OSDN Git Service

fixed prints.
authormaqiyuan <maqiyuan@users.sourceforge.jp>
Fri, 11 Jul 2014 12:31:24 +0000 (20:31 +0800)
committermaqiyuan <maqiyuan@users.sourceforge.jp>
Fri, 11 Jul 2014 12:31:24 +0000 (20:31 +0800)
src/texsourc/itex.c
src/texsourc/local.c
src/texsourc/tex0.c
src/texsourc/tex4.c
src/texsourc/tex9.c
src/texsourc/texmf.h
src/texsourc/yandy_inlines.c
src/texsourc/yandytex.c

index a3d76d7..5e863d8 100644 (file)
@@ -34,8 +34,8 @@ extern clock_t start_time, main_time, finish_time;
 void initialize (void)
 {
   integer i; 
-  integer k; 
-  integer flag; /* bkph */
+  integer k;
+  integer flag;
 
 #ifndef ALLOCATEHYPHEN
   hyph_pointer z;
index ae90a57..becba21 100644 (file)
@@ -398,7 +398,7 @@ int read_xchr_file (char *filename, int flag, char *argv[])
     }
   }
 
-  if (xchr_input == NULL)   /* 97/July/31 */
+  if (xchr_input == NULL)
   {
     strcpy (infile, argv[0]);     /* try TeX program path */
 
@@ -443,11 +443,11 @@ int read_xchr_file (char *filename, int flag, char *argv[])
   }
 
   if (flag == 0)
-    read_xchr_sub (xchr_input);
+    read_xchr_sub(xchr_input);
   else
-    read_repl_sub (xchr_input);
+    read_repl_sub(xchr_input);
 
-  (void) fclose (xchr_input);
+  (void) fclose(xchr_input);
 
   return 1;
 }
@@ -539,7 +539,7 @@ void *ourrealloc (void *old, size_t new_size)
 }
 #endif
 
-void memory_error (char *s, int n)
+void memory_error (const char * s, int n)
 {
   if (log_opened)
   {
@@ -551,7 +551,7 @@ void memory_error (char *s, int n)
   show_maximums(stderr);
 }
 
-void trace_memory (char *s, int n)
+void trace_memory (const char * s, int n)
 {
   printf("Allocating %d bytes for %s\n", n, s);
 }
@@ -716,7 +716,7 @@ int current_mem_size = 0;   /* current total words in main mem allocated -1 */
 
 #ifdef ALLOCATEMAIN   
 /* initial main memory alloc - mem_top */
-memory_word *allocate_main_memory (int size)
+memory_word * allocate_main_memory (int size)
 {
   int n;
 
@@ -1820,7 +1820,8 @@ int free_memory (void)
   if (source_direct != NULL)
     free(source_direct);
 
-  format_file = source_direct = NULL;
+  format_file = NULL;
+  source_direct = NULL;
 
   if (dvi_file_name != NULL)
     free(dvi_file_name);
@@ -1831,7 +1832,9 @@ int free_memory (void)
   if (pdf_file_name != NULL)
     free(pdf_file_name);
 
-  pdf_file_name = log_file_name = dvi_file_name = NULL;
+  pdf_file_name = NULL;
+  log_file_name = NULL;
+  dvi_file_name = NULL;
 
   return 0;
 }
index 8c3af1e..2c36686 100644 (file)
@@ -77,7 +77,7 @@ void print_char_ (ASCII_code s)
       
       if (file_offset == max_print_line)
       {
-        putc ('\n', log_file);
+        putc('\n', log_file);
         file_offset = 0;
       }
 
@@ -114,7 +114,7 @@ void print_char_ (ASCII_code s)
     case new_string:
 #ifdef ALLOCATESTRING
       if (pool_ptr + 1 > current_pool_size)
-        str_pool = realloc_str_pool (increment_pool_size);
+        str_pool = realloc_str_pool(increment_pool_size);
       
       if (pool_ptr < current_pool_size)
         append_char(s);
@@ -216,7 +216,7 @@ void print_ (integer s)
 /* string version print. */
 void prints_ (const char *s)
 {
-  while (*s > 0)
+  while (*s)
     print_char(*s++);
 }
 /* sec 0060 */
@@ -2216,7 +2216,7 @@ void show_node_list_(integer p)
 
   n = 0; 
 
-  while (p != 0)     /* want p != null - bkph 93/Dec/15 NOTE: still not fixed in 3.14159 ! */
+  while (p != 0)
   {
     print_ln(); 
     print_current_string(); 
index fadf100..1c4420b 100644 (file)
@@ -37,7 +37,7 @@ void char_warning_(internal_font_number f, eight_bits c)
 
     print(c);
 
-    if (show_numeric) /* bkph 93/Dec/21 */
+    if (show_numeric)
     {
       print_char(' ');
       print_char('(');
@@ -72,7 +72,7 @@ void char_warning_(internal_font_number f, eight_bits c)
     if (show_missing == 0)
       end_diagnostic(false);
 
-    missing_characters++;           /* bkph 93/Dec/16 */
+    missing_characters++;
   }
 }
 /* sec 0582 */
index 09c5597..12f3566 100644 (file)
@@ -348,10 +348,7 @@ void close_files_and_terminate (void)
           }
 
           if (trace_flag)
