version 1.46, 2005/10/11 01:08:52 |
version 1.47, 2005/10/13 05:34:11 |
|
|
int |
int |
togglereadonly(int f, int n) |
togglereadonly(int f, int n) |
{ |
{ |
if (!(curbp->b_flag & BFREADONLY)) { |
if (!(curbp->b_flag & BFREADONLY)) |
curbp->b_flag |= BFREADONLY; |
curbp->b_flag |= BFREADONLY; |
ewprintf("Now readonly"); |
else { |
} else { |
|
curbp->b_flag &=~ BFREADONLY; |
curbp->b_flag &=~ BFREADONLY; |
if (curbp->b_flag & BFCHG) |
if (curbp->b_flag & BFCHG) |
ewprintf("Warning: Buffer was modified"); |
ewprintf("Warning: Buffer was modified"); |
} |
} |
curwp->w_flag |= WFMODE; |
curwp->w_flag |= WFMODE; |
|
|
return (1); |
return (TRUE); |
} |
} |
|
|
/* |
/* |
|
|
} |
} |
|
|
/* |
/* |
* The argument "text" points to a format string. Append this line to the |
* The argument "fmt" points to a format string. Append this line to the |
* buffer. Handcraft the EOL on the end. Return TRUE if it worked and |
* buffer. Handcraft the EOL on the end. Return TRUE if it worked and |
* FALSE if you ran out of room. |
* FALSE if you ran out of room. |
*/ |
*/ |