}
}
if (pinput == NULL) {
-/* strcpy (infile, gargv[0]); */ /* try TeX program path */
- strcpy (infile, argv[0]); /* try TeX program path */
+/* strcpy (infile, gargv[0]); *//* try TeX program path */
+ strcpy (infile, argv[0]); /* try TeX program path */
if ((s = strrchr (infile, '\\')) != NULL) *(s+1) = '\0';
else if ((s = strrchr (infile, '/')) != NULL) *(s+1) = '\0';
else if ((s = strrchr (infile, ':')) != NULL) *(s+1) = '\0';
}
}
if (pinput == NULL) { /* 97/July/31 */
-/* strcpy (infile, gargv[0]); */ /* try TeX program path\keyboard */
- strcpy (infile, argv[0]); /* try TeX program path */
+/* strcpy (infile, gargv[0]); *//* try TeX program path\keyboard */
+ strcpy (infile, argv[0]); /* try TeX program path */
if ((s = strrchr (infile, '\\')) != NULL) *(s+1) = '\0';
else if ((s = strrchr (infile, '/')) != NULL) *(s+1) = '\0';
else if ((s = strrchr (infile, ':')) != NULL) *(s+1) = '\0';
/* Following may be useful if link without floating point emulation */
#ifdef DEBUG
-void testfloating (void) {
+void testfloating (void)
+{
/* double x = 1.0; */
/* double dx = DBL_EPSILON; */
double dx = 1.0;
#ifdef SHOWHEAPERROR
char *heapstrings[] = {
- "", "Empty", "OK", "Bad Begin", "Bad Node", "End", "Bad Pointer"
+ "",
+ "Empty",
+ "OK",
+ "Bad Begin",
+ "Bad Node",
+ "End",
+ "Bad Pointer"
};
#endif
/* Attempt to get at problem with eqtb ... temporarily abandoned */
#ifdef CHECKEQTB
-void check_eqtb (char *act) {
+void check_eqtb (char *act)
+{
int k, count=0;
memory_word *eqtb = zeqtb;
/* for (k = 10280 + hash_extra; k < 10280 + eqtb_extra; k++) { */
}
sprintf(log_line, "%d ", k);
show_line(log_line, 0);
- if (count++ > 256) break;
+ if (count++ > 256)
+ break;
}
}
if (count != 0) show_char('\n');
update_statistics ((int) save_stack, n, current_save_size);
current_save_size = newsize;
if (trace_flag) {
- sprintf(log_line, "Current%s %d\n", "save_size", current_save_size);
+ sprintf(log_line, " Current %s %d\n", "save_size", current_save_size);
show_line(log_line, 0);
- sprintf(log_line, "New Address %s == %d\n", "save stack", save_stack);
+ sprintf(log_line, " New Address %s == %d\n", "save stack", save_stack);
show_line(log_line, 0);
}
if (trace_flag) probe_show(); /* 94/Mar/25 */
update_statistics ((int) input_stack, n, current_stack_size);
current_stack_size = newsize;
if (trace_flag) {
- sprintf(log_line, "Current%s %d\n", "stack_size", current_stack_size);
+ sprintf(log_line, " Current %s %d\n", "stack_size", current_stack_size);
show_line(log_line, 0);
- sprintf(log_line, "New Address %s == %d\n", "input stack", input_stack);
+ sprintf(log_line, " New Address %s == %d\n", "input stack", input_stack);
show_line(log_line, 0);
}
if (trace_flag) probe_show(); /* 94/Mar/25 */
update_statistics ((int) nest, n, current_nest_size);
current_nest_size = newsize;
if (trace_flag) {
- sprintf(log_line, "Current%s %d\n", "nest_size", current_nest_size);
+ sprintf(log_line, " Current %s %d\n", "nest_size", current_nest_size);
show_line(log_line, 0);
- sprintf(log_line, "New Address %s == %d\n", "nest stack", nest);
+ sprintf(log_line, " New Address %s == %d\n", "nest stack", nest);
show_line(log_line, 0);
}
if (trace_flag) probe_show(); /* 94/Mar/25 */
update_statistics ((int) param_stack, n, current_param_size);
current_param_size = newsize;
if (trace_flag) {
- sprintf(log_line, "Current%s %d\n", "param_size", current_param_size);
+ sprintf(log_line, " Current %s %d\n", "param_size", current_param_size);
show_line(log_line, 0);
- sprintf(log_line, "New Address %s == %d\n", "param stack", param_stack);
+ sprintf(log_line, " New Address %s == %d\n", "param stack", param_stack);
show_line(log_line, 0);
}
if (trace_flag) probe_show(); /* 94/Mar/25 */
#endif
current_buf_size = newsize;
if (trace_flag) {
- sprintf(log_line, "Current%s %d\n", "buffer", current_buf_size);
+ sprintf(log_line, " Current %s %d\n", "buffer", current_buf_size);
show_line(log_line, 0);
- sprintf(log_line, "New Address %s == %d\n", "buffer", buffer);
+ sprintf(log_line, " New Address %s == %d\n", "buffer", buffer);
show_line(log_line, 0);
}
if (trace_flag) probe_show(); /* 94/Mar/25 */
/* we used to allocate this one only to reduce the size of the PE file */
/* it can be done without loss in performance, since register eqtb = zeqtb */
#ifdef ALLOCATEZEQTB
-memory_word *allocatezeqtb (int k)
+memory_word *allocate_zeqtb (int k)
{
memory_word *zeqtb;
int n;
n = k * sizeof (memory_word); /* 13507 * 8 = 108 kilobytes */
- if (trace_flag) trace_memory("eqtb", n);
- zeqtb = (memory_word *) malloc (roundup(n));
+ if (trace_flag)
+ trace_memory("eqtb", n);
+ zeqtb = (memory_word *) malloc(roundup(n));
if (zeqtb == NULL) {
- memory_error("eqtb", n);
-// exit (1); /* serious error */
+ memory_error("eqtb", n);
return NULL;
}
if (trace_flag) {
show_line(log_line, 0);
}
update_statistics ((int) zeqtb, n, 0);
- if (trace_flag) probe_show(); /* 94/Mar/25 */
+ if (trace_flag)
+ probe_show(); /* 94/Mar/25 */
return zeqtb;
}
#endif
#ifdef ALLOCATEZEQTB
/* zeqtb = NULL; */
#ifdef INCREASEFONTS
-/* zeqtb = allocatezeqtb (13507 + eqtb_extra); */ /* 94/Mar/29 */
- zeqtb = allocatezeqtb (hash_size + 4007 + eqtb_extra); /* 94/Mar/29 */
+/* zeqtb = allocate_zeqtb (13507 + eqtb_extra); */ /* 94/Mar/29 */
+ zeqtb = allocate_zeqtb (hash_size + 4007 + eqtb_extra); /* 94/Mar/29 */
#else
-/* zeqtb = allocatezeqtb (13507); */
- zeqtb = allocatezeqtb (hash_size + 4007);
+/* zeqtb = allocate_zeqtb (13507); */
+ zeqtb = allocate_zeqtb (hash_size + 4007);
#endif
#endif
if (zdvibuf != NULL) free(zdvibuf);
zdvibuf = NULL;
#endif
-#ifdef ALLOCATEZEQTB
+#ifdef ALLLOCATEZEQTB
if (zeqtb != NULL) free(zeqtb);
zeqtb = NULL;
#endif
char initbuffer[PATH_MAX];
int k;
- debugfile = getenv("TEXDEBUG"); /* 94/March/28 */
+ debugfile = getenv("TEXDEBUG"); /* 94/March/28 */
if (debugfile)
debug_flag = 1;
else
show_line(log_line, 1);
}
- start_time = clock(); /* get time */
- main_time = start_time; /* fill in, in case file never opened */
+ start_time = clock(); /* get time */
+ main_time = start_time; /* fill in, in case file never opened */
- initbuffer[0] = '\0'; /* paranoia 94/Apr/10 */
+ initbuffer[0] = '\0'; /* paranoia 94/Apr/10 */
/* reset all allocatable memory pointers to NULL - in case we drop out */
mainmemory = NULL;
- font_info = NULL;
- str_pool = NULL;
- str_start = NULL;
+ font_info = NULL;
+ str_pool = NULL;
+ str_start = NULL;
#ifdef ALLOCATEZEQTB
zeqtb = NULL;
#endif
buffer = realloc_buffer (initial_buf_size);
/* sprintf(log_line, "buffer %x, current_buf_size %d\n", buffer, current_buf_size); */
#endif
- hyph_list = NULL; hyph_word = NULL;
- trie_taken = NULL; trie_hash = NULL;
+ hyph_list = NULL;
+ hyph_word = NULL;
+ trie_taken = NULL;
+ trie_hash = NULL;
trie_r = NULL;
trie_c = NULL;
trie_o = NULL;
/* if (*av[1] == '-Y') reorder_arg_flag = false; */ /* 94/April/14 */
if (ac > 1 && *av[1] == '-Y') reorder_arg_flag = false;
- if (reorder_arg_flag) reorderargs(ac, av);
+ if (reorder_arg_flag)
+ reorderargs(ac, av);
if (init_commands(ac, av))
return -1; // failure
closed_already=0; // so can only do once
- if (trace_flag) show_line("Entering init (local)\n", 0);
+ if (trace_flag)
+ show_line("Entering init (local)\n", 0);
/* Print version *after* banner ? */ /* does this get in log file ? */
probe_memory(); /* show top address */
ini_max_address = max_address; /* initial max address */
- if (trace_flag) show_maximums(stdout);
+ if (trace_flag)
+ show_maximums(stdout);
#ifdef HEAPWALK
- if (heap_flag) (void) heap_dump(stdout, 1);
+ if (heap_flag)
+ (void) heap_dump(stdout, 1);
#endif
initial_memory();
/* openinout.c: open input and output files. These routines used by
TeX, Metafont, and BibTeX. */
-/* #include <sys\stat.h> */ /* debugging 94/Mar/2 */
-/* #include <sys\types.h> */ /* debugging 94/Mar/2 */
-/* #include <conio.h> */ /* for getch */
-
-// #include "config.h"
-// #include "c-namemx.h"
-// #include "c-pathch.h"
-
#define BUILDNAMEDIRECT /* avoid malloc for string concat */
bool test_read_access (unsigned char *, int); /* in ourpaths.c - bkph */
#ifdef MSDOS
/* separated out 1996/Jan/20 to make easier to read */
/* assumes path does not end in PATH_SEP */
-void patch_in_path (unsigned char *buffer, unsigned char *name, unsigned char *path)
+void patch_in_path (unsigned char * buffer, unsigned char * name, unsigned char * path)
{
#ifdef BUILDNAMEDIRECT
- if (*path == '\0') strcpy((char *)buffer, (char *)name);
- else xconcat3((char *)buffer, (char *)path, PATH_SEP_STRING, (char *)name);
+ if (*path == '\0')
+ strcpy((char *) buffer, (char *) name);
+ else
+ xconcat3((char *) buffer, (char *) path, PATH_SEP_STRING, (char *) name);
#else
string temp_name;
temp_name = concat3 (path, PATH_SEP_STRING, name);
}
int qualified (unsigned char *name)
{
- if (strchr((char *)name, PATH_SEP) != NULL ||
- strchr((char *)name, '\\') != NULL ||
- strchr((char *)name, ':') != NULL)
+ if (strchr((char *) name, PATH_SEP) != NULL ||
+ strchr((char *) name, '\\') != NULL ||
+ strchr((char *) name, ':') != NULL)
return 1;
else
return 0;
/* void check_short_name(void) { */ /* 1995/Feb/20 */
void check_short_name (unsigned char *s)
-{ /* 1995/Sep/26 */
+{/* 1995/Sep/26 */
unsigned char *star, *sdot;
int n;
/* if share_flag is non-zero and we are opening for reading use fsopen */
/* but we can assume here that we are opening for *input* */
/* *f = fopen (name_of_file + 1, fopen_mode); */
- if (share_flag == 0) *f = fopen (name_of_file + 1, fopen_mode);
+ if (share_flag == 0) *f = fopen (name_of_file + 1, fopen_mode);
else *f = _fsopen (name_of_file + 1, fopen_mode, share_flag);
temp_length = strlen (name_of_file + 1);
/* space_terminate (name_of_file + 1); */
/* We can assume `name_of_file' is openable, */
/* since `test_read_access' just returned true. */
/* *f = xfopen_pas (name_of_file, fopen_mode); */
- *f = xfopen((char *)name_of_file+1, fopen_mode);
+ *f = xfopen((char *) (name_of_file + 1), fopen_mode);
// should we check *f == NULL ??? (should be OK because of test_read_access)
#ifdef MSDOS
/* code added 94/June/21 to show 'fmt' file opening in log */
/* if (show_fmt_flag && strstr(name_of_file+1, ".fmt") != NULL) { */
- if (strstr((char *)name_of_file + 1, ".fmt") != NULL) {
+ if (strstr((char *) (name_of_file + 1), ".fmt") != NULL) {
if (format_file == NULL) {
/* null_terminate (name_of_file + 1); */
- format_file = xstrdup((char *)name_of_file + 1);
+ format_file = xstrdup((char *) (name_of_file + 1));
/* space_terminate (name_of_file + 1); */
}
} /* remember full format file name with path */
/* if (showpoolflag && strstr(name_of_file+1, ".poo") != NULL) { */
- else if (strstr((char *)name_of_file+1, ".poo") != NULL) {
+ else if (strstr((char *) (name_of_file + 1), ".poo") != NULL) {
if (string_file == NULL) {
/* null_terminate (name_of_file + 1); */
- string_file = xstrdup((char *)name_of_file + 1);
+ string_file = xstrdup((char *) (name_of_file + 1));
/* space_terminate (name_of_file + 1); */
}
} /* remember full pool file name with path */
/* else if (show_tfm_flag && strstr(name_of_file+1, ".tfm") != NULL) { */
- else if (strstr((char *)name_of_file+1, ".tfm") != NULL) {
+ else if (strstr((char *) (name_of_file + 1), ".tfm") != NULL) {
if (show_tfm_flag && log_opened) {
#ifdef WRAPLINES
int old_setting = selector;
char *s = name_of_file + 1;
- selector = 18; /* log file only */
- print_char (' ');
- print_char (40); /*(*/
-/* while (*s > ' ') print_char (*s++); */
+ selector = log_only;
+ print_char(' ');
+ print_char('(');
+/* while (*s > ' ') print_char (*s++); */
while (*s != '\0') print_char (*s++);
- print_char (41); /*)*/
+ print_char(')');
selector = old_setting;
#else
int n;
-/* null_terminate (name_of_file + 1); */
- n = strlen((char *)name_of_file+1);
+/* null_terminate (name_of_file + 1); */
+ n = strlen((char *) (name_of_file + 1));
if (file_offset + n > max_print_line) {
putc('\n', log_file);
file_offset = 0;
} /* somewhat risky ? */
else putc(' ', log_file);
- fprintf(log_file, "(%s)", name_of_file+1);
+ fprintf(log_file, "(%s)", (name_of_file + 1));
file_offset += n+3;
/* space_terminate (name_of_file + 1); */
#endif /* end of WRAPLINES */
}
/* space_terminate (name_of_file + 1); */
{
- unsigned temp_length = strlen((char *)name_of_file + 1);
+ unsigned temp_length = strlen((char *) (name_of_file + 1));
name_of_file[temp_length+1] = ' '; /* space terminate */
/* set up name_length ??? */
}
#endif /* ifndef TEXONLY */
\f
-char *get_env_shroud (char *); /* defined in texmf.c */
+char * get_env_shroud (char *); /* defined in texmf.c */
/* char outputdirectory[PATH_MAX]; */ /* defined in local.c */
-extern char *dvi_directory; /* defined in local.c */
-extern char *log_directory; /* defined in local.c */
-extern char *aux_directory; /* defined in local.c */
+extern char * dvi_directory; /* defined in local.c */
+extern char * log_directory; /* defined in local.c */
+extern char * aux_directory; /* defined in local.c */
#ifdef IGNORED
/* Try and figure out if can write to current directory */
-bool isitsafe (char *name)
+bool isitsafe (char * name)
{
/* struct stat statbuf; */ /* debugging 94/Mar/2 */
/* Can't test access on file, since fails if not exist */
{
unsigned temp_length;
-/* null_terminate (name_of_file + 1); */ /* moved here 95/Sep/26 */
- name_of_file[name_length+1] = '\0'; /* null terminate */
+ name_of_file[name_length + 1] = '\0';
/* reinsert '~' and ' ' in file names - 95/June/5 */
-/* done late to prevent problems with null_terminate / space_terminate */
+/* done late to prevent problems with null_terminate / space_terminate */
if (pseudo_tilde != 0 || pseudo_space != 0) {
retwiddle(name_of_file + 1);
}
#ifdef MSDOS
/* write into user specified output directory if given on command line */
/* following code added 1993/Dec/12 */ /* separated 1996/Jan/20 */
- if (prepend_path_if (name_of_file+1, name_of_file+1, ".dvi", (unsigned char *)dvi_directory) ||
- prepend_path_if (name_of_file+1, name_of_file+1, ".log", (unsigned char *)log_directory) ||
- prepend_path_if (name_of_file+1, name_of_file+1, ".aux", (unsigned char *)aux_directory)) {
+ if (prepend_path_if (name_of_file + 1, name_of_file + 1, ".dvi", (unsigned char *) dvi_directory) ||
+ prepend_path_if (name_of_file + 1, name_of_file + 1, ".log", (unsigned char *) log_directory) ||
+ prepend_path_if (name_of_file + 1, name_of_file + 1, ".aux", (unsigned char *) aux_directory)) {
if (open_trace_flag) {
- sprintf(log_line, "After prepend %s\n", name_of_file+1);
+ sprintf(log_line, "After prepend %s\n", name_of_file + 1);
show_line(log_line, 0);
}
}
if (open_trace_flag) {
/* null_terminate (name_of_file + 1); */
- sprintf(log_line, " Open `%s' for output ", name_of_file+1); /* C string */
+ sprintf(log_line, " Open `%s' for output ", name_of_file + 1); /* C string */
show_line(log_line, 0);
/* space_terminate (name_of_file + 1); */
} // debugging only
/* if share_flag is non-zero and we are opening for reading use fsopen */
/* but we can assume this is opening here for *output* */
- *f = fopen((char *)name_of_file + 1, fopen_mode);
+ *f = fopen((char *) (name_of_file + 1), fopen_mode);
if (*f == NULL) { /* Can't open as given. Try the envvar. */
/* string temp_dir = getenv ("TEXMFOUTPUT"); */ /* 93/Nov/20 */
// show_line(name_of_file+1, 1); // debugging only
// New code to remember complete dvi_file name and log_file_name
// To remember for output at the end 2000 June 18
- if (strstr((char *)name_of_file + 1, ".dvi") != NULL) {
- if (qualified(name_of_file+1)) *log_line = '\0';
+ if (strstr((char *) (name_of_file + 1), ".dvi") != NULL) {
+ if (qualified(name_of_file + 1))
+ *log_line = '\0';
else {
- (void) _getcwd(log_line, sizeof(log_line));
+ (void) getcwd(log_line, sizeof(log_line));
strcat(log_line, PATH_SEP_STRING);
}
- strcat(log_line, (char*)name_of_file+1);
+ strcat(log_line, (char*) (name_of_file + 1));
unixify(log_line);
dvi_file_name = xstrdup(log_line);
// show_line(dvi_file_name, 1); // debugging only
}
- else if (strstr((char *)name_of_file + 1, ".log") != NULL) {
- if (qualified(name_of_file+1)) *log_line = '\0';
+ else if (strstr((char *) (name_of_file + 1), ".log") != NULL) {
+ if (qualified(name_of_file + 1))
+ *log_line = '\0';
else {
- (void) _getcwd(log_line, sizeof(log_line));
+ (void) getcwd(log_line, sizeof(log_line));
strcat(log_line, PATH_SEP_STRING);
}
- strcat(log_line, (char *)name_of_file+1);
+ strcat(log_line, (char *) (name_of_file + 1));
unixify(log_line);
log_file_name = xstrdup(log_line);
// show_line(log_file_name, 1); // debugging only
/* n current name, a current area, e current extension */
/* result in name_of_file[] */
-
+/* sec 0519 */
void pack_file_name_(str_number n, str_number a, str_number e)
{
integer k;
ASCII_code c;
pool_pointer j;
- k = 0;
- {register integer for_end; j = str_start[a];
- for_end = str_start[a + 1]- 1; if (j <= for_end) do
- {
- c = str_pool[j];
- incr(k);
- if (k <= PATHMAX)
- name_of_file[k]= xchr[c];
- }
- while(j++ < for_end); }
- {register integer for_end; j = str_start[n];
- for_end = str_start[n + 1]- 1; if (j <= for_end) do
- {
- c = str_pool[j];
- incr(k);
- if (k <= PATHMAX)
- name_of_file[k]= xchr[c];
- }
- while(j++ < for_end); }
- {register integer for_end; j = str_start[e];
- for_end = str_start[e + 1]- 1; if (j <= for_end) do
- {
- c = str_pool[j];
- incr(k);
- if (k <= PATHMAX)
- name_of_file[k]= xchr[c];
- }
- while(j++ < for_end); }
- if (k < PATHMAX)name_length = k;
- else name_length = PATHMAX - 1;
+ k = 0;
+
+ for (j = str_start[a]; j <= str_start[a + 1] - 1; j++) {
+ c = str_pool[j];
+ incr(k);
+ if (k <= PATHMAX)
+ name_of_file[k] = xchr[c];
+ }
+ for (j = str_start[n]; j <= str_start[n + 1] - 1; j++) {
+ c = str_pool[j];
+ incr(k);
+ if (k <= PATHMAX)
+ name_of_file[k] = xchr[c];
+ }
+ for (j = str_start[e]; j <= str_start[e + 1] - 1; j++) {
+ c = str_pool[j];
+ incr(k);
+ if (k <= PATHMAX)
+ name_of_file[k] = xchr[c];
+ }
+ if (k < PATHMAX) name_length = k;
+ else name_length = PATHMAX - 1;
/* pad it out with spaces ... what for ? in case we modify and forget ? */
- {register integer for_end; k = name_length + 1; for_end = PATHMAX;
- if (k <= for_end) do name_of_file[k]= ' ';
- while(k++ < for_end); }
+ for (k = name_length + 1; k <= PATHMAX; k++) name_of_file[k] = ' ';
name_of_file[PATHMAX]= '\0'; /* paranoia 94/Mar/24 */
{
- name_of_file [name_length+1] = '\0';
+ name_of_file [name_length + 1] = '\0';
if (trace_flag) {
- sprintf(log_line, " pack_file_name `%s' (%d) ",
- name_of_file+1, name_length); /* debugging */
+ sprintf(log_line, " pack_file_name `%s' (%d) ", name_of_file + 1, name_length); /* debugging */
show_line(log_line, 0);
}
- name_of_file [name_length+1] = ' ';
+ name_of_file [name_length + 1] = ' ';
}
}
/* Called only from two places tex9.c for format name - specified and default */
/* for specified format name args are 0, a, b name in buffer[a] --- buffer[b] */
/* for default args are format_default_length-4, 1, 0 */
+/* sec 0523 */
void pack_buffered_name_(small_number n, integer a, integer b)
{
integer k;
if (n + b - a + 5 > PATHMAX)
b = a + PATHMAX - n - 5;
k = 0;
-/* This loop kicks in when we want the default format name */
- {register integer for_end; j = 1; for_end = n; if (j <= for_end) do
- {
- c = xord[TEX_format_default[j]];
- incr(k);
- if (k <= PATHMAX)
- name_of_file[k]= xchr[c];
- }
- while(j++ < for_end); }
+/* This loop kicks in when we want the default format name */
+ for (j = 1; j <= n; j++) {
+ c = xord[TEX_format_default[j]];
+ incr(k);
+ if (k <= PATHMAX)
+ name_of_file[k]= xchr[c];
+ }
/* This loop kicks in when we want a specififed format name */
- {register integer for_end; j = a; for_end = b; if (j <= for_end) do
- {
- c = buffer[j];
- incr(k);
- if (k <= PATHMAX)
- name_of_file[k]= xchr[c];
- }
- while(j++ < for_end); }
+ for (j = a; j <= b; j++) {
+ c = buffer[j];
+ incr(k);
+ if (k <= PATHMAX)
+ name_of_file[k]= xchr[c];
+ }
/* This adds the extension from the default format name */
- {register integer for_end; j = format_default_length - 3; for_end =
- format_default_length; if (j <= for_end) do
- {
- c = xord[TEX_format_default[j]];
- incr(k);
- if (k <= PATHMAX)
- name_of_file[k]= xchr[c];
- }
- while(j++ < for_end); }
- if (k < PATHMAX)
- name_length = k;
+ for (j = format_default_length - 3; j <= format_default_length; j++) {
+ c = xord[TEX_format_default[j]];
+ incr(k);
+ if (k <= PATHMAX)
+ name_of_file[k]= xchr[c];
+ }
+ if (k < PATHMAX) name_length = k;
else name_length = PATHMAX - 1;
/* pad it out with spaces ... what for ? */
- {register integer for_end; k = name_length + 1; for_end = PATHMAX; if (k
- <= for_end) do
- name_of_file[k]= ' ';
- while(k++ < for_end); }
- name_of_file[PATHMAX]= '\0'; /* paranoia 94/Mar/24 */
+ for (k = name_length + 1; k <= PATHMAX; k++) name_of_file[k]= ' ';
+ name_of_file[PATHMAX] = '\0'; /* paranoia 94/Mar/24 */
}
str_number make_name_string (void)
(cur_length > 0))
#else
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
- if ((pool_ptr + name_length > pool_size)||(str_ptr == max_strings)||
- (cur_length > 0))
+ if ((pool_ptr + name_length > pool_size) ||
+ (str_ptr == max_strings) ||
+ (cur_length > 0))
#endif
- Result = 63;
+ Result = 63;
else {
- {register integer for_end; k = 1; for_end = name_length; if (k <= for_end) do
- {
+ for (k = 1; k <= name_length; k++) {
str_pool[pool_ptr]= xord[name_of_file[k]];
-// sprintf(log_line, "%d => %d ", name_of_file[k], xord[name_of_file[k]]);
-// show_line(log_line, 0); // debugging only
- incr(pool_ptr);
- }
- while(k++ < for_end); }
+// sprintf(log_line, "%d => %d ", name_of_file[k], xord[name_of_file[k]]);
+// show_line(log_line, 0); // debugging only
+ incr(pool_ptr);
+ }
Result = make_string();
- }
- return Result;
-}
+ }
+ return Result;
+}
str_number a_make_name_string_(alpha_file * f)
{
get_x_token();
}
}
- while(true){
- if ((cur_cmd > 12)||(cur_chr > 255))
- { /* (cur_cmd > otherchar) OR (cur_chr > 255) */
+ while (true) {
+ if ((cur_cmd > other_char) || (cur_chr > 255)) {
back_input(); /* not a character put it back and leave */
goto lab30;
}
/* if (pseudo_space != 0 && cur_chr == ' ') cur_chr = pseudo_space; */
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
if (! more_name(cur_chr)) /* up to next white space */
- goto lab30;
- get_x_token();
- }
+ goto lab30;
+ get_x_token();
+ }
lab30:
end_name();
- name_in_progress = false;
+ name_in_progress = false;
}
/* argument is string .fmt, .log, or .dvi */
print_nl(" ");
print_char(' ');
- print_char(40); /*(*/
+ print_char('(');
t = s;
while (*t > '\0') print_char(*t++);
print_char('=');
show_context();
print_nl("Please type another ");
print(s);
- if (interaction < 2){
+ if (interaction < 2) {
fatal_error("*** (job aborted, file error in nonstop mode)");
return; // abort_flag set
}
begin_name();
k = first;
/* step over leading spaces ... */
- while((buffer[k]== 32)&&(k < last)) incr(k);
+ while((buffer[k] == ' ') && (k < last)) incr(k);
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
quoted_file_name = 0; /* 98/March/15 */
if (allow_quoted_names && k < last) { /* check whether quoted name */
if (k == last) goto lab30;
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
/* convert tilde '~' to pseudo tilde */
- if (pseudo_tilde != 0 && buffer[k]== '~') buffer[k]= pseudo_tilde;
+ if (pseudo_tilde != 0 && buffer[k]== '~') buffer[k] = pseudo_tilde;
/* convert space ' ' to pseudo space */
- if (pseudo_space != 0 && buffer[k]== ' ') buffer[k]= pseudo_space;
+ if (pseudo_space != 0 && buffer[k]== ' ') buffer[k] = pseudo_space;
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
if (! more_name(buffer[k])) goto lab30;
incr(k);
old_setting = selector;
- if (job_name == 0) job_name = 790; /* default: texput */
+ if (job_name == 0) job_name = 790; /* default: texput */
pack_job_name(791); /* .log */
- while(! a_open_out(log_file)) {
- selector = 17;
+ while (!a_open_out(log_file)) {
+ selector = 17;
prompt_file_name(793, 791); /* transcript file name texput */
- }
- texmf_log_name = a_make_name_string(log_file);
+ }
+ texmf_log_name = a_make_name_string(log_file);
selector = 18; /* log file only */
- log_opened = true;
+ log_opened = true;
{
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
// for our version DOS/Windows
- if (want_version) {
+ if (want_version) {
// showversion (log_file); /* in local.c - bkph */
// showversion (stdout);
- stamp_it(log_line); // ??? use log_line ???
- strcat(log_line, "\n");
- (void) fputs(log_line, log_file);
+ stamp_it(log_line); // ??? use log_line ???
+ strcat(log_line, "\n");
+ (void) fputs(log_line, log_file);
// show_line(buffer, 0); // ??? show on screen as well
-// print_ln();
- stampcopy(log_line);
- strcat(log_line, "\n");
+// print_ln();
+ stampcopy(log_line);
+ strcat(log_line, "\n");
// show_line(buffer, 0); // ??? show on screen as well
- (void) fputs(log_line, log_file);
-// print_ln();
- }
+ (void) fputs(log_line, log_file);
+// print_ln();
+ }
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
/* also change following in itex.c - bkph */
- (void) fputs(tex_version, log_file);
- (void) fprintf(log_file, " (%s %s)", application, yandyversion);
- if (format_ident > 0) slow_print(format_ident); /* bkph */
+ (void) fputs(tex_version, log_file);
+ (void) fprintf(log_file, " (%s %s)", application, yandyversion);
+ if (format_ident > 0) slow_print(format_ident); /* bkph */
print_string(" ");
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
- if (civilize_flag) print_int(year); /* year */
- else
+ if (civilize_flag) print_int(year);
+ else print_int(day);
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
- print_int(day);
print_char(' ');
- months = " JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";
- {register integer for_end; k = 3 * month - 2; for_end = 3
- * month; if (k <= for_end) do
- (void) putc(months[k], log_file);
- while(k++ < for_end); } /* month */
+ months = " JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";
+ for (k = 3 * month - 2 ; k <= 3 * month; k++) (void) putc(months[k], log_file);
print_char(' ');
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
- if (civilize_flag) print_int(day);
- else
+ if (civilize_flag) print_int(day);
+ else print_int(year);
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
- print_int(year); /* year */
print_char(' ');
- print_two(tex_time / 60); /* hour */
+ print_two(tex_time / 60);
print_char(':');
- print_two(tex_time % 60); /* minute */
- }
- input_stack[input_ptr]= cur_input;
+ print_two(tex_time % 60);
+ }
+ input_stack[input_ptr] = cur_input;
print_nl("**");
- l = input_stack[0].limit_field;
- if (buffer[l]== eqtb[(hash_size + 3211)].cint)
- decr(l);
- {register integer for_end; k = 1; for_end = l; if (k <= for_end) do
- print(buffer[k]);
- while(k++ < for_end); }
- print_ln();
+ l = input_stack[0].limit_field;
+ if (buffer[l] == eqtb[(hash_size + 3211)].cint)
+ decr(l);
+ for (k = 1; k <= l; k++) print(buffer[k]);
+ print_ln();
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
/* a good place to show the fmt file name or pool file name ? 94/June/21 */
if (show_fmt_flag) {
}
}
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
- selector = old_setting + 2;
-}
+ selector = old_setting + 2;
+}
/**************************** start of insertion 98/Feb/7 **************/
return; // abort_flag set
}
#endif
- str_pool[pool_ptr]= c;
+ str_pool[pool_ptr] = c;
incr(pool_ptr);
}
return make_string();
}
+/* add extension to job_name */
void jobnameappend (void)
-{ /* add extension to job_name */
+{
int k, n;
-/* copy job_name */
+/* copy job_name */
k = str_start[job_name];
n = str_start[job_name + 1];
- while (k < n) morenamecopy(str_pool[k++]);
-/* copy `extension' */
+ while (k < n)
+ morenamecopy(str_pool[k++]);
+/* copy `extension' */
k = str_start[cur_ext];
n = str_start[cur_ext + 1];
- while (k < n) morenamecopy(str_pool[k++]);
+ while (k < n)
+ morenamecopy(str_pool[k++]);
job_name = endnamecopy();
}
/**************************** end of insertion 98/Feb/7 **************/
void start_input (void)
-{/* 30 */
+{
bool addedextension = false;
- scan_file_name();
- pack_file_name(cur_name, cur_area, cur_ext);
- while(true){ /* loop until we get a valid file name */
+ scan_file_name();
+ pack_file_name(cur_name, cur_area, cur_ext);
+
+ while (true) { /* loop until we get a valid file name */
addedextension = false;
- begin_file_reading();
+ begin_file_reading();
/* *** *** *** *** *** following is new in 3.14159 *** *** *** *** *** *** */
/* if current extension is *not* empty, try to open using name as is */
/* string 335 is "" the empty string */
- if ((cur_ext != 335)&& a_open_in(input_file[cur_input.index_field],
- TEXINPUTPATH))
- goto lab30;
+ if ((cur_ext != 335) && a_open_in(input_file[cur_input.index_field], TEXINPUTPATH))
+ goto lab30;
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
/* we get here if extension is "", or file with extension failed to open */
/* if current extension is not `tex,' and `tex' is not irrelevant, try it */
/* string 785 is .tex */
- if ((cur_ext != 785)&&(name_length + 5 < PATHMAX)&&
-/* (! extensionirrelevantp(name_of_file, "tex"))){ */
- (! extensionirrelevantp(name_of_file, name_length, "tex"))){
- name_of_file[name_length + 1] = 46; /* .tex */
- name_of_file[name_length + 2] = 116;
- name_of_file[name_length + 3] = 101;
- name_of_file[name_length + 4] = 120;
- name_of_file[name_length + 5] = 32; /* 96/Jan/20 ??? */
- name_length = name_length + 4;
- addedextension = true;
-/* *** *** *** *** following new in 3.14159 *** *** *** *** *** *** *** */
- if (a_open_in(input_file[cur_input.index_field], TEXINPUTPATH))
- goto lab30;
- name_length = name_length - 4; /* strip extension again */
- name_of_file[name_length + 1]= 32; /* ' ' */
- addedextension = false;
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
+ if ((cur_ext != 785) && (name_length + 5 < PATHMAX) &&
+ (! extensionirrelevantp(name_of_file, name_length, "tex"))) {
+ name_of_file[name_length + 1] = '.'; /* .tex */
+ name_of_file[name_length + 2] = 't';
+ name_of_file[name_length + 3] = 'e';
+ name_of_file[name_length + 4] = 'x';
+ name_of_file[name_length + 5] = ' '; /* 96/Jan/20 ??? */
+ name_length = name_length + 4;
+ addedextension = true;
+ if (a_open_in(input_file[cur_input.index_field], TEXINPUTPATH))
+ goto lab30;
+ name_length = name_length - 4; /* strip extension again */
+ name_of_file[name_length + 1] = ' ';
+ addedextension = false;
}
/* *** *** *** *** major changes here in 3.14159 *** *** *** *** *** *** */
/* string 335 is "" the empty string */
- if ((cur_ext == 335)&& a_open_in(input_file[cur_input.index_field],
- TEXINPUTPATH))
- goto lab30;
- if (maketextex () && a_open_in(input_file[cur_input.index_field],
- TEXINPUTPATH))
- goto lab30;
+ if ((cur_ext == 335) && a_open_in(input_file[cur_input.index_field], TEXINPUTPATH))
+ goto lab30;
+ if (maketextex() && a_open_in(input_file[cur_input.index_field], TEXINPUTPATH))
+ goto lab30;
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
- end_file_reading();
+ end_file_reading();
prompt_file_name(781, 785); /* input file name .tex */
} /* end of while(true)trying to get valid file name */
/* maybe set pseudo_tilde = 0 at this point ? 95/Sep/26 */
- lab30: cur_input.name_field =
- a_make_name_string(input_file[cur_input.index_field]);
+lab30:
+ cur_input.name_field = a_make_name_string(input_file[cur_input.index_field]);
if (job_name == 0) /* only the first time */
{
job_name = cur_name; /* here we set the job_name */
/* did file name have an `extension' already and we added ".tex" ? */
- if (cur_ext != 335 && addedextension) /* 98/Feb/7 */
- jobnameappend(); /* append `extension' to job_name */
- open_log_file();
- }
- if (term_offset + length(cur_input.name_field) > max_print_line - 2) /* was 3 ? */
- print_ln();
- else if ((term_offset > 0)||(file_offset > 0))
- print_char(' ');
+ if (cur_ext != 335 && addedextension) /* 98/Feb/7 */
+ jobnameappend(); /* append `extension' to job_name */
+ open_log_file();
+ }
+ if (term_offset + length(cur_input.name_field) > max_print_line - 2) /* was 3 ? */
+ print_ln();
+ else if ((term_offset > 0)||(file_offset > 0))
+ print_char(' ');
print_char('(');
// print_char(64); // debugging only marker
- incr(open_parens);
+ incr(open_parens);
if (open_parens > max_open_parens)
max_open_parens = open_parens; /* 1999/Jan/17 */
- slow_print(cur_input.name_field);
+ slow_print(cur_input.name_field);
// print_char(64); // debugging only marker
#ifndef _WINDOWS
fflush(stdout);
#endif
- cur_input.state_field = 33;
+ cur_input.state_field = 33;
{
- line = 1;
- if (input_ln(input_file[cur_input.index_field], false))
- ;
- firm_up_the_line();
- if ((end_line_char < 0)||
- (end_line_char > 255))
- decr(cur_input.limit_field);
+ line = 1;
+ if (input_ln(input_file[cur_input.index_field], false));
+ firm_up_the_line();
+ if ((end_line_char < 0) || (end_line_char > 255))
+ decr(cur_input.limit_field);
/* long to unsigned char ... */
- else buffer[cur_input.limit_field] = end_line_char;
- first = cur_input.limit_field + 1;
- cur_input.loc_field = cur_input.start_field;
- }
-}
+ else buffer[cur_input.limit_field] = end_line_char;
+ first = cur_input.limit_field + 1;
+ cur_input.loc_field = cur_input.start_field;
+ }
+}
/**********************************************************************/
/* show TEXFONTS=... or format specific */
/* only show this if name was not fully qualified ? */
+/* 98/Jan/28 */
void show_tex_fonts (void)
-{ /* 98/Jan/28 */
+{
char *s, *t, *v, *u;
int n;
s = "TEXFONTS";
if (encoding_specific) {
u = encoding_name; /* try specific */
if ((t = grabenv(u)) != NULL) {
- if (strchr(t, ':') != NULL &&
- sscanf(t, "%d", &n) == 0) {
+ if (strchr(t, ':') != NULL && sscanf(t, "%d", &n) == 0) {
s = u; /* look here instead of TEXFONTS=... */
}
}
/**********************************************************************/
/* called only from tex8.c */
-
+/* sec 0506 */
internal_font_number read_font_info_(halfword u, str_number nom, str_number aire, scaled s)
{
- register internal_font_number Result;
- font_index k;
- bool fileopened;
-/* halfword lf, lh, bc, ec, nw, nh, nd, ni, nl, nk, ne, np; */
+ register internal_font_number Result;
+ font_index k;
+ bool fileopened;
+/* halfword lf, lh, bc, ec, nw, nh, nd, ni, nl, nk, ne, np; */
halfword lf, lh, nw, nh, nd, ni, nl, nk, ne, np;
-/* halfword bc, ec; */
- int bc, ec; /* 95/Jan/7 */
- internal_font_number f;
- internal_font_number g;
- eight_bits a, b, c, d;
- ffourquarters qw;
- scaled sw;
- integer bchlabel;
- short bchar;
- scaled z;
- integer alpha;
- char beta;
- g = 0;
- fileopened = false;
+/* halfword bc, ec; */
+ int bc, ec; /* 95/Jan/7 */
+ internal_font_number f;
+ internal_font_number g;
+ eight_bits a, b, c, d;
+ ffourquarters qw;
+ scaled sw;
+ integer bchlabel;
+ short bchar;
+ scaled z;
+ integer alpha;
+ char beta;
+ g = 0;
+ fileopened = false;
pack_file_name(nom, aire, 805); /* .tfm */
- if (!b_open_in(tfm_file))
- { /* new in C version d */
- if (maketextfm ())
- {
- if (!b_open_in(tfm_file))
- goto lab11;
- }
- else goto lab11;
- }
+ if (!b_open_in(tfm_file)) { /* new in C version d */
+ if (maketextfm()) {
+ if (!b_open_in(tfm_file))
+ goto lab11;
+ } else goto lab11;
+ }
/* was just: goto lab11; */
- fileopened = true;
+ fileopened = true;
{
/* tfm_temp = getc(tfm_file); */ /* done already in open_input, but why? */
{
lf = tfm_temp;
if (lf > 127)
- goto lab11;
- tfm_temp = getc(tfm_file);
- lf = lf * 256 + tfm_temp;
- }
- tfm_temp = getc(tfm_file);
+ goto lab11;
+ tfm_temp = getc(tfm_file);
+ lf = lf * 256 + tfm_temp;
+ }
+ tfm_temp = getc(tfm_file);
{
- lh = tfm_temp;
+ lh = tfm_temp;
if (lh > 127)
- goto lab11;
- tfm_temp = getc(tfm_file);
- lh = lh * 256 + tfm_temp;
- }
+ goto lab11;
+ tfm_temp = getc(tfm_file);
+ lh = lh * 256 + tfm_temp;
+ }
tfm_temp = getc(tfm_file);
{
bc = tfm_temp;
tfm_temp = getc(tfm_file);
ec = ec * 256 + tfm_temp;
}
- if ((bc > ec + 1)||(ec > 255))
- goto lab11;
- if (bc > 255)
- {
- bc = 1;
- ec = 0;
- }
+ if ((bc > ec + 1)||(ec > 255))
+ goto lab11;
+ if (bc > 255) {
+ bc = 1;
+ ec = 0;
+ }
tfm_temp = getc(tfm_file);
{
nw = tfm_temp;
if (nw > 127)
- goto lab11;
- tfm_temp = getc(tfm_file);
- nw = nw * 256 + tfm_temp;
+ goto lab11;
+ tfm_temp = getc(tfm_file);
+ nw = nw * 256 + tfm_temp;
}
tfm_temp = getc(tfm_file);
{
- nh = tfm_temp;
+ nh = tfm_temp;
if (nh > 127)
- goto lab11;
- tfm_temp = getc(tfm_file);
- nh = nh * 256 + tfm_temp;
- }
- tfm_temp = getc(tfm_file);
+ goto lab11;
+ tfm_temp = getc(tfm_file);
+ nh = nh * 256 + tfm_temp;
+ }
+ tfm_temp = getc(tfm_file);
{
- nd = tfm_temp;
+ nd = tfm_temp;
if (nd > 127)
- goto lab11;
- tfm_temp = getc(tfm_file);
- nd = nd * 256 + tfm_temp;
- }
- tfm_temp = getc(tfm_file);
+ goto lab11;
+ tfm_temp = getc(tfm_file);
+ nd = nd * 256 + tfm_temp;
+ }
+ tfm_temp = getc(tfm_file);
{
- ni = tfm_temp;
+ ni = tfm_temp;
if (ni > 127)
- goto lab11;
- tfm_temp = getc(tfm_file);
- ni = ni * 256 + tfm_temp;
- }
- tfm_temp = getc(tfm_file);
+ goto lab11;
+ tfm_temp = getc(tfm_file);
+ ni = ni * 256 + tfm_temp;
+ }
+ tfm_temp = getc(tfm_file);
{
- nl = tfm_temp;
+ nl = tfm_temp;
if (nl > 127)
- goto lab11;
- tfm_temp = getc(tfm_file);
- nl = nl * 256 + tfm_temp;
- }
- tfm_temp = getc(tfm_file);
+ goto lab11;
+ tfm_temp = getc(tfm_file);
+ nl = nl * 256 + tfm_temp;
+ }
+ tfm_temp = getc(tfm_file);
{
- nk = tfm_temp;
+ nk = tfm_temp;
if (nk > 127)
- goto lab11;
- tfm_temp = getc(tfm_file);
- nk = nk * 256 + tfm_temp;
- }
- tfm_temp = getc(tfm_file);
+ goto lab11;
+ tfm_temp = getc(tfm_file);
+ nk = nk * 256 + tfm_temp;
+ }
+ tfm_temp = getc(tfm_file);
{
- ne = tfm_temp;
+ ne = tfm_temp;
if (ne > 127)
- goto lab11;
- tfm_temp = getc(tfm_file);
- ne = ne * 256 + tfm_temp;
- }
- tfm_temp = getc(tfm_file);
+ goto lab11;
+ tfm_temp = getc(tfm_file);
+ ne = ne * 256 + tfm_temp;
+ }
+ tfm_temp = getc(tfm_file);
{
- np = tfm_temp;
+ np = tfm_temp;
if (np > 127)
- goto lab11;
- tfm_temp = getc(tfm_file);
- np = np * 256 + tfm_temp;
- }
- if (lf != 6 + lh +(ec - bc + 1)+ nw + nh + nd + ni + nl + nk + ne + np)
- goto lab11;
-/* For robustness, enforce a restriction checked by TFtoPL (suggested by DRF) */
- if ((nw == 0) || (nh == 0) || (nd == 0) || (ni == 0))
- goto lab11;
- }
- lf = lf - 6 - lh;
+ goto lab11;
+ tfm_temp = getc(tfm_file);
+ np = np * 256 + tfm_temp;
+ }
+ if (lf != 6 + lh + (ec - bc + 1) + nw + nh + nd + ni + nl + nk + ne + np)
+ goto lab11;
+ if ((nw == 0) || (nh == 0) || (nd == 0) || (ni == 0))
+ goto lab11;
+ }
+ lf = lf - 6 - lh;
if (np < 7)
lf = lf + 7 - np;
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
#endif
{
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
-
if (trace_flag) {
sprintf(log_line, "font_ptr %d font_max %d fmem_ptr %d lf %d font_mem_size %d\n",
font_ptr, font_max, fmem_ptr, lf, font_mem_size); /* debugging */
show_line(log_line, 0);
}
-
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
print_err("Font ");
sprint_cs(u);
print_char('=');
print_file_name(nom, aire, 335); /* "" */
- if (s >= 0)
- {
+ if (s >= 0) {
print_string(" at ");
print_scaled(s);
print_string("pt");
- }
- else if (s != -1000)
- {
+ } else if (s != -1000) {
print_string(" scaled ");
- print_int(- (integer) s);
- }
+ print_int(- (integer) s);
+ }
print_string(" not loaded: Not enough room left");
- help4("I'm afraid I won't be able to make use of this font,",
- "because my memory for character-size data is too small.",
- "If you're really stuck, ask a wizard to enlarge me.",
- "Or maybe try `I\\font<same font id>=<name of loaded font>'.");
- error();
- goto lab30;
- }
+ help4("I'm afraid I won't be able to make use of this font,",
+ "because my memory for character-size data is too small.",
+ "If you're really stuck, ask a wizard to enlarge me.",
+ "Or maybe try `I\\font<same font id>=<name of loaded font>'.");
+ error();
+ goto lab30;
+ }
f = font_ptr + 1;
- char_base[f]= fmem_ptr - bc;
- width_base[f]= char_base[f]+ ec + 1;
- height_base[f]= width_base[f]+ nw;
- depth_base[f]= height_base[f]+ nh;
- italic_base[f]= depth_base[f]+ nd;
- lig_kern_base[f]= italic_base[f]+ ni;
- kern_base[f]= lig_kern_base[f]+ nl - 256 *(128);
- exten_base[f]= kern_base[f]+ 256 *(128)+ nk;
- param_base[f]= exten_base[f]+ ne;
+ char_base[f] = fmem_ptr - bc;
+ width_base[f] = char_base[f] + ec + 1;
+ height_base[f] = width_base[f] + nw;
+ depth_base[f] = height_base[f] + nh;
+ italic_base[f] = depth_base[f] + nd;
+ lig_kern_base[f] = italic_base[f] + ni;
+ kern_base[f] = lig_kern_base[f] + nl - 256 * (128);
+ exten_base[f] = kern_base[f] + 256 * (128) + nk;
+ param_base[f] = exten_base[f] + ne;
{
if (lh < 2)
- goto lab11;
+ goto lab11;
/* build the font checksum now */
{
- tfm_temp = getc(tfm_file);
- a = tfm_temp;
- qw.b0 = a;
- tfm_temp = getc(tfm_file);
- b = tfm_temp;
- qw.b1 = b;
- tfm_temp = getc(tfm_file);
- c = tfm_temp;
- qw.b2 = c;
- tfm_temp = getc(tfm_file);
- d = tfm_temp;
- qw.b3 = d;
- font_check[f]= qw;
- }
- tfm_temp = getc(tfm_file);
+ tfm_temp = getc(tfm_file);
+ a = tfm_temp;
+ qw.b0 = a;
+ tfm_temp = getc(tfm_file);
+ b = tfm_temp;
+ qw.b1 = b;
+ tfm_temp = getc(tfm_file);
+ c = tfm_temp;
+ qw.b2 = c;
+ tfm_temp = getc(tfm_file);
+ d = tfm_temp;
+ qw.b3 = d;
+ font_check[f]= qw;
+ }
+ tfm_temp = getc(tfm_file);
{
- z = tfm_temp;
+ z = tfm_temp;
if (z > 127)
- goto lab11;
- tfm_temp = getc(tfm_file);
- z = z * 256 + tfm_temp;
- }
- tfm_temp = getc(tfm_file);
- z = z * 256 + tfm_temp;
- tfm_temp = getc(tfm_file);
- z =(z * 16)+(tfm_temp / 16);
+ goto lab11;
+ tfm_temp = getc(tfm_file);
+ z = z * 256 + tfm_temp;
+ }
+ tfm_temp = getc(tfm_file);
+ z = z * 256 + tfm_temp;
+ tfm_temp = getc(tfm_file);
+ z =(z * 16) + (tfm_temp / 16);
if (z < 65536L)
- goto lab11;
- while(lh > 2){
- tfm_temp = getc(tfm_file);
- tfm_temp = getc(tfm_file);
- tfm_temp = getc(tfm_file);
- tfm_temp = getc(tfm_file);
- decr(lh);
- }
- font_dsize[f]= z;
+ goto lab11;
+ while (lh > 2) {
+ tfm_temp = getc(tfm_file);
+ tfm_temp = getc(tfm_file);
+ tfm_temp = getc(tfm_file);
+ tfm_temp = getc(tfm_file);
+ decr(lh);
+ }
+ font_dsize[f] = z;
if (s != -1000)
- if (s >= 0)
- z = s;
- else z = xn_over_d(z, - (integer) s, 1000);
- font_size[f]= z;
+ if (s >= 0)
+ z = s;
+ else z = xn_over_d(z, - (integer) s, 1000);
+ font_size[f] = z;
}
- {register integer for_end; k = fmem_ptr; for_end = width_base[f]- 1
-; if (k <= for_end) do
- {
+ {
+ register integer for_end;
+ k = fmem_ptr;
+ for_end = width_base[f] - 1;
+ if (k <= for_end) do {
{
- tfm_temp = getc(tfm_file);
- a = tfm_temp;
- qw.b0 = a;
- tfm_temp = getc(tfm_file);
- b = tfm_temp;
- qw.b1 = b;
- tfm_temp = getc(tfm_file);
- c = tfm_temp;
- qw.b2 = c;
- tfm_temp = getc(tfm_file);
- d = tfm_temp;
- qw.b3 = d;
- font_info[k].qqqq = qw;
+ tfm_temp = getc(tfm_file);
+ a = tfm_temp;
+ qw.b0 = a;
+ tfm_temp = getc(tfm_file);
+ b = tfm_temp;
+ qw.b1 = b;
+ tfm_temp = getc(tfm_file);
+ c = tfm_temp;
+ qw.b2 = c;
+ tfm_temp = getc(tfm_file);
+ d = tfm_temp;
+ qw.b3 = d;
+ font_info[k].qqqq = qw;
}
- if ((a >= nw)||(b / 16 >= nh)||(b % 16 >= nd)||(c / 4 >=
- ni))
- goto lab11;
- switch(c % 4)
- {case 1 :
- if (d >= nl)
- goto lab11;
- break;
- case 3 :
- if (d >= ne)
- goto lab11;
- break;
- case 2 :
- {
- {
- if ((d < bc)||(d > ec))
- goto lab11;
- }
- while(d < k + bc - fmem_ptr){
-
- qw = font_info[char_base[f]+ d].qqqq;
- if (((qw.b2)% 4)!= 2)
- goto lab45;
- d = qw.b3;
- }
- if (d == k + bc - fmem_ptr)
- goto lab11;
- lab45:;
+ if ((a >= nw) || (b / 16 >= nh) || (b % 16 >= nd) || (c / 4 >= ni))
+ goto lab11;
+ switch(c % 4) {
+ case 1:
+ if (d >= nl)
+ goto lab11;
+ break;
+ case 3:
+ if (d >= ne)
+ goto lab11;
+ break;
+ case 2:
+ {
+ {
+ if ((d < bc)||(d > ec))
+ goto lab11;
+ }
+ while (d < k + bc - fmem_ptr) {
+ qw = font_info[char_base[f]+ d].qqqq;
+ if (((qw.b2)% 4)!= 2)
+ goto lab45;
+ d = qw.b3;
+ }
+ if (d == k + bc - fmem_ptr)
+ goto lab11;
+lab45:;
+ }
+ break;
+ default:
+ ;
+ break;
+ }
+ } while(k++ < for_end);
}
- break;
- default:
- ;
- break;
- }
- }
- while(k++ < for_end); }
{
{
- alpha = 16;
- while(z >= 8388608L){ /* 2^23 */
-
- z = z / 2;
- alpha = alpha + alpha;
- }
-/* beta = 256 / alpha; */ /* keep compiler happy */
- beta = (char) (256 / alpha);
- alpha = alpha * z;
- }
- {register integer for_end; k = width_base[f]; for_end = lig_kern_base[
- f]- 1; if (k <= for_end) do
- {
- tfm_temp = getc(tfm_file);
- a = tfm_temp;
- tfm_temp = getc(tfm_file);
- b = tfm_temp;
- tfm_temp = getc(tfm_file);
- c = tfm_temp;
- tfm_temp = getc(tfm_file);
- d = tfm_temp;
- sw =(((((d * z)/ 256)+(c * z)) / 256)+(b * z)) / beta;
- if (a == 0)
- font_info[k].cint = sw;
- else if (a == 255)
- font_info[k].cint = sw - alpha;
- else goto lab11;
- }
- while(k++ < for_end); }
+ alpha = 16;
+ while (z >= 8388608L) { /* 2^23 */
+ z = z / 2;
+ alpha = alpha + alpha;
+ }
+ beta = (char) (256 / alpha);
+ alpha = alpha * z;
+ }
+ {
+ register integer for_end;
+ k = width_base[f];
+ for_end = lig_kern_base[f] - 1;
+ if (k <= for_end) do {
+ tfm_temp = getc(tfm_file);
+ a = tfm_temp;
+ tfm_temp = getc(tfm_file);
+ b = tfm_temp;
+ tfm_temp = getc(tfm_file);
+ c = tfm_temp;
+ tfm_temp = getc(tfm_file);
+ d = tfm_temp;
+ sw =(((((d * z) / 256) + (c * z)) / 256) + (b * z)) / beta;
+ if (a == 0)
+ font_info[k].cint = sw;
+ else if (a == 255)
+ font_info[k].cint = sw - alpha;
+ else goto lab11;
+ } while(k++ < for_end);
+ }
if (font_info[width_base[f]].cint != 0)
- goto lab11;
+ goto lab11;
if (font_info[height_base[f]].cint != 0)
- goto lab11;
+ goto lab11;
if (font_info[depth_base[f]].cint != 0)
- goto lab11;
+ goto lab11;
if (font_info[italic_base[f]].cint != 0)
- goto lab11;
- }
+ goto lab11;
+ }
/* read ligature/kern program */
bchlabel = 32767; /* '77777 */
- bchar = 256;
- if (nl > 0)
- {
-/* begin for k:=lig_kern_base[f] to kern_base[f]+kern_base_offset-1 do */
- {register integer for_end; k = lig_kern_base[f]; for_end = kern_base[f
- ]+ 256 *(128)- 1; if (k <= for_end) do
- {
- {
- tfm_temp = getc(tfm_file);
- a = tfm_temp;
- qw.b0 = a;
- tfm_temp = getc(tfm_file);
- b = tfm_temp;
- qw.b1 = b;
- tfm_temp = getc(tfm_file);
- c = tfm_temp;
- qw.b2 = c;
- tfm_temp = getc(tfm_file);
- d = tfm_temp;
- qw.b3 = d;
- font_info[k].qqqq = qw; /* store_four_quarters(font_info[k].qqqq */
- }
- if (a > 128)
- {
- if (256 * c + d >= nl)
- goto lab11; /* error in TFM, abort */
- if (a == 255)
- if (k == lig_kern_base[f])
- bchar = b;
- }
- else {
- if (b != bchar)
- {
- {
- if ((b < bc)||(b > ec)) /* check-existence(b) */
- goto lab11; /* error in TFM, abort */
- }
- qw = font_info[char_base[f]+ b].qqqq;
- if (!(qw.b0 > 0))
- goto lab11; /* error in TFM, abort */
- }
- if (c < 128)
- {
- {
- if ((d < bc)||(d > ec)) /* check-existence(d) */
- goto lab11; /* error in TFM, abort */
- }
- qw = font_info[char_base[f]+ d].qqqq;
- if (!(qw.b0 > 0))
- goto lab11; /* error in TFM, abort */
- }
- else if (256 *(c - 128)+ d >= nk)
- goto lab11; /* error in TFM, abort */
- if (a < 128)
- if (k - lig_kern_base[f]+ a + 1 >= nl)
- goto lab11; /* error in TFM, abort */
- }
- }
- while(k++ < for_end); }
+ bchar = 256;
+ if (nl > 0) {
+/* begin for k:=lig_kern_base[f] to kern_base[f]+kern_base_offset-1 do */
+ {
+ register integer for_end;
+ k = lig_kern_base[f];
+ for_end = kern_base[f] + 256 * (128) - 1;
+ if (k <= for_end) do {
+ {
+ tfm_temp = getc(tfm_file);
+ a = tfm_temp;
+ qw.b0 = a;
+ tfm_temp = getc(tfm_file);
+ b = tfm_temp;
+ qw.b1 = b;
+ tfm_temp = getc(tfm_file);
+ c = tfm_temp;
+ qw.b2 = c;
+ tfm_temp = getc(tfm_file);
+ d = tfm_temp;
+ qw.b3 = d;
+ font_info[k].qqqq = qw; /* store_four_quarters(font_info[k].qqqq */
+ }
+ if (a > 128) {
+ if (256 * c + d >= nl)
+ goto lab11; /* error in TFM, abort */
+ if (a == 255)
+ if (k == lig_kern_base[f])
+ bchar = b;
+ } else {
+ if (b != bchar) {
+ {
+ if ((b < bc)||(b > ec)) /* check-existence(b) */
+ goto lab11; /* error in TFM, abort */
+ }
+ qw = font_info[char_base[f]+ b].qqqq;
+ if (!(qw.b0 > 0))
+ goto lab11; /* error in TFM, abort */
+ }
+ if (c < 128) {
+ {
+ if ((d < bc)||(d > ec)) /* check-existence(d) */
+ goto lab11; /* error in TFM, abort */
+ }
+ qw = font_info[char_base[f]+ d].qqqq;
+ if (!(qw.b0 > 0))
+ goto lab11; /* error in TFM, abort */
+ } else if (256 *(c - 128)+ d >= nk)
+ goto lab11; /* error in TFM, abort */
+ if (a < 128)
+ if (k - lig_kern_base[f]+ a + 1 >= nl)
+ goto lab11; /* error in TFM, abort */
+ }
+ } while(k++ < for_end);
+ }
if (a == 255)
- bchlabel = 256 * c + d;
- }
+ bchlabel = 256 * c + d;
+ }
/* for k:=kern_base[f]+kern_base_offset to exten_base[f]-1 do */
/* store_scaled(font_info[k].sc); */
- {register integer for_end; k = kern_base[f]+ 256 *(128); for_end =
- exten_base[f]- 1; if (k <= for_end) do
- {
- tfm_temp = getc(tfm_file);
- a = tfm_temp;
- tfm_temp = getc(tfm_file);
- b = tfm_temp;
- tfm_temp = getc(tfm_file);
- c = tfm_temp;
- tfm_temp = getc(tfm_file);
- d = tfm_temp;
- sw =(((((d * z)/ 256)+(c * z)) / 256)+(b * z)) / beta;
+ {
+ register integer for_end;
+ k = kern_base[f] + 256 * (128);
+ for_end = exten_base[f] - 1;
+ if (k <= for_end) do {
+ tfm_temp = getc(tfm_file);
+ a = tfm_temp;
+ tfm_temp = getc(tfm_file);
+ b = tfm_temp;
+ tfm_temp = getc(tfm_file);
+ c = tfm_temp;
+ tfm_temp = getc(tfm_file);
+ d = tfm_temp;
+ sw =(((((d * z) / 256) + (c * z)) / 256) + (b * z)) / beta;
if (a == 0)
- font_info[k].cint = sw;
+ font_info[k].cint = sw;
else if (a == 255)
- font_info[k].cint = sw - alpha;
- else goto lab11;
- }
- while(k++ < for_end); }
+ font_info[k].cint = sw - alpha;
+ else goto lab11;
+ } while(k++ < for_end);
+ }
/* read extensible character recipes */
/* for k:=exten_base[f] to param_base[f]-1 do */
- {register integer for_end; k = exten_base[f]; for_end = param_base[f]
- - 1; if (k <= for_end) do
- {
- {
- tfm_temp = getc(tfm_file);
- a = tfm_temp;
- qw.b0 = a;
- tfm_temp = getc(tfm_file);
- b = tfm_temp;
- qw.b1 = b;
- tfm_temp = getc(tfm_file);
- c = tfm_temp;
- qw.b2 = c;
- tfm_temp = getc(tfm_file);
- d = tfm_temp;
- qw.b3 = d;
-/* store_four_quarters(font_info[k].qqqq); */
- font_info[k].qqqq = qw;
- }
- if (a != 0)
- {
{
- if ((a < bc)||(a > ec))
- goto lab11;
- }
- qw = font_info[char_base[f]+ a].qqqq;
- if (!(qw.b0 > 0))
- goto lab11;
- }
- if (b != 0)
+ register integer for_end;
+ k = exten_base[f];
+ for_end = param_base[f] - 1;
+ if (k <= for_end) do {
{
- {
- if ((b < bc)||(b > ec))
- goto lab11;
- }
- qw = font_info[char_base[f]+ b].qqqq;
- if (!(qw.b0 > 0))
- goto lab11;
- }
- if (c != 0)
- {
- {
- if ((c < bc)||(c > ec))
- goto lab11;
- }
- qw = font_info[char_base[f]+ c].qqqq;
- if (!(qw.b0 > 0))
- goto lab11;
- }
+ tfm_temp = getc(tfm_file);
+ a = tfm_temp;
+ qw.b0 = a;
+ tfm_temp = getc(tfm_file);
+ b = tfm_temp;
+ qw.b1 = b;
+ tfm_temp = getc(tfm_file);
+ c = tfm_temp;
+ qw.b2 = c;
+ tfm_temp = getc(tfm_file);
+ d = tfm_temp;
+ qw.b3 = d;
+/* store_four_quarters(font_info[k].qqqq); */
+ font_info[k].qqqq = qw;
+ }
+ if (a != 0) {
+ {
+ if ((a < bc)||(a > ec))
+ goto lab11;
+ }
+ qw = font_info[char_base[f]+ a].qqqq;
+ if (!(qw.b0 > 0))
+ goto lab11;
+ }
+ if (b != 0) {
+ {
+ if ((b < bc)||(b > ec))
+ goto lab11;
+ }
+ qw = font_info[char_base[f]+ b].qqqq;
+ if (!(qw.b0 > 0))
+ goto lab11;
+ }
+ if (c != 0) {
+ {
+ if ((c < bc)||(c > ec))
+ goto lab11;
+ }
+ qw = font_info[char_base[f]+ c].qqqq;
+ if (!(qw.b0 > 0))
+ goto lab11;
+ }
{
+ {
+ if ((d < bc)||(d > ec))
+ goto lab11;
+ }
+ qw = font_info[char_base[f]+ d].qqqq;
+ if (!(qw.b0 > 0))
+ goto lab11;
+ }
+ } while(k++ < for_end);
+ }
{
- if ((d < bc)||(d > ec))
- goto lab11;
- }
- qw = font_info[char_base[f]+ d].qqqq;
- if (!(qw.b0 > 0))
- goto lab11;
- }
- }
- while(k++ < for_end); }
- {
- {register integer for_end; k = 1; for_end = np; if (k <= for_end) do
- if (k == 1)
- {
- tfm_temp = getc(tfm_file);
- sw = tfm_temp;
- if (sw > 127)
- sw = sw - 256;
- tfm_temp = getc(tfm_file);
- sw = sw * 256 + tfm_temp;
- tfm_temp = getc(tfm_file);
- sw = sw * 256 + tfm_temp;
- tfm_temp = getc(tfm_file);
- font_info[param_base[f]].cint =(sw * 16)+(tfm_temp / 16);
- }
- else {
-
- tfm_temp = getc(tfm_file);
- a = tfm_temp;
- tfm_temp = getc(tfm_file);
- b = tfm_temp;
- tfm_temp = getc(tfm_file);
- c = tfm_temp;
- tfm_temp = getc(tfm_file);
- d = tfm_temp;
- sw =(((((d * z)/ 256)+(c * z)) / 256)+(b * z)) / beta;
- if (a == 0)
- font_info[param_base[f]+ k - 1].cint = sw;
- else if (a == 255)
- font_info[param_base[f]+ k - 1].cint = sw - alpha;
- else goto lab11;
- }
- while(k++ < for_end); }
+ {
+ register integer for_end;
+ k = 1;
+ for_end = np;
+ if (k <= for_end)
+ do if (k == 1) {
+ tfm_temp = getc(tfm_file);
+ sw = tfm_temp;
+ if (sw > 127)
+ sw = sw - 256;
+ tfm_temp = getc(tfm_file);
+ sw = sw * 256 + tfm_temp;
+ tfm_temp = getc(tfm_file);
+ sw = sw * 256 + tfm_temp;
+ tfm_temp = getc(tfm_file);
+ font_info[param_base[f]].cint =(sw * 16)+(tfm_temp / 16);
+ } else {
+ tfm_temp = getc(tfm_file);
+ a = tfm_temp;
+ tfm_temp = getc(tfm_file);
+ b = tfm_temp;
+ tfm_temp = getc(tfm_file);
+ c = tfm_temp;
+ tfm_temp = getc(tfm_file);
+ d = tfm_temp;
+ sw = (((((d * z) / 256) + (c * z)) / 256) + (b * z)) / beta;
+ if (a == 0)
+ font_info[param_base[f] + k - 1].cint = sw;
+ else if (a == 255)
+ font_info[param_base[f] + k - 1].cint = sw - alpha;
+ else goto lab11;
+ } while(k++ < for_end);
+ }
/* use test_eof() here instead ? */
if (feof(tfm_file))
- goto lab11;
- {register integer for_end; k = np + 1; for_end = 7; if (k <= for_end)
- do
- font_info[param_base[f]+ k - 1].cint = 0;
- while(k++ < for_end); }
- }
+ goto lab11;
+ {
+ register integer for_end;
+ k = np + 1;
+ for_end = 7;
+ if (k <= for_end) do
+ font_info[param_base[f] + k - 1].cint = 0;
+ while(k++ < for_end);
+ }
+ }
/* @<Make final adjustments...@>= l.11174 */
if (np >= 7)
- font_params[f]= np;
- else font_params[f]= 7;
+ font_params[f] = np;
+ else
+ font_params[f] = 7;
hyphen_char[f] = default_hyphen_char;
skew_char[f] = default_skew_char;
if (bchlabel < nl)
- bchar_label[f]= bchlabel + lig_kern_base[f];
+ bchar_label[f]= bchlabel + lig_kern_base[f];
/* bchar_label[f]:=non_address; */ /* 3.14159 */
/* else bchar_label[f]= font_mem_size; */ /* OK ??? 93/Nov/28 */
- else bchar_label[f]= non_address; /* i.e. 0 --- 96/Jan/15 */
- font_bchar[f]= bchar;
- font_false_bchar[f]= bchar;
+ else bchar_label[f] = non_address; /* i.e. 0 --- 96/Jan/15 */
+ font_bchar[f] = bchar;
+ font_false_bchar[f] = bchar;
if (bchar <= ec)
- if (bchar >= bc)
- {
- qw = font_info[char_base[f]+ bchar].qqqq;
- if ((qw.b0 > 0))
- font_false_bchar[f]= 256;
- }
- font_name[f] = nom;
- font_area[f] = aire;
- font_bc[f] = bc;
- font_ec[f] = ec;
+ if (bchar >= bc) {
+ qw = font_info[char_base[f]+ bchar].qqqq;
+ if ((qw.b0 > 0))
+ font_false_bchar[f]= 256;
+ }
+ font_name[f] = nom;
+ font_area[f] = aire;
+ font_bc[f] = bc;
+ font_ec[f] = ec;
font_glue[f] = 0; /* font_glue[f]:=null; l.11184 */
- char_base[f] = char_base[f];
- width_base[f] = width_base[f];
- lig_kern_base[f] = lig_kern_base[f];
- kern_base[f] = kern_base[f];
- exten_base[f] = exten_base[f];
- decr(param_base[f]);
- fmem_ptr = fmem_ptr + lf;
- font_ptr = f;
- g = f;
+ char_base[f] = char_base[f];
+ width_base[f] = width_base[f];
+ lig_kern_base[f] = lig_kern_base[f];
+ kern_base[f] = kern_base[f];
+ exten_base[f] = exten_base[f];
+ decr(param_base[f]);
+ fmem_ptr = fmem_ptr + lf;
+ font_ptr = f;
+ g = f;
goto lab30;
lab11:
print_err("Font ");
- sprint_cs(u);
+ sprint_cs(u);
print_char('=');
print_file_name(nom, aire, 335); /* "" */
- if (s >= 0)
- {
+ if (s >= 0) {
print_string(" at ");
- print_scaled(s);
+ print_scaled(s);
print_string("pt");
- }
- else if (s != -1000)
- {
+ } else if (s != -1000) {
print_string("scaled");
- print_int(- (integer) s);
+ print_int(- (integer) s);
}
- if (fileopened)print_string(" not loadable: Bad metric (TFM) file");
- else print_string(" not loadable: Metric (TFM) file not found");
- if (aire == 335) { /* "" only if path not specified */
+ if (fileopened)
+ print_string(" not loadable: Bad metric (TFM) file");
+ else
+ print_string(" not loadable: Metric (TFM) file not found");
+/* "" only if path not specified */
+ if (aire == 335) {
if (show_texinput_flag) show_tex_fonts(); /* 98/Jan/31 */
}
help5("I wasn't able to read the size data for this font,",
- "so I will ignore the font specification.",
- "[Wizards can fix TFM files using TFtoPL/PLtoTF.]",
- "You might try inserting a different font spec;",
- "e.g., type `I\\font<same font id>=<substitute font name>'.");
+ "so I will ignore the font specification.",
+ "[Wizards can fix TFM files using TFtoPL/PLtoTF.]",
+ "You might try inserting a different font spec;",
+ "e.g., type `I\\font<same font id>=<substitute font name>'.");
error();
lab30:
- if (fileopened)b_close(tfm_file);
- Result = g;
- return Result;
+ if (fileopened)
+ b_close(tfm_file);
+ Result = g;
+ return Result;
}
\ No newline at end of file