-/* Copyright 1992 Karl Berry\r
+/*\r
+ Copyright 1992 Karl Berry\r
Copyright 2007 TeX Users Group\r
Copyright 2014 Clerk Ma\r
\r
You should have received a copy of the GNU General Public License\r
along with this program; if not, write to the Free Software\r
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA\r
- 02110-1301 USA. */\r
+ 02110-1301 USA.\r
+*/\r
\r
#define EXTERN\r
\r
for (last = first; buffer[last]; ++last)\r
do_nothing();\r
\r
- for (--last; last >= first && ISBLANK (buffer[last]) && buffer[last] != '\r'; --last)\r
+ for (--last; last >= first && ISBLANK(buffer[last]) && buffer[last] != '\r'; --last)\r
do_nothing();\r
\r
last++;\r
\r
-/* One more time, this time converting to TeX's internal character\r
- representation. */ /* for command line input in this case */\r
if (non_ascii)\r
{\r
for (i = first; i < last; i++)\r
\r
return true;\r
}\r
-\r
-/* Read a line of input into buffer as efficiently as possible (ha ha)\r
- while still looking like Pascal.\r
- We set `last' to `first' and return `false' if we get to eof.\r
- Otherwise, we return `true' and set last = first +\r
- length(line except trailing whitespace). */\r
-\r
+/* sec 0031 */\r
boolean input_line (FILE * f)\r
{\r
char * u; /* 1994/July/3 for key_replace */\r
}\r
}\r
\r
- if (return_flag) /* let return terminate line as well as newline */\r
+ if (return_flag) /* let return terminate line as well as newline */\r
{\r
- if (i == '\r') /* see whether return followed by newline */\r
+ if (i == '\r') /* see whether return followed by newline */\r
{\r
- i = getc (f); /* in which case throw away the newline */\r
+ i = getc(f); /* in which case throw away the newline */\r
\r
if (i != '\n')\r
{\r
- ungetc (i, f);\r
+ ungetc(i, f);\r
i = '\r';\r
}\r
/* else buffer[last-1] = (ASCII_code) i; */\r
\r
static char * edit_value = "c:\\yandy\\WinEdt\\WinEdt.exe [Open('%s');SelLine(%d,7)]";\r
\r
+#ifdef WIN32\r
static inline int Isspace (char c)\r
{\r
return (c == ' ' || c == '\t');\r
}\r
+#endif\r
\r
void call_edit (ASCII_code * filename, pool_pointer fnstart, integer fnlength, integer linenumber)\r
{\r
sdone = ddone = 0;\r
filename += fnstart;\r
\r
- /* Close any open input files, since we're going to kill the job. */\r
+ /* Close any open input files, since we're going to kill the job. */\r
for (i = 1; i <= in_open; i++)\r
#ifdef XeTeX\r
- xfclose (input_file[i]->f, "inputfile");\r
+ xfclose(input_file[i]->f, "inputfile");\r
#else\r
- xfclose (input_file[i], "inputfile");\r
+ xfclose(input_file[i], "inputfile");\r
#endif\r
\r
/* Replace the default with the value of the appropriate environment\r
\r
\r
#if !defined (WORDS_BIGENDIAN) && !defined (NO_FMTBASE_SWAP)\r
-\r
-/* We don't REALLY care what `endian' the machine is after all ! */\r
-\r
-// #ifdef MYDEBUG\r
-// char swapmarkerstring="ERROR: SWAPPING - NOT BigEndian AND NOT NoFmtBaseSwap";\r
-// #endif\r
-\r
-/* This macro is always invoked as a statement. It assumes a variable\r
- `temp'. */\r
\r
#define SWAP(x, y) temp = (x); (x) = (y); (y) = temp;\r
\r
#endif\r
\r
return 0;\r
-}\r
-\r
-#ifdef FUNNY_CORE_DUMP\r
-\r
-void funny_core_dump (void)\r
-{\r
- int pid, w;\r
- union wait status;\r
-\r
- switch (pid = vfork ())\r
- {\r
- case -1:\r
- perrormod ("vfork");\r
- exit (-1);\r
-\r
- case 0:\r
- (void) signal (SIGQUIT, SIG_DFL);\r
- (void) kill (getpid (), SIGQUIT);\r
- (void) write (2, "how did we get here?\n", 21);\r
- exit (1);\r
-\r
- default:\r
- while ((w = wait (&status)) != pid && w != -1)\r
- ;\r
-\r
- if (status.w_coredump)\r
- exit (0);\r
-\r
- (void) write (2, "attempt to dump core failed\n", 28);\r
- exit (1);\r
- }\r
-}\r
-#endif /* FUNNY_CORE_DUMP */
\ No newline at end of file
+}
\ No newline at end of file