fix indent
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: buffer.c,v 1.20 2003/01/23 18:37:20 ukai Exp $ */
|
/* $Id: buffer.c,v 1.21 2003/01/23 18:38:04 ukai Exp $ */
|
||||||
#include "fm.h"
|
#include "fm.h"
|
||||||
|
|
||||||
#ifdef USE_MOUSE
|
#ifdef USE_MOUSE
|
||||||
@@ -561,7 +561,7 @@ reshapeBuffer(Buffer *buf)
|
|||||||
int n;
|
int n;
|
||||||
gotoRealLine(buf, sbuf.currentLine->real_linenumber);
|
gotoRealLine(buf, sbuf.currentLine->real_linenumber);
|
||||||
n = (buf->currentLine->linenumber - buf->topLine->linenumber)
|
n = (buf->currentLine->linenumber - buf->topLine->linenumber)
|
||||||
- (sbuf.currentLine->linenumber - sbuf.topLine->linenumber);
|
- (sbuf.currentLine->linenumber - sbuf.topLine->linenumber);
|
||||||
if (n) {
|
if (n) {
|
||||||
buf->topLine = lineSkip(buf, buf->topLine, n, FALSE);
|
buf->topLine = lineSkip(buf, buf->topLine, n, FALSE);
|
||||||
gotoRealLine(buf, sbuf.currentLine->real_linenumber);
|
gotoRealLine(buf, sbuf.currentLine->real_linenumber);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: display.c,v 1.53 2003/01/23 18:37:20 ukai Exp $ */
|
/* $Id: display.c,v 1.54 2003/01/23 18:38:05 ukai Exp $ */
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include "fm.h"
|
#include "fm.h"
|
||||||
|
|
||||||
@@ -364,7 +364,9 @@ displayBuffer(Buffer *buf, int mode)
|
|||||||
if (buf->height == 0)
|
if (buf->height == 0)
|
||||||
buf->height = LASTLINE + 1;
|
buf->height = LASTLINE + 1;
|
||||||
if ((buf->width != INIT_BUFFER_WIDTH && (buf->type &&
|
if ((buf->width != INIT_BUFFER_WIDTH && (buf->type &&
|
||||||
!strcmp(buf->type, "text/html") || FoldLine)) || buf->need_reshape) {
|
!strcmp(buf->type, "text/html")
|
||||||
|
|| FoldLine))
|
||||||
|
|| buf->need_reshape) {
|
||||||
buf->need_reshape = TRUE;
|
buf->need_reshape = TRUE;
|
||||||
reshapeBuffer(buf);
|
reshapeBuffer(buf);
|
||||||
}
|
}
|
||||||
@@ -1260,8 +1262,7 @@ cursorUp(Buffer *buf, int n)
|
|||||||
}
|
}
|
||||||
cursorUp0(buf, n);
|
cursorUp0(buf, n);
|
||||||
while (buf->currentLine->prev && buf->currentLine->bpos &&
|
while (buf->currentLine->prev && buf->currentLine->bpos &&
|
||||||
buf->currentLine->bwidth >=
|
buf->currentLine->bwidth >= buf->currentColumn + buf->visualpos)
|
||||||
buf->currentColumn + buf->visualpos)
|
|
||||||
cursorUp0(buf, n);
|
cursorUp0(buf, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1293,8 +1294,8 @@ cursorDown(Buffer *buf, int n)
|
|||||||
}
|
}
|
||||||
cursorDown0(buf, n);
|
cursorDown0(buf, n);
|
||||||
while (buf->currentLine->next && buf->currentLine->next->bpos &&
|
while (buf->currentLine->next && buf->currentLine->next->bpos &&
|
||||||
buf->currentLine->bwidth + buf->currentLine->width <
|
buf->currentLine->bwidth + buf->currentLine->width <
|
||||||
buf->currentColumn + buf->visualpos)
|
buf->currentColumn + buf->visualpos)
|
||||||
cursorDown0(buf, n);
|
cursorDown0(buf, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1389,7 +1390,9 @@ cursorLeft(Buffer *buf, int n)
|
|||||||
cpos = COLPOS(l, buf->pos);
|
cpos = COLPOS(l, buf->pos);
|
||||||
buf->visualpos = l->bwidth + cpos - buf->currentColumn;
|
buf->visualpos = l->bwidth + cpos - buf->currentColumn;
|
||||||
if (buf->visualpos - l->bwidth < 0 && n) {
|
if (buf->visualpos - l->bwidth < 0 && n) {
|
||||||
columnSkip(buf, -n + buf->visualpos - l->bwidth - (buf->visualpos - l->bwidth) % n);
|
columnSkip(buf,
|
||||||
|
-n + buf->visualpos - l->bwidth - (buf->visualpos -
|
||||||
|
l->bwidth) % n);
|
||||||
buf->visualpos = l->bwidth + cpos - buf->currentColumn;
|
buf->visualpos = l->bwidth + cpos - buf->currentColumn;
|
||||||
}
|
}
|
||||||
buf->cursorX = buf->visualpos - l->bwidth;
|
buf->cursorX = buf->visualpos - l->bwidth;
|
||||||
@@ -1464,7 +1467,7 @@ arrangeLine(Buffer *buf)
|
|||||||
return;
|
return;
|
||||||
buf->cursorY = buf->currentLine->linenumber - buf->topLine->linenumber;
|
buf->cursorY = buf->currentLine->linenumber - buf->topLine->linenumber;
|
||||||
i = columnPos(buf->currentLine, buf->currentColumn + buf->visualpos
|
i = columnPos(buf->currentLine, buf->currentColumn + buf->visualpos
|
||||||
- buf->currentLine->bwidth);
|
- buf->currentLine->bwidth);
|
||||||
cpos = COLPOS(buf->currentLine, i) - buf->currentColumn;
|
cpos = COLPOS(buf->currentLine, i) - buf->currentColumn;
|
||||||
if (cpos >= 0) {
|
if (cpos >= 0) {
|
||||||
buf->cursorX = cpos;
|
buf->cursorX = cpos;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: etc.c,v 1.58 2003/01/23 18:37:20 ukai Exp $ */
|
/* $Id: etc.c,v 1.59 2003/01/23 18:38:06 ukai Exp $ */
|
||||||
#include "fm.h"
|
#include "fm.h"
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include "myctype.h"
|
#include "myctype.h"
|
||||||
@@ -240,7 +240,7 @@ checkType(Str s, Lineprop **oprop
|
|||||||
#ifdef USE_ANSI_COLOR
|
#ifdef USE_ANSI_COLOR
|
||||||
, Linecolor **ocolor
|
, Linecolor **ocolor
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Lineprop mode;
|
Lineprop mode;
|
||||||
Lineprop effect = PE_NORMAL;
|
Lineprop effect = PE_NORMAL;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: file.c,v 1.203 2003/01/23 18:37:20 ukai Exp $ */
|
/* $Id: file.c,v 1.204 2003/01/23 18:38:06 ukai Exp $ */
|
||||||
#include "fm.h"
|
#include "fm.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include "myctype.h"
|
#include "myctype.h"
|
||||||
@@ -658,7 +658,7 @@ readHeader(URLFile *uf, Buffer *newBuf, int thru, ParsedURL *pu)
|
|||||||
#ifdef USE_ANSI_COLOR
|
#ifdef USE_ANSI_COLOR
|
||||||
, NULL
|
, NULL
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
Strcat(tmp, lineBuf2);
|
Strcat(tmp, lineBuf2);
|
||||||
if (thru)
|
if (thru)
|
||||||
addnewline(newBuf, lineBuf2->ptr, propBuffer,
|
addnewline(newBuf, lineBuf2->ptr, propBuffer,
|
||||||
@@ -6059,9 +6059,9 @@ extern Lineprop NullProp[];
|
|||||||
static void
|
static void
|
||||||
addnewline2(Buffer *buf, char *line, Lineprop *prop,
|
addnewline2(Buffer *buf, char *line, Lineprop *prop,
|
||||||
#ifdef USE_ANSI_COLOR
|
#ifdef USE_ANSI_COLOR
|
||||||
Linecolor *color,
|
Linecolor *color,
|
||||||
#endif
|
#endif
|
||||||
int pos, int nlines)
|
int pos, int nlines)
|
||||||
{
|
{
|
||||||
Line *l;
|
Line *l;
|
||||||
l = New(Line);
|
l = New(Line);
|
||||||
@@ -6885,7 +6885,7 @@ loadBuffer(URLFile *uf, Buffer *volatile newBuf)
|
|||||||
#ifdef USE_ANSI_COLOR
|
#ifdef USE_ANSI_COLOR
|
||||||
, &colorBuffer
|
, &colorBuffer
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
addnewline(newBuf, lineBuf2->ptr, propBuffer,
|
addnewline(newBuf, lineBuf2->ptr, propBuffer,
|
||||||
#ifdef USE_ANSI_COLOR
|
#ifdef USE_ANSI_COLOR
|
||||||
colorBuffer,
|
colorBuffer,
|
||||||
@@ -7258,8 +7258,8 @@ getNextPage(Buffer *buf, int plen)
|
|||||||
#ifdef USE_ANSI_COLOR
|
#ifdef USE_ANSI_COLOR
|
||||||
, &colorBuffer
|
, &colorBuffer
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
addnewline(buf, lineBuf2->ptr, propBuffer,
|
addnewline(buf, lineBuf2->ptr, propBuffer,
|
||||||
#ifdef USE_ANSI_COLOR
|
#ifdef USE_ANSI_COLOR
|
||||||
colorBuffer,
|
colorBuffer,
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: main.c,v 1.198 2003/01/23 18:37:21 ukai Exp $ */
|
/* $Id: main.c,v 1.199 2003/01/23 18:38:08 ukai Exp $ */
|
||||||
#define MAINPROGRAM
|
#define MAINPROGRAM
|
||||||
#include "fm.h"
|
#include "fm.h"
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@@ -2487,7 +2487,8 @@ linend(void)
|
|||||||
{
|
{
|
||||||
if (Currentbuf->firstLine == NULL)
|
if (Currentbuf->firstLine == NULL)
|
||||||
return;
|
return;
|
||||||
while (Currentbuf->currentLine->next && Currentbuf->currentLine->next->bpos)
|
while (Currentbuf->currentLine->next
|
||||||
|
&& Currentbuf->currentLine->next->bpos)
|
||||||
cursorDown0(Currentbuf, 1);
|
cursorDown0(Currentbuf, 1);
|
||||||
Currentbuf->pos = Currentbuf->currentLine->len - 1;
|
Currentbuf->pos = Currentbuf->currentLine->len - 1;
|
||||||
arrangeCursor(Currentbuf);
|
arrangeCursor(Currentbuf);
|
||||||
|
|||||||
Reference in New Issue
Block a user