minicom contains a function called wprintf() (print to a window) which

collides with the standard C wprintf() (print a wide character string).
Upstream already realised this was a bad idea and changed the function's
name to mc_wprintf(). Do the same for our port.
ok ajacoutot landry dcoppa
This commit is contained in:
stsp 2011-04-22 11:21:46 +00:00
parent a08f291690
commit a1212ad29c
11 changed files with 1156 additions and 15 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.51 2010/11/15 00:22:50 espie Exp $
# $OpenBSD: Makefile,v 1.52 2011/04/22 11:21:46 stsp Exp $
COMMENT= MS-DOS Telix-like serial communication program
DISTNAME= minicom-2.2
REVISION= 0
CATEGORIES= comms
MASTER_SITES= http://alioth.debian.org/frs/download.php/1806/

View File

@ -0,0 +1,642 @@
$OpenBSD: patch-src_config_c,v 1.1 2011/04/22 11:21:46 stsp Exp $
--- src/config.c.orig Thu Apr 21 23:37:21 2011
+++ src/config.c Thu Apr 21 23:38:54 2011
@@ -253,9 +253,9 @@ static void dologopt(void)
w = wopen(5, 4, 75, 8, BDOUBLE, stdattr, mfcolor, mbcolor, 0, 0, 1);
wtitle(w, TMID, _("Logging options"));
- wprintf(w, "%s %s\n", logfnstr, P_LOGFNAME);
- wprintf(w, "%s %s\n", logconn, _(P_LOGCONN));
- wprintf(w, "%s %s\n", logxfer, _(P_LOGXFER));
+ mc_wprintf(w, "%s %s\n", logfnstr, P_LOGFNAME);
+ mc_wprintf(w, "%s %s\n", logconn, _(P_LOGCONN));
+ mc_wprintf(w, "%s %s\n", logxfer, _(P_LOGXFER));
wlocate(w, 4, 4);
wputs(w, question);
wredraw(w, 1);
@@ -274,13 +274,13 @@ static void dologopt(void)
case 'B':
strcpy(P_LOGCONN, yesno(P_LOGCONN[0] == 'N'));
wlocate(w, mbslen(logconn) + 1, 1);
- wprintf(w, "%s ", _(P_LOGCONN));
+ mc_wprintf(w, "%s ", _(P_LOGCONN));
markch(P_LOGCONN);
break;
case 'C':
strcpy(P_LOGXFER, yesno(P_LOGXFER[0] == 'N'));
wlocate(w, mbslen(logxfer) + 1, 2);
- wprintf(w, "%s ", _(P_LOGXFER));
+ mc_wprintf(w, "%s ", _(P_LOGXFER));
markch(P_LOGXFER);
break;
default:
@@ -305,13 +305,13 @@ static void dopath(void)
char *question = _("Change which setting?");
w = wopen(5, 5, 75, 12, BDOUBLE, stdattr, mfcolor, mbcolor, 0, 0, 1);
- wprintf(w, "%s %.44s\n", download_directory, P_DOWNDIR);
- wprintf(w, "%s %.44s\n", upload_directory, P_UPDIR);
- wprintf(w, "%s %.44s\n", script_directory, P_SCRIPTDIR);
- wprintf(w, "%s %.44s\n", script_program, P_SCRIPTPROG);
- wprintf(w, "%s %.44s\n", kermit_program, P_KERMIT);
+ mc_wprintf(w, "%s %.44s\n", download_directory, P_DOWNDIR);
+ mc_wprintf(w, "%s %.44s\n", upload_directory, P_UPDIR);
+ mc_wprintf(w, "%s %.44s\n", script_directory, P_SCRIPTDIR);
+ mc_wprintf(w, "%s %.44s\n", script_program, P_SCRIPTPROG);
+ mc_wprintf(w, "%s %.44s\n", kermit_program, P_KERMIT);
#ifdef LOGFILE
- wprintf(w, "%s\n", log_settings);
+ mc_wprintf(w, "%s\n", log_settings);
#endif
wlocate(w, 4, 8);
wputs(w, question);
@@ -381,7 +381,7 @@ static void inputproto(WIN *w, int n)
pgets(w, 15, n+1, P_PPROG(n), 31, 64);
do {
wlocate(w, 47, n + 1);
- wprintf(w, "%c", P_PNN(n));
+ mc_wprintf(w, "%c", P_PNN(n));
c = rwxgetch();
if (c == 'Y')
P_PNN(n) = 'Y';
@@ -390,7 +390,7 @@ static void inputproto(WIN *w, int n)
} while (c != '\r' && c != '\n');
do {
wlocate(w, 52, n + 1);
- wprintf(w, "%c", P_PUD(n));
+ mc_wprintf(w, "%c", P_PUD(n));
c = rwxgetch();
if (c == 'U')
P_PUD(n) = 'U';
@@ -399,7 +399,7 @@ static void inputproto(WIN *w, int n)
} while (c != '\r' && c != '\n');
do {
wlocate(w, 57, n + 1);
- wprintf(w, "%c", P_PFULL(n));
+ mc_wprintf(w, "%c", P_PFULL(n));
c = rwxgetch();
if (c == 'Y')
P_PFULL(n) = 'Y';
@@ -408,7 +408,7 @@ static void inputproto(WIN *w, int n)
} while (c != '\r' && c != '\n');
do {
wlocate(w, 65, n + 1);
- wprintf(w, "%c", P_PIORED(n));
+ mc_wprintf(w, "%c", P_PIORED(n));
c = rwxgetch();
if (c == 'Y')
P_PIORED(n) = 'Y';
@@ -417,7 +417,7 @@ static void inputproto(WIN *w, int n)
} while (c != '\r' && c != '\n');
do {
wlocate(w, 73, n + 1);
- wprintf(w, "%c", P_MUL(n));
+ mc_wprintf(w, "%c", P_MUL(n));
c = rwxgetch();
if (c == 'Y')
P_MUL(n) = 'Y';
@@ -449,21 +449,21 @@ static void doproto(void)
for (f = 0; f < 12; f++) {
wlocate(w, 1, f + 1);
if (P_PNAME(f)[0])
- wprintf(w, "%c %-10.10s %-31.31s %c %c %c %c %c",
+ mc_wprintf(w, "%c %-10.10s %-31.31s %c %c %c %c %c",
'A' + f,
P_PNAME(f), P_PPROG(f),
P_PNN(f), P_PUD(f),
P_PFULL(f), P_PIORED(f),
P_MUL(f));
else
- wprintf(w, "%c -", 'A' + f);
+ mc_wprintf(w, "%c -", 'A' + f);
}
wlocate(w, 1, 13);
- wprintf(w, "%s %c", zmodem_download, P_PAUTO[0]);
+ mc_wprintf(w, "%s %c", zmodem_download, P_PAUTO[0]);
wlocate(w, 1, 14);
- wprintf(w, "%s %s", use_filename_selection, _(P_FSELW));
+ mc_wprintf(w, "%s %s", use_filename_selection, _(P_FSELW));
wlocate(w, 1, 15);
- wprintf(w, "%s %s", prompt_downdir, _(P_ASKDNDIR));
+ mc_wprintf(w, "%s %s", prompt_downdir, _(P_ASKDNDIR));
wlocate(w, 3, 17);
wputs(w, question);
@@ -492,17 +492,17 @@ static void doproto(void)
}
else if (c == 'M') {
wlocate(w, mbslen (zmodem_download) + 2, 13);
- wprintf(w, " \b");
+ mc_wprintf(w, " \b");
c = rwxgetch();
if (c >= 'A' && c <= 'L') {
P_PAUTO[0] = c;
markch(P_PAUTO);
- wprintf(w, "%c", c);
+ mc_wprintf(w, "%c", c);
} else if (c == '\n' || c == ' ') {
P_PAUTO[0] = ' ';
markch(P_PAUTO);
} else {
- wprintf(w, "%c", P_PAUTO[0]);
+ mc_wprintf(w, "%c", P_PAUTO[0]);
}
c = 0;
}
@@ -511,11 +511,11 @@ static void doproto(void)
if (P_FSELW[0] == 'N') {
strcpy(P_ASKDNDIR, "No ");
wlocate(w, mbslen (prompt_downdir) + 2, 15);
- wprintf(w, "%s ", _(P_ASKDNDIR));
+ mc_wprintf(w, "%s ", _(P_ASKDNDIR));
markch(P_ASKDNDIR);
}
wlocate(w, mbslen (use_filename_selection) + 2, 14);
- wprintf(w, "%s ", _(P_FSELW));
+ mc_wprintf(w, "%s ", _(P_FSELW));
markch(P_FSELW);
}
else if (c == 'O') {
@@ -523,11 +523,11 @@ static void doproto(void)
if (P_ASKDNDIR[0] == 'Y') {
strcpy(P_FSELW, "Yes");
wlocate(w, mbslen (use_filename_selection) + 2, 14);
- wprintf(w, "%s ", _(P_FSELW));
+ mc_wprintf(w, "%s ", _(P_FSELW));
markch(P_FSELW);
}
wlocate(w, mbslen (prompt_downdir) + 2, 15);
- wprintf(w, "%s ", _(P_ASKDNDIR));
+ mc_wprintf(w, "%s ", _(P_ASKDNDIR));
markch(P_ASKDNDIR);
}
} while (c != '\n');
@@ -547,14 +547,14 @@ static void doserial(void)
char *question = _("Change which setting?");
w = wopen(5, 4, 75, 12, BDOUBLE, stdattr, mfcolor, mbcolor, 0, 0, 1);
- wprintf(w, "%s %.41s\n", serial_device, P_PORT);
- wprintf(w, "%s %.41s\n", lockfile_location, P_LOCK);
- wprintf(w, "%s %.41s\n", callin_program, P_CALLIN);
- wprintf(w, "%s %.41s\n", callout_program, P_CALLOUT);
- wprintf(w, "%s %s %s%s%s\n",
+ mc_wprintf(w, "%s %.41s\n", serial_device, P_PORT);
+ mc_wprintf(w, "%s %.41s\n", lockfile_location, P_LOCK);
+ mc_wprintf(w, "%s %.41s\n", callin_program, P_CALLIN);
+ mc_wprintf(w, "%s %.41s\n", callout_program, P_CALLOUT);
+ mc_wprintf(w, "%s %s %s%s%s\n",
bps_par_bits, P_BAUDRATE, P_BITS, P_PARITY, P_STOPB);
- wprintf(w, "%s %s\n", hardware_flow_control, _(P_HASRTS));
- wprintf(w, "%s %s\n", software_flow_control, _(P_HASXON));
+ mc_wprintf(w, "%s %s\n", hardware_flow_control, _(P_HASRTS));
+ mc_wprintf(w, "%s %s\n", software_flow_control, _(P_HASXON));
wlocate(w, 4, 8);
wputs(w, question);
wredraw(w, 1);
@@ -582,7 +582,7 @@ static void doserial(void)
if (portfd >= 0)
port_init();
wlocate(w, mbslen (bps_par_bits) + 1, 4);
- wprintf(w, "%s %s%s%s \n",
+ mc_wprintf(w, "%s %s%s%s \n",
P_BAUDRATE, P_BITS, P_PARITY, P_STOPB);
if (st)
mode_status();
@@ -594,7 +594,7 @@ static void doserial(void)
case 'F':
strcpy(P_HASRTS, yesno(P_HASRTS[0] == 'N'));
wlocate(w, mbslen (hardware_flow_control) + 1, 5);
- wprintf(w, "%s ", _(P_HASRTS));
+ mc_wprintf(w, "%s ", _(P_HASRTS));
if (portfd >= 0)
port_init();
markch(P_HASRTS);
@@ -602,7 +602,7 @@ static void doserial(void)
case 'G':
strcpy(P_HASXON, yesno(P_HASXON[0] == 'N'));
wlocate(w, mbslen (software_flow_control) + 1, 6);
- wprintf(w, "%s ", _(P_HASXON));
+ mc_wprintf(w, "%s ", _(P_HASXON));
if (portfd >= 0)
port_init();
markch(P_HASXON);
@@ -652,39 +652,39 @@ static void domodem(void)
dirflush = 0;
wtitle(w, TMID, _("Modem and dialing parameter setup"));
- wprintf(w, "\n");
- wprintf(w, "%s %.48s\n", init_string, P_MINIT);
- wprintf(w, "%s %.48s\n", reset_string, P_MRESET);
- wprintf(w, "%s %.48s\n", dialing_prefix_1, P_MDIALPRE);
- wprintf(w, "%s %.48s\n", dialing_suffix_1, P_MDIALSUF);
- wprintf(w, "%s %.48s\n", dialing_prefix_2, P_MDIALPRE2);
- wprintf(w, "%s %.48s\n", dialing_suffix_2, P_MDIALSUF2);
- wprintf(w, "%s %.48s\n", dialing_prefix_3, P_MDIALPRE3);
- wprintf(w, "%s %.48s\n", dialing_suffix_3, P_MDIALSUF3);
- wprintf(w, "%s %.48s\n", connect_string, P_MCONNECT);
- wprintf(w, "%s %-20.20s %.20s\n", no_connect_strings, P_MNOCON1, P_MNOCON2);
+ mc_wprintf(w, "\n");
+ mc_wprintf(w, "%s %.48s\n", init_string, P_MINIT);
+ mc_wprintf(w, "%s %.48s\n", reset_string, P_MRESET);
+ mc_wprintf(w, "%s %.48s\n", dialing_prefix_1, P_MDIALPRE);
+ mc_wprintf(w, "%s %.48s\n", dialing_suffix_1, P_MDIALSUF);
+ mc_wprintf(w, "%s %.48s\n", dialing_prefix_2, P_MDIALPRE2);
+ mc_wprintf(w, "%s %.48s\n", dialing_suffix_2, P_MDIALSUF2);
+ mc_wprintf(w, "%s %.48s\n", dialing_prefix_3, P_MDIALPRE3);
+ mc_wprintf(w, "%s %.48s\n", dialing_suffix_3, P_MDIALSUF3);
+ mc_wprintf(w, "%s %.48s\n", connect_string, P_MCONNECT);
+ mc_wprintf(w, "%s %-20.20s %.20s\n", no_connect_strings, P_MNOCON1, P_MNOCON2);
wlocate(w, mbslen (no_connect_strings) + 1, 11);
- wprintf(w, "%-20.20s %.20s\n", P_MNOCON3, P_MNOCON4);
- wprintf(w, "%s %.48s\n", hangup_string, P_MHANGUP);
- wprintf(w, "%s %.48s\n", dial_cancel_string, P_MDIALCAN);
- wprintf(w, "\n");
- wprintf(w, "%s %.3s\n", dial_time, P_MDIALTIME);
- wprintf(w, "%s %.3s\n", delay_before_redial, P_MRDELAY);
- wprintf(w, "%s %.3s\n", number_of_tries, P_MRETRIES);
- wprintf(w, "%s %.3s\n", dtr_drop_time, P_MDROPDTR);
+ mc_wprintf(w, "%-20.20s %.20s\n", P_MNOCON3, P_MNOCON4);
+ mc_wprintf(w, "%s %.48s\n", hangup_string, P_MHANGUP);
+ mc_wprintf(w, "%s %.48s\n", dial_cancel_string, P_MDIALCAN);
+ mc_wprintf(w, "\n");
+ mc_wprintf(w, "%s %.3s\n", dial_time, P_MDIALTIME);
+ mc_wprintf(w, "%s %.3s\n", delay_before_redial, P_MRDELAY);
+ mc_wprintf(w, "%s %.3s\n", number_of_tries, P_MRETRIES);
+ mc_wprintf(w, "%s %.3s\n", dtr_drop_time, P_MDROPDTR);
wlocate(w, 34, 15);
- wprintf(w, "%s %s\n", auto_bps_detect, _(P_MAUTOBAUD));
+ mc_wprintf(w, "%s %s\n", auto_bps_detect, _(P_MAUTOBAUD));
wlocate(w, 34, 16);
- wprintf(w, "%s %s\n", modem_has_dcd_line, _(P_HASDCD));
+ mc_wprintf(w, "%s %s\n", modem_has_dcd_line, _(P_HASDCD));
wlocate(w, 34, 17);
- wprintf(w, "%s %s\n", shown_speed, sspd(P_SHOWSPD));
+ mc_wprintf(w, "%s %s\n", shown_speed, sspd(P_SHOWSPD));
wlocate(w, 34, 18); /* Option for multi-node untag */
- wprintf(w, "%s %s\n", multi_node, _(P_MULTILINE)); /* er 18-Apr-99 */
+ mc_wprintf(w, "%s %s\n", multi_node, _(P_MULTILINE)); /* er 18-Apr-99 */
wlocate(w, 1, 20);
- wprintf(w, "%s ", question);
+ mc_wprintf(w, "%s ", question);
x = w->curx; y = w->cury;
- wprintf(w, _(" (Return or Esc to exit)"));
+ mc_wprintf(w, _(" (Return or Esc to exit)"));
wredraw(w, 1);
while (1) {
@@ -826,36 +826,36 @@ static void doscrkeyb(void)
wtitle(w, TMID, _("Screen and keyboard"));
- wprintf(w, "\n%s %s\n", command_key, P_ESCAPE);
- wprintf(w, "%s %s\n", backspace_key, P_BACKSPACE);
- wprintf(w, "%s %s\n", status_line, _(P_STATLINE));
- wprintf(w, "%s %s\n", alarm_sound, _(P_SOUND));
+ mc_wprintf(w, "\n%s %s\n", command_key, P_ESCAPE);
+ mc_wprintf(w, "%s %s\n", backspace_key, P_BACKSPACE);
+ mc_wprintf(w, "%s %s\n", status_line, _(P_STATLINE));
+ mc_wprintf(w, "%s %s\n", alarm_sound, _(P_SOUND));
/* fmg - colors support */
- wprintf(w, "%s %s\n", foreground_color_menu, _(J_col[mfcolor]));
- wprintf(w, "%s %s\n", background_color_menu, _(J_col[mbcolor]));
- wprintf(w, "%s %s\n", foreground_color_term, _(J_col[tfcolor]));
- wprintf(w, "%s %s\n", background_color_term, _(J_col[tbcolor]));
- wprintf(w, "%s %s\n", foreground_color_stat, _(J_col[sfcolor]));
- wprintf(w, "%s %s\n", background_color_stat, _(J_col[sbcolor]));
+ mc_wprintf(w, "%s %s\n", foreground_color_menu, _(J_col[mfcolor]));
+ mc_wprintf(w, "%s %s\n", background_color_menu, _(J_col[mbcolor]));
+ mc_wprintf(w, "%s %s\n", foreground_color_term, _(J_col[tfcolor]));
+ mc_wprintf(w, "%s %s\n", background_color_term, _(J_col[tbcolor]));
+ mc_wprintf(w, "%s %s\n", foreground_color_stat, _(J_col[sfcolor]));
+ mc_wprintf(w, "%s %s\n", background_color_stat, _(J_col[sbcolor]));
/* MARK updated 02/17/95 - Configurable history buffer size */
- wprintf(w, "%s %s\n", history_buffer_size, P_HISTSIZE);
+ mc_wprintf(w, "%s %s\n", history_buffer_size, P_HISTSIZE);
/* fmg - macros support */
- wprintf(w, "%s %s\n", macros_file, P_MACROS);
- wprintf(w, _(" M - Edit Macros\n"));
- wprintf(w, "%s %s\n", macros_enabled, _(P_MACENAB));
- wprintf(w, "%s %s\n", character_conversion, P_CONVF);
+ mc_wprintf(w, "%s %s\n", macros_file, P_MACROS);
+ mc_wprintf(w, _(" M - Edit Macros\n"));
+ mc_wprintf(w, "%s %s\n", macros_enabled, _(P_MACENAB));
+ mc_wprintf(w, "%s %s\n", character_conversion, P_CONVF);
- wprintf(w, "%s %s\n", add_linefeed, P_ADDLINEFEED);
- wprintf(w, "%s %s\n", local_echo, P_LOCALECHO);
+ mc_wprintf(w, "%s %s\n", add_linefeed, P_ADDLINEFEED);
+ mc_wprintf(w, "%s %s\n", local_echo, P_LOCALECHO);
wredraw(w, 1);
while (1) {
if (clr) {
wlocate(w, 2, maxy - miny);
- wprintf(w, "%s ", question);
+ mc_wprintf(w, "%s ", question);
wclreol(w);
clr = 0;
} else
@@ -961,7 +961,7 @@ static void doscrkeyb(void)
else
psets(P_BACKSPACE, "DEL");
wlocate(w, mbslen (backspace_key) + 1, 2);
- wprintf(w, "%s ", P_BACKSPACE);
+ mc_wprintf(w, "%s ", P_BACKSPACE);
keyboard(KSETBS, P_BACKSPACE[0] == 'B' ? 8 : 127);
break;
case 'C':
@@ -975,12 +975,12 @@ static void doscrkeyb(void)
tempst = 0;
}
wlocate(w, mbslen (status_line) + 1, 3);
- wprintf(w, "%s ", _(P_STATLINE));
+ mc_wprintf(w, "%s ", _(P_STATLINE));
break;
case 'D':
psets(P_SOUND, yesno(P_SOUND[0] == 'N'));
wlocate(w, mbslen (alarm_sound) + 1, 4);
- wprintf(w, "%s", _(P_SOUND));
+ mc_wprintf(w, "%s", _(P_SOUND));
break;
case 'E': /* fmg - letters cycle colors */
if (mfcolor == WHITE)
@@ -989,7 +989,7 @@ static void doscrkeyb(void)
mfcolor++;
psets(P_MFG, J_col[mfcolor]);
wlocate(w, mbslen (foreground_color_menu) + 1, 5);
- wprintf(w, "%s ", _(J_col[mfcolor]));
+ mc_wprintf(w, "%s ", _(J_col[mfcolor]));
break;
case 'F': /* fmg - letters cycle colors */
if (mbcolor == WHITE)
@@ -998,7 +998,7 @@ static void doscrkeyb(void)
mbcolor++;
psets(P_MBG, J_col[mbcolor]);
wlocate(w, mbslen (background_color_menu) + 1, 6);
- wprintf(w, "%s ", _(J_col[mbcolor]));
+ mc_wprintf(w, "%s ", _(J_col[mbcolor]));
break;
case 'G': /* fmg - letters cycle colors */
if (tfcolor == WHITE)
@@ -1007,7 +1007,7 @@ static void doscrkeyb(void)
tfcolor++;
psets(P_TFG, J_col[tfcolor]);
wlocate(w, mbslen (foreground_color_term) + 1, 7);
- wprintf(w, "%s ", _(J_col[tfcolor]));
+ mc_wprintf(w, "%s ", _(J_col[tfcolor]));
if (us)
vt_pinit(us, tfcolor, tbcolor);
break;
@@ -1018,7 +1018,7 @@ static void doscrkeyb(void)
tbcolor++;
psets(P_TBG, J_col[tbcolor]);
wlocate(w, mbslen (background_color_term) + 1, 8);
- wprintf(w, "%s ", _(J_col[tbcolor]));
+ mc_wprintf(w, "%s ", _(J_col[tbcolor]));
if (us)
vt_pinit(us, tfcolor, tbcolor);
break;
@@ -1039,7 +1039,7 @@ static void doscrkeyb(void)
}
psets(P_SFG, J_col[sfcolor]);
wlocate(w, mbslen (foreground_color_stat) + 1, 9);
- wprintf(w, "%s ", _(J_col[sfcolor]));
+ mc_wprintf(w, "%s ", _(J_col[sfcolor]));
break;
case 'J': /* fmg - letters cycle colors & redraw stat line */
if (sbcolor == WHITE)
@@ -1058,7 +1058,7 @@ static void doscrkeyb(void)
}
psets(P_SBG, J_col[sbcolor]);
wlocate(w, mbslen (background_color_stat) + 1, 10);
- wprintf(w, "%s ", _(J_col[sbcolor]));
+ mc_wprintf(w, "%s ", _(J_col[sbcolor]));
break;
case 'K': /* MARK updated 02/17/95 - Config history size */
pgets(w, mbslen (history_buffer_size) + 1, 11,
@@ -1074,7 +1074,7 @@ static void doscrkeyb(void)
strcpy(P_HISTSIZE,"5000");
wlocate(w, mbslen (history_buffer_size) + 1, 11);
- wprintf(w, "%s ", P_HISTSIZE);
+ mc_wprintf(w, "%s ", P_HISTSIZE);
break;
case 'L': /* fmg - get local macros storage file */
pgets(w, mbslen (macros_file) + 1, 12, P_MACROS, 64, 64);
@@ -1106,22 +1106,22 @@ static void doscrkeyb(void)
case 'N':
psets(P_MACENAB, yesno(P_MACENAB[0] == 'N'));
wlocate(w, mbslen (macros_enabled) + 1, 14);
- wprintf(w, "%s", _(P_MACENAB));
+ mc_wprintf(w, "%s", _(P_MACENAB));
break;
case 'O': /* Character conversions - jl / 04.09.97 */
doconv();
wlocate(w, mbslen (character_conversion) + 1, 15);
- wprintf(w, "%-16.16s", _(P_CONVF));
+ mc_wprintf(w, "%-16.16s", _(P_CONVF));
break;
case 'P':
psets(P_ADDLINEFEED, yesno(P_ADDLINEFEED[0] == 'N'));
wlocate(w, strlen (add_linefeed) + 1, 15);
- wprintf(w, "%s", _(P_ADDLINEFEED));
+ mc_wprintf(w, "%s", _(P_ADDLINEFEED));
break;
case 'Q':
psets(P_LOCALECHO, yesno(P_LOCALECHO[0] == 'N'));
wlocate(w, strlen (local_echo) + 1, 16);
- wprintf(w, "%s", _(P_LOCALECHO));
+ mc_wprintf(w, "%s", _(P_LOCALECHO));
break;
}
}
@@ -1148,12 +1148,12 @@ int dotermmenu(void)
w = wopen(15, 7, 64, 15, BDOUBLE, stdattr, mfcolor, mbcolor, 0, 0, 1);
wtitle(w, TMID, _("Terminal settings"));
- wprintf(w, "\n");
- wprintf(w, "%s %s\n", terminal_emulation, terminal == VT100 ? "VT102" : "ANSI");
- wprintf(w, "%s %s\n", backspace_key_sends, P_BACKSPACE);
- wprintf(w, "%s %s\n", status_line, _(P_STATLINE));
- wprintf(w, "%s %d\n", msg_nl_delay, vt_nl_delay);
- wprintf(w, "%s %s\n", msg_answerback, P_ANSWERBACK);
+ mc_wprintf(w, "\n");
+ mc_wprintf(w, "%s %s\n", terminal_emulation, terminal == VT100 ? "VT102" : "ANSI");
+ mc_wprintf(w, "%s %s\n", backspace_key_sends, P_BACKSPACE);
+ mc_wprintf(w, "%s %s\n", status_line, _(P_STATLINE));
+ mc_wprintf(w, "%s %d\n", msg_nl_delay, vt_nl_delay);
+ mc_wprintf(w, "%s %s\n", msg_answerback, P_ANSWERBACK);
wlocate(w, 4, 7);
wputs(w, question);
@@ -1180,9 +1180,9 @@ int dotermmenu(void)
psets(P_BACKSPACE, "DEL");
}
wlocate(w, mbslen (terminal_emulation) + 1, 1);
- wprintf(w, "%s ", new_term == VT100 ? "VT102" : "ANSI");
+ mc_wprintf(w, "%s ", new_term == VT100 ? "VT102" : "ANSI");
wlocate(w, mbslen (backspace_key_sends) + 1, 2);
- wprintf(w, "%s ", P_BACKSPACE);
+ mc_wprintf(w, "%s ", P_BACKSPACE);
keyboard(KSETBS, P_BACKSPACE[0] == 'B' ? 8 : 127);
break;
case 'B':
@@ -1191,7 +1191,7 @@ int dotermmenu(void)
else
psets(P_BACKSPACE, "DEL");
wlocate(w, mbslen (backspace_key_sends) + 1, 2);
- wprintf(w, "%s ", P_BACKSPACE);
+ mc_wprintf(w, "%s ", P_BACKSPACE);
keyboard(KSETBS, P_BACKSPACE[0] == 'B' ? 8 : 127);
break;
case 'C':
@@ -1205,7 +1205,7 @@ int dotermmenu(void)
tempst = 0;
}
wlocate(w, mbslen (status_line) + 1, 3);
- wprintf(w, "%s ", _(P_STATLINE));
+ mc_wprintf(w, "%s ", _(P_STATLINE));
break;
case 'D':
sprintf(buf, "%d", vt_nl_delay);
@@ -1213,7 +1213,7 @@ int dotermmenu(void)
wgets(w, buf, 4, 4);
vt_nl_delay = atoi(buf);
wlocate(w, mbslen(msg_nl_delay) +1, 4);
- wprintf(w, "%-3d", vt_nl_delay);
+ mc_wprintf(w, "%-3d", vt_nl_delay);
break;
case 'E':
pgets(w, strlen(msg_answerback) + 1, 5, P_ANSWERBACK, 50, 50);
@@ -1423,7 +1423,7 @@ void get_bbp(char *ba, char *bi, char *pa, char *stopb
while (1) {
wlocate(w, 1, 1);
- wprintf(w, _("Current: %5s %s%s%s "), ba, bi, pa, stopb);
+ mc_wprintf(w, _("Current: %5s %s%s%s "), ba, bi, pa, stopb);
wlocate(w, x, y);
wflush();
c = wxgetch();
@@ -1537,7 +1537,7 @@ int update_bbp_from_char(char c, char *ba, char *bi, c
*/
static void out_mac(WIN *w, char *s, char n)
{
- wprintf(w, " %c : %.67s\n", n, s ? s : "[none]");
+ mc_wprintf(w, " %c : %.67s\n", n, s ? s : "[none]");
}
/*
@@ -1553,7 +1553,7 @@ void domacros(void)
w = wopen(3, 6, 75, 24, BDOUBLE, stdattr, mfcolor, mbcolor, 0, 0, 1);
wtitle(w, TMID, _("F1 to F10 Macros"));
- wprintf(w, "\n");
+ mc_wprintf(w, "\n");
out_mac(w,mmacs[Jm++].value, Jch++);
out_mac(w,mmacs[Jm++].value, Jch++);
out_mac(w,mmacs[Jm++].value, Jch++);
@@ -1579,7 +1579,7 @@ void domacros(void)
wputs(w, _(" = 19200 8N1. (See the \"Comm Parameters\" menu for valid values of X.))"));
if (clr) {
wlocate(w, 1, 12);
- wprintf(w, "%s ", question);
+ mc_wprintf(w, "%s ", question);
wclreol(w);
clr = 0;
} else
@@ -1682,34 +1682,34 @@ void doconv(void)
while (1) {
if (redraw) {
winclr(w);
- wprintf(w,
+ mc_wprintf(w,
_(" char in out char in out char in out char in out\n"));
for (i = offs, j = i+h, k = j+h, l = k+h;
i < offs+h && i < 256;
i++, j++, k++, l++) {
- wprintf(w, "%3d (%c) %3d %3d ",
+ mc_wprintf(w, "%3d (%c) %3d %3d ",
i, prch(i), (int) vt_inmap[i], (int) vt_outmap[i]);
if (j < 256)
- wprintf(w, "%3d (%c) %3d %3d ",
+ mc_wprintf(w, "%3d (%c) %3d %3d ",
j, prch(j), (int) vt_inmap[j], (int) vt_outmap[j]);
else
- wprintf(w, " ");
+ mc_wprintf(w, " ");
if (k < 256)
- wprintf(w, "%3d (%c) %3d %3d ",
+ mc_wprintf(w, "%3d (%c) %3d %3d ",
k, prch(k), (int) vt_inmap[k], (int) vt_outmap[k]);
else
- wprintf(w, " ");
+ mc_wprintf(w, " ");
if (l < 256)
- wprintf(w, "%3d (%c) %3d %3d\n",
+ mc_wprintf(w, "%3d (%c) %3d %3d\n",
l, prch(l), (int) vt_inmap[l], (int) vt_outmap[l]);
else
- wprintf(w, " \n");
+ mc_wprintf(w, " \n");
}
- wprintf(w, _("\n A - load table\tB - save table"));
+ mc_wprintf(w, _("\n A - load table\tB - save table"));
if (P_CONVF[0])
- wprintf(w, _("\tfile:%s"),P_CONVF);
- wprintf(w, _("\n C - edit char\tD - next screen\tE - prev screen\n"));
- wprintf(w, _(" F - convert capture: %s\n"), _(P_CONVCAP));
+ mc_wprintf(w, _("\tfile:%s"),P_CONVF);
+ mc_wprintf(w, _("\n C - edit char\tD - next screen\tE - prev screen\n"));
+ mc_wprintf(w, _(" F - convert capture: %s\n"), _(P_CONVCAP));
wredraw(w, 1);
redraw = 0;
@@ -1725,7 +1725,7 @@ void doconv(void)
case 'A':
strcpy(buf,P_CONVF);
prompt=_("Load file: %s");
- wprintf(w, prompt, buf);
+ mc_wprintf(w, prompt, buf);
pgets(w, mbslen(prompt) - 1, ymax - 1, P_CONVF, 64, 64);
if (loadconv(P_CONVF) == 0) {
if (strcmp(P_CONVF,buf))
@@ -1737,7 +1737,7 @@ void doconv(void)
case 'B':
strcpy(buf,P_CONVF);
prompt=_("Save as file: %s");
- wprintf(w, prompt, buf);
+ mc_wprintf(w, prompt, buf);
pgets(w, mbslen(prompt) - 1, ymax - 1, P_CONVF, 64, 64);
if (saveconv(P_CONVF) == 0) {
if (strcmp(P_CONVF,buf))
@@ -1748,7 +1748,7 @@ void doconv(void)
break;
case 'C':
prompt = _("Character to be edited: ");
- wprintf(w, prompt);
+ mc_wprintf(w, prompt);
buf[0] = 0;
i = -1;
wlocate(w, mbslen(prompt), ymax - 1);
@@ -1762,7 +1762,7 @@ void doconv(void)
sprintf(buf, "%u",(unsigned int) vt_inmap[i]);
wlocate(w, 30, ymax - 1);
prompt=_("Change input to: %s");
- wprintf(w, prompt,buf);
+ mc_wprintf(w, prompt,buf);
wlocate(w, mbslen(prompt) + 28, ymax - 1);
wgets(w, buf, 4, 4);
sscanf(buf, "%d", &j);
@@ -1774,7 +1774,7 @@ void doconv(void)
sprintf(buf, "%u",(unsigned int) vt_outmap[i]);
wlocate(w, 54, ymax - 1);
prompt = _("Change output to: %s");
- wprintf(w, prompt, buf);
+ mc_wprintf(w, prompt, buf);
wlocate(w, mbslen(prompt) + 52, ymax - 1);
wgets(w, buf, 4, 4);
sscanf(buf, "%d", &j);

View File

@ -0,0 +1,237 @@
$OpenBSD: patch-src_dial_c,v 1.1 2011/04/22 11:21:46 stsp Exp $
--- src/dial.c.orig Thu Apr 21 23:44:42 2011
+++ src/dial.c Thu Apr 21 23:44:50 2011
@@ -353,14 +353,14 @@ static int dialfailed(char *s, int rtime)
int ret = 0;
wlocate(dialwin, 1, 5);
- wprintf(dialwin, _(" No connection: %s. \n"), s);
+ mc_wprintf(dialwin, _(" No connection: %s. \n"), s);
if (rtime < 0) {
- wprintf(dialwin, _(" Press any key to continue.. "));
+ mc_wprintf(dialwin, _(" Press any key to continue.. "));
if (check_io(-1, 0, 10000, NULL, NULL) & 2)
keyboard(KGETKEY, 0);
return 0;
}
- wprintf(dialwin, _(" Retry in %2d seconds "), rtime);
+ mc_wprintf(dialwin, _(" Retry in %2d seconds "), rtime);
for (f = rtime - 1; f >= 0; f--) {
x = check_io(-1, 0, 1000, NULL, NULL);
@@ -372,7 +372,7 @@ static int dialfailed(char *s, int rtime)
break;
}
wlocate(dialwin, 0, 6);
- wprintf(dialwin, _(" Retry in %2d seconds "), f);
+ mc_wprintf(dialwin, _(" Retry in %2d seconds "), f);
}
#ifdef HAVE_USLEEP
/* MARK updated 02/17/94 - Min dial delay set to 0.35 sec instead of 1 sec */
@@ -383,8 +383,8 @@ static int dialfailed(char *s, int rtime)
sleep(1);
#endif
wlocate(dialwin, 1, 5);
- wprintf(dialwin, " \n");
- wprintf(dialwin, " ");
+ mc_wprintf(dialwin, " \n");
+ mc_wprintf(dialwin, " ");
return ret;
}
@@ -417,12 +417,12 @@ long dial(struct dialent *d, struct dialent **d2)
wcursor(dialwin, CNONE);
wputs(dialwin, "\n");
- wprintf(dialwin, " %s : %s\n", _("Dialing"), d->name);
- wprintf(dialwin, _(" At : %s"), d->number);
- wprintf(dialwin, "\n"); /* help translators */
+ mc_wprintf(dialwin, " %s : %s\n", _("Dialing"), d->name);
+ mc_wprintf(dialwin, _(" At : %s"), d->number);
+ mc_wprintf(dialwin, "\n"); /* help translators */
if (d->lastdate[0] && d->lasttime[0]) /* jl 26.01.98 */
- wprintf(dialwin, _(" Last on : %s at %s"), d->lastdate, d->lasttime);
- wprintf(dialwin, "\n");
+ mc_wprintf(dialwin, _(" Last on : %s at %s"), d->lastdate, d->lasttime);
+ mc_wprintf(dialwin, "\n");
wredraw(dialwin, 1);
/* Tell keyboard routines we need them. */
@@ -447,14 +447,14 @@ MainLoop:
d = dialents;
} while (!(d->flags & FL_TAG));
wlocate(dialwin, 0, 1);
- wprintf(dialwin, " %s : %s", _("Dialing"), d->name);
+ mc_wprintf(dialwin, " %s : %s", _("Dialing"), d->name);
wclreol(dialwin);
- wprintf(dialwin, "\n"); /* helps translators */
- wprintf(dialwin, _(" At : %s"), d->number);
+ mc_wprintf(dialwin, "\n"); /* helps translators */
+ mc_wprintf(dialwin, _(" At : %s"), d->number);
wclreol(dialwin);
if (d->lastdate[0] && d->lasttime[0]) {
- wprintf(dialwin, "\n"); /* don't merge with next printf, helps translators */
- wprintf(dialwin, _(" Last on : %s at %s"),
+ mc_wprintf(dialwin, "\n"); /* don't merge with next printf, helps translators */
+ mc_wprintf(dialwin, _(" Last on : %s at %s"),
d->lastdate, d->lasttime);
wclreol(dialwin);
}
@@ -469,9 +469,9 @@ MainLoop:
/* Show used time */
wlocate(dialwin, 0, 4);
- wprintf(dialwin, _(" Time : %-3d"), dialtime);
+ mc_wprintf(dialwin, _(" Time : %-3d"), dialtime);
if (maxretries > 1)
- wprintf(dialwin, _(" Attempt #%d"), retries);
+ mc_wprintf(dialwin, _(" Attempt #%d"), retries);
wputs(dialwin, _("\n\n\n Escape to cancel, space to retry."));
/* Start the dial */
@@ -591,7 +591,7 @@ MainLoop:
keyboard(KSTOP, 0);
wclose(dialwin, 1);
/* Print out the connect strings. */
- wprintf(us, "\r\n%s\r\n", modbuf);
+ mc_wprintf(us, "\r\n%s\r\n", modbuf);
dialwin = NULL;
/* Un-tag this entry. */
@@ -646,7 +646,7 @@ MainLoop:
if (dialtime < 0)
dialtime = 0;
wlocate(dialwin, 11, 4);
- wprintf(dialwin, "%-3d ", dialtime);
+ mc_wprintf(dialwin, "%-3d ", dialtime);
if (dialtime <= 0) {
mputs(P_MDIALCAN, 0);
reason = _("Timeout");
@@ -1073,23 +1073,23 @@ static void dedit(struct dialent *d)
*question = _("Change which setting?");
w = wopen(5, 4, 75, 19, BDOUBLE, stdattr, mfcolor, mbcolor, 0, 0, 1);
- wprintf(w, "%s %s\n", name, d->name);
- wprintf(w, "%s %s\n", number, d->number);
- wprintf(w, "%s %d\n", dial_string, d->dialtype + 1);
- wprintf(w, "%s %s\n", local_echo, _(yesno(d->flags & FL_ECHO)));
- wprintf(w, "%s %s\n", script, d->script);
- wprintf(w, "%s %s\n", username, d->username);
- wprintf(w, "%s %s\n", password, d->password);
- wprintf(w, "%s %s\n", terminal_emulation, te[d->term - 1]);
- wprintf(w, "%s %s\n", backspace_key_sends,
+ mc_wprintf(w, "%s %s\n", name, d->name);
+ mc_wprintf(w, "%s %s\n", number, d->number);
+ mc_wprintf(w, "%s %d\n", dial_string, d->dialtype + 1);
+ mc_wprintf(w, "%s %s\n", local_echo, _(yesno(d->flags & FL_ECHO)));
+ mc_wprintf(w, "%s %s\n", script, d->script);
+ mc_wprintf(w, "%s %s\n", username, d->username);
+ mc_wprintf(w, "%s %s\n", password, d->password);
+ mc_wprintf(w, "%s %s\n", terminal_emulation, te[d->term - 1]);
+ mc_wprintf(w, "%s %s\n", backspace_key_sends,
d->flags & FL_DEL ? _("Delete") : _("Backspace"));
- wprintf(w, "%s %s\n", linewrap,
+ mc_wprintf(w, "%s %s\n", linewrap,
d->flags & FL_WRAP ? _("On") : _("Off"));
- wprintf(w, "%s %s %s%s%s\n", line_settings,
+ mc_wprintf(w, "%s %s %s%s%s\n", line_settings,
d->baud, d->bits, d->parity, d->stopb);
- wprintf(w, "%s %s\n", conversion_table, d->convfile);
- wprintf(w, _(" Last dialed : %s %s\n"),d->lastdate,d->lasttime);
- wprintf(w, _(" Times on : %d"),d->count);
+ mc_wprintf(w, "%s %s\n", conversion_table, d->convfile);
+ mc_wprintf(w, _(" Last dialed : %s %s\n"),d->lastdate,d->lasttime);
+ mc_wprintf(w, _(" Times on : %d"),d->count);
wlocate(w, 4, 15);
wputs(w, question);
wredraw(w, 1);
@@ -1116,13 +1116,13 @@ static void dedit(struct dialent *d)
case 'C':
d->dialtype = (d->dialtype + 1) % 3;
wlocate(w, mbslen (dial_string) + 1, 2);
- wprintf(w, "%d", d->dialtype + 1);
+ mc_wprintf(w, "%d", d->dialtype + 1);
wflush();
break;
case 'D':
d->flags ^= FL_ECHO;
wlocate(w, mbslen (local_echo) + 1, 3);
- wprintf(w, "%s", _(yesno(d->flags & FL_ECHO)));
+ mc_wprintf(w, "%s", _(yesno(d->flags & FL_ECHO)));
wflush();
break;
case 'E':
@@ -1171,7 +1171,7 @@ static void dedit(struct dialent *d)
case 'K':
get_bbp(d->baud, d->bits, d->parity, d->stopb, 1);
wlocate(w, mbslen (line_settings) + 1, 10);
- wprintf(w, "%s %s%s%s ",
+ mc_wprintf(w, "%s %s%s%s ",
d->baud, d->bits, d->parity, d->stopb);
break;
case 'L': /* jl 21.09.97 */
@@ -1207,9 +1207,9 @@ static void horiz_draw(size_t k)
{
static const char spaces[] = " ";
- wprintf(dsub, "%.*s", what_padding[k][0], spaces);
- wprintf(dsub, "%.*s", what_lens[k], _(what[k]));
- wprintf(dsub, "%.*s", what_padding[k][1], spaces);
+ mc_wprintf(dsub, "%.*s", what_padding[k][0], spaces);
+ mc_wprintf(dsub, "%.*s", what_lens[k], _(what[k]));
+ mc_wprintf(dsub, "%.*s", what_padding[k][1], spaces);
}
/*
@@ -1256,7 +1256,7 @@ static void prdir(WIN *dialw, int top, int cur)
d = getno(f + top);
if (d == (struct dialent *)0)
break;
- wprintf(dialw, fmt, f+1+top, (d->flags & FL_TAG) ? '>' : ' ',
+ mc_wprintf(dialw, fmt, f+1+top, (d->flags & FL_TAG) ? '>' : ' ',
d->name, d->number, d->lastdate, d->lasttime,
d->count, d->script);
}
@@ -1508,7 +1508,7 @@ void dialdir(void)
prdir(w, top, top);
wlocate(w, position_dialing_directory, w->ys - 1);
- wprintf(w, "%*.*s", tagmvlen,tagmvlen, tag_exit);
+ mc_wprintf(w, "%*.*s", tagmvlen,tagmvlen, tag_exit);
dhili(position_dialing_directory, subm);
dirflush = 1;
wredraw(dsub, 1);
@@ -1554,7 +1554,7 @@ again:
wlocate(w, 4, cur + 1 - top);
d->flags ^= FL_TAG;
wsetattr(w, XA_REVERSE | stdattr);
- wprintf(w, "%c", d->flags & FL_TAG ? '>' : ' ');
+ mc_wprintf(w, "%c", d->flags & FL_TAG ? '>' : ' ');
wsetattr(w, XA_NORMAL | stdattr);
cur += (cur < nrents - 1);
break;
@@ -1713,7 +1713,7 @@ again:
dedit(d);
changed++;
wlocate(w, 0, cur + 1 - top);
- wprintf(w, fmt, cur+1, (d->flags & FL_TAG) ? 16 : ' ', d->name,
+ mc_wprintf(w, fmt, cur+1, (d->flags & FL_TAG) ? 16 : ' ', d->name,
d->number, d->lastdate, d->lasttime, d->count, d->script);
}
@@ -1751,13 +1751,13 @@ again:
/* Move the entry up/down in directory. */
if (subm == 5) {
wlocate(w, position_dialing_directory, w->ys - 1);
- wprintf(w, "%*.*s", tagmvlen,tagmvlen, move_exit);
+ mc_wprintf(w, "%*.*s", tagmvlen,tagmvlen, move_exit);
cur = move_entry (w, d, cur, &top);
if (cur != ocur)
changed++;
ocur = cur;
wlocate(w, position_dialing_directory, w->ys - 1);
- wprintf(w, "%*.*s", tagmvlen,tagmvlen, tag_exit);
+ mc_wprintf(w, "%*.*s", tagmvlen,tagmvlen, tag_exit);
}
/* Dial a number manually. */

View File

@ -0,0 +1,42 @@
$OpenBSD: patch-src_file_c,v 1.1 2011/04/22 11:21:46 stsp Exp $
--- src/file.c.orig Thu Apr 21 23:45:04 2011
+++ src/file.c Thu Apr 21 23:45:09 2011
@@ -89,11 +89,11 @@ static void horiz_draw(size_t k, char start_attr, char
{
static const char spaces[] = " ";
- wprintf(dsub, "%.*s", what_padding[k][0], spaces);
+ mc_wprintf(dsub, "%.*s", what_padding[k][0], spaces);
wsetattr(dsub, start_attr);
- wprintf(dsub, "%.*s", what_lens[k], _(what[k]));
+ mc_wprintf(dsub, "%.*s", what_lens[k], _(what[k]));
wsetattr(dsub, end_attr);
- wprintf(dsub, "%.*s", what_padding[k][1], spaces);
+ mc_wprintf(dsub, "%.*s", what_padding[k][1], spaces);
}
/*
@@ -163,9 +163,9 @@ static void prdir(WIN *dirw, int top, int cur,
wsetattr(dirw, XA_REVERSE | stdattr);
if (S_ISDIR(d->mode)) {
snprintf(t_str, sizeof(t_str), "[%s]", d->fname);
- wprintf(dirw, f_str, t_str);
+ mc_wprintf(dirw, f_str, t_str);
} else
- wprintf(dirw, f_str, d->fname);
+ mc_wprintf(dirw, f_str, d->fname);
wsetattr(dirw, XA_NORMAL | stdattr);
wputc(dirw, '\n');
}
@@ -191,9 +191,9 @@ static void prone(WIN *dirw, GETSDIR_ENTRY *dirdat, in
wsetattr(dirw, XA_REVERSE | stdattr);
if (S_ISDIR(dirdat->mode)) {
snprintf(t_str, sizeof(t_str), "[%s]", dirdat->fname);
- wprintf(dirw, f_str, t_str);
+ mc_wprintf(dirw, f_str, t_str);
} else
- wprintf(dirw, f_str, dirdat->fname);
+ mc_wprintf(dirw, f_str, dirdat->fname);
wsetattr(dirw, XA_NORMAL | stdattr);
dirflush = 1;
wflush();

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_help_c,v 1.1 2011/04/22 11:21:46 stsp Exp $
--- src/help.c.orig Thu Apr 21 23:45:22 2011
+++ src/help.c Thu Apr 21 23:45:27 2011
@@ -38,7 +38,7 @@ int help(void)
wputs(w, _("Minicom Command Summary"));
wlocate(w, 10, 2);
- wprintf(w, _("Commands can be called by %s<key>"), esc_key());
+ mc_wprintf(w, _("Commands can be called by %s<key>"), esc_key());
wlocate(w, 15, 4);
wputs(w, _("Main Functions"));

View File

@ -1,9 +1,9 @@
$OpenBSD: patch-src_main_c,v 1.1 2007/05/23 16:40:56 ckuethe Exp $
--- src/main.c.orig Mon Oct 31 05:13:51 2005
+++ src/main.c Thu May 17 12:55:59 2007
$OpenBSD: patch-src_main_c,v 1.2 2011/04/22 11:21:46 stsp Exp $
--- src/main.c.orig Mon Oct 31 13:13:51 2005
+++ src/main.c Thu Apr 21 23:47:45 2011
@@ -22,6 +22,9 @@
#include "rcsid.h"
RCSID("$Id: patch-src_main_c,v 1.1 2007/05/23 16:40:56 ckuethe Exp $")
RCSID("$Id: patch-src_main_c,v 1.2 2011/04/22 11:21:46 stsp Exp $")
+#include <sys/types.h>
+#include <sys/ioctl.h>
@ -37,12 +37,61 @@ $OpenBSD: patch-src_main_c,v 1.1 2007/05/23 16:40:56 ckuethe Exp $
}
@@ -476,7 +489,7 @@ void time_status(void)
@@ -452,12 +465,12 @@ void mode_status(void)
if (st) { /* if swich off status line - NOT print !!! (vlk@st.simbirsk.su) */
wlocate(st, 20, 0);
if (portfd_is_socket) {
- wprintf(st, "unix-socket");
+ mc_wprintf(st, "unix-socket");
} else {
if (P_SHOWSPD[0] == 'l')
- wprintf(st, "%6ld %s%s%s", linespd, P_BITS, P_PARITY, P_STOPB);
+ mc_wprintf(st, "%6ld %s%s%s", linespd, P_BITS, P_PARITY, P_STOPB);
else
- wprintf(st, "%6.6s %s%s%s", P_BAUDRATE, P_BITS, P_PARITY, P_STOPB);
+ mc_wprintf(st, "%6.6s %s%s%s", P_BAUDRATE, P_BITS, P_PARITY, P_STOPB);
}
ret_csr();
}
@@ -474,9 +487,9 @@ void time_status(void)
return;
wlocate(st, 63, 0);
if (online < 0)
wprintf(st, " %12.12s ", P_HASDCD[0] == 'Y' ? _("Offline") : _("OFFLINE"));
- wprintf(st, " %12.12s ", P_HASDCD[0] == 'Y' ? _("Offline") : _("OFFLINE"));
+ mc_wprintf(st, " %12.12s ", P_HASDCD[0] == 'Y' ? _("Offline") : _("OFFLINE"));
else
- wprintf(st, " %s %02ld:%02ld", P_HASDCD[0] == 'Y' ? _("Online") : _("ONLINE"),
+ wprintf(st, " %s %02d:%02d", P_HASDCD[0] == 'Y' ? _("Online") : _("ONLINE"),
+ mc_wprintf(st, " %s %02d:%02d", P_HASDCD[0] == 'Y' ? _("Online") : _("ONLINE"),
online / 3600, (online / 60) % 60);
ret_csr();
@@ -488,7 +501,7 @@ void time_status(void)
void curs_status(void)
{
wlocate(st, 33, 0);
- wprintf(st, cursormode == NORMAL ? "NOR" : "APP");
+ mc_wprintf(st, cursormode == NORMAL ? "NOR" : "APP");
ret_csr();
}
@@ -570,7 +583,7 @@ void show_status(void)
{
st->direct = 0;
wlocate(st, 0, 0);
- wprintf(st,
+ mc_wprintf(st,
_(" %7.7sZ for help | | | Minicom %-6.6s | | "),
esc_key(), VERSION);
mode_status();
@@ -598,9 +611,9 @@ void scriptname(const char *s)
return;
wlocate(st, 39, 0);
if (*s == 0)
- wprintf(st, "Minicom %-6.6s", VERSION);
+ mc_wprintf(st, "Minicom %-6.6s", VERSION);
else
- wprintf(st, "script %-7.7s", s);
+ mc_wprintf(st, "script %-7.7s", s);
ret_csr();
}

View File

@ -0,0 +1,76 @@
$OpenBSD: patch-src_minicom_c,v 1.1 2011/04/22 11:21:46 stsp Exp $
--- src/minicom.c.orig Thu Apr 21 23:47:54 2011
+++ src/minicom.c Thu Apr 21 23:47:59 2011
@@ -261,7 +261,7 @@ void searchhist(WIN *w_hist, wchar_t *str)
w_new->wrap = 0;
hline = _("SEARCH FOR (ESC=Exit)");
- wprintf(w_new, "%s(%d):",hline,MAX_SEARCH);
+ mc_wprintf(w_new, "%s(%d):",hline,MAX_SEARCH);
wredraw(w_new, 1);
wflush();
@@ -461,7 +461,7 @@ static void scrollback(void)
if (b_st->xs < 127)
hline0[b_st->xs] = 0;
hline = hline0;
- wprintf(b_st, hline);
+ mc_wprintf(b_st, hline);
wredraw(b_st, 1);
wflush();
@@ -514,7 +514,7 @@ static void scrollback(void)
searchhist(b_us, look_for);
/* must redraw status line... */
wlocate(b_st, 0, 0); /* move back to column 0! */
- wprintf(b_st, hline); /* and show the above-defined hline */
+ mc_wprintf(b_st, hline); /* and show the above-defined hline */
wredraw(b_st, 1); /* again... */
/* highlight any matches */
if (wcslen(look_for) > 1) {
@@ -723,7 +723,7 @@ static void scrollback(void)
hline = hline0;
}
wlocate(b_st, 0, 0);
- wprintf(b_st, hline);
+ mc_wprintf(b_st, hline);
wredraw(b_st, 1);
if (citemode)
wlocate(b_us, 0, cite_y);
@@ -743,7 +743,7 @@ static void scrollback(void)
break;
}
wlocate(b_st, 0, 0);
- wprintf(b_st, hline);
+ mc_wprintf(b_st, hline);
wredraw(b_st, 1);
wdrawelm_inverse(b_us, cite_y, getline(b_us, cite_ystart));
wlocate(b_us, 0, cite_y);
@@ -762,7 +762,7 @@ static void scrollback(void)
}
drawcite_whole(b_us, y, cite_ystart, cite_yend);
wlocate(b_st, 0, 0);
- wprintf(b_st, hline);
+ mc_wprintf(b_st, hline);
wredraw(b_st, 1);
if (citemode)
wlocate(b_us, 0, cite_y);
@@ -1338,13 +1338,13 @@ int main(int argc, char **argv)
if (doinit)
modeminit();
- wprintf(us, "\n%s %s\r\n", _("Welcome to minicom"), VERSION);
- wprintf(us, "\n%s: %s\r\n", _("OPTIONS"), option_string);
+ mc_wprintf(us, "\n%s %s\r\n", _("Welcome to minicom"), VERSION);
+ mc_wprintf(us, "\n%s: %s\r\n", _("OPTIONS"), option_string);
#if defined (__DATE__) && defined (__TIME__)
- wprintf(us, "%s %s, %s.\r\n",_("Compiled on"), __DATE__,__TIME__);
+ mc_wprintf(us, "%s %s, %s.\r\n",_("Compiled on"), __DATE__,__TIME__);
#endif
- wprintf(us, "Port %s\n", P_PORT);
- wprintf(us, _("\nPress %sZ for help on special keys%c\n\n"),esc_key(),'\r');
+ mc_wprintf(us, "Port %s\n", P_PORT);
+ mc_wprintf(us, _("\nPress %sZ for help on special keys%c\n\n"),esc_key(),'\r');
/* Now that all initialization is done, drop our priviliges. */
drop_privs();

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_updown_c,v 1.2 2007/05/23 16:40:56 ckuethe Exp $
--- src/updown.c.orig Sun Aug 14 14:39:30 2005
+++ src/updown.c Thu May 17 12:58:26 2007
$OpenBSD: patch-src_updown_c,v 1.3 2011/04/22 11:21:46 stsp Exp $
--- src/updown.c.orig Sun Aug 14 22:39:30 2005
+++ src/updown.c Thu Apr 21 23:48:31 2011
@@ -40,7 +40,7 @@ static int mcd(char *dir)
{
char buf[256];
@ -19,3 +19,34 @@ $OpenBSD: patch-src_updown_c,v 1.2 2007/05/23 16:40:56 ckuethe Exp $
snprintf(title, sizeof(title), _("%.30s %s - Press CTRL-C to quit"), P_PNAME(g),
what == 'U' ? _("upload") : _("download"));
wtitle(win, TMID, title);
@@ -355,7 +355,7 @@ void updown(int what, int nr)
if (win && (status & 0xFF00) == 0) {
#if VC_MUSIC
if (P_SOUND[0] == 'Y') {
- wprintf(win, _("\n READY: press any key to continue..."));
+ mc_wprintf(win, _("\n READY: press any key to continue..."));
music();
} else
sleep(1);
@@ -363,7 +363,7 @@ void updown(int what, int nr)
/* MARK updated 02/17/94 - If there was no VC_MUSIC capability, */
/* then at least make some beeps! */
if (P_SOUND[0] == 'Y')
- wprintf(win, "\007\007\007");
+ mc_wprintf(win, "\007\007\007");
sleep(1);
#endif
}
@@ -526,9 +526,9 @@ void runscript(int ask, const char *s, const char *l,
w = wopen(10, 5, 70, 10, BDOUBLE, stdattr, mfcolor, mbcolor, 0, 0, 1);
wtitle(w, TMID, _("Run a script"));
wputs(w, "\n");
- wprintf(w, "%s %s\n", username, scr_user[0] ? msg : "");
- wprintf(w, "%s %s\n", password, scr_passwd[0] ? msg : "");
- wprintf(w, "%s %s\n", name_of_script, scr_name);
+ mc_wprintf(w, "%s %s\n", username, scr_user[0] ? msg : "");
+ mc_wprintf(w, "%s %s\n", password, scr_passwd[0] ? msg : "");
+ mc_wprintf(w, "%s %s\n", name_of_script, scr_name);
wlocate(w, 4, 5);
wputs(w, question);
wredraw(w, 1);

View File

@ -1,11 +1,29 @@
$OpenBSD: patch-src_windiv_c,v 1.2 2007/05/23 16:40:56 ckuethe Exp $
--- src/windiv.c.orig Thu May 17 12:50:11 2007
+++ src/windiv.c Thu May 17 12:50:13 2007
$OpenBSD: patch-src_windiv_c,v 1.3 2011/04/22 11:21:46 stsp Exp $
--- src/windiv.c.orig Wed Oct 11 22:46:21 2006
+++ src/windiv.c Thu Apr 21 23:48:44 2011
@@ -19,6 +19,7 @@
#include "rcsid.h"
RCSID("$Id: patch-src_windiv_c,v 1.2 2007/05/23 16:40:56 ckuethe Exp $")
RCSID("$Id: patch-src_windiv_c,v 1.3 2011/04/22 11:21:46 stsp Exp $")
+#include <sys/types.h>
#include <dirent.h>
#include <sys/stat.h>
#include "port.h"
@@ -120,7 +121,7 @@ int ask(const char *what, const char **s)
while (1) {
wlocate(w, 2 + offs + 10 * cur, 1);
if (!useattr)
- wprintf(w, ">%s", _(s[cur]) + 1);
+ mc_wprintf(w, ">%s", _(s[cur]) + 1);
else {
wsetattr(w, XA_REVERSE | stdattr);
wputs(w, _(s[cur]));
@@ -169,7 +170,7 @@ char *input(char *s, char *buf)
BDOUBLE, stdattr, mfcolor, mbcolor, 1, 0, 1);
wputs(w, s);
wlocate(w, 0, 1);
- wprintf(w, "> %-38.38s", buf);
+ mc_wprintf(w, "> %-38.38s", buf);
wlocate(w, 2, 1);
if (wgets(w, buf, 38, 128) < 0)
buf = NULL;

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-src_window_c,v 1.3 2011/04/22 11:21:46 stsp Exp $
--- src/window.c.orig Thu Apr 21 23:48:56 2011
+++ src/window.c Thu Apr 21 23:49:02 2011
@@ -1146,7 +1146,7 @@ void wputs(WIN *win, const char *s)
* Print a formatted string in a window.
* Should return stringlength - but who cares.
*/
-int wprintf(WIN *win, const char *fmt, ...)
+int mc_wprintf(WIN *win, const char *fmt, ...)
{
char buf[160];
va_list va;
@@ -1304,7 +1304,7 @@ int wselect(int x, int y, const char *const *choices,
wtitle(w, TMID, title);
for (c = 0; c < count; c++)
- wprintf(w, " %s%s", _(choices[c]), c == count - 1 ? "" : "\n");
+ mc_wprintf(w, " %s%s", _(choices[c]), c == count - 1 ? "" : "\n");
wcurbar(w, cur, high_on);
wredraw(w, 1);

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_window_h,v 1.1 2011/04/22 11:21:46 stsp Exp $
--- src/window.h.orig Thu Apr 21 23:37:49 2011
+++ src/window.h Thu Apr 21 23:37:58 2011
@@ -151,7 +151,7 @@ void wlocate(WIN *win, int x, int y);
void wputc(WIN *win, wchar_t c);
void wdrawelm(WIN *win, int y, ELM *e);
void wputs(WIN *win, const char *s);
-int wprintf(WIN *, const char *, ...)
+int mc_wprintf(WIN *, const char *, ...)
__attribute__((format(printf, 2, 3)));
void wbell(void);
void wcursor(WIN *win, int type);