home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / os2 / programm / 3751 < prev    next >
Encoding:
Text File  |  1992-07-23  |  25.1 KB  |  567 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!usc!elroy.jpl.nasa.gov!nntp-server.caltech.edu!brooke
  3. From: brooke@cco.caltech.edu (Brooke Paul Anderson)
  4. Subject: Next draft of the GNU C/C++/make/info user's manual
  5. Message-ID: <1992Jul24.051541.4023@cco.caltech.edu>
  6. Sender: news@cco.caltech.edu
  7. Nntp-Posting-Host: kanga
  8. Organization: California Institute of Technology, Pasadena
  9. Date: Fri, 24 Jul 1992 05:15:41 GMT
  10. Lines: 555
  11.  
  12.  
  13. OK, folks, here's the next draft of the manual I'm working on.
  14. I expanded it to describe how to get, install, and use the GNU
  15. C and C++ compiler, the debugger, make, and info (the hypertext
  16. document reader).
  17.  
  18. I rewrote a lot of it based on suggestions I got.  As always,
  19. I'm open to suggestions.  Also, please take a look at Appendix 3 --
  20. I would like to get some volunteers who'd be willing to mail 
  21. people the whole set of archives even if you don't feel like doing
  22. it unless people are willing to pay you more than shipping and
  23. packaging.
  24.  
  25. Also, if anyone has the full references for OS/2 programming books
  26. from Van Norstrand-Reinhold, I would be grateful if you would e-mail
  27. me the information.
  28.  
  29.  
  30. A long post follows:
  31.  
  32. ======================== cut here ========================
  33.  
  34.  
  35. A USER'S MANUAL FOR THE FREE GNU C AND C++ SOFTWARE-DEVELOPMENT
  36. SYSTEM FOR OS/2 V2.0
  37.  
  38. by Brooke P. Anderson, 7/23/92
  39.  
  40. Brooke Anderson
  41. 1155 E. Del Mar #312
  42. Pasadena, CA  91106
  43. (818) 577-7555
  44. GEnie address:  BROOKE
  45. Internet address:  brooke@hope.caltech.edu
  46.  
  47. TABLE OF CONTENTS
  48.  
  49. 1.0 Introduction
  50. 2.0 How to get it
  51. 3.0 How to install it
  52.      3.1 Zoo210e.exe and uz42_16e.zoo
  53.      3.2 Wholeinf.zoo
  54.      3.3 Gnumk362.zoo
  55.      3.4 Gnudev.zoo and emxdev.zoo
  56.      3.5 Emxgdb.zoo and emxgpp.zoo
  57.      3.6 The final steps
  58. 4.0 How to use it
  59.      4.1 Using info
  60.      4.2 Using the compiler
  61.      4.3 Using the debugger
  62.      4.4 Using make
  63. 5.0 Where to get more information
  64. 6.0 Conclusions
  65.  
  66. Appendix 1:  Optional packages
  67. Appendix 2:  Frequently asked questions
  68. Appendix 3:  Sources of distribution
  69.  
  70. 1.0 INTRODUCTION
  71.  
  72. This document describes the free GNU C and C++
  73. software-development system for OS/2 v2.0.  It tells you how to
  74. acquire all the necessary software, how to install it, how to
  75. start using it, and where to look for more information.
  76.  
  77. The GNU software-development system includes a C and C++
  78. compiler, a debugger, an assembler, a make utility (for
  79. automating the compilation of programs made of many source
  80. files), and a hypertext reader (for reading the documentation). 
  81. The compiler generates full 32-bit, optimized code, and it
  82. supports many OS/2 API calls, so you software developers out
  83. there can use it for PM programming, manipulating semaphores,
  84. manipulating threads, using named pipes, etc.  Optional packages
  85. include emacs (a programmer's editor), a package for using IBM's
  86. OS/2 tool kit, and full source code for all the programs and
  87. libraries in the system.
  88.  
  89. GNU software is originally developed by the Free Software
  90. Foundation, an organization which produces a lot of free software
  91. for UNIX.  After the Free Software Foundation releases the UNIX
  92. versions, people often port them to many other operation systems
  93. (such as OS/2).  Despite the fact that the software is free, the
  94. UNIX community considers it a standard and often prefers it over
  95. other products because of its high quality.  The compilers, for
  96. example, produce well-optimized code; and emacs is one of the two
  97. most popular editors for UNIX.
  98.  
  99. Sometimes, there is more than one port of a GNU program.  For
  100. OS/2, for example, there are two different ports of the GNU C
  101. compiler.  This document discusses only one of them (the EMX
  102. port) since the EMX port provides faster floating point routines
  103. and since it works with a debugger.
  104.  
  105. IMPORTANT:  Not all of the archives described in this document
  106. extract correctly onto FAT file systems, file systems which are
  107. still strangled by the egregious 8.3 file-naming convention.  If
  108. you are still using FAT, you will have to work around some
  109. problems.  For example, the wholeinf.zoo archive, described
  110. below, will not extract or operate properly on FAT.  I think
  111. everything else is FAT compatible, but I haven't checked.  I
  112. recommend that you allocate at least part of your file system for
  113. HPFS and thus leave behind another of the many grim limitations
  114. of MS-DOS.  
  115.  
  116. 2.0 HOW TO GET IT
  117.  
  118. The full software-development system (and the various optional
  119. packages described in Appendix 1) are available from a variety of
  120. sources.  If you have access to Internet, you can get the files
  121. from the main anonymous-ftp site for OS/2, ftp-os2.nmsu.edu. 
  122. Much of them are also available on GEnie, and they might be
  123. available on CompuServe and many other on-line services.  Also,
  124. see Appendix 3 for a list of people who are willing to distribute
  125. the whole system through regular mail.
  126.  
  127. You need to obtain the files "gnudev.zoo" (which contains the
  128. compiler and some auxiliary programs), "emxdev.zoo" (which
  129. contains more auxiliary programs), "emxgpp.zoo" (which contains
  130. the libraries the compiler needs for C++ programs), "emxgdb.zoo"
  131. (which contains the latest port of the debugger), "gnumk362.zoo"
  132. (which contains make), and "wholeinf.zoo" (which contains the
  133. hypertext reader and all the documentation for the compiler, the
  134. debugger, and make).  See Appendix 1 for a description of what
  135. you need for the optional packages.
  136.  
  137. The above files might be available as ZIP archives instead of ZOO
  138. archives, but that is not a problem as both zip and zoo are
  139. available free for OS/2.  You can get them from the same place
  140. you get the other archives.  You need the files "zoo210e.exe"
  141. (which contains zoo) and "uz42_16e.zoo" (which contains unzip).
  142.  
  143. The sizes of the various files are as follows:  zoo210e.exe
  144. (120k), uz42_16e.zoo (84k), gnumk362.zoo (259k), gnudev.zoo
  145. (846k), emxdev.zoo (227k), emxgdb.zoo (251k), emxgpp.zoo (1232k),
  146. and wholeinf.zoo (544k).
  147.  
  148. On ftp-os2.nmsu.edu, zoo210e.exe and uz42_16e.zoo are in
  149. pub/os2/all/archivers; gnumk362.zoo is in
  150. pub/os2/2.0/programming; and the rest of the files are in
  151. pub/os2/2.0/programming/emx-0.8d.  On GEnie, all the archives are
  152. (or soon will be) in the OS/2 library (library 13) of the IBMPC
  153. round table.
  154.  
  155. 3.0 HOW TO INSTALL IT
  156.  
  157. The following subsections describe how to install the various
  158. pieces of the GNU C and C++ software-development system.  Go
  159. through the procedures step by step as described -- the order is
  160. important.  Don't feel compelled to read through any of the
  161. readme files or other documentation spit out during the
  162. unarchiving process -- I think you will have a much easier time
  163. if you go through this document beforehand.
  164.  
  165. 3.1 ZOO210E.EXE AND UZ42_16E.ZOO
  166.  
  167. If you don't already have zoo or unzip, you will need to install
  168. them.  zoo210e.exe is a self-extracting archive.  Simply move it
  169. to a convenient directory and type "zoo210e".  Add the name of
  170. the directory zoo is in to the path variable in your config.sys
  171. file, and reboot.  (On my machine, zoo.exe is in c:\apps\zoo, so
  172. I appended "c:\apps\zoo;" to the "SET PATH" statement in
  173. config.sys.)  Now, to unarchive uz42_16e.zoo, you simply move it
  174. to another convenient directory and type "zoo e uz42_16e".  Add
  175. the name of the directory unzip is in to your path as well, and
  176. again reboot.  Now, you can unarchive any ZOO archive by typing
  177. "zoo e filename", and you can unarchive any ZIP archive by typing
  178. "unzip filename", where "filename.zoo" or "filename.zip" is the
  179. name of the archive.
  180.  
  181. 3.2 WHOLEINF.ZOO
  182.  
  183. Copy wholeinf.zoo to any convenient directory and unarchive it. 
  184. It will disgorge a program called "info.exe" (the hypertext
  185. reader), several auxiliary files, and a bunch of documentation
  186. files for itself, the compiler, the debugger, and make.
  187.  
  188. 3.3 GNUMK362.ZOO
  189.  
  190. Copy gnumk362.zoo to any convenient directory and unarchive it. 
  191. The archive will disgorge several files, including two more
  192. archives:  source.zoo and info.zoo.  You can delete info.zoo, as
  193. its contents are duplicated in wholeinf.zoo.  You can keep
  194. source.zoo if you want the source code to make, but it is not
  195. necessary to keep it.
  196.  
  197. Add the name of the directory make is in to your path statement
  198. in config.sys.  (I have make in c:\apps\make, so I appended
  199. "c:\apps\make;" to the "SET PATH" statement in my config.sys.)
  200.  
  201. 3.4 GNUDEV.ZOO AND EMXDEV.ZOO
  202.  
  203. These archives create the directory ".\emx" and a bunch of
  204. directories under that.  Thus, unarchive the files from the
  205. directory in which you want this emx directory.  (In other words,
  206. if you unarchive gnudev.zoo in the directory "\compiler", the
  207. process will create \compiler\emx, \compiler\emx\bin,
  208. \compiler\emx\lib, and many other such directories.)
  209.  
  210. 3.5 EMXGDB.ZOO AND EMXGPP.ZOO
  211.  
  212. As with the above two archives, unarchive emxgdb.zoo and
  213. emxgpp.zoo in the directory on top of the emx directory.  In
  214. other words, if the emx directory is \compiler\emx, move
  215. emxgdp.zoo and emxgpp.zoo to \compiler and unarchive them.
  216.  
  217. IMPORTANT:  These two archives contain newer versions of some of
  218. the files contained in gnudev.zoo and emxdev.zoo.  If zoo or
  219. unzip ask you if you want to replace existing files (i.e.,
  220. overwrite files already on disk), answer "yes".  Make sure that
  221. you do not skip the unarchiving of any files in emxgdb.zoo and
  222. emxgpp.zoo.
  223.  
  224. 3.6 THE FINAL STEPS
  225.  
  226. Now, you need to modify your config.sys file.  The examples below
  227. are from my config.sys file, and I have the emx directory
  228. installed under c:\apps.  Thus, my system has the directories
  229. "c:\apps\emx\dll", "c:\apps\emx\lib", "c:\apps\emx\include", and
  230. so on -- you will need to modify the following examples so that
  231. the directories are specified correctly.  
  232.  
  233. First, you need to specify in your libpath the location of
  234. emx.dll.  In my config.sys, I have
  235.  
  236. LIBPATH=.;C:\OS2\DLL;C:\OS2\MDOS;C:\;C:\OS2\APPS\DLL;c:\apps\emx\dll;
  237.  
  238. Second, you need to set a few environmental variables so that the
  239. compiler knows where to find various files:
  240.  
  241. set C_INCLUDE_PATH=c:/apps/emx/include
  242. set LIBRARY_PATH=c:/apps/emx/lib
  243. set CPLUS_INCLUDE_PATH=C:/apps/emx/include.cpp;C:/apps/emx/include
  244.  
  245. Note:  you need to use forward slashes ("/") and not backward
  246. slashes ("\") in the previous three lines.
  247.  
  248. Now, reboot your machine so that these definitions take effect. 
  249. Then go into the emx\lib\misc directory and type "make", and
  250. finally go into the emx\lib\math directory and type "make". 
  251. These last two actions update some libraries, and you must make
  252. sure you rebooted the machine once before executing the make
  253. commands.
  254.  
  255. This completes the installation process.
  256.  
  257. 4.0 HOW TO USE IT
  258.  
  259. Now, you are ready to use info (the hypertext reader), to compile
  260. programs, to debug programs, and to use make.  The next
  261. subsections discuss each of these actions in turn.
  262.  
  263. 4.1 USING INFO
  264.  
  265. Go into the directory in which info.exe resides.  Type "info". 
  266. You are now looking at a screen that has some information on the
  267. top half (information such as "Typing 'd' returns here, 'q'
  268. quits, '?' lists all info commands, 'h' gives a primer for
  269. first-timers . . .") and a list of subjects near the bottom
  270. (subjects such as "Info", "Gcc", "Gdb", "Make", and "Gdbint").  
  271.  
  272. Go ahead and type "h" for a tutorial.  The most basic functions
  273. to remember are:  type "q" to quit, type "?" to get a list of
  274. commands, hit the space bar or PgDn key to go down a page, press
  275. the Del key or the PgUp key to go up a page, press "n" to go to
  276. the next node (think of a node as being a collection of one or
  277. more pages dealing with a single topic), press "p" to go to the
  278. previous node, use the up and down arrow keys to highlight
  279. choices of new nodes to jump to, and press enter to jump to the
  280. highlighted node.
  281.  
  282. Just play around with it a little while, and you will get the
  283. hang of it.  Type "d" to get back to the main directory, use the
  284. down arrow to highlight "Gcc", press enter, press the down arrow
  285. to highlight "Contributors", press enter, scan through the pages
  286. of text by hitting the PgDn key a couple of times, type "?" to
  287. see a list of commands, type "p" a couple of times, etc.
  288.  
  289. There is one bug that I found in this package.  If you use "s" to
  290. search and if you type a phrase that info cannot find, it
  291. crashes.  This is a fairly major bug, so I suspect it will get
  292. fixed sometime soon.
  293.  
  294. 4.2 USING THE COMPILER
  295.  
  296. To compile a C source file called "myprog.c", type "gcc -o
  297. myprog.exe myprog.c".  The -o switch tells gcc that it should
  298. call the resulting executable "myprog.exe".  To compile the C++
  299. source file "myprog.cc", type "gcc -o myprog.exe myprog.cc
  300. -lgpp".  C++ source files should have the extension ".cc".  The
  301. -lgpp switch tells gcc to link the C++ libraries.  You can also
  302. tell gcc to optimize your code by using the -O switch.  There are
  303. two levels of optimization (-O and -O2, the highest being -O2). 
  304. Thus, for the fastest-executing code (at the expense of time to
  305. compile and of size of the executable), you would type "gcc -O2
  306. -o myprog.exe myprog.c" for myprog.c and "gcc -O2 -o myprog.exe
  307. myprog.cc -lgpp" for myprog.cc.
  308.  
  309. Note that specifying "-o myprog.exe" is important.  If you don't
  310. specify ".exe" as the suffix of the output file name, the
  311. compiler will generate a UNIX-style executable which will not run
  312. under OS/2 even if you subsequently rename the file so that it
  313. has a .exe extension.
  314.  
  315. 4.3 USING THE DEBUGGER
  316.  
  317. To debug a program, you need to compile it with the -g switch: 
  318. "gcc -g -o myprog.exe myprog.c" for myprog.c and likewise for
  319. myprog.cc.  After compilation, you then type "gdb myprog.exe" to
  320. start the debugger.  Type "h" at the debugger prompt to get a
  321. list of help topics.  gdb supports all sorts of breakpoints
  322. (including conditional ones), and you can watch variables, set
  323. variables to different values, etc.  For example, to get help on
  324. running programs from within the gdb, you can type "help
  325. running".  That will give you a list of commands such as run,
  326. kill, step, etc.  You can get help on individual commands by
  327. typing, for example, "help step".
  328.  
  329. The following is a sample compile and debug session.  Go into the
  330. emx\test directory and type "gcc -g -o hello.exe hello.cc -lgpp"
  331. to compile hello.cc.  Type "hello" to run it, to see if the
  332. compiler is functioning.  The program will print "Hello, world!"
  333. on the screen.  Now type "gdb hello.exe" to start gdb.  At the
  334. prompt "(gdb)", type "list main" to list the function "main". 
  335. Then type "break 5" to cause execution to stop at line 5 in the
  336. main function.  Type "run" to start execution -- it will stop at
  337. line 5.  Type "print argc" to see the value of the variable
  338. "argc".  Type "step" to run line 5 then halt execution at the
  339. next line.  Type "quit" to quit.  To list a function (main, say)
  340. that is longer than a screenful, type "list main"; then type
  341. "list" again to list the next screenful of main.
  342.  
  343. 4.4 USING MAKE
  344.  
  345. Assume you have a program made of the following source files: 
  346. "myprog1.c" and "myprog2.c".  You might manually compile these
  347. files by typing "gcc -o myprog.exe myprog1.c myprog2.c".  Of
  348. course, if you change only one of the files, typing such a
  349. command causes the recompiling of both source files.  During
  350. development, this could be tiresome if the files take a long time
  351. to compile.  A better way would be to type "gcc -c myprog1.c"
  352. which compiles myprog1.c into the object file "myprog1.o" (the -c
  353. switch tells gcc to make an object file), then to type "gcc -c
  354. myprog2.c" to generate myprog2.o, and finally to type "gcc -o
  355. myprog.exe myprog1.o myprog2.o".  This way, if you change only
  356. myprog1.c, you can recompile it and relink it with myprog2.o to
  357. create myprog.exe (skipping the "gcc -c myprog2.c" step).  This
  358. will be much faster if the source files take a long time to
  359. compile (or if you have a lot of source files).
  360.  
  361. Of course, doing all this typing is tiresome, too.  Also, if
  362. myprog1.c happens to depend on myprog1.h, and you change
  363. myprog1.h, you must recompile myprog1.c.  Thus, you have to keep
  364. track of all the file dependencies in order to know, after
  365. changing one header file, which other files need to be
  366. recompiled.
  367.  
  368. Fortunately, make takes care of all of this automatically.  All
  369. you have to do is create one text file that describes the various
  370. dependencies and the various steps to compile the program.  You
  371. name the text file "Makefile".  From then on, whenever you type
  372. "make", make examines the Makefile, looks for files which have
  373. changed since the last compile, recompiles any files which depend
  374. on the changed files, and relinks everything into an executable.
  375.  
  376. For example, suppose that myprog.exe is made from myprog1.c and
  377. myprog2.c, that myprog1.c contains the lines "#include
  378. "myprog1.c"" and "#include "mainhead.h"", and that myprog2.c
  379. includes myprog2.h and mainhead.h.  The Makefile describing all
  380. of this is
  381.  
  382. myprog.exe: myprog1.o myprog2.o
  383.      gcc -o myprog.exe myprog1.o myprog2.o
  384.  
  385. myprog1.o: myprog1.c myprog1.h mainhead.h
  386.      gcc -c myprog1.c
  387.  
  388. myprog2.o: myprog2.c myprog2.h mainhead.h
  389.      gcc -c myprog2.c
  390.  
  391. The first line shows that myprog.exe depends on myprog1.o and
  392. myprog2.o.  If either of those has changed since the last time
  393. make was invoked, make will relink them to create myprog.exe by
  394. giving the command under the first line.  The fourth line shows
  395. that myprog1.o depends on myprog1.c, myprog1.h, and mainhead.h. 
  396. If any of these three files have changed since the last time make
  397. was run, make will recompile myprog1.o by issuing the command on
  398. line five.  It will also realize that myprog.o has changed, that
  399. myprog.exe depends on myprog.o, and will relink myprog.exe.  If
  400. mainhead.h is changed, make will recompile and relink everything
  401. since myprog1.o needs to be changed, myprog2.o needs to be
  402. changed, and thus myprog.exe needs to be changed.
  403.  
  404. The example above shows the general form of a Makefile.  You give
  405. a target (like "myprog.exe" or "myprog1.o") followed by a colon,
  406. followed by a space, followed by a space-delimited list of files
  407. the target depends on.  The next line specifies the action to be
  408. taken when any of the dependencies change:  the first character
  409. MUST be a tab (not just a bunch of spaces used for indentation);
  410. then you type the command make should issue.  A Makefile is just
  411. a list of such targets, dependencies, and actions.
  412.  
  413. 5.0 WHERE TO GET MORE INFORMATION
  414.  
  415. Unfortunately, the GNU C and C++ software-development system does
  416. not come with extensive, easy-to-use documentation like that you
  417. would get with, for example, Borland C++.  The info files (the
  418. ones you see when you use the hypertext reader) do not contain
  419. information on all the usual C library functions (like printf,
  420. calloc, fopen, sin, etc.).  develop.doc (in the emx\doc
  421. directory) does contain a partial list of library functions,
  422. including a list of headers you need to include, what the
  423. functions do, and what parameters they accept -- but it is not
  424. complete.  Moreover, some of the installation instructions are
  425. sketchy (which is why I wrote this document).
  426.  
  427. Nevertheless, since the C compiler is ANSI C compliant (or at
  428. least close to it) and since the C++ compiler is very close to
  429. AT&T C++ 2.0, you can use just about any ANSI C and AT&T C++ 2.0
  430. reference manuals.  I use the ones I got with an old version of
  431. Borland Turbo C++.  If you don't have such manuals, you should be
  432. able to find something suitable in a bookstore.  
  433.  
  434. Keep in mind that, even if you already have books on C and C++,
  435. you need an ANSI C language reference manual that contains a
  436. complete list of all the functions available in ANSI C (like
  437. printf, calloc, sin, time, etc.) including descriptions of the
  438. prototypes for the functions (like "double sin(double)" and
  439. "time_t time(time_t *)") and descriptions of which headers you
  440. need to include in order to use the functions (sin requires
  441. math.h and time requires time.h, for example).  I recommend C:  A
  442. Reference Manual, by S. P. Harbison and G. L. Steele, Jr.
  443. (Prentice-Hall, 1991).  This book contains all the necessary
  444. information on library functions.
  445.  
  446. For those of you developing applications that use the PM or that
  447. use special OS/2 functions, the system DOES support many of the
  448. OS/2 API functions, including ones for semaphores, PM
  449. programming, named pipes, threads, etc.  See develop.doc (in the
  450. emx\doc directory) for a list of the supported functions.  The
  451. documentation does not contain a manual on how to use these API
  452. calls -- you need an OS/2 programming book for that.  [Check out
  453. the new series of books published by Van Norstrand-Reinhold --
  454. the series includes several books on using the API.  I will add
  455. specific titles and authors' names when I find out more
  456. information.  Does anyone have other recommendations for OS/2
  457. programming books?]
  458.  
  459. Also, way back when you were unarchiving, you might have been
  460. itching to examine the various readme files and other
  461. documentation.  Now is the time to do that to your heart's
  462. content.  Browse through "readme.gpp" and "readme.gdb" (both in
  463. the emx directory); "readme.doc", "install.doc", "user.doc", and
  464. "develop.doc" (all in the emx/doc directory); and the information
  465. available from the hypertext reader.
  466.  
  467. 6.0 CONCLUSIONS
  468.  
  469. I wrote this to help people get started with a free -- yet
  470. powerful -- 32-bit C and C++ software-development system for
  471. OS/2.  For the price of a couple of books, you have a full C and
  472. C++ programming system.  For the additional price of an OS/2
  473. programming book, you have a bargain-basement SDK.
  474.  
  475. If you find errors in this document, or if you have suggestions
  476. for its improvement, please let me know.  My GEnie address is
  477. "BROOKE", and my Internet address is "brooke@hope.caltech.edu".
  478.  
  479. APPENDIX 1:  OPTIONAL PACKAGES
  480.  
  481. There are a few optional packages you can get for this
  482. software-development system, packages which are not necessary but
  483. which can nevertheless be important.
  484.  
  485. The first is emacs, the GNU programmer's editor.  As mentioned
  486. earlier, this is one of the two most popular editors for UNIX,
  487. and it is very popular on many other operating systems as well. 
  488. An interesting feature of GNU emacs for OS/2 is that you can use
  489. it to interact both with the info files (the ones used by the
  490. hypertext reader) and with the debugger.  This latter ability
  491. provides fully-interactive debugging, similar to what MicroSoft's
  492. CodeView or Borland's integrated development environment offers. 
  493. To use emacs, you need the files "emacs.doc" and "emacsbin.zoo". 
  494. The source code is available in "emacssrc.zoo" and
  495. "emacspat.zoo".  On ftp-os2.nmsu.edu, these files are available
  496. in pub/os2/2.0/gnu/emacs.
  497.  
  498. The second is a package that allows you to use IBM's OS/2 tool
  499. kit.  You still have to buy the tool kit from IBM, but it is
  500. probably cheaper than buying their entire software-development
  501. kit.  With this package and IBM's tool kit, you have full use of
  502. all OS/2 API functions.  This package is available in the file
  503. "icc2gcc.zoo".  On ftp-os2.nmsu.edu, this file is available in
  504. pub/os2/2.0/programming/emx-0.8d.
  505.  
  506. The third package contains full source code to all the programs
  507. and libraries that come with the software-development system. 
  508. The source (and the full collection of auxiliary programs) for
  509. the hypertext reader is in the file "gnuinfo.zoo", available on
  510. ftp-os2.nmsu.edu in the pub/os2/2.0/gnu directory.  The source
  511. for make comes in gnumk362.zoo, and the names of the archives for
  512. all the other sources in the system are given in readme.doc. 
  513. (readme.doc is in the emx\doc directory.)  The latter archives
  514. are available on ftp-os2.nmsu.edu in
  515. pub/os2/2.0/programming/emx-0.8d.
  516.  
  517. APPENDIX 2:  FREQUENTLY ASKED QUESTIONS
  518.  
  519. This is such a common question concerning gcc that I figured I
  520. should answer it from the start:  "What's wrong with printf?" 
  521. People find that printf doesn't immediately echo to the screen;
  522. the string is held in a buffer and dumped later, usually long
  523. after the printf statement is executed.  This is not really a bug
  524. -- ANSI C does not specify that printf should flush the I/O
  525. buffer (since it is probably more efficient on mainframe systems
  526. with terminals to flush the I/O buffer only by large chunks at a
  527. time).  So, to get a printf to work like you are probably
  528. accustomed to, put an fflush(stdout) after any printf you want
  529. immediately displayed.
  530.  
  531. APPENDIX 3:  SOURCES OF DISTRIBUTION
  532.  
  533. This document already described some places from which you can
  534. get the necessary archives:  ftp-os2.nmsu.edu, GEnie, and perhaps
  535. CompuServe and other on-line servies.  However, some people don't
  536. have access to these sites, don't have modems fast enough to
  537. download MBytes of data in a reasonable amount of time, or can't
  538. afford the charges which they might incur by downloading from
  539. on-line services.  For these people, I am including the following
  540. list of people willing to distribute the whole system through
  541. regular mail.
  542.  
  543. If you would like to get on this list, just send me your name, a
  544. description of how people can contact you, and how much money you
  545. want for the service (such as "cost of disks and shipping",
  546. "disks + shipping + $30", or whatever you want to charge).  It
  547. would be helpful to have a list of five to ten people so that
  548. people can try another source if they can't contact one of them.
  549.  
  550. Folks, please consider what price would be sufficient for you to
  551. provide this service.  Even if you don't want to do it unless
  552. someone pays you $30, it might be helpful.  You might feel uneasy
  553. about charging money, but someone who can't get the system any
  554. other way might be VERY glad that you provide the service at all. 
  555.  
  556. Here's the list so far.  Keep in mind that people might change
  557. their prices, cease distributing the software, move, etc., so
  558. contact them first to find out details.
  559.  
  560. Brooke Anderson
  561. 1155 E. Del Mar #312
  562. Pasadena, CA  91106
  563. (818) 577-7555
  564. GEnie address:  BROOKE
  565. Internet address:  brooke@hope.caltech.edu
  566. Cost:  disks + shipping + $5 (subject to change if I get swamped) 
  567.