-          {
-            sprintf(log_line, "\ndviwrite %lld", dvi_gone);
-            show_line(log_line, 0);
-          }
+            printf("\ndvi_write %lld", dvi_gone);
 
           if (dvi_limit == half_buf)
             write_dvi(half_buf, dvi_buf_size - 1);
index 152d7c0..484b0a1 100644 (file)
@@ -89,6 +89,4 @@ extern int do_undump (char * p, int item_size, int nitems, FILE * out_file);
     }                       \
   while (0)
 
-#define undump_int  generic_undump
-
-extern void t_open_in();
\ No newline at end of file
+#define undump_int  generic_undump
\ No newline at end of file
index 5a95ff9..98e3344 100644 (file)
@@ -21,8 +21,7 @@
 
 void do_nothing(void)
 {
-  if (trace_flag)
-    printf("DO_NOTHING.\n");
+  /* todo */
 }
 
 void update_terminal(void)
index 53a9fef..0575e87 100644 (file)
@@ -193,7 +193,7 @@ void fix_date_and_time (void)
 }
 
 /* I/O for TeX and Metafont.  */
-void complain_line (FILE *output)
+void complain_line (FILE * output)
 {
   show_line("\n", 0);
 
@@ -327,7 +327,7 @@ boolean input_line_finish (void)
    length(line except trailing whitespace).  */
 /* texmfmp.c */
 
-boolean input_line (FILE *f)
+boolean input_line (FILE * f)
 {
 //  int ch, flag;         /* for restrict_to_ascii case 94/Jan/21 */
   char *u;            /* 1994/July/3 for key_replace */
@@ -644,7 +644,7 @@ void call_edit (ASCII_code *stringpool, pool_pointer fnstart, integer fnlength,
   //flushall();
   fflush(NULL);
 
-  if (system (command) != 0)
+  if (system(command) != 0)
   {
     show_line("\n", 0);
     sprintf(log_line, "! Error in call: %s\n", command);
@@ -668,7 +668,6 @@ void call_edit (ASCII_code *stringpool, pool_pointer fnstart, integer fnlength,
 #if !defined (WORDS_BIGENDIAN) && !defined (NO_FMTBASE_SWAP)
 
 /* We don't REALLY care what `endian' the machine is after all ! */
-/* But we do care about speed - so check exe file for following - bkph */
 
 // #ifdef MYDEBUG
 // char swapmarkerstring="ERROR: SWAPPING - NOT BigEndian AND NOT NoFmtBaseSwap";