Changeset 252 for trunk/include/slib.h


Ignore:
Timestamp:
Oct 12, 2009, 10:40:45 AM (15 years ago)
Author:
katerina
Message:

Add code to check for stale file records on close() and fclose(), fix sl_close() to handle open stream (ticket #163).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/slib.h

    r248 r252  
    329329#define SL_OFILE_SIZE 32
    330330
     331  char * sl_check_badfd();
    331332  char * sl_check_stale();
    332333
     334  /* Create a file record for an open file
     335   */
    333336  SL_TICKET sl_make_ticket (const char * ofile, int oline,
    334                             int fd, const char * filename);
     337                            int fd, const char * filename, FILE * stream);
    335338 
     339  /* Get the pointer to a stream. If none exists yet, open it
     340   */
     341  FILE * sl_stream (SL_TICKET ticket, char * mode);
     342
    336343  /* Open for writing.
    337344   */
     
    388395   */
    389396  int sl_close (SL_TICKET ticket);
     397
     398  /* Close file descriptor.
     399   */
     400  int sl_close_fd (const char * file, int line, int fd);
     401
     402  /* Close stream.
     403   */
     404  int sl_fclose (const char * file, int line, FILE * fp);
    390405
    391406  /* Unlink file.
Note: See TracChangeset for help on using the changeset viewer.