tintin++v1.5pl6.diff
tintin++v1.5pl6.diff · 4.2 KB
From the archive tintin++v1.5pl6-os2.zip
Download the archive « Back to the archive contents
*** echo.c.orig Sun Aug 28 17:11:56 1994
--- echo.c Wed Sep 16 14:23:42 1998
***************
*** 30,35 ****
--- 30,39 ----
#endif
#endif
+ #ifdef HAVE_TERMIOS_H
+ #include <termios.h>
+ #endif
+
#if defined(HAVE_SYS_TERMIO_H) && !defined(BSD_ECHO)
#ifdef HAVE_TCFLAG_T
extern tcflag_t c_lflag;
*************** void init_echo()
*** 45,53 ****
--- 49,64 ----
if(ioctl(0, TCGETA, &io)<0)
syserr("ioctl");
+ #ifdef __OS2__
+ io.c_lflag &= ~IDEFAULT;
+ #endif
c_lflag = io.c_lflag;
c_cc[VMIN] = io.c_cc[VMIN];
c_cc[VTIME] = io.c_cc[VTIME];
+ #ifdef __OS2__
+ if(ioctl(0, TCSETA, &io)<0)
+ syserr("ioctl");
+ #endif
}
/********************************/
*** main.c.orig Sun Aug 28 17:12:06 1994
--- main.c Wed Sep 16 14:25:35 1998
***************
*** 15,20 ****
--- 15,23 ----
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
+ #ifdef HAVE_TERMIOS_H
+ #include <termios.h>
+ #endif
#include <signal.h>
#include "tintin.h"
#include <fcntl.h>
*************** extern struct listnode *init_list();
*** 81,87 ****
--- 84,92 ----
extern void term_noecho();
extern void read_complete();
extern void syserr();
+ #ifndef __OS2__
extern void alarm();
+ #endif
extern int do_one_antisub();
extern void do_one_sub();
extern void do_one_high();
*************** unsigned short c_lflag;
*** 112,117 ****
--- 117,123 ----
#endif
/* CHANGED to get rid of double-echoing bug when tintin++ gets suspended */
+ #ifndef __OS2__
void tstphandler(sig, code, scp, addr)
int sig;
int code;
*************** void tstphandler(sig, code, scp, addr)
*** 129,134 ****
--- 135,141 ----
#endif
term_noecho();
}
+ #endif
/**************************************************************************/
/* main() - show title - setup signals - init lists - readcoms - tintin() */
*************** void main(argc, argv, environ)
*** 172,179 ****
--- 179,188 ----
if(signal(SIGALRM, tick_func)==BADSIG)
syserr("signal SIGALRM");
/* CHANGED to get rid of double-echoing bug when tintin++ gets suspended */
+ #ifndef __OS2__
if(signal(SIGTSTP, tstphandler)==BADSIG)
syserr("signal SIGTSTP");
+ #endif
time0=time(NULL);
#if defined(DEBUG)
alarm(0);
*************** void tintin_puts2(cptr, ses)
*** 732,738 ****
sprintf(strng,"%c8%s\n\r%c7%c[%d;%df", E, cptr, E, E, input_row, input_col);
else
sprintf(strng,"%s\n\r", cptr);
! write(1,strng, strlen(strng)+1);
display_col=1;
if (redraw && term_echoing && !is_split)
write(1, k_input, strlen(k_input));
--- 741,747 ----
sprintf(strng,"%c8%s\n\r%c7%c[%d;%df", E, cptr, E, E, input_row, input_col);
else
sprintf(strng,"%s\n\r", cptr);
! write(1,strng, strlen(strng));
display_col=1;
if (redraw && term_echoing && !is_split)
write(1, k_input, strlen(k_input));
*** parse.c.orig Sun Aug 28 17:12:10 1994
--- parse.c Wed Sep 16 14:25:58 1998
*************** struct session *parse_tintin_command(com
*** 351,358 ****
--- 351,360 ----
/* CHANGED to allow suspending from within tintin. */
/* I know, I know, this is a hack *yawn* */
+ #ifndef __OS2__
else if(is_abrev(command, "suspend"))
tstphandler(SIGTSTP,0,NULL,NULL);
+ #endif
else if(is_abrev(command, "tablist"))
tablist(complete_head);
*************** void prompt(ses)
*** 670,679 ****
if(ses && !PSEUDO_PROMPT)
write_line_mud("", ses);
else if (!is_split)
! write(1,"> ", 3);
else {
sprintf(strng,"8> 7[%d;%df", input_row, input_col);
! write(1,strng, strlen(strng)+1);
display_col+=2;
}
}
--- 672,681 ----
if(ses && !PSEUDO_PROMPT)
write_line_mud("", ses);
else if (!is_split)
! write(1,"> ", 2);
else {
sprintf(strng,"8> 7[%d;%df", input_row, input_col);
! write(1,strng, strlen(strng));
display_col+=2;
}
}
*** utils.c.orig Sun Aug 28 17:12:16 1994
--- utils.c Wed Sep 16 14:23:42 1998
*************** void syserr(msg)
*** 56,62 ****
--- 56,64 ----
char *msg;
{
extern int errno, sys_nerr;
+ #ifndef __OS2__
extern char *sys_errlist[];
+ #endif
fprintf(stderr,"ERROR: %s (%d",msg, errno);
if(errno>0 && errno<sys_nerr)