[BACK]Return to fileio.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mg

Diff for /src/usr.bin/mg/fileio.c between version 1.61 and 1.62

version 1.61, 2005/11/13 07:49:02 version 1.62, 2005/11/18 20:56:52
Line 28 
Line 28 
  * Open a file for reading.   * Open a file for reading.
  */   */
 int  int
 ffropen(const char *fn, BUFFER *bp)  ffropen(const char *fn, struct buffer *bp)
 {  {
         struct stat     statbuf;          struct stat     statbuf;
   
Line 60 
Line 60 
  * Open a file for writing.   * Open a file for writing.
  */   */
 int  int
 ffwopen(const char *fn, BUFFER *bp)  ffwopen(const char *fn, struct buffer *bp)
 {  {
         int     fd;          int     fd;
         mode_t  mode = DEFFILEMODE;          mode_t  mode = DEFFILEMODE;
Line 101 
Line 101 
  */   */
 /* ARGSUSED */  /* ARGSUSED */
 int  int
 ffclose(BUFFER *bp)  ffclose(struct buffer *bp)
 {  {
         (void) fclose(ffp);          (void) fclose(ffp);
         return (FIOSUC);          return (FIOSUC);
Line 112 
Line 112 
  * buffer. Return the status.   * buffer. Return the status.
  */   */
 int  int
 ffputbuf(BUFFER *bp)  ffputbuf(struct buffer *bp)
 {  {
         LINE   *lp, *lpend;          struct line   *lp, *lpend;
   
         lpend = bp->b_linep;          lpend = bp->b_linep;
         for (lp = lforw(lpend); lp != lpend; lp = lforw(lp)) {          for (lp = lforw(lpend); lp != lpend; lp = lforw(lp)) {
Line 412 
Line 412 
 #endif                          /* NO_DIRED */  #endif                          /* NO_DIRED */
   
 struct filelist {  struct filelist {
         LIST    fl_l;          struct list     fl_l;
         char    fl_name[NFILEN + 2];          char    fl_name[NFILEN + 2];
 };  };
   
 /*  /*
  * return list of file names that match the name in buf.   * return list of file names that match the name in buf.
  */   */
 LIST *  struct list *
 make_file_list(char *buf)  make_file_list(char *buf)
 {  {
         char            *dir, *file, *cp;          char            *dir, *file, *cp;
         int              len, preflen, ret;          int              len, preflen, ret;
         DIR             *dirp;          DIR             *dirp;
         struct dirent   *dent;          struct dirent   *dent;
         LIST            *last;          struct list             *last;
         struct filelist *current;          struct filelist *current;
         char             prefixx[NFILEN + 1];          char             prefixx[NFILEN + 1];
   
Line 540 
Line 540 
                 }                  }
                 current->fl_l.l_next = last;                  current->fl_l.l_next = last;
                 current->fl_l.l_name = current->fl_name;                  current->fl_l.l_name = current->fl_name;
                 last = (LIST *) current;                  last = (struct list *) current;
         }          }
         closedir(dirp);          closedir(dirp);
   

Legend:
Removed from v.1.61  
changed lines
  Added in v.1.62