[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.24 and 1.25

version 1.24, 2002/02/22 00:18:37 version 1.25, 2002/03/11 13:02:56
Line 18 
Line 18 
  * Open a file for reading.   * Open a file for reading.
  */   */
 int  int
 ffropen(fn, bp)  ffropen(const char *fn, BUFFER *bp)
         char    *fn;  
         BUFFER  *bp;  
 {  {
         struct stat     statbuf;          struct stat     statbuf;
   
Line 41 
Line 39 
  * FALSE on error (cannot create).   * FALSE on error (cannot create).
  */   */
 int  int
 ffwopen(fn, bp)  ffwopen(const char *fn, BUFFER *bp)
         char   *fn;  
         BUFFER *bp;  
 {  {
         int fd;          int fd;
         mode_t mode = DEFFILEMODE;          mode_t mode = DEFFILEMODE;
Line 84 
Line 80 
  */   */
 /* ARGSUSED */  /* ARGSUSED */
 int  int
 ffclose(bp)  ffclose(BUFFER *bp)
         BUFFER *bp;  
 {  {
   
         (void) fclose(ffp);          (void) fclose(ffp);
Line 100 
Line 95 
  * end of buffer.   * end of buffer.
  */   */
 int  int
 ffputbuf(bp)  ffputbuf(BUFFER *bp)
         BUFFER *bp;  
 {  {
         char   *cp;          char   *cp;
         char   *cpend;          char   *cpend;
Line 137 
Line 131 
  * of data without the normally implied \n.   * of data without the normally implied \n.
  */   */
 int  int
 ffgetline(buf, nbuf, nbytes)  ffgetline(char *buf, int nbuf, int *nbytes)
         char    *buf;  
         int     nbuf;  
         int     *nbytes;  
 {  {
         int     c, i;          int     c, i;
   
Line 168 
Line 159 
  * a problem when using mg with things like crontab and vipw.   * a problem when using mg with things like crontab and vipw.
  */   */
 int  int
 fbackupfile(fn)  fbackupfile(const char *fn)
         char  *fn;  
 {  {
         struct stat     sb;          struct stat     sb;
         int             from, to, serrno;          int             from, to, serrno;
Line 238 
Line 228 
 #endif  #endif
   
 char *  char *
 adjustname(fn)  adjustname(const char *fn)
         char    *fn;  
 {  {
         char            *cp;          char            *cp;
         static char     fnb[NFILEN];          static char     fnb[NFILEN];
Line 511 
Line 500 
  */   */
   
 LIST *  LIST *
 make_file_list(buf)  make_file_list(char *buf)
         char    *buf;  
 {  {
         char            *dir, *file, *cp;          char            *dir, *file, *cp;
         int             len, preflen;          int             len, preflen;

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25