Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsius committed Apr 26, 2020
1 parent 0159cb1 commit 2ece508
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 40 deletions.
22 changes: 13 additions & 9 deletions lisp/pdf-misc.el
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,17 @@
"Miscellaneous options for PDF documents."
:group 'pdf-tools)

(define-obsolete-variable-alias 'pdf-misc-print-programm
'pdf-misc-print-program "1.0")
(defcustom pdf-misc-print-programm nil
"The program used for printing.
It is called with one argument, the PDF file."
:group 'pdf-misc
:type 'file)

(define-obsolete-variable-alias 'pdf-misc-print-programm-args
'pdf-misc-print-program-args "1.0")
(defcustom pdf-misc-print-programm-args nil
"List of additional arguments passed to `pdf-misc-print-program'."
:group 'pdf-misc
Expand All @@ -254,28 +258,28 @@ It is called with one argument, the PDF file."
'executable-find
'("gtklp" "xpp" "gpr")))))
buffer-file-name
(programm
(program
(expand-file-name
(read-file-name
"Print with: " default nil t nil 'file-executable-p))))
(when (and programm
(executable-find programm))
(when (and program
(executable-find program))
(when (y-or-n-p "Save choice using customize ?")
(customize-save-variable
'pdf-misc-print-programm programm))
(setq pdf-misc-print-programm programm))))))
'pdf-misc-print-program program))
(setq pdf-misc-print-program program))))))

(defun pdf-misc-print-document (filename &optional interactive-p)
(interactive
(list (pdf-view-buffer-file-name) t))
(cl-check-type filename (and string file-readable))
(let ((programm (pdf-misc-print-programm interactive-p))
(let ((program (pdf-misc-print-program interactive-p))
(args (append pdf-misc-print-programm-args (list filename))))
(unless programm
(unless program
(error "No print program available"))
(apply #'start-process "printing" nil programm args)
(apply #'start-process "printing" nil program args)
(message "Print job started: %s %s"
programm (mapconcat #'identity args " "))))
program (mapconcat #'identity args " "))))


(provide 'pdf-misc)
Expand Down
4 changes: 2 additions & 2 deletions lisp/pdf-sync.el
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,8 @@ point to the correct position."
(need-suffix-space-p (memq char '(?\s ?\n)))
;; Figure out whether we missed a space by matching the
;; prefix's suffix with the line's prefix. Due to the text
;; extraction in poppler, spaces are only inserted
;; inbetween words. This test may fail, if prefix and line
;; extraction in poppler, spaces are only inserted in
;; between words. This test may fail, if prefix and line
;; do not overlap, which may happen in various cases, but
;; we don't care.
(need-prefix-space-p
Expand Down
2 changes: 1 addition & 1 deletion lisp/pdf-util.el
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ is non-nil."
(defun pdf-util-hexcolor (color)
"Return COLOR in hex-format.
Singal an error, if color is invalid."
Signal an error, if color is invalid."
(if (string-match "\\`#[[:xdigit:]]\\{6\\}\\'" color)
color
(let ((values (color-values color)))
Expand Down
48 changes: 24 additions & 24 deletions server/synctex_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,12 +648,12 @@ static synctex_open_s __synctex_open_v2(const char * output, synctex_io_mode_t i
quoteless_synctex_name = NULL;
}
}
/* The operation is successfull, return the arguments by value. */
/* The operation is successful, return the arguments by value. */
open.status = SYNCTEX_STATUS_OK;
return open;
}

/* Opens the ouput file, taking into account the eventual build_directory.
/* Opens the output file, taking into account the eventual build_directory.
* - returns: an open structure which status is
* SYNCTEX_STATUS_OK on success,
* SYNCTEX_STATUS_ERROR on failure.
Expand Down Expand Up @@ -1499,7 +1499,7 @@ DEFINE_SYNCTEX_DATA_INT_GETSET(depth_V)
* It contains V variants of geometrical information.
* It happens that hboxes contain material that is not used to compute
* the bounding box. Some letters may appear out of the box given by TeX.
* In such a situation, the visible bouding box is bigger ence the V variant.
* In such a situation, the visible bounding box is bigger ence the V variant.
* Only hboxes have such variant. It does not make sense for void boxes
* and it is not used here for vboxes.
* - author: JL
Expand Down Expand Up @@ -4125,7 +4125,7 @@ static synctex_is_s _synctex_decode_int_v(synctex_scanner_p scanner) {
* and before the next '\n' character.
* If a string was properly decoded, it is returned in value_ref and
* the cursor points to the new line marker.
* The returned string was alloced on the heap, the caller is the owner and
* The returned string was allocated on the heap, the caller is the owner and
* is responsible to free it in due time,
* unless it transfers the ownership to another object.
* If no string is parsed, * value_ref is undefined.
Expand Down Expand Up @@ -4666,7 +4666,7 @@ static synctex_status_t _synctex_make_hbox_contain_box(synctex_node_p node,synct
# endif


/* Here are the control characters that strat each line of the synctex output file.
/* Here are the control characters that start each line of the synctex output file.
* Their values define the meaning of the line.
*/
# define SYNCTEX_CHAR_BEGIN_SHEET '{'
Expand Down Expand Up @@ -5027,7 +5027,7 @@ SYNCTEX_INLINE static void _synctex_handle_set_tlc(synctex_node_p x_handle, sync
* When we have parsed a box, we must register
* all the contained heading boundary nodes
* that have not yet been registered.
* Those handles will be deleted when poping.
* Those handles will be deleted when popping.
*/
SYNCTEX_INLINE static void _synctex_handle_make_friend_tlc(synctex_node_p node) {
while (node) {
Expand Down Expand Up @@ -5165,7 +5165,7 @@ static synctex_status_t __synctex_parse_sfi(synctex_scanner_p scanner) {
/* At least 1 more character */
zs = _synctex_buffer_get_available_size(scanner,1);
if (zs.size == 0){
_synctex_error("Uncomplete synctex file, postamble missing.");
_synctex_error("Incomplete synctex file, postamble missing.");
SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR);
}
goto main_loop;
Expand All @@ -5182,13 +5182,13 @@ static synctex_status_t __synctex_parse_sfi(synctex_scanner_p scanner) {
--ignored_form_depth;
}
if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
_synctex_error("Uncomplete container.");
_synctex_error("Incomplete container.");
SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR);
}
} else {
zs = _synctex_buffer_get_available_size(scanner,1);
if (zs.size == 0){
_synctex_error("Uncomplete synctex file, postamble missing.");
_synctex_error("Incomplete synctex file, postamble missing.");
SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR);
}
}
Expand Down Expand Up @@ -5264,7 +5264,7 @@ static synctex_status_t __synctex_parse_sfi(synctex_scanner_p scanner) {
synctex_node_log(child);
# endif
if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
_synctex_error("Uncomplete container.");
_synctex_error("Incomplete container.");
SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR);
}
last_k = last_g = NULL;
Expand Down Expand Up @@ -5373,7 +5373,7 @@ static synctex_status_t __synctex_parse_sfi(synctex_scanner_p scanner) {
sibling = _synctex_tree_child(parent);
_synctex_data_set_point(sibling,_synctex_data_point_V(parent));
if (last_k && last_g && (child = synctex_node_child(parent))) {
/* Find the node preceeding last_k */
/* Find the node preceding last_k */
synctex_node_p next;
while ((next = __synctex_tree_sibling(child))) {
if (next == last_k) {
Expand All @@ -5397,7 +5397,7 @@ static synctex_status_t __synctex_parse_sfi(synctex_scanner_p scanner) {
# endif
}
if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
_synctex_error("Uncomplete container.");
_synctex_error("Incomplete container.");
SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR);
}
last_k = last_g = NULL;
Expand Down Expand Up @@ -5678,7 +5678,7 @@ _synctex_make_hbox_contain_box(parent,_synctex_data_box(child));
}
zs = _synctex_buffer_get_available_size(scanner,1);
if (zs.size == 0){
_synctex_error("Uncomplete synctex file, postamble missing.");
_synctex_error("Incomplete synctex file, postamble missing.");
SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR);
}
last_k = last_g = NULL;
Expand Down Expand Up @@ -5956,7 +5956,7 @@ static synctex_status_t _synctex_scan_content(synctex_scanner_p scanner) {
return status;
}
if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
_synctex_error("Uncomplete Content.");
_synctex_error("Incomplete Content.");
return SYNCTEX_STATUS_ERROR;
}
if (status == SYNCTEX_STATUS_NOT_OK) {
Expand Down Expand Up @@ -6063,7 +6063,7 @@ synctex_scanner_p synctex_scanner_parse(synctex_scanner_p scanner) {
scanner->pre_unit = 8192;
scanner->pre_x_offset = scanner->pre_y_offset = 578;
/* initialize the offset with a fake unprobable value,
* If there is a post scriptum section, this value will be overriden by the real life value */
* If there is a post scriptum section, this value will be overridden by the real life value */
scanner->x_offset = scanner->y_offset = 6.027e23f;
scanner->reader->line_number = 1;

Expand Down Expand Up @@ -7578,7 +7578,7 @@ synctex_node_p synctex_node_target(synctex_node_p node) {
# pragma mark Geometric utilities
# endif

/** Rougly speaking, this is:
/** Roughly speaking, this is:
* node's h coordinate - hit point's h coordinate.
* If node is to the right of the hit point, then this distance is positive,
* if node is to the left of the hit point, this distance is negative.
Expand Down Expand Up @@ -7613,7 +7613,7 @@ static synctex_nd_s _synctex_point_h_ordered_distance_v2
width = _synctex_data_width(node);
min = _synctex_data_h(node);
max = min + (width>0?width:-width);
/* We allways have min <= max */
/* We always have min <= max */
if (hit->h<min) {
nd.distance = min - hit->h; /* regions 1+4+7, result is > 0 */
} else if (hit->h>max) {
Expand All @@ -7627,7 +7627,7 @@ static synctex_nd_s _synctex_point_h_ordered_distance_v2
width = synctex_node_width(node);
min = synctex_node_h(node);
max = min + (width>0?width:-width);
/* We allways have min <= max */
/* We always have min <= max */
if (hit->h<min) {
nd.distance = min - hit->h; /* regions 1+4+7, result is > 0 */
} else if (hit->h>max) {
Expand All @@ -7642,7 +7642,7 @@ static synctex_nd_s _synctex_point_h_ordered_distance_v2
width = synctex_node_hbox_width(node);
min = synctex_node_hbox_h(node);
max = min + (width>0?width:-width);
/* We allways have min <= max */
/* We always have min <= max */
if (hit->h<min) {
nd.distance = min - hit->h; /* regions 1+4+7, result is > 0 */
} else if (hit->h>max) {
Expand Down Expand Up @@ -7722,7 +7722,7 @@ static synctex_nd_s _synctex_point_h_ordered_distance_v2
}
return nd;
}
/** Rougly speaking, this is:
/** Roughly speaking, this is:
* node's v coordinate - hit point's v coordinate.
* If node is at the top of the hit point, then this distance is positive,
* if node is at the bottom of the hit point, this distance is negative.
Expand Down Expand Up @@ -7754,7 +7754,7 @@ static synctex_nd_s _synctex_point_v_ordered_distance_v2
min = synctex_node_v(node);
max = min + _synctex_abs(_synctex_data_depth(node));
min -= _synctex_abs(_synctex_data_height(node));
/* We allways have min <= max */
/* We always have min <= max */
if (hit->v<min) {
nd.distance = min - hit->v; /* regions 1+2+3, result is > 0 */
} else if (hit->v>max) {
Expand All @@ -7768,7 +7768,7 @@ static synctex_nd_s _synctex_point_v_ordered_distance_v2
min = synctex_node_v(node);
max = min + _synctex_abs(synctex_node_depth(node));
min -= _synctex_abs(synctex_node_height(node));
/* We allways have min <= max */
/* We always have min <= max */
if (hit->v<min) {
nd.distance = min - hit->v; /* regions 1+2+3, result is > 0 */
} else if (hit->v>max) {
Expand All @@ -7785,7 +7785,7 @@ static synctex_nd_s _synctex_point_v_ordered_distance_v2
max = min + (depth>0?depth:-depth);
height = synctex_node_hbox_height(node);
min -= (height>0?height:-height);
/* We allways have min <= max */
/* We always have min <= max */
if (hit->v<min) {
nd.distance = min - hit->v; /* regions 1+2+3, result is > 0 */
} else if (hit->v>max) {
Expand All @@ -7801,7 +7801,7 @@ static synctex_nd_s _synctex_point_v_ordered_distance_v2
min = _synctex_data_v(node);
max = min + _synctex_abs(_synctex_data_depth(_synctex_tree_parent(node)));
min -= _synctex_abs(_synctex_data_height(_synctex_tree_parent(node)));
/* We allways have min <= max */
/* We always have min <= max */
if (hit->v<min) {
nd.distance = min - hit->v; /* regions 1+2+3, result is > 0 */
} else if (hit->v>max) {
Expand Down
2 changes: 1 addition & 1 deletion server/synctex_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ extern "C" {
* Use 0 only if you do not want to parse the
* content but just check for existence.
* Available since version 1.5
* - resturn: a scanner. NULL is returned in case
* - return: a scanner. NULL is returned in case
* of an error or non existent file.
*/
synctex_scanner_p synctex_scanner_new_with_output_file(const char * output, const char * build_directory, int parse);
Expand Down
6 changes: 3 additions & 3 deletions server/synctex_parser_advanced.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ extern "C" {

/**
* These are the masks for the synctex node types.
* int's are 32 bits at leats.
* int's are 32 bits at least.
*/
enum {
synctex_shift_root,
Expand Down Expand Up @@ -325,7 +325,7 @@ extern "C" {
* Proxies are used to support pdf forms.
* The ref primary nodes are replaced by a tree
* of proxy nodes which duplicate the tree of primary
* nodes available in the refered form.
* nodes available in the referred form.
* Roughly speaking, the primary nodes of the form
* know what to display, the proxy nodes know where.
* Handles are used in queries. They point to either
Expand Down Expand Up @@ -449,7 +449,7 @@ extern "C" {
*/
void synctex_iterator_free(synctex_iterator_p iterator);
/**
* Wether the iterator actually points to an object.
* Whether the iterator actually points to an object.
* - argument iterator: the object to iterate on...
*/
synctex_bool_t synctex_iterator_has_next(synctex_iterator_p iterator);
Expand Down

0 comments on commit 2ece508

Please sign in to comment.