void initialize (void)
{
integer i;
- integer k;
- integer flag; /* bkph */
+ integer k;
+ integer flag;
#ifndef ALLOCATEHYPHEN
hyph_pointer z;
}
}
- if (xchr_input == NULL) /* 97/July/31 */
+ if (xchr_input == NULL)
{
strcpy (infile, argv[0]); /* try TeX program path */
}
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;
}
}
#endif
-void memory_error (char *s, int n)
+void memory_error (const char * s, int n)
{
if (log_opened)
{
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);
}
#ifdef ALLOCATEMAIN
/* initial main memory alloc - mem_top */
-memory_word *allocate_main_memory (int size)
+memory_word * allocate_main_memory (int size)
{
int n;
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);
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;
}
if (file_offset == max_print_line)
{
- putc ('\n', log_file);
+ putc('\n', log_file);
file_offset = 0;
}
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);
/* string version print. */
void prints_ (const char *s)
{
- while (*s > 0)
+ while (*s)
print_char(*s++);
}
/* sec 0060 */
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();
print(c);
- if (show_numeric) /* bkph 93/Dec/21 */
+ if (show_numeric)
{
print_char(' ');
print_char('(');
if (show_missing == 0)
end_diagnostic(false);
- missing_characters++; /* bkph 93/Dec/16 */
+ missing_characters++;
}
}
/* sec 0582 */
}
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);
} \
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
void do_nothing(void)
{
- if (trace_flag)
- printf("DO_NOTHING.\n");
+ /* todo */
}
void update_terminal(void)
}
/* I/O for TeX and Metafont. */
-void complain_line (FILE *output)
+void complain_line (FILE * output)
{
show_line("\n", 0);
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 */
//flushall();
fflush(NULL);
- if (system (command) != 0)
+ if (system(command) != 0)
{
show_line("\n", 0);
sprintf(log_line, "! Error in call: %s\n", command);
#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";