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

Diff for /src/usr.bin/mg/region.c between version 1.18 and 1.19

version 1.18, 2005/08/09 00:53:48 version 1.19, 2005/11/18 20:56:53
Line 11 
Line 11 
   
 #include "def.h"  #include "def.h"
   
 static  int     getregion(REGION *);  static  int     getregion(struct region *);
 static  int     setsize(REGION *, RSIZE);  static  int     setsize(struct region *, RSIZE);
   
 /*  /*
  * Kill the region.  Ask "getregion" to figure out the bounds of the region.   * Kill the region.  Ask "getregion" to figure out the bounds of the region.
Line 23 
Line 23 
 killregion(int f, int n)  killregion(int f, int n)
 {  {
         int     s;          int     s;
         REGION  region;          struct region   region;
   
         if ((s = getregion(&region)) != TRUE)          if ((s = getregion(&region)) != TRUE)
                 return (s);                  return (s);
Line 44 
Line 44 
 int  int
 copyregion(int f, int n)  copyregion(int f, int n)
 {  {
         LINE    *linep;          struct line     *linep;
         REGION   region;          struct region    region;
         int      loffs;          int      loffs;
         int      s;          int      s;
   
Line 88 
Line 88 
 int  int
 lowerregion(int f, int n)  lowerregion(int f, int n)
 {  {
         LINE    *linep;          struct line     *linep;
         REGION   region;          struct region    region;
         int      loffs, c, s;          int      loffs, c, s;
   
         if (curbp->b_flag & BFREADONLY) {          if (curbp->b_flag & BFREADONLY) {
Line 129 
Line 129 
 int  int
 upperregion(int f, int n)  upperregion(int f, int n)
 {  {
         LINE     *linep;          struct line      *linep;
         REGION    region;          struct region     region;
         int       loffs, c, s;          int       loffs, c, s;
   
         if (curbp->b_flag & BFREADONLY) {          if (curbp->b_flag & BFREADONLY) {
Line 171 
Line 171 
  * because I might add a "if regions is big, ask before clobbering" flag.   * because I might add a "if regions is big, ask before clobbering" flag.
  */   */
 static int  static int
 getregion(REGION *rp)  getregion(struct region *rp)
 {  {
         LINE    *flp, *blp;          struct line     *flp, *blp;
         long     fsize, bsize;          long     fsize, bsize;
   
         if (curwp->w_markp == NULL) {          if (curwp->w_markp == NULL) {
Line 227 
Line 227 
  * Set size, and check for overflow.   * Set size, and check for overflow.
  */   */
 static int  static int
 setsize(REGION *rp, RSIZE size)  setsize(struct region *rp, RSIZE size)
 {  {
         rp->r_size = size;          rp->r_size = size;
         if (rp->r_size != size) {          if (rp->r_size != size) {
Line 258 
Line 258 
 int  int
 prefixregion(int f, int n)  prefixregion(int f, int n)
 {  {
         LINE    *first, *last;          struct line     *first, *last;
         REGION   region;          struct region    region;
         char    *prefix = prefix_string;          char    *prefix = prefix_string;
         int      nline;          int      nline;
         int      s;          int      s;
Line 325 
Line 325 
 #endif /* PREFIXREGION */  #endif /* PREFIXREGION */
   
 int  int
 region_get_data(REGION *reg, char *buf, int len)  region_get_data(struct region *reg, char *buf, int len)
 {  {
         int      i, off;          int      i, off;
         LINE    *lp;          struct line     *lp;
   
         off = reg->r_offset;          off = reg->r_offset;
         lp = reg->r_linep;          lp = reg->r_linep;

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19