home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / vms / 20071 < prev    next >
Encoding:
Internet Message Format  |  1992-12-30  |  2.2 KB

  1. Path: sparky!uunet!news.claremont.edu!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL
  2. From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: VAX c
  5. Date: 30 Dec 1992 11:51:29 GMT
  6. Organization: HST Wide Field/Planetary Camera
  7. Lines: 36
  8. Distribution: world
  9. Message-ID: <1hs2g1INNnqs@gap.caltech.edu>
  10. References: <9212290122.AA05517@hermann.barra.COM>
  11. Reply-To: carl@SOL1.GPS.CALTECH.EDU
  12. NNTP-Posting-Host: sol1.gps.caltech.edu
  13.  
  14. In article <9212290122.AA05517@hermann.barra.COM>, louis@BARRA.COM (Louis Dunne) writes:
  15. >On Dec 26,  7:35am, Carl J Lydick wrote:
  16. >>Actually, you don't have to go all the way to the FAB, just to the RAB.  And
  17. >>the "unsupported and undocumented" function that DEC support was talking about
  18. >>was almost certainly the one that returns the RAB associated with a file
  19. >>descriptor.
  20. >
  21. >    1.    Does anyone know the function (undocumented or not) which will
  22. >        return a RAB associated with a stream-id.
  23.  
  24. Sorry, my mistake.  I was confusing two different RTLs.  If you happened to be
  25. using FORTRAN, the routine you'd want would be FOR$RAB.  There appears to be no
  26. corresponding routine for the VAXC RTL.  Again, my apologies.
  27.  
  28. >    2.    The "unsupported and undocumented" function that DEC support
  29. >        talked about was probably fsync(), which will force RMS to
  30. >        flush it's buffers, for a given file *number*.
  31.  
  32. You're right.  fsync() is what you want to use under VAX C.  But don't forget
  33. to fflush() first (and use fdopen() to get a file pointer for fflush() if
  34. necessary).  If you've got a file pointer:
  35.     fflush(fp);
  36.     fsync(fileno(fp));
  37. If you've got a file descriptor:
  38.     fflush(fdopen(fd, "a"));
  39.     fsync(fd);
  40.  
  41. For the third time, my abject apologies for the confusion I've caused.
  42. --------------------------------------------------------------------------------
  43. Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
  44.  
  45. Disclaimer:  Hey, I understand VAXen and VMS.  That's what I get paid for.  My
  46. understanding of astronomy is purely at the amateur level (or below).  So
  47. unless what I'm saying is directly related to VAX/VMS, don't hold me or my
  48. organization responsible for it.  If it IS related to VAX/VMS, you can try to
  49. hold me responsible for it, but my organization had nothing to do with it.
  50.