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

Diff for /src/usr.bin/mg/file.c between version 1.44 and 1.45

version 1.44, 2005/11/13 07:24:48 version 1.45, 2005/11/18 20:56:52
Line 41 
Line 41 
 int  int
 filevisit(int f, int n)  filevisit(int f, int n)
 {  {
         BUFFER  *bp;          struct buffer   *bp;
         char     fname[NFILEN], *bufp, *adjf, *slash;          char     fname[NFILEN], *bufp, *adjf, *slash;
         int      status;          int      status;
   
Line 86 
Line 86 
 int  int
 filevisitalt(int f, int n)  filevisitalt(int f, int n)
 {  {
         BUFFER  *bp;          struct buffer   *bp;
         char     fname[NFILEN], *bufp, *adjf, *slash;          char     fname[NFILEN], *bufp, *adjf, *slash;
         int      status;          int      status;
   
Line 145 
Line 145 
 int  int
 poptofile(int f, int n)  poptofile(int f, int n)
 {  {
         BUFFER  *bp;          struct buffer   *bp;
         MGWIN   *wp;          struct mgwin    *wp;
         char     fname[NFILEN], *adjf, *bufp;          char     fname[NFILEN], *adjf, *bufp;
         int      status;          int      status;
   
Line 176 
Line 176 
  * Given a file name, either find the buffer it uses, or create a new   * Given a file name, either find the buffer it uses, or create a new
  * empty buffer to put it in.   * empty buffer to put it in.
  */   */
 BUFFER *  struct buffer *
 findbuffer(char *fn)  findbuffer(char *fn)
 {  {
         BUFFER          *bp;          struct buffer           *bp;
         char             bname[NBUFN], fname[NBUFN];          char             bname[NBUFN], fname[NBUFN];
         unsigned int     count, remain, i;          unsigned int     count, remain, i;
   
Line 211 
Line 211 
 int  int
 readin(char *fname)  readin(char *fname)
 {  {
         MGWIN   *wp;          struct mgwin    *wp;
         int      status, i, ro = FALSE;          int      status, i, ro = FALSE;
         PF      *ael;          PF      *ael;
   
Line 288 
Line 288 
 int  int
 insertfile(char *fname, char *newname, int replacebuf)  insertfile(char *fname, char *newname, int replacebuf)
 {  {
         BUFFER  *bp;          struct buffer   *bp;
         LINE    *lp1, *lp2;          struct line     *lp1, *lp2;
         LINE    *olp;                   /* line we started at */          struct line     *olp;                   /* line we started at */
         MGWIN   *wp;          struct mgwin    *wp;
         int      nbytes, s, nline, siz, x = -1, x2;          int      nbytes, s, nline, siz, x = -1, x2;
         int      opos;                  /* offset we started at */          int      opos;                  /* offset we started at */
   
Line 540 
Line 540 
  * the value of makebackup.   * the value of makebackup.
  */   */
 int  int
 buffsave(BUFFER *bp)  buffsave(struct buffer *bp)
 {  {
         int      s;          int      s;
   
Line 615 
Line 615 
  * "fileio.c" package. Most of the grief is checking of some sort.   * "fileio.c" package. Most of the grief is checking of some sort.
  */   */
 int  int
 writeout(BUFFER *bp, char *fn)  writeout(struct buffer *bp, char *fn)
 {  {
         int      s;          int      s;
   
Line 639 
Line 639 
  * mode line updated.   * mode line updated.
  */   */
 void  void
 upmodes(BUFFER *bp)  upmodes(struct buffer *bp)
 {  {
         MGWIN   *wp;          struct mgwin    *wp;
   
         for (wp = wheadp; wp != NULL; wp = wp->w_wndp)          for (wp = wheadp; wp != NULL; wp = wp->w_wndp)
                 if (bp == NULL || curwp->w_bufp == bp)                  if (bp == NULL || curwp->w_bufp == bp)

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45