Applied patches from Alexey and Pavel

This commit is contained in:
Alexander S. Aganichev 2001-07-25 19:06:12 +00:00
parent e35e04920a
commit 690e26c268
7 changed files with 97 additions and 23 deletions

View File

@ -12,6 +12,8 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________
! Old logo returned back with Pavel Gulchouck's patch :-)
- Fixed double WAZOO FREQ bug (Thanx to Dmitry Lebus for discovering
problem).

View File

@ -376,12 +376,23 @@ static void w_brag() {
W_READ = wopen_(1, 2, MAXROW-4, MAXCOL-5, W_BBRAG, C_BRAGB, C_BRAGW);
w_shadow();
wprints(0, 0, C_BRAGB, " 88 88 88 ");
wprints(1, 0, C_BRAGB, " oooooo oooooo 88 oooo88 oooooo oooo88 o ");
wprints(2, 0, C_BRAGB, " 88 88 88 88 88 88 88 88oo88 88 88 o8o ");
wprints(3, 0, C_BRAGB, " 88oo88 88oo88 88 88oo88 88oooo 88oo88 8 ");
wprints(4, 0, C_BRAGB, " oo 88 ");
wprints(5, 0, C_BRAGB, " 88oooooo88 ");
if(W_BBRAG == 7) {
wprints(0, 0, C_BRAGB, " 88 88 88 ");
wprints(1, 0, C_BRAGB, " oooooo oooooo 88 oooo88 oooooo oooo88 o ");
wprints(2, 0, C_BRAGB, " 88 88 88 88 88 88 88 88oo88 88 88 o8o ");
wprints(3, 0, C_BRAGB, " 88oo88 88oo88 88 88oo88 88oooo 88oo88 8 ");
wprints(4, 0, C_BRAGB, " oo 88 ");
wprints(5, 0, C_BRAGB, " 88oooooo88 ");
}
else {
wprints_box(0, 0, C_BRAGT|ACSET, " Éť Éť Éť ");
wprints_box(1, 0, C_BRAGT|ACSET, " ÉËÍÍËť ÉËÍÍËť şş ÉËÍÍšş ÉËÍÍËť ÉËÍÍšş Ë ");
wprints_box(2, 0, C_BRAGT|ACSET, " şş şş şş şş şş şş şş şĚÍÍĘź şş şş ÍÎÍ ");
wprints_box(3, 0, C_BRAGT|ACSET, " ČĘÍÍšş ČĘÍÍĘź Čź ČĘÍÍĘź ČĘÍÍĘź ČĘÍÍĘź Ę ");
wprints_box(4, 0, C_BRAGT|ACSET, " Éť şş ");
wprints_box(5, 0, C_BRAGT|ACSET, " ČĘÍÍÍÍÍÍĘź ");
}
wprints(4, 46-strlen(__gver_longpid__)-1-strlen(__gver_ver__), C_BRAGW, __gver_longpid__);
wprints(4, 46-strlen(__gver_ver__), C_BRAGW, __gver_ver__);

View File

@ -34,7 +34,7 @@
// ------------------------------------------------------------------
#ifdef __UNIX__
#define GOLDMARK '\xB2'
#define GOLDMARK '^' // xwindow fonts has no square sign :(
#else
#define GOLDMARK '\xFD'
#endif

View File

@ -369,6 +369,7 @@ void vputws (int row, int col, vatch* buf, uint len);
void vputc (int row, int col, int atr, vchar chr);
void vputvs (int row, int col, int atr, const vchar* str);
void vputs (int row, int col, int atr, const char* str);
void vputs_box (int row, int col, int atr, const char* str);
void vputns (int row, int col, int atr, const char* str, uint len);
void vputx (int row, int col, int atr, vchar chr, uint len);
void vputy (int row, int col, int atr, vchar chr, uint len);

View File

@ -79,6 +79,7 @@
// ------------------------------------------------------------------
static bool __vcurhidden = false;
static unsigned long gvid_boxcvtc(char);
#if !defined(__USE_NCURSES__)
@ -779,6 +780,20 @@ void vputvs(int row, int col, int atr, const vchar* str) {
// ------------------------------------------------------------------
// Print string with attribute at specfied location
void vputs_box(int row, int col, int atr, const char* str) {
#if defined(__USE_NCURSES__)
uint counter;
int len = strlen(str);
int attr = gvid_attrcalc(atr);
move(row, col);
for(counter = 0; counter < len; counter++)
addch(gvid_tcpr(gvid_boxcvtc(str[counter])) | attr);
refresh();
#else
vputs(row, col, atr, str);
#endif
}
void vputs(int row, int col, int atr, const char* str) {
#if defined(__USE_NCURSES__)
@ -2069,25 +2084,52 @@ chtype _box_table(int type, int c) {
// ------------------------------------------------------------------
#if defined(__UNIX__) && !defined(__USE_NCURSES__)
#if defined(__UNIX__)
void gvid_boxcvt(char* s) {
while(*s)
*s++ = (char)gvid_boxcvtc(*s);
}
while(*s) {
switch(*s) {
case 'Ú': *s = _box_table(8, 0); break;
case 'Ä': *s = _box_table(8, 1); break;
case '¿': *s = _box_table(8, 2); break;
case '³': *s = _box_table(8, 4); break;
case 'À': *s = _box_table(8, 5); break;
case 'Ù': *s = _box_table(8, 7); break;
case 'Å': *s = _box_table(8, 8); break;
case 'Ã': *s = _box_table(8, 9); break;
case '´': *s = _box_table(8, 10); break;
case 'Â': *s = _box_table(8, 11); break;
case 'Á': *s = _box_table(8, 12); break;
static unsigned long gvid_boxcvtc(char c) {
switch(c) {
#if 0
case 'Ú': return _box_table(8, 0);
case 'Ä': return _box_table(8, 1);
case '¿': return _box_table(8, 2);
case '³': return _box_table(8, 4);
case 'À': return _box_table(8, 5);
case 'Ù': return _box_table(8, 7);
case 'Å': return _box_table(8, 8);
case 'Ã': return _box_table(8, 9);
case '´': return _box_table(8, 10);
case 'Â': return _box_table(8, 11);
case 'Á': return _box_table(8, 12);
#else
case 'Ú': return _box_table(0, 0);
case 'Ä': return _box_table(0, 1);
case '¿': return _box_table(0, 2);
case '³': return _box_table(0, 4);
case 'À': return _box_table(0, 5);
case 'Ù': return _box_table(0, 7);
case 'Å': return _box_table(0, 8);
case 'Ã': return _box_table(0, 9);
case '´': return _box_table(0, 10);
case 'Â': return _box_table(0, 11);
case 'Á': return _box_table(0, 12);
case 'É': return _box_table(1, 0);
case 'Í': return _box_table(1, 1);
case '»': return _box_table(1, 2);
case 'º': return _box_table(1, 4);
case 'È': return _box_table(1, 5);
case '¼': return _box_table(1, 7);
case 'Î': return _box_table(1, 8);
case 'Ì': return _box_table(1, 9);
case '¹': return _box_table(1, 10);
case 'Ë': return _box_table(1, 11);
case 'Ê': return _box_table(1, 12);
#endif
}
s++;
}
return c;
}
#endif

View File

@ -376,6 +376,7 @@ int wprintf (const char* format, ...) __attribute__ ((format (printf,
int wprintaf (int attr, const char* format, ...) __attribute__ ((format (printf, 2, 3)));
int wprintfs (int wrow, int wcol, int attr, const char* format, ...) __attribute__ ((format (printf, 4, 5)));
int wprints (int wrow, int wcol, int attr, const char* str);
int wprints_box (int wrow, int wcol, int attr, const char* str);
int wprintvs (int wrow, int wcol, int attr, const vchar* str);
int wprintns (int wrow, int wcol, int attr, const char* str, uint len, vchar fill=' ', int fill_attr=-1);
int wprintsf (int wrow, int wcol, int attr, const char* format, const char* str);

View File

@ -886,6 +886,23 @@ int wprints(int wrow, int wcol, int attr, const char* str) {
return gwin.werrno=W_NOERROR;
}
int wprints_box(int wrow, int wcol, int attr, const char* str) {
// check for active window
if(!gwin.total)
return gwin.werrno=W_NOACTIVE;
// check for valid coordinates
#ifdef GOLD_WCHK
if(wchkcoord(wrow,wcol))
return gwin.werrno=W_INVCOORD;
#endif
const int &border = gwin.active->border;
vputs_box(gwin.active->srow+wrow+border,gwin.active->scol+wcol+border,attr,str);
return gwin.werrno=W_NOERROR;
}
// ------------------------------------------------------------------
// Displays a string inside active window