11use crate :: {
2- c_api:: {
3- bibs:: get_bib_command_or_entry_and_process,
4- buffer:: { BufTy , GlobalBuffer } ,
5- char_info:: LexClass ,
6- cite:: find_cite_locs_for_this_cite_key,
7- exec:: { check_command_execution, execute_fn, ExecCtx } ,
8- hash:: { FnClass , HashData } ,
9- history:: mark_warning,
10- log:: {
11- already_seen_function_print, bst_err_print_and_look_for_blank_line, bst_id_print,
12- bst_left_brace_print, bst_right_brace_print, bst_warn_print,
13- cite_key_disappeared_confusion, eat_bst_print, hash_cite_confusion, log_pr_bib_name,
14- print_a_token, print_confusion, print_missing_entry, rs_bad_cross_reference_print,
15- rs_nonexistent_cross_reference_error, print_bib_name, rs_print_fn_class,
16- write_log_file, write_logs,
17- } ,
18- peekable:: { peekable_close, tectonic_eof} ,
19- pool:: StringPool ,
20- scan:: { eat_bst_white_space, scan_fn_def, scan_identifier, Scan , ScanRes } ,
21- Bibtex , CiteNumber , GlobalItems , HashPointer , StrIlk ,
2+ bibs:: get_bib_command_or_entry_and_process,
3+ buffer:: { BufTy , GlobalBuffer } ,
4+ char_info:: LexClass ,
5+ cite:: find_cite_locs_for_this_cite_key,
6+ exec:: { check_command_execution, execute_fn, ExecCtx } ,
7+ hash:: { FnClass , HashData } ,
8+ history:: mark_warning,
9+ log:: {
10+ already_seen_function_print, bst_err_print_and_look_for_blank_line, bst_id_print,
11+ bst_left_brace_print, bst_right_brace_print, bst_warn_print,
12+ cite_key_disappeared_confusion, eat_bst_print, hash_cite_confusion, log_pr_bib_name,
13+ print_a_token, print_bib_name, print_confusion, print_missing_entry,
14+ rs_bad_cross_reference_print, rs_nonexistent_cross_reference_error, rs_print_fn_class,
15+ write_log_file, write_logs,
2216 } ,
23- BibtexError ,
17+ peekable:: { peekable_close, tectonic_eof} ,
18+ pool:: StringPool ,
19+ scan:: { eat_bst_white_space, scan_fn_def, scan_identifier, Scan , ScanRes } ,
20+ Bibtex , BibtexError , CiteNumber , GlobalItems , HashPointer , StrIlk ,
2421} ;
2522use std:: ptr:: NonNull ;
2623
@@ -85,7 +82,10 @@ macro_rules! bst_ident {
8582 } ;
8683}
8784
88- fn bst_entry_command ( ctx : & mut ExecCtx , globals : & mut GlobalItems < ' _ > ) -> Result < ( ) , BibtexError > {
85+ fn bst_entry_command (
86+ ctx : & mut ExecCtx < ' _ , ' _ , ' _ > ,
87+ globals : & mut GlobalItems < ' _ > ,
88+ ) -> Result < ( ) , BibtexError > {
8989 if ctx. glbl_ctx ( ) . entry_seen {
9090 write_logs ( "Illegal, another entry command" ) ;
9191 bst_err_print_and_look_for_blank_line ( ctx. glbl_ctx_mut ( ) , globals. buffers , globals. pool ) ?;
@@ -226,7 +226,7 @@ fn bst_entry_command(ctx: &mut ExecCtx, globals: &mut GlobalItems<'_>) -> Result
226226}
227227
228228fn bst_execute_command (
229- ctx : & mut ExecCtx ,
229+ ctx : & mut ExecCtx < ' _ , ' _ , ' _ > ,
230230 globals : & mut GlobalItems < ' _ > ,
231231) -> Result < ( ) , BibtexError > {
232232 if !ctx. glbl_ctx ( ) . read_seen {
@@ -272,7 +272,7 @@ fn bst_execute_command(
272272}
273273
274274fn bst_function_command (
275- ctx : & mut ExecCtx ,
275+ ctx : & mut ExecCtx < ' _ , ' _ , ' _ > ,
276276 globals : & mut GlobalItems < ' _ > ,
277277) -> Result < ( ) , BibtexError > {
278278 eat_bst_white ! ( ctx, globals, "function" ) ;
@@ -329,7 +329,7 @@ fn bst_function_command(
329329}
330330
331331fn bst_integers_command (
332- ctx : & mut ExecCtx ,
332+ ctx : & mut ExecCtx < ' _ , ' _ , ' _ > ,
333333 globals : & mut GlobalItems < ' _ > ,
334334) -> Result < ( ) , BibtexError > {
335335 eat_bst_white ! ( ctx, globals, "integers" ) ;
@@ -373,7 +373,7 @@ fn bst_integers_command(
373373}
374374
375375fn bst_iterate_command (
376- ctx : & mut ExecCtx ,
376+ ctx : & mut ExecCtx < ' _ , ' _ , ' _ > ,
377377 globals : & mut GlobalItems < ' _ > ,
378378) -> Result < ( ) , BibtexError > {
379379 if !ctx. glbl_ctx ( ) . read_seen {
@@ -422,7 +422,10 @@ fn bst_iterate_command(
422422 Ok ( ( ) )
423423}
424424
425- fn bst_macro_command ( ctx : & mut ExecCtx , globals : & mut GlobalItems < ' _ > ) -> Result < ( ) , BibtexError > {
425+ fn bst_macro_command (
426+ ctx : & mut ExecCtx < ' _ , ' _ , ' _ > ,
427+ globals : & mut GlobalItems < ' _ > ,
428+ ) -> Result < ( ) , BibtexError > {
426429 if ctx. glbl_ctx ( ) . read_seen {
427430 write_logs ( "Illegal, macro command after read command" ) ;
428431 bst_err_print_and_look_for_blank_line ( ctx. glbl_ctx_mut ( ) , globals. buffers , globals. pool ) ?;
@@ -502,7 +505,10 @@ fn bst_macro_command(ctx: &mut ExecCtx, globals: &mut GlobalItems<'_>) -> Result
502505 Ok ( ( ) )
503506}
504507
505- fn bst_read_command ( ctx : & mut ExecCtx , globals : & mut GlobalItems < ' _ > ) -> Result < ( ) , BibtexError > {
508+ fn bst_read_command (
509+ ctx : & mut ExecCtx < ' _ , ' _ , ' _ > ,
510+ globals : & mut GlobalItems < ' _ > ,
511+ ) -> Result < ( ) , BibtexError > {
506512 if ctx. glbl_ctx ( ) . read_seen {
507513 write_logs ( "Illegal, another read command" ) ;
508514 bst_err_print_and_look_for_blank_line ( ctx. glbl_ctx_mut ( ) , globals. buffers , globals. pool ) ?;
@@ -579,7 +585,12 @@ fn bst_read_command(ctx: &mut ExecCtx, globals: &mut GlobalItems<'_>) -> Result<
579585 ) ?;
580586 }
581587 // SAFETY: take_cur_bib_file returns reference to which we're the last owner
582- unsafe { peekable_close ( ctx. glbl_ctx_mut ( ) , globals. bibs . take_cur_bib_file ( ) . map ( NonNull :: from) ) } ;
588+ unsafe {
589+ peekable_close (
590+ ctx. glbl_ctx_mut ( ) ,
591+ globals. bibs . take_cur_bib_file ( ) . map ( NonNull :: from) ,
592+ )
593+ } ;
583594 globals. bibs . set_ptr ( globals. bibs . ptr ( ) + 1 ) ;
584595 }
585596
@@ -783,7 +794,7 @@ fn bst_read_command(ctx: &mut ExecCtx, globals: &mut GlobalItems<'_>) -> Result<
783794}
784795
785796fn bst_reverse_command (
786- ctx : & mut ExecCtx ,
797+ ctx : & mut ExecCtx < ' _ , ' _ , ' _ > ,
787798 globals : & mut GlobalItems < ' _ > ,
788799) -> Result < ( ) , BibtexError > {
789800 if !ctx. glbl_ctx ( ) . read_seen {
@@ -831,7 +842,10 @@ fn bst_reverse_command(
831842 Ok ( ( ) )
832843}
833844
834- fn bst_sort_command ( ctx : & mut ExecCtx , globals : & mut GlobalItems < ' _ > ) -> Result < ( ) , BibtexError > {
845+ fn bst_sort_command (
846+ ctx : & mut ExecCtx < ' _ , ' _ , ' _ > ,
847+ globals : & mut GlobalItems < ' _ > ,
848+ ) -> Result < ( ) , BibtexError > {
835849 if !ctx. glbl_ctx ( ) . read_seen {
836850 write_logs ( "Illegal, sort command before read command" ) ;
837851 bst_err_print_and_look_for_blank_line ( ctx. glbl_ctx_mut ( ) , globals. buffers , globals. pool ) ?;
@@ -848,7 +862,7 @@ fn bst_sort_command(ctx: &mut ExecCtx, globals: &mut GlobalItems<'_>) -> Result<
848862}
849863
850864fn bst_strings_command (
851- ctx : & mut ExecCtx ,
865+ ctx : & mut ExecCtx < ' _ , ' _ , ' _ > ,
852866 globals : & mut GlobalItems < ' _ > ,
853867) -> Result < ( ) , BibtexError > {
854868 eat_bst_white ! ( ctx, globals, "strings" ) ;
@@ -904,7 +918,7 @@ fn bst_strings_command(
904918}
905919
906920fn bad_argument_token (
907- ctx : & mut Bibtex ,
921+ ctx : & mut Bibtex < ' _ , ' _ > ,
908922 fn_out : Option < & mut HashPointer > ,
909923 buffers : & mut GlobalBuffer ,
910924 pool : & StringPool ,
@@ -937,7 +951,7 @@ fn bad_argument_token(
937951}
938952
939953pub ( crate ) fn get_bst_command_and_process (
940- ctx : & mut ExecCtx ,
954+ ctx : & mut ExecCtx < ' _ , ' _ , ' _ > ,
941955 globals : & mut GlobalItems < ' _ > ,
942956) -> Result < ( ) , BibtexError > {
943957 let init = globals. buffers . init ( BufTy :: Base ) ;
0 commit comments