mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-28 20:16:43 -05:00
uemacs: convert typedef struct REGION to struct region.
Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
724c4efc5f
commit
bbf253858a
2
efunc.h
2
efunc.h
@ -161,7 +161,7 @@ extern int killregion(int f, int n);
|
|||||||
extern int copyregion(int f, int n);
|
extern int copyregion(int f, int n);
|
||||||
extern int lowerregion(int f, int n);
|
extern int lowerregion(int f, int n);
|
||||||
extern int upperregion(int f, int n);
|
extern int upperregion(int f, int n);
|
||||||
extern int getregion(REGION *rp);
|
extern int getregion(struct region *rp);
|
||||||
|
|
||||||
/* posix.c */
|
/* posix.c */
|
||||||
extern void ttopen(void);
|
extern void ttopen(void);
|
||||||
|
@ -509,11 +509,11 @@ struct buffer {
|
|||||||
* The starting position of a region, and the size of the region in
|
* The starting position of a region, and the size of the region in
|
||||||
* characters, is kept in a region structure. Used by the region commands.
|
* characters, is kept in a region structure. Used by the region commands.
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
struct region {
|
||||||
struct line *r_linep; /* Origin struct line address. */
|
struct line *r_linep; /* Origin struct line address. */
|
||||||
short r_offset; /* Origin struct line offset. */
|
short r_offset; /* Origin struct line offset. */
|
||||||
long r_size; /* Length in characters. */
|
long r_size; /* Length in characters. */
|
||||||
} REGION;
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* All text is kept in circularly linked lists of "struct line" structures. These
|
* All text is kept in circularly linked lists of "struct line" structures. These
|
||||||
|
14
region.c
14
region.c
@ -1,4 +1,4 @@
|
|||||||
/* REGION.C
|
/* region.c
|
||||||
*
|
*
|
||||||
* The routines in this file
|
* The routines in this file
|
||||||
* deal with the region, that magic space
|
* deal with the region, that magic space
|
||||||
@ -23,7 +23,7 @@
|
|||||||
int killregion(int f, int n)
|
int killregion(int f, int n)
|
||||||
{
|
{
|
||||||
int s;
|
int s;
|
||||||
REGION region;
|
struct region region;
|
||||||
|
|
||||||
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
||||||
return (rdonly()); /* we are in read only mode */
|
return (rdonly()); /* we are in read only mode */
|
||||||
@ -48,7 +48,7 @@ int copyregion(int f, int n)
|
|||||||
struct line *linep;
|
struct line *linep;
|
||||||
int loffs;
|
int loffs;
|
||||||
int s;
|
int s;
|
||||||
REGION region;
|
struct region region;
|
||||||
|
|
||||||
if ((s = getregion(®ion)) != TRUE)
|
if ((s = getregion(®ion)) != TRUE)
|
||||||
return (s);
|
return (s);
|
||||||
@ -87,7 +87,7 @@ int lowerregion(int f, int n)
|
|||||||
int loffs;
|
int loffs;
|
||||||
int c;
|
int c;
|
||||||
int s;
|
int s;
|
||||||
REGION region;
|
struct region region;
|
||||||
|
|
||||||
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
||||||
return (rdonly()); /* we are in read only mode */
|
return (rdonly()); /* we are in read only mode */
|
||||||
@ -124,7 +124,7 @@ int upperregion(int f, int n)
|
|||||||
int loffs;
|
int loffs;
|
||||||
int c;
|
int c;
|
||||||
int s;
|
int s;
|
||||||
REGION region;
|
struct region region;
|
||||||
|
|
||||||
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
||||||
return (rdonly()); /* we are in read only mode */
|
return (rdonly()); /* we are in read only mode */
|
||||||
@ -150,7 +150,7 @@ int upperregion(int f, int n)
|
|||||||
/*
|
/*
|
||||||
* This routine figures out the
|
* This routine figures out the
|
||||||
* bounds of the region in the current window, and
|
* bounds of the region in the current window, and
|
||||||
* fills in the fields of the "REGION" structure pointed
|
* fills in the fields of the "struct region" structure pointed
|
||||||
* to by "rp". Because the dot and mark are usually very
|
* to by "rp". Because the dot and mark are usually very
|
||||||
* close together, we scan outward from dot looking for
|
* close together, we scan outward from dot looking for
|
||||||
* mark. This should save time. Return a standard code.
|
* mark. This should save time. Return a standard code.
|
||||||
@ -158,7 +158,7 @@ int upperregion(int f, int n)
|
|||||||
* an "ABORT" status; we might make this have the
|
* an "ABORT" status; we might make this have the
|
||||||
* conform thing later.
|
* conform thing later.
|
||||||
*/
|
*/
|
||||||
int getregion(REGION *rp)
|
int getregion(struct region *rp)
|
||||||
{
|
{
|
||||||
struct line *flp;
|
struct line *flp;
|
||||||
struct line *blp;
|
struct line *blp;
|
||||||
|
2
word.c
2
word.c
@ -651,7 +651,7 @@ int wordcount(int f, int n)
|
|||||||
int nlines; /* total number of lines in region */
|
int nlines; /* total number of lines in region */
|
||||||
int avgch; /* average number of chars/word */
|
int avgch; /* average number of chars/word */
|
||||||
int status; /* status return code */
|
int status; /* status return code */
|
||||||
REGION region; /* region to look at */
|
struct region region; /* region to look at */
|
||||||
|
|
||||||
/* make sure we have a region to count */
|
/* make sure we have a region to count */
|
||||||
if ((status = getregion(®ion)) != TRUE)
|
if ((status = getregion(®ion)) != TRUE)
|
||||||
|
Loading…
Reference in New Issue
Block a user