Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/med/buffer.d
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ int makelist()
int nbytes;
int s;
int type;
char b[6+1];
char line[128];
char[6+1] b;
char[128] line;

blistp.b_flag &= ~BFCHG; /* Don't complain! */
if ((s=buffer_clear(blistp)) != TRUE) /* Blow old text away */
Expand Down
2 changes: 1 addition & 1 deletion src/med/console.d
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ void updateline(int row,attchar_t[] buffer,attchar_t[] physical)
int col;
int numcols;
CHAR_INFO *psb;
CHAR_INFO sbbuf[256];
CHAR_INFO[256] sbbuf;
CHAR_INFO *sb;
COORD sbsize;
static COORD sbcoord;
Expand Down
2 changes: 1 addition & 1 deletion src/med/disp.d
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct disp_t
ubyte mode;
ubyte inited;
ubyte ega;
ubyte reserved[3];
ubyte[3] reserved;
short nowrap;

union
Expand Down
17 changes: 11 additions & 6 deletions src/med/display.d
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ import window;
import main;
import buffer;
import disprev;
import console;
import termio;
import terminal;
import xterm;
import url;
import utf;

Expand Down Expand Up @@ -313,12 +316,13 @@ int getcol2(const(char)[] dotp, int doto)
int coltodoto(LINE* lp, int col)
{
size_t len = llength(lp);
size_t i = 0;
int i = 0;
while (i < len)
{
if (getcol(lp,i) >= col)
if (getcol(lp, i) >= col)
return i;
decodeUTF8(lp.l_text, i);
ulong j = i;
decodeUTF8(lp.l_text, j);
}
return i;
}
Expand Down Expand Up @@ -589,7 +593,7 @@ else
wp.w_flag = 0;
wp.w_force = 0;
}
} /* if any update flags on */
} /* if any update flags on */
debug (WFDEBUG)
{
modeline(wp);
Expand Down Expand Up @@ -963,7 +967,7 @@ int mlyesno(string prompt)
*/

const HISTORY_MAX = 10;
string history[HISTORY_MAX];
string[HISTORY_MAX] history;
int history_top;

int HDEC(int hi) { return (hi == 0) ? HISTORY_MAX - 1 : hi - 1; }
Expand Down Expand Up @@ -1182,7 +1186,8 @@ int mlreply(string prompt, string init, out string result)
//case InsKEY:
case 0x11: /* ^Q, quote next */
c = term.t_getchar();
default:
goto default;
default:
if (c < 0 || c >= 0x7F)
{ // Error
ctrlg(FALSE, 0);
Expand Down
10 changes: 5 additions & 5 deletions src/med/file.d
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import core.stdc.stdlib;
import std.stdio;
import std.path;
import std.string;
import std.file;
import std.utf;

import ed;
Expand Down Expand Up @@ -164,7 +165,7 @@ int file_readin(string fname)
{
/* If the current buffer now becomes undisplayed */
if (--curbp.b_nwnd == 0)
{
{
curbp.b_dotp = curwp.w_dotp;
curbp.b_doto = curwp.w_doto;
curbp.b_markp = curwp.w_markp;
Expand All @@ -173,7 +174,7 @@ int file_readin(string fname)
curbp = bp;
curwp.w_bufp = bp;
if (bp.b_nwnd++ == 0) /* if buffer not already displayed */
{
{
curwp.w_dotp = bp.b_dotp;
curwp.w_doto = bp.b_doto;
curwp.w_markp = bp.b_markp;
Expand All @@ -183,9 +184,9 @@ int file_readin(string fname)
{
/* Set dot to be at place where other window has it */
foreach (wp; windows)
{
{
if (wp!=curwp && wp.w_bufp==bp)
{
{
curwp.w_dotp = wp.w_dotp;
curwp.w_doto = wp.w_doto;
curwp.w_markp = wp.w_markp;
Expand Down Expand Up @@ -570,4 +571,3 @@ int file_writeregion(string dfilename, REGION* region)
return FALSE;
}
}

1 change: 1 addition & 0 deletions src/med/fileio.d
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ bool ffreadonly(string name)
}
else
{
import core.sys.posix.sys.stat;
return exists && (a & S_IWUSR) == 0;
}
}
Expand Down
Loading