18
18
#ifdef WITH_SYNCTEX
19
19
// Create scanner from given PDF file name.
20
20
// Returns zathura->synctex.scanner. (May be NULL on error.)
21
- synctex_scanner_p synctex_make_scanner (zathura_t * zathura , const char * pdf_filename ) {
21
+ synctex_scanner_p synctex_make_scanner (zathura_t * zathura , const char * pdf_filename ) {
22
22
if (zathura -> synctex .scanner ) {
23
23
return zathura -> synctex .scanner ;
24
24
}
@@ -40,8 +40,8 @@ synctex_scanner_p synctex_make_scanner(zathura_t *zathura, const char* pdf_filen
40
40
return scanner ;
41
41
}
42
42
43
- bool synctex_get_input_line_column (zathura_t * zathura , const char * filename , unsigned int page , int x , int y , char * * input_file ,
44
- unsigned int * line , unsigned int * column ) {
43
+ bool synctex_get_input_line_column (zathura_t * zathura , const char * filename , unsigned int page , int x , int y ,
44
+ char * * input_file , unsigned int * line , unsigned int * column ) {
45
45
if (filename == NULL ) {
46
46
return false;
47
47
}
@@ -52,7 +52,6 @@ bool synctex_get_input_line_column(zathura_t* zathura, const char* filename, uns
52
52
}
53
53
54
54
bool ret = false;
55
-
56
55
if (synctex_edit_query (scanner , page + 1u , x , y ) > 0 ) {
57
56
/* Assume that a backward search returns at most one result. */
58
57
synctex_node_p node = synctex_scanner_next_result (scanner );
@@ -93,8 +92,8 @@ void synctex_edit(zathura_t* zathura, const char* editor, zathura_page_t* page,
93
92
unsigned int column = 0 ;
94
93
char * input_file = NULL ;
95
94
96
- if (synctex_get_input_line_column (zathura , filename , zathura_page_get_index (page ), x , y , & input_file , & line , & column ) ==
97
- true &&
95
+ if (synctex_get_input_line_column (zathura , filename , zathura_page_get_index (page ), x , y , & input_file , & line ,
96
+ & column ) == true &&
98
97
input_file != NULL ) {
99
98
char * linestr = g_strdup_printf ("%d" , line );
100
99
char * columnstr = g_strdup_printf ("%d" , column );
@@ -138,8 +137,9 @@ void synctex_edit(zathura_t* zathura, const char* editor, zathura_page_t* page,
138
137
}
139
138
}
140
139
141
- girara_list_t * synctex_rectangles_from_position (zathura_t * zathura , const char * filename , const char * input_file , int line , int column ,
142
- unsigned int * page , girara_list_t * * secondary_rects ) {
140
+ girara_list_t * synctex_rectangles_from_position (zathura_t * zathura , const char * filename , const char * input_file ,
141
+ int line , int column , unsigned int * page ,
142
+ girara_list_t * * secondary_rects ) {
143
143
if (filename == NULL || input_file == NULL || page == NULL ) {
144
144
return NULL ;
145
145
}
@@ -207,17 +207,18 @@ girara_list_t* synctex_rectangles_from_position(zathura_t* zathura, const char*
207
207
return hitlist_flat ;
208
208
}
209
209
#else
210
- bool synctex_get_input_line_column (zathura_t * UNUSED (zathura ), const char * UNUSED (filename ), unsigned int UNUSED (page ), int UNUSED ( x ),
211
- int UNUSED (y ), char * * UNUSED (input_file ), unsigned int * UNUSED (line ),
210
+ bool synctex_get_input_line_column (zathura_t * UNUSED (zathura ), const char * UNUSED (filename ), unsigned int UNUSED (page ),
211
+ int UNUSED (x ), int UNUSED ( y ), char * * UNUSED (input_file ), unsigned int * UNUSED (line ),
212
212
unsigned int * UNUSED (column )) {
213
213
return false;
214
214
}
215
215
216
- void synctex_edit (zathura_t * UNUSED (zathura ), const char * UNUSED (editor ), zathura_page_t * UNUSED (page ), int UNUSED (x ), int UNUSED (y )) {}
216
+ void synctex_edit (zathura_t * UNUSED (zathura ), const char * UNUSED (editor ), zathura_page_t * UNUSED (page ), int UNUSED (x ),
217
+ int UNUSED (y )) {}
217
218
218
- girara_list_t * synctex_rectangles_from_position (zathura_t * UNUSED (zathura ), const char * UNUSED (filename ), const char * UNUSED ( input_file ),
219
- int UNUSED (line ), int UNUSED (column ), unsigned int * UNUSED (page ),
220
- girara_list_t * * UNUSED (secondary_rects )) {
219
+ girara_list_t * synctex_rectangles_from_position (zathura_t * UNUSED (zathura ), const char * UNUSED (filename ),
220
+ const char * UNUSED (input_file ), int UNUSED (line ), int UNUSED (column ),
221
+ unsigned int * UNUSED ( page ), girara_list_t * * UNUSED (secondary_rects )) {
221
222
return NULL ;
222
223
}
223
224
#endif
@@ -338,8 +339,8 @@ bool synctex_view(zathura_t* zathura, const char* input_file, unsigned int line,
338
339
339
340
unsigned int page = 0 ;
340
341
girara_list_t * secondary_rects = NULL ;
341
- girara_list_t * rectangles = synctex_rectangles_from_position (zathura , zathura_document_get_path (zathura -> document ), input_file ,
342
- line , column , & page , & secondary_rects );
342
+ girara_list_t * rectangles = synctex_rectangles_from_position (zathura , zathura_document_get_path (zathura -> document ),
343
+ input_file , line , column , & page , & secondary_rects );
343
344
344
345
if (rectangles == NULL ) {
345
346
return false;
0 commit comments