home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / c / 17056 < prev    next >
Encoding:
Text File  |  1992-11-23  |  1002 b   |  26 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!asuvax!ncar!news.miami.edu!aem
  3. From: aem@news.miami.edu (andrew mossberg)
  4. Subject: putenv question
  5. Message-ID: <1992Nov23.204330.13594@news.miami.edu>
  6. Organization: R.S.M.A.S.
  7. Distribution: na
  8. Date: Mon, 23 Nov 92 20:43:30 GMT
  9. Lines: 15
  10.  
  11.  
  12. I'm trying to read a file and place lines found there into the environment
  13. via putenv, but it isn't cooperating.  It works fine when I hardcode
  14. values into the putenv calls, like putenv("SSS=adas");, but reading
  15. a file using fgets() and then putenv'ing the line (sans trailing newline)
  16. only leave the last line in the environment. Obviously I'm doing something
  17. wrong with pointers, but I can't figure out what.  Please, someone, tell
  18. me what idiotic mistake I'm making this time! This is on a HP 9000/720
  19. running HP/UX 8.0.7
  20.  
  21. aem
  22.  
  23. -- 
  24. a.e.mossberg    Symbiosis Corporation    Miami, Florida    aem@symbiosis.ahp.com
  25. (305) 597-4110  fax: (305) 597-4002     alt mailbox: aem@umigw.miami.edu
  26.