From 12b052d0b466b3cbac905bead7c635c5d9a96c9c Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 5 Jul 2022 11:16:08 +0300 Subject: Squashed commit of the following: commit 05b8f271482d472db8d6c2a3764b68dd3543cacc Author: Arnold D. Robbins Date: Sun Jul 3 21:35:43 2022 +0300 Nuke OS/2 stuff. --- ChangeLog | 4 +- NEWS | 3 + README | 6 +- README_d/ChangeLog | 2 + README_d/README.os2 | 57 ---- README_d/README.pc | 10 +- awk.h | 4 +- awkgram.y | 11 - doc/ChangeLog | 4 + doc/gawk.info | 845 +++++++++++++++++++++++++-------------------------- doc/gawk.texi | 8 - doc/gawktexi.in | 8 - gawkmisc.c | 2 +- io.c | 56 +--- main.c | 2 - missing_d/ChangeLog | 4 + missing_d/snprintf.c | 4 +- nonposix.h | 18 +- pc/ChangeLog | 5 + pc/Makefile | 46 +-- pc/config.h | 8 - pc/config.sed | 8 - pc/gawkmisc.pc | 263 +--------------- 23 files changed, 468 insertions(+), 910 deletions(-) delete mode 100644 README_d/README.os2 diff --git a/ChangeLog b/ChangeLog index 3fdbea98..94f43869 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2022-07-03 Arnold D. Robbins - * README: Updated. + * README: Updated. Remove mention of OS/2. + * awk.h, awgram.y. gawkmisc.c, io.c, main.c, nonposix.h: + Remove all code for __EMX__. 2022-06-20 Arnold D. Robbins diff --git a/NEWS b/NEWS index 1f7f66e6..93f683a3 100644 --- a/NEWS +++ b/NEWS @@ -49,6 +49,9 @@ allowing gawk to preserve the contents of its variables and arrays between runs. THIS IS AN EXPERIMENTAL FEATURE! For more information, see the manual. +10. Support for OS/2 has been removed. It was not being actively +maintained. + Changes from 5.1.1 to 5.1.2 --------------------------- diff --git a/README b/README index 316d686b..1c9d52af 100644 --- a/README +++ b/README @@ -42,7 +42,7 @@ want to get a copy of Bison from the FSF too.) The build mechanics depend upon Bison. Also, gawk doesn't work correctly with some versions of yacc, so just use Bison. -If you have an MS-DOS, MS-Windows, or OS/2 system, use the stuff in the `pc' +If you have an MS-DOS, or MS-Windows system, use the stuff in the `pc' directory. Similarly, there is a separate directory for VMS. Appendix B of ``GAWK: Effective Awk Programming'' discusses configuration @@ -95,10 +95,6 @@ MS-Windows with MinGW: Eli Zaretskii eliz@gnu.org -OS/2: - Andreas Buening - andreas.buening@nexgo.de - VMS: John Malmberg wb8tyw@qsl.net diff --git a/README_d/ChangeLog b/README_d/ChangeLog index 96c64813..75bf9693 100644 --- a/README_d/ChangeLog +++ b/README_d/ChangeLog @@ -2,6 +2,8 @@ * README.gcc-3: Deleted. * README.mpfr: Updated. + * README.os: Removed. + * README.pc: Updated. 2021-10-27 Arnold D. Robbins diff --git a/README_d/README.os2 b/README_d/README.os2 deleted file mode 100644 index c12f82db..00000000 --- a/README_d/README.os2 +++ /dev/null @@ -1,57 +0,0 @@ -From andreas.buening@nexgo.de Thu Oct 19 15:34:16 2017 -Date: Thu, 19 Oct 2017 23:34:09 +0200 (CEST) -From: =?UTF-8?Q?Andreas_B=C3=BCning?= -To: arnold@skeeve.com -Message-ID: <1433289104.12656.1508448849820@mail.vodafone.de> -Subject: Re: gawk for OS/2 - any updates? - -Hello Arnold, - -I'd like to inform you about the current state of compiling gawk on -OS/2: - -1. Compilation - -Running ./configure does work but - -- I tried only running with --disable-nls, so with NLS I didn't test. -- Depending on the gcc version you use you may get linker errors. In - that case add 'CFLAGS=-O2 -g -fgnu89-inline' to the configure options - (-O2 -g already is the default). - - -2. Tests - -It is possible to run the built-in checks but many test results depend -on the shell being used. I recommend to use 'make -i check' to run -the tests because some failures might cause a immediate termination -of the make run. - -- If your shell uses \r\n linebreaks (in that case all tests fail) - then you have to run 'make -i check CMP=diff' to ignore the linebreak - differences at the test result comparison. -- Depending on the shell some tests might just hang forever. Press - Ctrl+C and/or Ctrl+Break until the tests continue. -- OS/2 can only load DLLs with filenames up to 8+3 bytes but gawk - creates three internal DLLs with longer names (e.g. filefuncs.dll, - revoutput.dll, revtwoway.dll). Thus, all tests trying to load - filefuncs.dll or the other two DLLs will fail. This is not a bug - of gawk. If you change e.g. the '@load filefuncs' directive to - '@load filefunc' in the according *.awk file then the tests will - succeed. -- The number of failling tests is currently around 50, less if your - shell uses \r\n linebreaks, more otherwise. - -Best wishes, - -Andreas Buening -====================================================== - -Sat Oct 21 21:01:49 IDT 2017 -============================ - -Fixes for loading extension libraries have since been included -in the git repo and will be part of 4.2.1. - -Arnold Robbins -arnold@skeeve.com diff --git a/README_d/README.pc b/README_d/README.pc index eb9e8fe1..a366c661 100644 --- a/README_d/README.pc +++ b/README_d/README.pc @@ -2,8 +2,7 @@ This is the README for GNU awk 4 under Windows32, OS/2, and DOS. Gawk has been compiled and tested under OS/2, DOS, and Windows32 using the GNU development tools from DJ Delorie (DJGPP; DOS with special -support for long filenames on Windows), Eberhard Mattes (EMX; OS/2, -DOS, and Windows32 with rsxnt), and Jan-Jaap van der Heijden and Mumit Khan +support for long filenames on Windows), and Jan-Jaap van der Heijden and Mumit Khan (Mingw32; Windows32). The Cygwin environment (http://cygwin.com) may also be used @@ -38,7 +37,7 @@ gawk will be installed under $(prefix)/lib/awk (e.g., /gnu/lib/awk), it is convenient to have this directory in DEFPATH of config.h. The makefile contains a number of targets for building various DOS and -OS/2 versions. A list of targets will be printed if the make command is +Windows versions. A list of targets will be printed if the make command is given without a target. As an example, to build gawk using the djgpp tools, enter "make djgpp". @@ -102,14 +101,11 @@ additional help on changes for Windows32. ---- -If you have any problems with the DOS or OS/2 versions of Gawk, +If you have any problems with the DOS versions of Gawk, please send bug reports (along with the version and compiler used) to Juan Manuel Guerrero, juan.guerrero@gmx.de (DJGPP) -or - - andreas.buening@nexgo.de (OS/2 version) Support for Windows32 started in gawk-3.0.3. diff --git a/awk.h b/awk.h index 16b852ae..0da24149 100644 --- a/awk.h +++ b/awk.h @@ -169,9 +169,9 @@ extern void *memset_ulong(void *dest, int val, unsigned long l); #define fwrite fwrite_unlocked #endif /* HAVE_FWRITE_UNLOCKED */ -#if defined(__DJGPP__) || defined(__EMX__) || defined(__MINGW32__) +#if defined(__DJGPP__) || defined(__MINGW32__) #include "nonposix.h" -#endif /* defined(__DJGPP__) || defined(__EMX__) || defined(__MINGW32__) */ +#endif /* defined(__DJGPP__) || defined(__MINGW32__) */ /* use this as lintwarn("...") this is a hack but it gives us the right semantics */ diff --git a/awkgram.y b/awkgram.y index daf90a5b..36cac704 100644 --- a/awkgram.y +++ b/awkgram.y @@ -3612,17 +3612,6 @@ yylex(void) return lasttok = NEWLINE_EOF; pushback(); -#if defined __EMX__ - /* - * added for OS/2's extproc feature of cmd.exe - * (like #! in BSD sh) - */ - if (strncasecmp(lexptr, "extproc ", 8) == 0) { - while (*lexptr && *lexptr != '\n') - lexptr++; - } -#endif - lexeme = lexptr; thisline = NULL; diff --git a/doc/ChangeLog b/doc/ChangeLog index 61eef4f3..7963cc16 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2022-07-03 Arnold D. Robbins + + * gawktexi.in: Remove stuff related to OS/2. + 2022-06-29 Arnold D. Robbins * gawktexi.in (Persistent Memory): Note that only 64-bit diff --git a/doc/gawk.info b/doc/gawk.info index 31f85ac8..638f2195 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -11439,9 +11439,6 @@ they are not special: Microsoft Windows, using either DJGPP or MinGW, respectively. - '"os2"' - OS/2. - '"os390"' OS/390. @@ -32299,8 +32296,6 @@ MS-DOS with DJGPP Juan Manuel Guerrero, MS-Windows with MinGW Eli Zaretskii, -OS/2 Andreas Buening, - VMS John Malmberg, z/OS (OS/390) Daniel Richard G. @@ -36512,7 +36507,7 @@ Index * dark corner, exit statement: Exit Statement. (line 30) * dark corner, value of ARGV[0]: Auto-set. (line 39) * dark corner, FILENAME variable <1>: Auto-set. (line 108) -* dark corner, FNR/NR variables: Auto-set. (line 409) +* dark corner, FNR/NR variables: Auto-set. (line 406) * dark corner, array subscripts: Uninitialized Subscripts. (line 43) * dark corner, regexp as second argument to index(): String Functions. @@ -36761,8 +36756,8 @@ Index * differences in awk and gawk, ERRNO variable: Auto-set. (line 87) * differences in awk and gawk, FUNCTAB variable: Auto-set. (line 134) * differences in awk and gawk, PROCINFO array: Auto-set. (line 148) -* differences in awk and gawk, RS/RT variables <3>: Auto-set. (line 348) -* differences in awk and gawk, SYMTAB variable: Auto-set. (line 352) +* differences in awk and gawk, RS/RT variables <3>: Auto-set. (line 345) +* differences in awk and gawk, SYMTAB variable: Auto-set. (line 349) * differences in awk and gawk, ARGC/ARGV variables: ARGC and ARGV. (line 89) * differences in awk and gawk, array elements, deleting: Delete. @@ -36959,7 +36954,7 @@ Index * expressions, selecting: Conditional Exp. (line 6) * expressions, as patterns: Expression Patterns. (line 6) * Extended Regular Expressions (EREs): Bracket Expressions. (line 34) -* extension API, version number: Auto-set. (line 287) +* extension API, version number: Auto-set. (line 284) * extension API, interaction with namespaces: Namespace And Features. (line 22) * extension API: Extension API Description. @@ -37135,7 +37130,7 @@ Index (line 12) * FNR variable: Records. (line 6) * FNR variable <1>: Auto-set. (line 118) -* FNR variable, changing: Auto-set. (line 409) +* FNR variable, changing: Auto-set. (line 406) * for statement: For Statement. (line 6) * for statement, looping over arrays: Scanning an Array. (line 20) * fork() extension function: Extension Sample Fork. @@ -37299,9 +37294,9 @@ Index * gawk, ERRNO variable in <3>: Auto-set. (line 87) * gawk, FUNCTAB array in: Auto-set. (line 134) * gawk, PROCINFO array in <1>: Auto-set. (line 148) -* gawk, version of: Auto-set. (line 262) -* gawk, RT variable in <3>: Auto-set. (line 348) -* gawk, SYMTAB array in: Auto-set. (line 352) +* gawk, version of: Auto-set. (line 259) +* gawk, RT variable in <3>: Auto-set. (line 345) +* gawk, SYMTAB array in: Auto-set. (line 349) * gawk, IGNORECASE variable in <2>: Array Intro. (line 100) * gawk, function arguments and: Calling Built-in. (line 16) * gawk, IGNORECASE variable in <3>: String Functions. (line 57) @@ -37745,7 +37740,7 @@ Index * mawk utility <2>: Concatenation. (line 36) * mawk utility <3>: Nextfile Statement. (line 47) * mawk utility <4>: Other Versions. (line 39) -* maximum precision supported by MPFR library: Auto-set. (line 276) +* maximum precision supported by MPFR library: Auto-set. (line 273) * McIlroy, Doug: Glossary. (line 255) * McPhee, Patrick T.J.: Contributors. (line 103) * memory, allocating for extensions: Memory Allocation Functions. @@ -37760,7 +37755,7 @@ Index * messages from extensions: Printing Messages. (line 6) * metacharacters, escape sequences for: Escape Sequences. (line 139) * metacharacters, in regular expressions: Regexp Operators. (line 6) -* minimum precision required by MPFR library: Auto-set. (line 279) +* minimum precision required by MPFR library: Auto-set. (line 276) * Minshall, Greg: Getopt Function. (line 105) * mkbool: Boolean Functions. (line 10) * mktime: Time Functions. (line 25) @@ -37857,7 +37852,7 @@ Index * not Boolean-logic operator: Boolean Ops. (line 6) * NR variable: Records. (line 6) * NR variable <1>: Auto-set. (line 143) -* NR variable, changing: Auto-set. (line 409) +* NR variable, changing: Auto-set. (line 406) * null strings, in gawk arguments, quoting and: Quoting. (line 82) * null strings, in gawk arguments, quoting and <1>: Other Arguments. (line 73) @@ -37974,7 +37969,7 @@ Index (line 39) * package, definition of: Global Namespace. (line 18) * Papadopoulos, Panos: Contributors. (line 131) -* parent process ID of gawk process: Auto-set. (line 251) +* parent process ID of gawk process: Auto-set. (line 248) * parentheses (), regexp operator: Regexp Operator Details. (line 77) * parentheses (), in a profile: Profiling. (line 146) @@ -38173,8 +38168,8 @@ Index * printing, mailing labels: Labels Program. (line 6) * printing, messages from extensions: Printing Messages. (line 6) * private variables: Library Names. (line 11) -* process group ID of gawk process: Auto-set. (line 245) -* process ID of gawk process: Auto-set. (line 248) +* process group ID of gawk process: Auto-set. (line 242) +* process ID of gawk process: Auto-set. (line 245) * processes, two-way communications with: Two-way I/O. (line 6) * processing data: Basic High Level. (line 6) * PROCINFO array: Auto-set. (line 148) @@ -38364,7 +38359,7 @@ Index * right angle bracket (>), >> operator (I/O) <1>: Precedence. (line 64) * right shift, bitwise: Bitwise Functions. (line 33) * Ritchie, Dennis: Basic Data Typing. (line 54) -* RLENGTH variable: Auto-set. (line 335) +* RLENGTH variable: Auto-set. (line 332) * RLENGTH variable, match() function and: String Functions. (line 241) * Robbins, Miriam: Acknowledgments. (line 94) * Robbins, Jean: Acknowledgments. (line 94) @@ -38394,12 +38389,12 @@ Index * RS variable, multiline records and: Multiple Line. (line 17) * RS variable <1>: User-modified. (line 135) * rshift: Bitwise Functions. (line 55) -* RSTART variable: Auto-set. (line 341) +* RSTART variable: Auto-set. (line 338) * RSTART variable, match() function and: String Functions. (line 241) * RT variable: awk split records. (line 118) * RT variable <1>: gawk split records. (line 66) * RT variable <2>: Multiple Line. (line 138) -* RT variable <3>: Auto-set. (line 348) +* RT variable <3>: Auto-set. (line 345) * Rubin, Paul: History. (line 30) * Rubin, Paul <1>: Contributors. (line 16) * rule, definition of: Getting Started. (line 21) @@ -38417,7 +38412,7 @@ Index * scanning arrays: Scanning an Array. (line 6) * scanning multidimensional arrays: Multiscanning. (line 11) * Schorr, Andrew: Acknowledgments. (line 60) -* Schorr, Andrew <1>: Auto-set. (line 379) +* Schorr, Andrew <1>: Auto-set. (line 376) * Schorr, Andrew <2>: Contributors. (line 136) * Schreiber, Bert: Acknowledgments. (line 38) * Schreiber, Rita: Acknowledgments. (line 38) @@ -38541,7 +38536,7 @@ Index * sidebar, Syntactic Ambiguities Between /= and Regular Expressions: Assignment Ops. (line 148) * sidebar, Operator Evaluation Order: Increment Ops. (line 58) -* sidebar, Changing NR and FNR: Auto-set. (line 407) +* sidebar, Changing NR and FNR: Auto-set. (line 404) * sidebar, Matching the Null String: String Functions. (line 561) * sidebar, Interactive Versus Noninteractive Buffering: I/O Functions. (line 73) @@ -38699,9 +38694,9 @@ Index * substr: String Functions. (line 499) * substring: String Functions. (line 499) * Sumner, Andrew: Other Versions. (line 64) -* supplementary groups of gawk process: Auto-set. (line 292) +* supplementary groups of gawk process: Auto-set. (line 289) * switch statement: Switch Statement. (line 6) -* SYMTAB array: Auto-set. (line 352) +* SYMTAB array: Auto-set. (line 349) * syntactic ambiguity: /= operator vs. /=.../ regexp constant: Assignment Ops. (line 150) * system: I/O Functions. (line 105) @@ -38920,10 +38915,10 @@ Index * variables, global, for library functions: Library Names. (line 11) * variables, private: Library Names. (line 11) * variables <1>: Basic Data Typing. (line 6) -* version of, gawk: Auto-set. (line 262) -* version of, GNU MP library: Auto-set. (line 270) -* version of, GNU MPFR library: Auto-set. (line 272) -* version of, gawk extension API: Auto-set. (line 287) +* version of, gawk: Auto-set. (line 259) +* version of, GNU MP library: Auto-set. (line 267) +* version of, GNU MPFR library: Auto-set. (line 269) +* version of, gawk extension API: Auto-set. (line 284) * vertical bar (|): Regexp Operator Details. (line 66) * vertical bar (|), | operator (I/O): Getline/Pipe. (line 10) @@ -39210,401 +39205,401 @@ Node: Exit Statement469789 Node: Built-in Variables472192 Node: User-modified473325 Node: Auto-set481092 -Ref: Auto-set-Footnote-1497899 -Ref: Auto-set-Footnote-2498105 -Node: ARGC and ARGV498161 -Node: Pattern Action Summary502374 -Node: Arrays504804 -Node: Array Basics506133 -Node: Array Intro506977 -Ref: figure-array-elements508952 -Ref: Array Intro-Footnote-1511657 -Node: Reference to Elements511785 -Node: Assigning Elements514249 -Node: Array Example514740 -Node: Scanning an Array516694 -Node: Controlling Scanning519716 -Ref: Controlling Scanning-Footnote-1526172 -Node: Numeric Array Subscripts526488 -Node: Uninitialized Subscripts528672 -Node: Delete530291 -Ref: Delete-Footnote-1533043 -Node: Multidimensional533100 -Node: Multiscanning536195 -Node: Arrays of Arrays537786 -Node: Arrays Summary542554 -Node: Functions544647 -Node: Built-in545685 -Node: Calling Built-in546838 -Node: Boolean Functions548834 -Node: Numeric Functions549388 -Ref: Numeric Functions-Footnote-1553415 -Ref: Numeric Functions-Footnote-2554063 -Ref: Numeric Functions-Footnote-3554111 -Node: String Functions554383 -Ref: String Functions-Footnote-1579225 -Ref: String Functions-Footnote-2579353 -Ref: String Functions-Footnote-3579601 -Node: Gory Details579688 -Ref: table-sub-escapes581479 -Ref: table-sub-proposed582999 -Ref: table-posix-sub584363 -Ref: table-gensub-escapes585905 -Ref: Gory Details-Footnote-1586729 -Node: I/O Functions586883 -Ref: table-system-return-values593337 -Ref: I/O Functions-Footnote-1595418 -Ref: I/O Functions-Footnote-2595566 -Node: Time Functions595686 -Ref: Time Functions-Footnote-1606357 -Ref: Time Functions-Footnote-2606425 -Ref: Time Functions-Footnote-3606583 -Ref: Time Functions-Footnote-4606694 -Ref: Time Functions-Footnote-5606806 -Ref: Time Functions-Footnote-6607033 -Node: Bitwise Functions607299 -Ref: table-bitwise-ops607893 -Ref: Bitwise Functions-Footnote-1613957 -Ref: Bitwise Functions-Footnote-2614130 -Node: Type Functions614321 -Node: I18N Functions617741 -Node: User-defined619392 -Node: Definition Syntax620204 -Ref: Definition Syntax-Footnote-1625898 -Node: Function Example625969 -Ref: Function Example-Footnote-1628891 -Node: Function Calling628913 -Node: Calling A Function629501 -Node: Variable Scope630459 -Node: Pass By Value/Reference633453 -Node: Function Caveats636097 -Ref: Function Caveats-Footnote-1638144 -Node: Return Statement638264 -Node: Dynamic Typing641243 -Node: Indirect Calls642173 -Node: Functions Summary653100 -Node: Library Functions655805 -Ref: Library Functions-Footnote-1659412 -Ref: Library Functions-Footnote-2659555 -Node: Library Names659726 -Ref: Library Names-Footnote-1663393 -Ref: Library Names-Footnote-2663616 -Node: General Functions663702 -Node: Strtonum Function664884 -Node: Assert Function667906 -Node: Round Function671232 -Node: Cliff Random Function672772 -Node: Ordinal Functions673788 -Ref: Ordinal Functions-Footnote-1676851 -Ref: Ordinal Functions-Footnote-2677103 -Node: Join Function677313 -Ref: Join Function-Footnote-1679083 -Node: Getlocaltime Function679283 -Node: Readfile Function683025 -Node: Shell Quoting685002 -Node: Isnumeric Function686430 -Node: Data File Management687818 -Node: Filetrans Function688450 -Node: Rewind Function692546 -Node: File Checking694455 -Ref: File Checking-Footnote-1695789 -Node: Empty Files695990 -Node: Ignoring Assigns697969 -Node: Getopt Function699519 -Ref: Getopt Function-Footnote-1714816 -Node: Passwd Functions715016 -Ref: Passwd Functions-Footnote-1723855 -Node: Group Functions723943 -Ref: Group Functions-Footnote-1731841 -Node: Walking Arrays732048 -Node: Library Functions Summary735056 -Node: Library Exercises736462 -Node: Sample Programs736927 -Node: Running Examples737697 -Node: Clones738425 -Node: Cut Program739649 -Node: Egrep Program749789 -Node: Id Program758790 -Node: Split Program768725 -Ref: Split Program-Footnote-1778618 -Node: Tee Program778791 -Node: Uniq Program781581 -Node: Wc Program789169 -Node: Bytes vs. Characters789556 -Node: Using extensions791104 -Node: wc program791858 -Node: Miscellaneous Programs796723 -Node: Dupword Program797936 -Node: Alarm Program799966 -Node: Translate Program804821 -Ref: Translate Program-Footnote-1809386 -Node: Labels Program809656 -Ref: Labels Program-Footnote-1813007 -Node: Word Sorting813091 -Node: History Sorting817163 -Node: Extract Program819388 -Node: Simple Sed827401 -Node: Igawk Program830475 -Ref: Igawk Program-Footnote-1844806 -Ref: Igawk Program-Footnote-2845008 -Ref: Igawk Program-Footnote-3845130 -Node: Anagram Program845245 -Node: Signature Program848307 -Node: Programs Summary849554 -Node: Programs Exercises850768 -Ref: Programs Exercises-Footnote-1854898 -Node: Advanced Features854984 -Node: Nondecimal Data857381 -Node: Boolean Typed Values858979 -Node: Array Sorting860860 -Node: Controlling Array Traversal861565 -Ref: Controlling Array Traversal-Footnote-1869933 -Node: Array Sorting Functions870051 -Ref: Array Sorting Functions-Footnote-1875962 -Node: Two-way I/O876158 -Ref: Two-way I/O-Footnote-1883884 -Ref: Two-way I/O-Footnote-2884071 -Node: TCP/IP Networking884153 -Node: Profiling887229 -Node: Persistent Memory896535 -Ref: Persistent Memory-Footnote-1902704 -Node: Extension Philosophy902831 -Node: Advanced Features Summary904318 -Node: Internationalization906490 -Node: I18N and L10N908164 -Node: Explaining gettext908851 -Ref: Explaining gettext-Footnote-1914743 -Ref: Explaining gettext-Footnote-2914928 -Node: Programmer i18n915093 -Ref: Programmer i18n-Footnote-1920042 -Node: Translator i18n920091 -Node: String Extraction920885 -Ref: String Extraction-Footnote-1922017 -Node: Printf Ordering922103 -Ref: Printf Ordering-Footnote-1924889 -Node: I18N Portability924953 -Ref: I18N Portability-Footnote-1927409 -Node: I18N Example927472 -Ref: I18N Example-Footnote-1930747 -Ref: I18N Example-Footnote-2930820 -Node: Gawk I18N930929 -Node: I18N Summary931551 -Node: Debugger932892 -Node: Debugging933892 -Node: Debugging Concepts934333 -Node: Debugging Terms936142 -Node: Awk Debugging938717 -Ref: Awk Debugging-Footnote-1939662 -Node: Sample Debugging Session939794 -Node: Debugger Invocation940328 -Node: Finding The Bug941714 -Node: List of Debugger Commands948188 -Node: Breakpoint Control949521 -Node: Debugger Execution Control953215 -Node: Viewing And Changing Data956577 -Node: Execution Stack960118 -Node: Debugger Info961755 -Node: Miscellaneous Debugger Commands965826 -Node: Readline Support970888 -Node: Limitations971784 -Node: Debugging Summary974338 -Node: Namespaces975617 -Node: Global Namespace976728 -Node: Qualified Names978126 -Node: Default Namespace979125 -Node: Changing The Namespace979866 -Node: Naming Rules981480 -Node: Internal Name Management983328 -Node: Namespace Example984370 -Node: Namespace And Features986932 -Node: Namespace Summary988367 -Node: Arbitrary Precision Arithmetic989844 -Node: Computer Arithmetic991331 -Ref: table-numeric-ranges995097 -Ref: table-floating-point-ranges995591 -Ref: Computer Arithmetic-Footnote-1996250 -Node: Math Definitions996307 -Ref: table-ieee-formats999283 -Node: MPFR features999851 -Node: MPFR On Parole1000296 -Ref: MPFR On Parole-Footnote-11001125 -Node: MPFR Intro1001280 -Node: FP Math Caution1002919 -Ref: FP Math Caution-Footnote-11003991 -Node: Inexactness of computations1004360 -Node: Inexact representation1005391 -Node: Comparing FP Values1006751 -Node: Errors accumulate1007992 -Node: Strange values1009448 -Ref: Strange values-Footnote-11012036 -Node: Getting Accuracy1012141 -Node: Try To Round1014851 -Node: Setting precision1015750 -Ref: table-predefined-precision-strings1016447 -Node: Setting the rounding mode1018278 -Ref: table-gawk-rounding-modes1018652 -Ref: Setting the rounding mode-Footnote-11022584 -Node: Arbitrary Precision Integers1022763 -Ref: Arbitrary Precision Integers-Footnote-11025938 -Node: Checking for MPFR1026087 -Node: POSIX Floating Point Problems1027561 -Ref: POSIX Floating Point Problems-Footnote-11032214 -Node: Floating point summary1032252 -Node: Dynamic Extensions1034442 -Node: Extension Intro1035995 -Node: Plugin License1037261 -Node: Extension Mechanism Outline1038058 -Ref: figure-load-extension1038497 -Ref: figure-register-new-function1040063 -Ref: figure-call-new-function1041156 -Node: Extension API Description1043219 -Node: Extension API Functions Introduction1044932 -Ref: table-api-std-headers1046768 -Node: General Data Types1051018 -Ref: General Data Types-Footnote-11059724 -Node: Memory Allocation Functions1060023 -Ref: Memory Allocation Functions-Footnote-11064524 -Node: Constructor Functions1064623 -Node: API Ownership of MPFR and GMP Values1068276 -Node: Registration Functions1069809 -Node: Extension Functions1070509 -Node: Exit Callback Functions1075831 -Node: Extension Version String1077081 -Node: Input Parsers1077744 -Node: Output Wrappers1090465 -Node: Two-way processors1094977 -Node: Printing Messages1097242 -Ref: Printing Messages-Footnote-11098413 -Node: Updating ERRNO1098566 -Node: Requesting Values1099305 -Ref: table-value-types-returned1100042 -Node: Accessing Parameters1101151 -Node: Symbol Table Access1102388 -Node: Symbol table by name1102900 -Ref: Symbol table by name-Footnote-11105925 -Node: Symbol table by cookie1106053 -Ref: Symbol table by cookie-Footnote-11110238 -Node: Cached values1110302 -Ref: Cached values-Footnote-11113838 -Node: Array Manipulation1113991 -Ref: Array Manipulation-Footnote-11115082 -Node: Array Data Types1115119 -Ref: Array Data Types-Footnote-11117777 -Node: Array Functions1117869 -Node: Flattening Arrays1122654 -Node: Creating Arrays1129630 -Node: Redirection API1134397 -Node: Extension API Variables1137230 -Node: Extension Versioning1137941 -Ref: gawk-api-version1138370 -Node: Extension GMP/MPFR Versioning1140102 -Node: Extension API Informational Variables1141730 -Node: Extension API Boilerplate1142803 -Node: Changes from API V11146777 -Node: Finding Extensions1148349 -Node: Extension Example1148908 -Node: Internal File Description1149706 -Node: Internal File Ops1153786 -Ref: Internal File Ops-Footnote-11165136 -Node: Using Internal File Ops1165276 -Ref: Using Internal File Ops-Footnote-11167659 -Node: Extension Samples1167933 -Node: Extension Sample File Functions1169462 -Node: Extension Sample Fnmatch1177111 -Node: Extension Sample Fork1178598 -Node: Extension Sample Inplace1179816 -Node: Extension Sample Ord1183442 -Node: Extension Sample Readdir1184278 -Ref: table-readdir-file-types1185167 -Node: Extension Sample Revout1186235 -Node: Extension Sample Rev2way1186824 -Node: Extension Sample Read write array1187564 -Node: Extension Sample Readfile1190729 -Node: Extension Sample Time1191824 -Node: Extension Sample API Tests1193576 -Node: gawkextlib1194068 -Node: Extension summary1196986 -Node: Extension Exercises1200688 -Node: Language History1201930 -Node: V7/SVR3.11203586 -Node: SVR41205738 -Node: POSIX1207172 -Node: BTL1208553 -Node: POSIX/GNU1209282 -Node: Feature History1215060 -Node: Common Extensions1232235 -Node: Ranges and Locales1233518 -Ref: Ranges and Locales-Footnote-11238134 -Ref: Ranges and Locales-Footnote-21238161 -Ref: Ranges and Locales-Footnote-31238396 -Node: Contributors1238619 -Node: History summary1244616 -Node: Installation1245996 -Node: Gawk Distribution1246940 -Node: Getting1247424 -Node: Extracting1248387 -Node: Distribution contents1250025 -Node: Unix Installation1257086 -Node: Quick Installation1257890 -Node: Compiling with MPFR1260310 -Node: Shell Startup Files1261000 -Node: Additional Configuration Options1262089 -Node: Configuration Philosophy1264404 -Node: Compiling from Git1266800 -Node: Building the Documentation1267355 -Node: Non-Unix Installation1268739 -Node: PC Installation1269199 -Node: PC Binary Installation1270037 -Node: PC Compiling1270910 -Node: PC Using1272027 -Node: Cygwin1275580 -Node: MSYS1276804 -Node: VMS Installation1277406 -Node: VMS Compilation1278125 -Ref: VMS Compilation-Footnote-11279354 -Node: VMS Dynamic Extensions1279412 -Node: VMS Installation Details1281097 -Node: VMS Running1283359 -Node: VMS GNV1287638 -Node: Bugs1288352 -Node: Bug definition1289264 -Node: Bug address1292200 -Node: Usenet1295388 -Node: Performance bugs1296577 -Node: Asking for help1299498 -Node: Maintainers1301465 -Node: Other Versions1302659 -Node: Installation summary1310929 -Node: Notes1312293 -Node: Compatibility Mode1313087 -Node: Additions1313869 -Node: Accessing The Source1314794 -Node: Adding Code1316231 -Node: New Ports1323046 -Node: Derived Files1327421 -Ref: Derived Files-Footnote-11333081 -Ref: Derived Files-Footnote-21333116 -Ref: Derived Files-Footnote-31333714 -Node: Future Extensions1333828 -Node: Implementation Limitations1334486 -Node: Extension Design1335696 -Node: Old Extension Problems1336840 -Ref: Old Extension Problems-Footnote-11338358 -Node: Extension New Mechanism Goals1338415 -Ref: Extension New Mechanism Goals-Footnote-11341779 -Node: Extension Other Design Decisions1341968 -Node: Extension Future Growth1344081 -Node: Notes summary1344687 -Node: Basic Concepts1345845 -Node: Basic High Level1346526 -Ref: figure-general-flow1346808 -Ref: figure-process-flow1347494 -Ref: Basic High Level-Footnote-11350796 -Node: Basic Data Typing1350981 -Node: Glossary1354309 -Node: Copying1386196 -Node: GNU Free Documentation License1423739 -Node: Index1448859 +Ref: Auto-set-Footnote-1497859 +Ref: Auto-set-Footnote-2498065 +Node: ARGC and ARGV498121 +Node: Pattern Action Summary502334 +Node: Arrays504764 +Node: Array Basics506093 +Node: Array Intro506937 +Ref: figure-array-elements508912 +Ref: Array Intro-Footnote-1511617 +Node: Reference to Elements511745 +Node: Assigning Elements514209 +Node: Array Example514700 +Node: Scanning an Array516654 +Node: Controlling Scanning519676 +Ref: Controlling Scanning-Footnote-1526132 +Node: Numeric Array Subscripts526448 +Node: Uninitialized Subscripts528632 +Node: Delete530251 +Ref: Delete-Footnote-1533003 +Node: Multidimensional533060 +Node: Multiscanning536155 +Node: Arrays of Arrays537746 +Node: Arrays Summary542514 +Node: Functions544607 +Node: Built-in545645 +Node: Calling Built-in546798 +Node: Boolean Functions548794 +Node: Numeric Functions549348 +Ref: Numeric Functions-Footnote-1553375 +Ref: Numeric Functions-Footnote-2554023 +Ref: Numeric Functions-Footnote-3554071 +Node: String Functions554343 +Ref: String Functions-Footnote-1579185 +Ref: String Functions-Footnote-2579313 +Ref: String Functions-Footnote-3579561 +Node: Gory Details579648 +Ref: table-sub-escapes581439 +Ref: table-sub-proposed582959 +Ref: table-posix-sub584323 +Ref: table-gensub-escapes585865 +Ref: Gory Details-Footnote-1586689 +Node: I/O Functions586843 +Ref: table-system-return-values593297 +Ref: I/O Functions-Footnote-1595378 +Ref: I/O Functions-Footnote-2595526 +Node: Time Functions595646 +Ref: Time Functions-Footnote-1606317 +Ref: Time Functions-Footnote-2606385 +Ref: Time Functions-Footnote-3606543 +Ref: Time Functions-Footnote-4606654 +Ref: Time Functions-Footnote-5606766 +Ref: Time Functions-Footnote-6606993 +Node: Bitwise Functions607259 +Ref: table-bitwise-ops607853 +Ref: Bitwise Functions-Footnote-1613917 +Ref: Bitwise Functions-Footnote-2614090 +Node: Type Functions614281 +Node: I18N Functions617701 +Node: User-defined619352 +Node: Definition Syntax620164 +Ref: Definition Syntax-Footnote-1625858 +Node: Function Example625929 +Ref: Function Example-Footnote-1628851 +Node: Function Calling628873 +Node: Calling A Function629461 +Node: Variable Scope630419 +Node: Pass By Value/Reference633413 +Node: Function Caveats636057 +Ref: Function Caveats-Footnote-1638104 +Node: Return Statement638224 +Node: Dynamic Typing641203 +Node: Indirect Calls642133 +Node: Functions Summary653060 +Node: Library Functions655765 +Ref: Library Functions-Footnote-1659372 +Ref: Library Functions-Footnote-2659515 +Node: Library Names659686 +Ref: Library Names-Footnote-1663353 +Ref: Library Names-Footnote-2663576 +Node: General Functions663662 +Node: Strtonum Function664844 +Node: Assert Function667866 +Node: Round Function671192 +Node: Cliff Random Function672732 +Node: Ordinal Functions673748 +Ref: Ordinal Functions-Footnote-1676811 +Ref: Ordinal Functions-Footnote-2677063 +Node: Join Function677273 +Ref: Join Function-Footnote-1679043 +Node: Getlocaltime Function679243 +Node: Readfile Function682985 +Node: Shell Quoting684962 +Node: Isnumeric Function686390 +Node: Data File Management687778 +Node: Filetrans Function688410 +Node: Rewind Function692506 +Node: File Checking694415 +Ref: File Checking-Footnote-1695749 +Node: Empty Files695950 +Node: Ignoring Assigns697929 +Node: Getopt Function699479 +Ref: Getopt Function-Footnote-1714776 +Node: Passwd Functions714976 +Ref: Passwd Functions-Footnote-1723815 +Node: Group Functions723903 +Ref: Group Functions-Footnote-1731801 +Node: Walking Arrays732008 +Node: Library Functions Summary735016 +Node: Library Exercises736422 +Node: Sample Programs736887 +Node: Running Examples737657 +Node: Clones738385 +Node: Cut Program739609 +Node: Egrep Program749749 +Node: Id Program758750 +Node: Split Program768685 +Ref: Split Program-Footnote-1778578 +Node: Tee Program778751 +Node: Uniq Program781541 +Node: Wc Program789129 +Node: Bytes vs. Characters789516 +Node: Using extensions791064 +Node: wc program791818 +Node: Miscellaneous Programs796683 +Node: Dupword Program797896 +Node: Alarm Program799926 +Node: Translate Program804781 +Ref: Translate Program-Footnote-1809346 +Node: Labels Program809616 +Ref: Labels Program-Footnote-1812967 +Node: Word Sorting813051 +Node: History Sorting817123 +Node: Extract Program819348 +Node: Simple Sed827361 +Node: Igawk Program830435 +Ref: Igawk Program-Footnote-1844766 +Ref: Igawk Program-Footnote-2844968 +Ref: Igawk Program-Footnote-3845090 +Node: Anagram Program845205 +Node: Signature Program848267 +Node: Programs Summary849514 +Node: Programs Exercises850728 +Ref: Programs Exercises-Footnote-1854858 +Node: Advanced Features854944 +Node: Nondecimal Data857341 +Node: Boolean Typed Values858939 +Node: Array Sorting860820 +Node: Controlling Array Traversal861525 +Ref: Controlling Array Traversal-Footnote-1869893 +Node: Array Sorting Functions870011 +Ref: Array Sorting Functions-Footnote-1875922 +Node: Two-way I/O876118 +Ref: Two-way I/O-Footnote-1883844 +Ref: Two-way I/O-Footnote-2884031 +Node: TCP/IP Networking884113 +Node: Profiling887189 +Node: Persistent Memory896495 +Ref: Persistent Memory-Footnote-1902664 +Node: Extension Philosophy902791 +Node: Advanced Features Summary904278 +Node: Internationalization906450 +Node: I18N and L10N908124 +Node: Explaining gettext908811 +Ref: Explaining gettext-Footnote-1914703 +Ref: Explaining gettext-Footnote-2914888 +Node: Programmer i18n915053 +Ref: Programmer i18n-Footnote-1920002 +Node: Translator i18n920051 +Node: String Extraction920845 +Ref: String Extraction-Footnote-1921977 +Node: Printf Ordering922063 +Ref: Printf Ordering-Footnote-1924849 +Node: I18N Portability924913 +Ref: I18N Portability-Footnote-1927369 +Node: I18N Example927432 +Ref: I18N Example-Footnote-1930707 +Ref: I18N Example-Footnote-2930780 +Node: Gawk I18N930889 +Node: I18N Summary931511 +Node: Debugger932852 +Node: Debugging933852 +Node: Debugging Concepts934293 +Node: Debugging Terms936102 +Node: Awk Debugging938677 +Ref: Awk Debugging-Footnote-1939622 +Node: Sample Debugging Session939754 +Node: Debugger Invocation940288 +Node: Finding The Bug941674 +Node: List of Debugger Commands948148 +Node: Breakpoint Control949481 +Node: Debugger Execution Control953175 +Node: Viewing And Changing Data956537 +Node: Execution Stack960078 +Node: Debugger Info961715 +Node: Miscellaneous Debugger Commands965786 +Node: Readline Support970848 +Node: Limitations971744 +Node: Debugging Summary974298 +Node: Namespaces975577 +Node: Global Namespace976688 +Node: Qualified Names978086 +Node: Default Namespace979085 +Node: Changing The Namespace979826 +Node: Naming Rules981440 +Node: Internal Name Management983288 +Node: Namespace Example984330 +Node: Namespace And Features986892 +Node: Namespace Summary988327 +Node: Arbitrary Precision Arithmetic989804 +Node: Computer Arithmetic991291 +Ref: table-numeric-ranges995057 +Ref: table-floating-point-ranges995551 +Ref: Computer Arithmetic-Footnote-1996210 +Node: Math Definitions996267 +Ref: table-ieee-formats999243 +Node: MPFR features999811 +Node: MPFR On Parole1000256 +Ref: MPFR On Parole-Footnote-11001085 +Node: MPFR Intro1001240 +Node: FP Math Caution1002879 +Ref: FP Math Caution-Footnote-11003951 +Node: Inexactness of computations1004320 +Node: Inexact representation1005351 +Node: Comparing FP Values1006711 +Node: Errors accumulate1007952 +Node: Strange values1009408 +Ref: Strange values-Footnote-11011996 +Node: Getting Accuracy1012101 +Node: Try To Round1014811 +Node: Setting precision1015710 +Ref: table-predefined-precision-strings1016407 +Node: Setting the rounding mode1018238 +Ref: table-gawk-rounding-modes1018612 +Ref: Setting the rounding mode-Footnote-11022544 +Node: Arbitrary Precision Integers1022723 +Ref: Arbitrary Precision Integers-Footnote-11025898 +Node: Checking for MPFR1026047 +Node: POSIX Floating Point Problems1027521 +Ref: POSIX Floating Point Problems-Footnote-11032174 +Node: Floating point summary1032212 +Node: Dynamic Extensions1034402 +Node: Extension Intro1035955 +Node: Plugin License1037221 +Node: Extension Mechanism Outline1038018 +Ref: figure-load-extension1038457 +Ref: figure-register-new-function1040023 +Ref: figure-call-new-function1041116 +Node: Extension API Description1043179 +Node: Extension API Functions Introduction1044892 +Ref: table-api-std-headers1046728 +Node: General Data Types1050978 +Ref: General Data Types-Footnote-11059684 +Node: Memory Allocation Functions1059983 +Ref: Memory Allocation Functions-Footnote-11064484 +Node: Constructor Functions1064583 +Node: API Ownership of MPFR and GMP Values1068236 +Node: Registration Functions1069769 +Node: Extension Functions1070469 +Node: Exit Callback Functions1075791 +Node: Extension Version String1077041 +Node: Input Parsers1077704 +Node: Output Wrappers1090425 +Node: Two-way processors1094937 +Node: Printing Messages1097202 +Ref: Printing Messages-Footnote-11098373 +Node: Updating ERRNO1098526 +Node: Requesting Values1099265 +Ref: table-value-types-returned1100002 +Node: Accessing Parameters1101111 +Node: Symbol Table Access1102348 +Node: Symbol table by name1102860 +Ref: Symbol table by name-Footnote-11105885 +Node: Symbol table by cookie1106013 +Ref: Symbol table by cookie-Footnote-11110198 +Node: Cached values1110262 +Ref: Cached values-Footnote-11113798 +Node: Array Manipulation1113951 +Ref: Array Manipulation-Footnote-11115042 +Node: Array Data Types1115079 +Ref: Array Data Types-Footnote-11117737 +Node: Array Functions1117829 +Node: Flattening Arrays1122614 +Node: Creating Arrays1129590 +Node: Redirection API1134357 +Node: Extension API Variables1137190 +Node: Extension Versioning1137901 +Ref: gawk-api-version1138330 +Node: Extension GMP/MPFR Versioning1140062 +Node: Extension API Informational Variables1141690 +Node: Extension API Boilerplate1142763 +Node: Changes from API V11146737 +Node: Finding Extensions1148309 +Node: Extension Example1148868 +Node: Internal File Description1149666 +Node: Internal File Ops1153746 +Ref: Internal File Ops-Footnote-11165096 +Node: Using Internal File Ops1165236 +Ref: Using Internal File Ops-Footnote-11167619 +Node: Extension Samples1167893 +Node: Extension Sample File Functions1169422 +Node: Extension Sample Fnmatch1177071 +Node: Extension Sample Fork1178558 +Node: Extension Sample Inplace1179776 +Node: Extension Sample Ord1183402 +Node: Extension Sample Readdir1184238 +Ref: table-readdir-file-types1185127 +Node: Extension Sample Revout1186195 +Node: Extension Sample Rev2way1186784 +Node: Extension Sample Read write array1187524 +Node: Extension Sample Readfile1190689 +Node: Extension Sample Time1191784 +Node: Extension Sample API Tests1193536 +Node: gawkextlib1194028 +Node: Extension summary1196946 +Node: Extension Exercises1200648 +Node: Language History1201890 +Node: V7/SVR3.11203546 +Node: SVR41205698 +Node: POSIX1207132 +Node: BTL1208513 +Node: POSIX/GNU1209242 +Node: Feature History1215020 +Node: Common Extensions1232195 +Node: Ranges and Locales1233478 +Ref: Ranges and Locales-Footnote-11238094 +Ref: Ranges and Locales-Footnote-21238121 +Ref: Ranges and Locales-Footnote-31238356 +Node: Contributors1238579 +Node: History summary1244576 +Node: Installation1245956 +Node: Gawk Distribution1246900 +Node: Getting1247384 +Node: Extracting1248347 +Node: Distribution contents1249985 +Node: Unix Installation1257046 +Node: Quick Installation1257850 +Node: Compiling with MPFR1260270 +Node: Shell Startup Files1260960 +Node: Additional Configuration Options1262049 +Node: Configuration Philosophy1264364 +Node: Compiling from Git1266760 +Node: Building the Documentation1267315 +Node: Non-Unix Installation1268699 +Node: PC Installation1269159 +Node: PC Binary Installation1269997 +Node: PC Compiling1270870 +Node: PC Using1271987 +Node: Cygwin1275540 +Node: MSYS1276764 +Node: VMS Installation1277366 +Node: VMS Compilation1278085 +Ref: VMS Compilation-Footnote-11279314 +Node: VMS Dynamic Extensions1279372 +Node: VMS Installation Details1281057 +Node: VMS Running1283319 +Node: VMS GNV1287598 +Node: Bugs1288312 +Node: Bug definition1289224 +Node: Bug address1292160 +Node: Usenet1295348 +Node: Performance bugs1296537 +Node: Asking for help1299458 +Node: Maintainers1301425 +Node: Other Versions1302526 +Node: Installation summary1310796 +Node: Notes1312160 +Node: Compatibility Mode1312954 +Node: Additions1313736 +Node: Accessing The Source1314661 +Node: Adding Code1316098 +Node: New Ports1322913 +Node: Derived Files1327288 +Ref: Derived Files-Footnote-11332948 +Ref: Derived Files-Footnote-21332983 +Ref: Derived Files-Footnote-31333581 +Node: Future Extensions1333695 +Node: Implementation Limitations1334353 +Node: Extension Design1335563 +Node: Old Extension Problems1336707 +Ref: Old Extension Problems-Footnote-11338225 +Node: Extension New Mechanism Goals1338282 +Ref: Extension New Mechanism Goals-Footnote-11341646 +Node: Extension Other Design Decisions1341835 +Node: Extension Future Growth1343948 +Node: Notes summary1344554 +Node: Basic Concepts1345712 +Node: Basic High Level1346393 +Ref: figure-general-flow1346675 +Ref: figure-process-flow1347361 +Ref: Basic High Level-Footnote-11350663 +Node: Basic Data Typing1350848 +Node: Glossary1354176 +Node: Copying1386063 +Node: GNU Free Documentation License1423606 +Node: Index1448726  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index acbda21e..9a276ad9 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -16426,9 +16426,6 @@ This element gives a string indicating the platform for which @itemx "mingw" Microsoft Windows, using either DJGPP or MinGW, respectively. -@item "os2" -OS/2. - @item "os390" OS/390. @@ -44010,10 +44007,6 @@ The people maintaining the various @command{gawk} ports are: @item MS-Windows with MinGW @tab Eli Zaretskii, @EMAIL{eliz@@gnu.org,eliz at gnu dot org} -@c Leave this in the document on purpose. -@c OS/2 is not mentioned anywhere else though. -@item OS/2 @tab Andreas Buening, @EMAIL{andreas.buening@@nexgo.de,andreas dot buening at nexgo dot de} - @item VMS @tab John Malmberg, @EMAIL{wb8tyw@@qsl.net,wb8tyw at qsl dot net} @item z/OS (OS/390) @tab Daniel Richard G.@: @EMAIL{skunk@@iSKUNK.ORG,skunk at iSKUNK dot ORG} @@ -44322,7 +44315,6 @@ the file. @command{gawk} may be built on non-POSIX systems as well. The currently supported systems are MS-Windows using MSYS, MSYS2, DJGPP, MinGW, and Cygwin, -@c OS/2, and both Vax/VMS and OpenVMS. Instructions for each system are included in this @value{APPENDIX}. diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 9e39f158..19476ea8 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -15613,9 +15613,6 @@ This element gives a string indicating the platform for which @itemx "mingw" Microsoft Windows, using either DJGPP or MinGW, respectively. -@item "os2" -OS/2. - @item "os390" OS/390. @@ -42853,10 +42850,6 @@ The people maintaining the various @command{gawk} ports are: @item MS-Windows with MinGW @tab Eli Zaretskii, @EMAIL{eliz@@gnu.org,eliz at gnu dot org} -@c Leave this in the document on purpose. -@c OS/2 is not mentioned anywhere else though. -@item OS/2 @tab Andreas Buening, @EMAIL{andreas.buening@@nexgo.de,andreas dot buening at nexgo dot de} - @item VMS @tab John Malmberg, @EMAIL{wb8tyw@@qsl.net,wb8tyw at qsl dot net} @item z/OS (OS/390) @tab Daniel Richard G.@: @EMAIL{skunk@@iSKUNK.ORG,skunk at iSKUNK dot ORG} @@ -43165,7 +43158,6 @@ the file. @command{gawk} may be built on non-POSIX systems as well. The currently supported systems are MS-Windows using MSYS, MSYS2, DJGPP, MinGW, and Cygwin, -@c OS/2, and both Vax/VMS and OpenVMS. Instructions for each system are included in this @value{APPENDIX}. diff --git a/gawkmisc.c b/gawkmisc.c index 1f85b221..165e15c6 100644 --- a/gawkmisc.c +++ b/gawkmisc.c @@ -32,7 +32,7 @@ /* some old compilers don't grok #elif. sigh */ -#if defined(__EMX__) || defined(__DJGPP__) || defined(__MINGW32__) +#if defined(__DJGPP__) || defined(__MINGW32__) #include "pc/gawkmisc.pc" #else /* not __DJGPP__, not __MINGW32__ */ #if defined(VMS) diff --git a/io.c b/io.c index 88fd1ea4..8fac000a 100644 --- a/io.c +++ b/io.c @@ -113,18 +113,6 @@ #include "popen.h" #endif -#ifdef __EMX__ -#include - -#if !defined(_S_IFDIR) && defined(S_IFDIR) -#define _S_IFDIR S_IFDIR -#endif - -#if !defined(_S_IRWXU) && defined(S_IRWXU) -#define _S_IRWXU S_IRWXU -#endif -#endif - #ifndef ENFILE #define ENFILE EMFILE #endif @@ -361,7 +349,7 @@ init_io() } -#if defined(__DJGPP__) || defined(__MINGW32__) || defined(__EMX__) || defined(__CYGWIN__) +#if defined(__DJGPP__) || defined(__MINGW32__) || defined(__CYGWIN__) /* binmode --- convert BINMODE to string for fopen */ static const char * @@ -1950,7 +1938,7 @@ strictopen: if (openfd == INVALID_HANDLE && errno == ENOENT && save_errno) errno = save_errno; } -#if defined(__EMX__) || defined(__MINGW32__) +#if defined(__MINGW32__) if (openfd == INVALID_HANDLE && errno == EACCES) { /* On OS/2 and Windows directory access via open() is not permitted. */ @@ -2366,11 +2354,9 @@ use_pipes: int ptoc[2], ctop[2]; int pid; int save_errno; -#if defined(__EMX__) || defined(__MINGW32__) +#if defined(__MINGW32__) int save_stdout, save_stdin; -#ifdef __MINGW32__ char *qcmd = NULL; -#endif #endif if (pipe(ptoc) < 0) @@ -2384,7 +2370,7 @@ use_pipes: return false; } -#if defined(__EMX__) || defined(__MINGW32__) +#if defined(__MINGW32__) save_stdin = dup(0); /* duplicate stdin */ save_stdout = dup(1); /* duplicate stdout */ @@ -2427,13 +2413,9 @@ use_pipes: os_close_on_exec(save_stdout, str, "pipe", "from"); /* saved stdout of the parent process */ /* stderr does NOT get dup'ed onto child's stdout */ -#ifdef __EMX__ - pid = spawnl(P_NOWAIT, "/bin/sh", "sh", "-c", str, NULL); -#else /* __MINGW32__ */ pid = spawnl(P_NOWAIT, getenv("ComSpec"), "cmd.exe", "/c", qcmd = quote_cmd(str), NULL); efree(qcmd); -#endif /* restore stdin and stdout */ close(1); @@ -2461,7 +2443,7 @@ use_pipes: return false; } -#else /* NOT __EMX__, NOT __MINGW32__ */ +#else /* NOT __MINGW32__ */ if ((pid = fork()) < 0) { save_errno = errno; close(ptoc[0]); close(ptoc[1]); @@ -2489,7 +2471,7 @@ use_pipes: execl("/bin/sh", "sh", "-c", str, NULL); _exit(errno == ENOENT ? 127 : 126); } -#endif /* NOT __EMX__, NOT __MINGW32__ */ +#endif /* NOT __MINGW32__ */ /* parent */ if ((BINMODE & BINMODE_INPUT) != 0) @@ -2529,7 +2511,7 @@ use_pipes: else find_output_wrapper(& rp->output); -#if !defined(__EMX__) && !defined(__MINGW32__) +#if !defined(__MINGW32__) os_close_on_exec(ctop[0], str, "pipe", "from"); os_close_on_exec(ptoc[1], str, "pipe", "from"); @@ -2656,11 +2638,9 @@ gawk_popen(const char *cmd, struct redirect *rp) { int p[2]; int pid; -#if defined(__EMX__) || defined(__MINGW32__) +#if defined(__MINGW32__) int save_stdout; -#ifdef __MINGW32__ char *qcmd = NULL; -#endif #endif /* @@ -2674,7 +2654,7 @@ gawk_popen(const char *cmd, struct redirect *rp) if (pipe(p) < 0) fatal(_("cannot open pipe `%s': %s"), cmd, strerror(errno)); -#if defined(__EMX__) || defined(__MINGW32__) +#if defined(__MINGW32__) rp->iop = NULL; save_stdout = dup(1); /* save stdout */ if (save_stdout == -1) { @@ -2697,13 +2677,9 @@ gawk_popen(const char *cmd, struct redirect *rp) os_close_on_exec(p[0], cmd, "pipe", "from"); /* pipe output: input of the parent process */ os_close_on_exec(save_stdout, cmd, "pipe", "from"); /* saved stdout of the parent process */ -#ifdef __EMX__ - pid = spawnl(P_NOWAIT, "/bin/sh", "sh", "-c", cmd, NULL); -#else /* __MINGW32__ */ pid = spawnl(P_NOWAIT, getenv("ComSpec"), "cmd.exe", "/c", qcmd = quote_cmd(cmd), NULL); efree(qcmd); -#endif /* restore stdout */ close(1); @@ -2713,7 +2689,7 @@ gawk_popen(const char *cmd, struct redirect *rp) } close(save_stdout); -#else /* NOT __EMX__, NOT __MINGW32__ */ +#else /* NOT __MINGW32__ */ if ((pid = fork()) == 0) { if (close(1) == -1) fatal(_("close of stdout in child failed: %s"), @@ -2726,14 +2702,14 @@ gawk_popen(const char *cmd, struct redirect *rp) execl("/bin/sh", "sh", "-c", cmd, NULL); _exit(errno == ENOENT ? 127 : 126); } -#endif /* NOT __EMX__, NOT __MINGW32__ */ +#endif /* NOT __MINGW32__ */ if (pid == -1) { close(p[0]); close(p[1]); fatal(_("cannot create child process for `%s' (fork: %s)"), cmd, strerror(errno)); } rp->pid = pid; -#if !defined(__EMX__) && !defined(__MINGW32__) +#if !defined(__MINGW32__) if (close(p[1]) == -1) { close(p[0]); fatal(_("close of pipe failed: %s"), strerror(errno)); @@ -3090,12 +3066,6 @@ find_source(const char *src, struct stat *stb, int *errcode, int is_extlib) *errcode = 0; if (src == NULL || *src == '\0') return NULL; -#ifdef __EMX__ - char os2_src[strlen(src) + 1]; - - if (is_extlib) - src = os2_fixdllname(os2_src, src, sizeof(os2_src)); -#endif /* __EMX__ */ path = do_find_source(src, stb, errcode, pi); if (path == NULL && is_extlib) { @@ -3411,7 +3381,7 @@ iop_alloc(int fd, const char *name, int errno_val) if (fd != INVALID_HANDLE) fstat(fd, & iop->public.sbuf); -#if defined(__EMX__) || defined(__MINGW32__) +#if defined(__MINGW32__) else if (errno_val == EISDIR) { iop->public.sbuf.st_mode = (_S_IFDIR | _S_IRWXU); iop->public.fd = FAKE_FD_VALUE; diff --git a/main.c b/main.c index f12ae68f..53126435 100644 --- a/main.c +++ b/main.c @@ -1864,8 +1864,6 @@ platform_name() return "mingw"; #elif defined(__DJGPP__) return "djgpp"; -#elif defined(__EMX__) - return "os2"; #elif defined(USE_EBCDIC) return "os390"; #else diff --git a/missing_d/ChangeLog b/missing_d/ChangeLog index c8ae30ff..f645dd06 100644 --- a/missing_d/ChangeLog +++ b/missing_d/ChangeLog @@ -1,3 +1,7 @@ +2022-07-03 Arnold D. Robbins + + * snprintf.c: Remove stuff related to __EMX__. + 2021-10-27 Arnold D. Robbins * 5.1.1: Release tar ball made. diff --git a/missing_d/snprintf.c b/missing_d/snprintf.c index c09c7473..dfe57c6b 100644 --- a/missing_d/snprintf.c +++ b/missing_d/snprintf.c @@ -87,9 +87,9 @@ safe_tmpfile (void) return NULL; #if ! defined(__DJGPP__) && ! defined(MSDOS) && ! defined(_MSC_VER) \ - && ! defined(_WIN32) && ! defined(__CRTRSXNT__) && ! defined(__EMX__) \ + && ! defined(_WIN32) && ! defined(__CRTRSXNT__) \ && ! defined(__MINGW32__) && ! defined(__WIN32__) - /* If not MS or OS/2, unlink after opening. */ + /* If not MS unlink after opening. */ unlink (tmpfilename); free(tmpfilename); tmpfilename = NULL; diff --git a/nonposix.h b/nonposix.h index b975f75e..80d30da4 100644 --- a/nonposix.h +++ b/nonposix.h @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2012, 2013, 2016, 2017, 2018, 2019 + * Copyright (C) 2012, 2013, 2016, 2017, 2018, 2019, 2022 * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the @@ -81,19 +81,3 @@ int getppid(void); wint_t btowc (int c); wint_t putwc (wchar_t wc, FILE *stream); #endif - -#ifdef __EMX__ - -char *os2_fixdllname(char *dst, const char *src, size_t n); - -#ifdef __KLIBC__ -#include - -#define dlopen(f, m) os2_dlopen(f, m) -void *os2_dlopen(const char *file, int mode); - -#define dlsym(h, n) os2_dlsym(h, n) -void *os2_dlsym(void *handle, const char *name); -#endif /* __KLIBC__ */ - -#endif /* __EMX__ */ diff --git a/pc/ChangeLog b/pc/ChangeLog index e012e4b3..65100263 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,3 +1,8 @@ +2022-07-03 Arnold D. Robbins + + * Makefile, config.h, config.sed, gawkmisc.pc: + Remove stuff related to __EMX__. + 2022-05-24 Adam Van Scyoc * Makefile.tst: Regenerated. diff --git a/pc/Makefile b/pc/Makefile index e0ef7662..1eb1fc9e 100644 --- a/pc/Makefile +++ b/pc/Makefile @@ -1,7 +1,6 @@ # Makefile for gawk (GNU awk) Dec 2010 # # - for GNU C (djgpp) [32bit protected-mode executable for DOS] -# - for GNU C (emx) [32bit executable for OS/2 or DOS or Windows32] # - for GNU C (mingw32) [Windows32 executable for Windows 9x/NT/2K/XP/7] # Tested with GNU make on Windows, OS/2 and DOS. @@ -26,9 +25,6 @@ default: @echo " djgpp-readline . Like djgpp, but with readline " @echo " [You will need to have GNU readline library installed.] " @echo " djgpp-readline-mpfr . djgpp with readline and MPFR " - @echo " emx ..... OS/2 32-bit exe [emx/gcc; uses emxlibc.dll] " - @echo " emxnt ... NT exe [emx/gcc with RSXNT] " - @echo " emxbnd .. OS/2 and DOS 32-bit exe [emx/gcc] " @echo " mingw32 . Windows32 exe [Mingw32 GNU C] " @echo " mingw32-readline . Like mingw32, but with readline " @echo " [You will need to have GNU readline library installed.] " @@ -65,7 +61,7 @@ RSPFILE = gawk.rsp #LDRSP = $(GAWKOBJS) #LNKRSP = $(LDRSP) # -# else use brain-dead approach (emxbnd will need 'tr'). +# else use brain-dead approach RSP = $(RSPFILE) LDRSP = @$(RSP) LNKRSP = $(LDRSP) @@ -149,46 +145,6 @@ djgpp-readline-mpfr: LNK=LDJG LF=-s LF2="-lreadline -lmpfr -lgmp -lm" \ BIND=BDJG -#======================================================================== -#========================== EMX ========================================= -#======================================================================== - -# Link command for OS/2 versions. -LEMX = $(CC) $(LF) -o $@ $(GAWKOBJS) gawk.def -lbsd $(LF2) - -# Link and bind for DOS and OS/2 versions. -# emx-09 needs '-p' emx option here or in EMXOPT environ var. -# The following works with 0.9a or newer -LEMXBND = $(CC) $(LF) -o gawk $(LDRSP) gawk.def -lbsd $(LF2) -BEMX = emxbind -bs gawk -p -# The following works with 0.9c or newer -#LEMXBND = $(CC) $(LF) -o a.out $(LDRSP) gawk.def -lbsd $(LF2) -#BEMX = emxbind -bs -o $@ a.out -p -#BEMX = emxbind -bs /emx/bin/emx.exe a.out $@ -p -BEMXD = emxbind -b -o $@ a.out -p - -emx: - $(MAK) all \ - "CC=gcc -Zomf" O=.obj "CF=-O -DOS2" \ - LNK=LEMX "LF=-s -Zcrtdll -Zstack 512" RSP= - -emxnt: - $(MAK) all \ - "CC=gcc -Zwin32 -Zcrtdll=rsxntcs" O=.o "CF=-O -DOS2" \ - LNK=LEMX "LF=-s -Zstack 512" RSP= - -emxbnd: - $(MAK) all \ - CC=gcc O=.o "CF=-O -DOS2 -DMSDOS" OBJ=popen.o \ - LNK=LEMXBND \ - BIND=BEMX "P=|tr \" \" \"\n\"" - -emxbnd-debug: - $(MAK) all \ - CC=gcc O=.o "CF=-g -DOS2 -DMSDOS" OBJ=popen.o \ - LNK=LEMXBND \ - BIND=BEMXD "P=|tr \" \" \"\n\"" - #======================================================================== #========================== MINGW32 ===================================== #======================================================================== diff --git a/pc/config.h b/pc/config.h index 7896a73f..bec42cfa 100644 --- a/pc/config.h +++ b/pc/config.h @@ -298,9 +298,6 @@ /* Define to 1 if you have the `strncasecmp' function. */ #define HAVE_STRNCASECMP 1 -#ifdef __EMX__ -#define strncasecmp strnicmp -#endif /* Define to 1 if you have the header file. */ #undef HAVE_STROPTS_H @@ -711,8 +708,3 @@ extern bool is_valid_identifier(const char *name); #ifndef __DJGPP__ #define HAVE_POPEN_H 1 #endif - -#if defined(__EMX__) -#define strcasecmp stricmp -#define strncasecmp strnicmp -#endif diff --git a/pc/config.sed b/pc/config.sed index e194fdcb..4547a842 100644 --- a/pc/config.sed +++ b/pc/config.sed @@ -183,9 +183,6 @@ s/^#undef HAVE_STRINGS_H *$/#define HAVE_STRINGS_H 1/ s/^#undef HAVE_STRING_H *$/#define HAVE_STRING_H 1/ /^#undef HAVE_STRNCASECMP *$/c\ #define HAVE_STRNCASECMP 1\ -#ifdef __EMX__\ -#define strncasecmp strnicmp\ -#endif s/^#undef HAVE_STRTOD *$/#define HAVE_STRTOD 1/ /^#undef HAVE_STRTOUL *$/c\ #if defined(__MINGW32__) || defined(__DJGPP__)\ @@ -326,9 +323,4 @@ extern bool is_valid_identifier(const char *name);\ \ #ifndef __DJGPP__\ #define HAVE_POPEN_H 1\ -#endif\ -\ -#if defined(__EMX__)\ -#define strcasecmp stricmp\ -#define strncasecmp strnicmp\ #endif diff --git a/pc/gawkmisc.pc b/pc/gawkmisc.pc index 149ea62c..813c201a 100644 --- a/pc/gawkmisc.pc +++ b/pc/gawkmisc.pc @@ -33,14 +33,6 @@ const char *defpath = ".;c:\\lib\\awk;c:\\gnu\\lib\\awk"; /* the Makefile should define DEFLIBPATH */ const char *deflibpath = DEFLIBPATH; -#ifdef __EMX__ -#include - -static int _os2_is_abs_path(const char *dirname); -static char* _os2_unixroot(const char *path); -static const char* _os2_unixroot_path(const char *path); -#endif - #ifdef __MINGW32__ #ifdef HAVE_SOCKETS #include @@ -123,17 +115,6 @@ os_arg_fixup(argcp, argvp) int *argcp; char ***argvp; { -#ifdef __EMX__ -# ifdef initialize_main - initialize_main(argcp, argvp); -# else - _wildcard(argcp, argvp); - _response(argcp, argvp); -# endif - - setvbuf(stdout, NULL, _IOLBF, BUFSIZ); - defpath = (char*) _os2_unixroot_path(defpath); -#endif /* __EMX__ */ return; } @@ -144,10 +125,6 @@ os_devopen(name, flag) const char *name; int flag; { -#ifdef __EMX__ - /* do not use open(name, flag) here !!! */ - return -1; -#else if (strcmp(name, "/dev/null") == 0) return open("NUL", flag); /* FIXME: */ @@ -155,7 +132,6 @@ int flag; * return open("???", flag); */ return -1; -#endif } /* optimal_bufsize --- determine optimal buffer size */ @@ -190,10 +166,6 @@ int ispath(file) const char *file; { -#ifdef __EMX__ - return (strpbrk(file, "/\\") != NULL || - (toupper(file[0]) >= 'A' && toupper(file[0]) <= 'Z' && file[1] == ':')); -#else for (; *file; file++) { switch (*file) { case '/': @@ -203,7 +175,6 @@ const char *file; } } return 0; -#endif } /* isdirpunct --- return true if char is a directory separator */ @@ -222,7 +193,7 @@ os_close_on_exec(fd, name, what, dir) int fd; const char *name, *what, *dir; { -#if (defined(__DJGPP__) && (__DJGPP__ > 2 || __DJGPP_MINOR__ >= 4)) || defined __EMX__ +#if (defined(__DJGPP__) && (__DJGPP__ > 2 || __DJGPP_MINOR__ >= 4)) if (fd <= 2) /* sanity */ return; @@ -283,16 +254,7 @@ os_isreadable(const awk_input_buf_t *iobuf, bool *isdir) int os_is_setuid() { -#ifdef __EMX__ - long uid, euid; - - uid = getuid(); - euid = geteuid(); - - return (euid == 0 && euid != uid); -#else return 0; -#endif } /* os_setbinmode --- set binary mode on file */ @@ -377,225 +339,6 @@ files_are_same(char *path, SRCFILE *src) return 0; } - -#ifdef __EMX__ -# ifndef PATH_SEPARATOR -# define PATH_SEPARATOR ';' -# endif - -/* result is 0 if dirname is no absolute path, 1 otherwise */ - -static int -_os2_is_abs_path(const char *dirname) -{ - int result = 0; - if (dirname != NULL && dirname[0] != '\0') { - /* if dirname contains a valid drive letter like "c:" */ - if (((dirname[0] >= 'A' && dirname[0] <= 'Z') || (dirname[0] >= 'a' && dirname[0] <= 'z')) - && dirname[1] == ':') dirname += 2; /* remove the drive letter */ - - if (dirname[0] == '/' || dirname[0] == '\\') result = 1; /* asbolute path */ - } - - return result; -} - - -/* path is assumed to be a list of directories separated by PATH_SEPARATOR. - This function determines if the first directory of path is on the - drive specified by the environment variable UNIXROOT. - If it is the case, NULL is returned, otherwise a new directory name - is allocated using the drive letter from UNIXROOT and returned as result. - If the first directory is a relative path NULL is returned, too. - The new directory name is allocated by malloc(). - Example (UNIXROOT is set to "e:"): - "c:/usr/share" -> "e:/usr/share" - "e:/usr/share" -> NULL (already on the $UNIXROOT drive) - "/usr/share" -> "e:/usr/share" - "." -> NULL (not an absolute path) - "usr/share" -> NULL (not an absolute path) - "c:usr/share" -> NULL (not an absolute path) - "c:/usr/share;d:/etc" -> "e:/usr/share" (only the first directory in path is used) */ - -static char* -_os2_unixroot(const char *path) -{ - static const char *unixroot = NULL; - static int unixroot_init = 0; - char *result = NULL; - - if (unixroot_init == 0) { - /* get $UNIXROOT only one time */ - unixroot = getenv("UNIXROOT"); - - /* check whether unixroot is valid (must be "x:") */ - if (unixroot != NULL) { - int drive = toupper(unixroot[0]); - if (drive < 'A' || drive > 'Z' || unixroot[1] != ':' || unixroot[2] != '\0') - unixroot = NULL; /* unixroot not valid */ - } - - unixroot_init = 1; /* initialized */ - } - - /* note: if unixroot != NULL then it contains a valid drive letter */ - if (unixroot != NULL && _os2_is_abs_path(path)) { - /* dirname is an absolute path and unixroot is a drive letter, "c:" for example */ - size_t old_path_len = strlen(path); - - /* end points to the first ';' in path or to NULL */ - const char *end = strchr(path, PATH_SEPARATOR); - - /* dir_len is the length of the first directory in path */ - size_t dir_len = (end) ? end - path : old_path_len; - - if (toupper(unixroot[0]) != toupper(path[0]) || path[1] != ':') { - /* the first directory of path does not start with the string $UNIXROOT */ - if (path[1] == ':') { - /* if there is a drive letter remove it */ - dir_len -= 2; - path += 2; - } - - result = malloc(dir_len + 3); - if (result) { /* do nothing if we are out of memory */ - result[0] = unixroot[0]; - result[1] = unixroot[1]; - memcpy(result + 2, path, dir_len); - result[dir_len + 2] = '\0'; - } - } - } - return result; -} - -/* path is assumed to be a list of directories separated by PATH_SEPARATOR. - Every directory is processed. _os2_unixroot() is used to find out whether - these directories are on the drive specified by the environment variable - UNIXROOT. If this is not the case the same directory on the UNIXROOT drive - is added to the end of path. If path is a valid path this function returns a valid path, too. - Example ($UNIXROOT is set to "e:"): - ".;c:/usr/local;d:/usr/local;d:/etc;e:/etc" - -> ".;c:/usr/local;d:/usr/local;d:/etc;e:/etc;e:/usr/local;e:/usr/local;e:/etc" */ - -static const char* -_os2_unixroot_path(const char *path) -{ - char *result = NULL; - const char *p = path; - unsigned dir_count = 1; - - if (path == NULL || path[0] == '\0') return NULL; /* empty path */ - - /* save number of path components in dir_count */ - while(*p) { - if (*p++ == PATH_SEPARATOR && *p != '\0' && *p != PATH_SEPARATOR) - dir_count += 1; - } - - { - const char *list[dir_count]; /* list of char pointers */ - size_t dir_len[dir_count]; /* the according directory length */ - size_t old_path_len = strlen(path); /* the old path length */ - size_t total_len; - unsigned i = 0; - - if (path[old_path_len - 1] == PATH_SEPARATOR) /* last character is ';' */ - old_path_len--; - - list[0] = p = path; /* first directory */ - - while(*p) { - if (*p++ == PATH_SEPARATOR && *p != '\0' && *p != PATH_SEPARATOR) - list[++i] = p; - } - /* now list[i] contains the ith directory of path (no 0-terminated strings!!!) */ - - /* determine the total length for the new path */ - total_len = old_path_len; - - for(i = 0; i < dir_count; i++) { - list[i] = _os2_unixroot(list[i]); - if (list[i] != NULL) { - dir_len[i] = strlen(list[i]); - total_len += dir_len[i] + 1; /* one character for ';' or '\0' */ - } - else dir_len[i] = 0; - } - /* now list[] contains the according directories on the UNIXROOT drive or NULL - total_len contains the total length for the new path */ - result = malloc(total_len + 1); - - if (result) { - /* copy the old path and the new directories into the new path */ - char *q = result; - memcpy(q, path, old_path_len); - q += old_path_len; - - for(i = 0; i < dir_count; i++) { - if (dir_len[i] != 0) { - *q++ = PATH_SEPARATOR; - memcpy(q, list[i], dir_len[i]); - q += dir_len[i]; - } - } - - *q = '\0'; /* terminating '\0' */ - } - - for(i = 0; i < dir_count; i++) free((void*) list[i]); - } - - return (result) ? (const char*) result : path; -} - -/* limit a length of DLL name up to 8 characters. If dst is not enough for - a fixed dll name, it is truncated. */ -char *os2_fixdllname(char *dst, const char *src, size_t n) -{ - char drive[_MAX_DRIVE]; - char dir[_MAX_DIR]; - char name[_MAX_FNAME]; - char ext[_MAX_EXT]; - char dll_file[_MAX_PATH]; - - _splitpath(src, drive, dir, name, ext); - if (strlen(name) > 8) - name[8] = '\0'; - _makepath(dll_file, drive, dir, name, ext); - - strncpy(dst, dll_file, n); - dst[n - 1] = '\0'; - - return dst; -} - -#ifdef __KLIBC__ - -/* replacement of dlopen(). This limits a length of a base name up to 8 - characters. */ -void *os2_dlopen(const char *file, int mode) -{ - char dll_file[strlen(file) + 1]; - - return (dlopen)(os2_fixdllname(dll_file, file, sizeof(dll_file)), mode); -} - -/* replacement of dlsym(). This prepends '_' to name. */ -void *os2_dlsym(void *handle, const char *name) -{ - char sym[strlen(name) + 1 + 1]; /* 1 for '_', 1 for NUL */ - - sym[0] = '_'; - strcpy(sym + 1, name); - - return (dlsym)(handle, sym); -} - -#endif /* __KLIBC__ */ - -#endif /* __EMX__ */ - #ifdef __MINGW32__ extern void *xmalloc (size_t); @@ -1091,12 +834,12 @@ os_maybe_set_errno (void) #endif /* __MINGW32__ */ -#if defined(__DJGPP__) || defined(__MINGW32__) || defined(__EMX__) +#if defined(__DJGPP__) || defined(__MINGW32__) void init_sockets(void) { -#if defined(HAVE_SOCKETS) && !defined(__EMX__) +#if defined(HAVE_SOCKETS) WSADATA winsockData; int errcode; -- cgit v1.2.1