mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-22 00:56:26 -05:00
Compare commits
No commits in common. "3889f1709c531a7117712596f621c1f8b7688fb9" and "a00f12b614e6500190af93beca7073e7f7452b09" have entirely different histories.
3889f1709c
...
a00f12b614
21
word.c
21
word.c
@ -352,8 +352,9 @@ static int parafillnjustify( int f, int n, int justify_f) {
|
|||||||
int wbufsize ;
|
int wbufsize ;
|
||||||
int wordlen; /* length of current word */
|
int wordlen; /* length of current word */
|
||||||
int clength; /* position on line during fill */
|
int clength; /* position on line during fill */
|
||||||
|
// int i; /* index during word copy */
|
||||||
int eopflag; /* Are we at the End-Of-Paragraph? */
|
int eopflag; /* Are we at the End-Of-Paragraph? */
|
||||||
int firstflag = TRUE ; /* first word? (needs no space) */
|
int firstflag; /* first word? (needs no space) */
|
||||||
struct line *eopline; /* pointer to line just past EOP */
|
struct line *eopline; /* pointer to line just past EOP */
|
||||||
int dotflag = 0 ; /* was the last char a period? */
|
int dotflag = 0 ; /* was the last char a period? */
|
||||||
int leftmarg = 0 ; /* left marginal */
|
int leftmarg = 0 ; /* left marginal */
|
||||||
@ -386,24 +387,18 @@ static int parafillnjustify( int f, int n, int justify_f) {
|
|||||||
gotoeop(FALSE, 1);
|
gotoeop(FALSE, 1);
|
||||||
eopline = lforw(curwp->w_dotp);
|
eopline = lforw(curwp->w_dotp);
|
||||||
|
|
||||||
/* and back to the beginning of the paragraph */
|
/* and back top the beginning of the paragraph */
|
||||||
gotobop(FALSE, 1);
|
gotobop(FALSE, 1);
|
||||||
|
|
||||||
/* initialize various info */
|
/* initialize various info */
|
||||||
if( justflag && leftmarg < llength(curwp->w_dotp)) {
|
if( justflag && leftmarg < llength(curwp->w_dotp))
|
||||||
setccol( leftmarg) ;
|
setccol( leftmarg) ;
|
||||||
lgetchar( &c) ;
|
|
||||||
if( c == ' ' || c == '\t')
|
|
||||||
/* on a space */
|
|
||||||
if( getccol( TRUE) < getccol( FALSE))
|
|
||||||
/* first non space before current position */
|
|
||||||
firstflag = FALSE ;
|
|
||||||
}
|
|
||||||
|
|
||||||
clength = getccol( FALSE) ;
|
clength = getccol( FALSE) ;
|
||||||
wordlen = 0;
|
wordlen = 0;
|
||||||
|
|
||||||
/* scan through lines, filling words */
|
/* scan through lines, filling words */
|
||||||
|
firstflag = TRUE;
|
||||||
eopflag = FALSE;
|
eopflag = FALSE;
|
||||||
while (!eopflag) {
|
while (!eopflag) {
|
||||||
int bytes = 1;
|
int bytes = 1;
|
||||||
@ -463,12 +458,8 @@ static int parafillnjustify( int f, int n, int justify_f) {
|
|||||||
wordlen = 0;
|
wordlen = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* and add a last newline for the end of our new paragraph */
|
/* and add a last newline for the end of our new paragraph */
|
||||||
if( eopline == curbp->b_linep) /* at EOF? */
|
lnewline();
|
||||||
forwchar( FALSE, 1) ;
|
|
||||||
else
|
|
||||||
lnewline() ;
|
|
||||||
|
|
||||||
if( justflag) {
|
if( justflag) {
|
||||||
forwword(FALSE, 1);
|
forwword(FALSE, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user