home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1987 < prev    next >
Internet Message Format  |  1990-12-28  |  2KB

  1. From: darcy@druid.uucp (D'Arcy J.M. Cain)
  2. Newsgroups: alt.sources,alt.sources.d
  3. Subject: Re: Multi-user chat program
  4. Message-ID: <1990Oct23.175327.7124@druid.uucp>
  5. Date: 23 Oct 90 17:53:27 GMT
  6.  
  7. In article <1990Oct22.172500.26286@agate.berkeley.edu> vreed@sandstorm.Berkeley.EDU (Vincent Reed) writes:
  8. >I grabbed your Multi-User Chat to use on our system, but we are missing a few 
  9. >of the header files necessary. Could you please send me your stdlib.h process.h
  10. >and getopt.h header files? The copies of these we do have seem to be program 
  11. >specific. I'm posting this to the net because I was unable to get mail 
  12. >directly to you.
  13. >
  14. I assumed these were ANSI standard header files but except for stdlib.h I
  15. can't find mention of them in my K&R2.  On my system, stdlib.h is just a
  16. link to unistd.h.  That file is obviously OS specific so I try to avoid it.
  17. I can't send you a copy because it is copyright AT&T.  Your best bet is to
  18. remove the include directive for this and see what prototypes you are
  19. missing.
  20.  
  21. I would think that getopt.h would be obvious from the name but here it is:
  22.  
  23. ------------------------- getopt.h -------------------------------
  24. /*
  25. declarations for getopt
  26. */
  27.  
  28. #ifndef        _GETOPT_H
  29. #define        _GETOPT_H
  30.  
  31. extern int getopt(int argc, char **argv, const char *opts);
  32. extern int optind, opterr;
  33. extern char *optarg;
  34.  
  35. #endif
  36. ------------------------ end of getopt.h ----------------------------
  37.  
  38. The file process.h holds mainly prototypes fork() and exec() calls as well
  39. as wait().  I have built up this file from various files and although I
  40. have modified it to an unrecognizable form I hesitate to send out the whole
  41. thing.  Here are the relevant prototypes:
  42.  
  43. ---------------------------- process.h -------------------------------
  44. /*
  45.     process.h
  46. */
  47.  
  48. #ifndef        _PROCESS_H
  49. #define        _PROCESS_H
  50.  
  51. int        execlp(const char *path, const char *arg0, ...);
  52. int        fork(void);
  53. int        getpid(void);
  54. int        system(const char *command);
  55. int        wait(int *stat_loc);
  56.  
  57. #endif
  58. --------------------------- end of process.h -------------------------
  59.  
  60. Was I wrong to assume that these files would be available under a standard
  61. compiler?
  62.  
  63. BTW:  This belongs in alt.sources.d where followups are directed.
  64.  
  65. -- 
  66. D'Arcy J.M. Cain (darcy@druid)     |
  67. D'Arcy Cain Consulting             |   I support gun control.
  68. West Hill, Ontario, Canada         |   Let's start with the government!
  69. + 416 281 6094                     |
  70.