home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
bx75p3.zip
/
doc
/
bitchx_os2.diff
< prev
next >
Wrap
Text File
|
1999-02-23
|
26KB
|
1,123 lines
diff -c --recursive old/commands.c new/commands.c
*** old/commands.c Wed May 7 02:25:16 1997
--- new/commands.c Mon Jul 14 16:28:44 1997
***************
*** 14,19 ****
--- 14,23 ----
#include <sys/stat.h>
+ #ifdef __EMX__
+ #include <netdb.h>
+ #endif
+
#ifdef ESIX
# include <lan/net_types.h>
#endif
***************
*** 3024,3030 ****
if ((reason = strchr(args, ' ')) != NULL)
*reason++ = '\0';
else
! if ((reason = get_reason(args, "~/.BitchX/BitchX.kill")))
reason = empty_string;
if (!strcmp(args, "*"))
--- 3028,3034 ----
if ((reason = strchr(args, ' ')) != NULL)
*reason++ = '\0';
else
! if ((reason = get_reason(args, "~/BitchX/BitchX.kil")))
reason = empty_string;
if (!strcmp(args, "*"))
diff -c --recursive old/commands2.c new/commands2.c
*** old/commands2.c Tue May 6 01:37:54 1997
--- new/commands2.c Sun Jul 13 23:39:26 1997
***************
*** 9,14 ****
--- 9,18 ----
#include <sys/stat.h>
+ #ifdef __EMX__
+ #include <netdb.h>
+ #endif
+
#ifdef ESIX
# include <lan/net_types.h>
#endif
Only in new: core
diff -c --recursive old/ctcp.c new/ctcp.c
*** old/ctcp.c Sat Apr 19 09:53:08 1997
--- new/ctcp.c Mon Jul 14 00:56:00 1997
***************
*** 739,745 ****
}
if (get_int_var(CLOAK_VAR))
return NULL;
! malloc_strcpy(&version_reply, stripansicodes(convert_output_format(get_string_var(FORMAT_VERSION_VAR), "%s %s %s", irc_version, internal_version, "*IX")));
send_ctcp(CTCP_NOTICE, from, CTCP_VERSION, "%s :%s", version_reply,
#endif
(tmp = get_string_var(CLIENTINFO_VAR)) ? tmp : IRCII_COMMENT);
--- 739,745 ----
}
if (get_int_var(CLOAK_VAR))
return NULL;
! malloc_strcpy(&version_reply, stripansicodes(convert_output_format(get_string_var(FORMAT_VERSION_VAR), "%s %s %s", irc_version, internal_version, "OS/2")));
send_ctcp(CTCP_NOTICE, from, CTCP_VERSION, "%s :%s", version_reply,
#endif
(tmp = get_string_var(CLIENTINFO_VAR)) ? tmp : IRCII_COMMENT);
diff -c --recursive old/dcc.c new/dcc.c
*** old/dcc.c Tue Apr 29 21:32:08 1997
--- new/dcc.c Mon Jul 14 19:33:32 1997
***************
*** 14,20 ****
#include <stdarg.h>
#include <stdio.h>
#include <dirent.h>
!
#include "ctcp.h"
#include "crypt.h"
--- 14,23 ----
#include <stdarg.h>
#include <stdio.h>
#include <dirent.h>
! #ifdef __EMX__
! #include <netdb.h>
! #include <sys/fcntl.h>
! #endif
#include "ctcp.h"
#include "crypt.h"
***************
*** 1055,1066 ****
}
else
{
char current_dir[BIG_BUFFER_SIZE+1];
getcwd(current_dir, sizeof(current_dir) - strlen(filename) - 4);
! malloc_sprintf(&FileBuf, "%s/%s", current_dir, filename);
}
! if (access(FileBuf, R_OK))
{
put_it("%s", convert_output_format("$G %RDCC%n Cannot access: $0", "%s", FileBuf));
new_free(&FileBuf);
--- 1058,1073 ----
}
else
{
+ #ifndef __EMX__
char current_dir[BIG_BUFFER_SIZE+1];
getcwd(current_dir, sizeof(current_dir) - strlen(filename) - 4);
! malloc_sprintf(&FileBuf, "%s/%s", current_dir, filename);
! #else
! malloc_sprintf(&FileBuf, "%s", filename);
! #endif
}
! if (access(FileBuf, R_OK))
{
put_it("%s", convert_output_format("$G %RDCC%n Cannot access: $0", "%s", FileBuf));
new_free(&FileBuf);
***************
*** 1125,1137 ****
}
else
{
getcwd(FileBuf, sizeof(FileBuf));
#ifdef WINNT
strcat(FileBuf, "\\");
#else
strcat(FileBuf, "/");
#endif
! strcat(FileBuf, filename);
}
while (args && *args)
--- 1132,1150 ----
}
else
{
+ #ifndef __EMX__
getcwd(FileBuf, sizeof(FileBuf));
+ #endif
#ifdef WINNT
strcat(FileBuf, "\\");
#else
strcat(FileBuf, "/");
#endif
! #ifndef __EMX__
! strcat(FileBuf, filename);
! #else
! strcpy(FileBuf, filename);
! #endif
}
while (args && *args)
***************
*** 1323,1329 ****
malloc_strcpy(&fullname, tmp);
! if (-1 == (Client->file = open(fullname, O_WRONLY | O_TRUNC | O_CREAT, 0644)))
{
put_it("%s", convert_output_format("$G %RDCC%n Unable to open $0: $1", "%s %s", Client->description, errno?strerror(errno):"Unknown"));
if (dcc_active_count) dcc_active_count--;
--- 1336,1346 ----
malloc_strcpy(&fullname, tmp);
! #ifndef __EMX__
! if (-1 == (Client->file = open(fullname, O_WRONLY | O_TRUNC | O_CREAT, 0644)))
! #else
! if (-1 == (Client->file = open(fullname, O_WRONLY | O_TRUNC | O_CREAT | O_BINARY, 0644)))
! #endif
{
put_it("%s", convert_output_format("$G %RDCC%n Unable to open $0: $1", "%s %s", Client->description, errno?strerror(errno):"Unknown"));
if (dcc_active_count) dcc_active_count--;
***************
*** 1382,1388 ****
--- 1399,1409 ----
if (!dcc_open(Client))
return;
+ #ifndef __EMX__
if (-1 == (Client->file = open(fullname, O_WRONLY | O_CREAT, 0644)))
+ #else
+ if (-1 == (Client->file = open(fullname, O_WRONLY | O_CREAT | O_BINARY, 0644)))
+ #endif
{
put_it("%s", convert_output_format("$G %RDCC%n Unable to open $0: $1", "%s %s", Client->description, errno?strerror(errno):"Unknown"));
Client->flags |= DCC_DELETE;
***************
*** 1991,1997 ****
--- 2012,2022 ----
Client->flags |= DCC_ACTIVE;
Client->eof = 0;
get_time(&Client->starttime);
+ #ifndef __EMX__
if ((Client->file = open(Client->description, O_RDONLY)) == -1)
+ #else
+ if ((Client->file = open(Client->description, O_RDONLY | O_BINARY)) == -1)
+ #endif
{
put_it("%s", convert_output_format("$G %RDCC%n Unable to open $0: $1", "%s %s", Client->description, errno ? strerror(errno) : "Unknown Host"));
FD_CLR(Client->read, &readables);
***************
*** 3495,3501 ****
--- 3520,3530 ----
if (0 == (fullname = expand_twiddle(tmp)))
malloc_strcpy(&fullname, tmp);
+ #ifndef __EMX__
if (!(Client->file = open(fullname, O_WRONLY | O_APPEND, 0644)))
+ #else
+ if (!(Client->file = open(fullname, O_WRONLY | O_APPEND | O_BINARY, 0644)))
+ #endif
{
say("Unable to open %s: %s", Client->description, errno ? strerror(errno) : "<No Error>");
Client->flags |= DCC_DELETE;
***************
*** 3690,3696 ****
--- 3719,3729 ----
{
struct stat st;
Client->read = Client->write = s1;
+ #ifndef __EMX__
Client->file = open(args, O_RDONLY);
+ #else
+ Client->file = open(args, O_RDONLY | O_BINARY);
+ #endif
fstat(Client->file, &st);
Client->flags |= DCC_ACTIVE;
FD_SET(Client->write, &writables);
***************
*** 3778,3784 ****
--- 3811,3821 ----
if ((Client = dcc_searchlist("ftpget", filename, DCC_FTPGET, 1, NULL, NULL, -1)))
{
Client->read = Client->write = s1;
+ #ifndef __EMX__
Client->file = open(filename, O_WRONLY|O_CREAT|O_TRUNC, 0644);
+ #else
+ Client->file = open(filename, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644);
+ #endif
Client->flags |= DCC_ACTIVE;
FD_SET(Client->read, &readables);
Client->filesize = filesize;
diff -c --recursive old/exec.c new/exec.c
*** old/exec.c Fri Apr 4 00:49:06 1997
--- new/exec.c Mon Jul 14 00:04:22 1997
***************
*** 639,645 ****
--- 639,649 ----
pgid = getpgid(process_list[kill_index]->pid);
#else
# ifndef GETPGRP_VOID
+ #ifndef __EMX__
pgid = getpgrp(process_list[kill_index]->pid);
+ #else
+ pgid = getpgrp();
+ #endif
# else
pgid = process_list[kill_index]->pid;
# endif
***************
*** 735,741 ****
--- 739,747 ----
break;
case 0:
{
+ #ifndef __EMX__
setsid();
+ #endif
my_signal(SIGINT, (sigfunc *) SIG_IGN, 0);
my_signal(SIGQUIT, (sigfunc *) SIG_DFL, 0);
my_signal(SIGSEGV, (sigfunc *) SIG_DFL, 0);
diff -c --recursive old/functions.c new/functions.c
*** old/functions.c Wed Apr 30 14:58:32 1997
--- new/functions.c Mon Jul 14 00:04:06 1997
***************
*** 3176,3181 ****
--- 3176,3182 ----
*/
BUILT_IN_FUNCTION(function_crypt, words)
{
+ #ifndef __EMX__
char pass[9] = "\0";
char seed[3] = "\0";
char *blah, *bleh, *crypt _((const char *, const char *));
***************
*** 3185,3190 ****
--- 3186,3192 ----
strmcpy(pass, blah, 8);
strmcpy(seed, bleh, 2);
RETURN_STR(crypt(pass, seed));
+ #endif
}
BUILT_IN_FUNCTION(function_info, words)
***************
*** 4149,4154 ****
--- 4151,4157 ----
BUILT_IN_FUNCTION(function_chmod, words)
{
+ #ifndef __EMX__
char *filearg, *after;
int fd = -1;
char *perm_s;
***************
*** 4168,4173 ****
--- 4171,4177 ----
}
else
RETURN_INT(chmod(filearg, perm))
+ #endif
}
BUILT_IN_FUNCTION(function_twiddle, words)
diff -c --recursive old/glob.c new/glob.c
*** old/glob.c Mon Mar 31 22:16:28 1997
--- new/glob.c Mon Jul 14 00:04:48 1997
***************
*** 65,70 ****
--- 65,73 ----
*/
#include <sys/param.h>
+ #ifdef __EMX__
+ #include <sys/types.h>
+ #endif
#include <sys/stat.h>
#include <ctype.h>
***************
*** 768,778 ****
glob_t *pglob )
{
char buf[MAXPATHLEN];
!
g_Ctoc(fn, buf);
if (pglob->gl_flags & GLOB_ALTDIRFUNC)
return((*pglob->gl_lstat)(buf, sb));
return(lstat(buf, sb));
}
static int g_stat ( register Char *fn,
--- 771,782 ----
glob_t *pglob )
{
char buf[MAXPATHLEN];
! #ifndef __EMX__
g_Ctoc(fn, buf);
if (pglob->gl_flags & GLOB_ALTDIRFUNC)
return((*pglob->gl_lstat)(buf, sb));
return(lstat(buf, sb));
+ #endif
}
static int g_stat ( register Char *fn,
diff -c --recursive old/help.c new/help.c
*** old/help.c Mon Apr 14 19:00:58 1997
--- new/help.c Sun Jul 13 23:43:20 1997
***************
*** 44,49 ****
--- 44,55 ----
#include <stdarg.h>
+ #ifdef __EMX__
+ #include <netdb.h>
+ #include <sys/types.h>
+ #include <dirent.h>
+ #endif
+
#include "help.h"
#include "input.h"
#include "ircaux.h"
diff -c --recursive old/input.c new/input.c
*** old/input.c Wed Apr 23 20:10:46 1997
--- new/input.c Mon Jul 14 02:20:20 1997
***************
*** 52,58 ****
NickTab *tabkey_array = NULL, *autoreply_array = NULL;
!
const int WIDTH = 10;
--- 52,60 ----
NickTab *tabkey_array = NULL, *autoreply_array = NULL;
! #ifdef __EMX__
! static int ESC = 0;
! #endif
const int WIDTH = 10;
***************
*** 155,161 ****
return;
cursor_to_input();
! if (current_screen->promptlist)
prompt = current_screen->promptlist->prompt;
else
prompt = input_prompt;
--- 157,164 ----
return;
cursor_to_input();
!
! if (current_screen->promptlist)
prompt = current_screen->promptlist->prompt;
else
prompt = input_prompt;
***************
*** 1159,1164 ****
--- 1162,1174 ----
meta_not_hit;
int i;
+ #ifdef __EMX__
+ if (key == 0) { ESC = 1; return 0; }
+ if (ESC == 1) {
+ ESC = 0; current_screen->meta_hit[1] = 1;
+ }
+ #endif
+
/* were we waiting for a keypress? */
if (current_screen->promptlist && current_screen->promptlist->type == WAIT_PROMPT_KEY)
{
***************
*** 1179,1185 ****
#ifdef TRANSLATE
if (translation)
! extended_key = transFromClient[key];
else
#endif
extended_key = key;
--- 1189,1195 ----
#ifdef TRANSLATE
if (translation)
! extended_key = transFromClient[key];
else
#endif
extended_key = key;
diff -c --recursive old/irc.c new/irc.c
*** old/irc.c Wed Apr 30 15:08:44 1997
--- new/irc.c Mon Jul 14 22:20:24 1997
***************
*** 6,12 ****
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*/
! const char irc_version[] = "BitchX-71p2";
/*
* INTERNAL_VERSION is the number that the special alias $V returns.
--- 6,12 ----
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*/
! const char irc_version[] = "BitchX/2-71p2";
/*
* INTERNAL_VERSION is the number that the special alias $V returns.
***************
*** 27,32 ****
--- 27,36 ----
#endif
#include <stdarg.h>
+ #ifdef __EMX__
+ #include <netdb.h>
+ #endif
+
#include "status.h"
#include "dcc.h"
#include "names.h"
***************
*** 356,365 ****
void display_bitchx(int j)
{
int i = strip_ansi_in_echo;
! strip_ansi_in_echo = 0;
! if (j == -1)
i = (int) (9.0*rand()/RAND_MAX);
! else
i = j;
switch(i)
{
--- 360,370 ----
void display_bitchx(int j)
{
int i = strip_ansi_in_echo;
! strip_ansi_in_echo = 0;
! if (j == -1) {
i = (int) (9.0*rand()/RAND_MAX);
! if (i == 8) i = 7;
! } else
i = j;
switch(i)
{
***************
*** 559,565 ****
break;
case 8:
! put_it("(U
");
break;
default:
break;
--- 564,570 ----
break;
case 8:
! put_it("");
break;
default:
break;
***************
*** 863,869 ****
}
if (!ircservers_file)
! malloc_strcpy(&ircservers_file, ".ircservers");
/* v-- right there was a '!' that should not have been there. */
if ((ptr = getenv("IRCLIB")))
--- 868,874 ----
}
if (!ircservers_file)
! malloc_strcpy(&ircservers_file, "ircserv.txt");
/* v-- right there was a '!' that should not have been there. */
if ((ptr = getenv("IRCLIB")))
***************
*** 1023,1029 ****
malloc_sprintf(&bircrc_file, "%s\\.bitchxrc", my_path);
#else
if (bircrc_file == NULL)
! malloc_sprintf(&bircrc_file, "%s/.bitchxrc", my_path);
#endif
if ((ptr = getenv("IRCPORT")))
--- 1028,1034 ----
malloc_sprintf(&bircrc_file, "%s\\.bitchxrc", my_path);
#else
if (bircrc_file == NULL)
! malloc_sprintf(&bircrc_file, "%s/bitchxrc", my_path);
#endif
if ((ptr = getenv("IRCPORT")))
***************
*** 1419,1424 ****
--- 1424,1433 ----
time(&start_time);
time(&idle_time);
+ #ifdef __EMX__
+ // setvbuf(stdout, NULL, _IOLBF, 80);
+ #endif
+
#ifdef SOCKS
SOCKSinit(argv[0]);
#endif
***************
*** 1445,1452 ****
if (!dumb)
{
! my_signal(SIGCONT, term_cont, 0);
my_signal(SIGWINCH, sig_refresh_screen, 0);
init_screen();
}
else
--- 1454,1463 ----
if (!dumb)
{
! #ifndef __EMX__
! my_signal(SIGCONT, term_cont, 0);
my_signal(SIGWINCH, sig_refresh_screen, 0);
+ #endif
init_screen();
}
else
diff -c --recursive old/ircaux.c new/ircaux.c
*** old/ircaux.c Wed Apr 30 15:00:26 1997
--- new/ircaux.c Mon Jul 14 19:10:08 1997
***************
*** 29,34 ****
--- 29,38 ----
#endif NTDBG
#endif WINNT
+ #ifdef __EMX__
+ #include <sys/time.h>
+ #include <sys/fcntl.h>
+ #endif
#include <sys/stat.h>
***************
*** 1748,1757 ****
if (timer)
{
! timer.tv_sec = time2;
! timer.tv_usec = 0;
return *timer;
! }
timer2.tv_sec = time2;
timer2.tv_usec = 0;
return timer2;
--- 1752,1761 ----
if (timer)
{
! timer->tv_sec = time2;
! timer->tv_usec = 0;
return *timer;
! }
timer2.tv_sec = time2;
timer2.tv_usec = 0;
return timer2;
***************
*** 1928,1934 ****
#if defined(NBLOCK_POSIX)
nonb |= O_NONBLOCK;
#else
! # if defined(NBLOCK_BSD)
nonb |= O_NDELAY;
# else
# if defined(NBLOCK_SYSV)
--- 1932,1938 ----
#if defined(NBLOCK_POSIX)
nonb |= O_NONBLOCK;
#else
! # if defined(NBLOCK_BSD) || defined(__EMX__)
nonb |= O_NDELAY;
# else
# if defined(NBLOCK_SYSV)
***************
*** 1941,1947 ****
# endif
# endif
#endif
! #if (defined(NBLOCK_POSIX) || defined(NBLOCK_BSD)) && !defined(NBLOCK_SYSV)
if ((res = fcntl(fd, F_GETFL, 0)) == -1)
return -1;
else if (fcntl(fd, F_SETFL, res | nonb) == -1)
--- 1945,1951 ----
# endif
# endif
#endif
! #if (defined(NBLOCK_POSIX) || defined(NBLOCK_BSD) || defined(__EMX__)) && !defined(NBLOCK_SYSV)
if ((res = fcntl(fd, F_GETFL, 0)) == -1)
return -1;
else if (fcntl(fd, F_SETFL, res | nonb) == -1)
***************
*** 1957,1963 ****
#if defined(NBLOCK_POSIX)
nonb |= O_NONBLOCK;
#else
! # if defined(NBLOCK_BSD)
nonb |= O_NDELAY;
# else
# if defined(NBLOCK_SYSV)
--- 1961,1967 ----
#if defined(NBLOCK_POSIX)
nonb |= O_NONBLOCK;
#else
! # if defined(NBLOCK_BSD) || defined(__EMX__)
nonb |= O_NDELAY;
# else
# if defined(NBLOCK_SYSV)
***************
*** 1970,1976 ****
# endif
# endif
#endif
! #if (defined(NBLOCK_POSIX) || defined(NBLOCK_BSD)) && !defined(NBLOCK_SYSV)
if ((res = fcntl(fd, F_GETFL, 0)) == -1)
return -1;
else if (fcntl(fd, F_SETFL, res &~ nonb) == -1)
--- 1974,1980 ----
# endif
# endif
#endif
! #if (defined(NBLOCK_POSIX) || defined(NBLOCK_BSD) || defined(__EMX__)) && !defined(NBLOCK_SYSV)
if ((res = fcntl(fd, F_GETFL, 0)) == -1)
return -1;
else if (fcntl(fd, F_SETFL, res &~ nonb) == -1)
diff -c --recursive old/mail.c new/mail.c
*** old/mail.c Wed Apr 30 15:03:24 1997
--- new/mail.c Sun Jul 13 23:48:34 1997
***************
*** 15,21 ****
#include "misc.h"
#include <sys/stat.h>
! static char *mail_path = NULL;
static int mail_latch = 0;
/*
--- 15,25 ----
#include "misc.h"
#include <sys/stat.h>
! #ifdef __EMX__
! #define UNIX_MAIL "./"
! #endif
!
! static char *mail_path = NULL;
static int mail_latch = 0;
/*
Only in new: makefile
Only in new: makefile.bak
diff -c --recursive old/misc.c new/misc.c
*** old/misc.c Mon May 5 11:53:30 1997
--- new/misc.c Sun Jul 13 23:49:06 1997
***************
*** 17,22 ****
--- 17,25 ----
#include <sys/rusage.h>
#endif
+ #ifdef __EMX__
+ #include <netdb.h>
+ #endif
#include "irc.h"
#include "server.h"
diff -c --recursive old/network.c new/network.c
*** old/network.c Sat Apr 5 09:29:54 1997
--- new/network.c Sun Jul 13 23:49:40 1997
***************
*** 10,15 ****
--- 10,19 ----
#include "ircaux.h"
#include "vars.h"
+ #ifdef __EMX__
+ #include <netdb.h>
+ #endif
+
#ifdef HAVE_SYS_UN_H
#include <sys/un.h>
#endif
diff -c --recursive old/newio.c new/newio.c
*** old/newio.c Mon Mar 31 22:16:26 1997
--- new/newio.c Sun Jul 13 23:51:06 1997
***************
*** 38,44 ****
--- 38,48 ----
# define IO_ARRAYLEN sysconf(_SC_OPEN_MAX)
#else
# ifdef FD_SETSIZE
+ #ifndef __EMX__
# define IO_ARRAYLEN FDSETSIZE
+ #else
+ #define IO_ARRAYLEN FD_SETSIZE
+ #endif
# else
# define IO_ARRAYLEN NFDBITS
# endif
diff -c --recursive old/numbers.c new/numbers.c
*** old/numbers.c Sat Apr 19 21:13:44 1997
--- new/numbers.c Mon Jul 14 17:03:14 1997
***************
*** 578,584 ****
case 001: /* #define RPL_WELCOME 001 */
{
bitchsay("For more information about \002BitchX\002 type \002/about\002");
! set_server2_8(from_server, 1);
set_server_nickname(from_server, user);
attempting_to_connect--;
set_server_motd(from_server, 1);
--- 578,585 ----
case 001: /* #define RPL_WELCOME 001 */
{
bitchsay("For more information about \002BitchX\002 type \002/about\002");
! bitchsay("\002BitchX-OS/2\002 port by Taneli \'rosmo\' Leppä <bandit@icenet.fi>");
! set_server2_8(from_server, 1);
set_server_nickname(from_server, user);
attempting_to_connect--;
set_server_motd(from_server, 1);
diff -c --recursive old/scandir.c new/scandir.c
*** old/scandir.c Mon Apr 7 17:52:18 1997
--- new/scandir.c Mon Jul 14 00:03:34 1997
***************
*** 47,53 ****
# if defined(XD88) || defined(__svr4__) || defined(POSIX) || defined(__linux__) \
|| defined(SVR3) || defined(__osf__) || defined(M_UNIX) || defined(_SEQUENT_) \
! || defined(__QNX__) || defined(SVR4) || defined(WINNT)
/*
** SCANDIR
--- 47,53 ----
# if defined(XD88) || defined(__svr4__) || defined(POSIX) || defined(__linux__) \
|| defined(SVR3) || defined(__osf__) || defined(M_UNIX) || defined(_SEQUENT_) \
! || defined(__QNX__) || defined(SVR4) || defined(WINNT) || defined(__EMX__)
/*
** SCANDIR
***************
*** 183,190 ****
--- 183,192 ----
return (-1);
if ((dirp = opendir(dirname)) == NULL)
return (-1);
+ #ifndef __EMX__
if (fstat(dirp->dd_fd, &stb) < 0)
return (-1);
+ #endif
/*
* estimate the array size by taking the size of the directory file and
***************
*** 218,225 ****
--- 220,229 ----
*/
if (++nitems >= arraysz)
{
+ #ifndef __EMX__
if (fstat(dirp->dd_fd, &stb) < 0)
return (-1); /* just might have grown */
+ #endif
arraysz = stb.st_size / 12;
names = (struct direct **) realloc((char *) names,
arraysz * sizeof(struct direct *));
diff -c --recursive old/screen.c new/screen.c
*** old/screen.c Sun Apr 27 07:21:30 1997
--- new/screen.c Sun Jul 13 23:54:36 1997
***************
*** 16,21 ****
--- 16,28 ----
# include <sys/un.h>
#endif /* HAVE_SYS_UN_H */
+ #ifdef __EMX__
+ struct sockaddr_un {
+ u_short sun_family; /* socket family: AF_UNIX */
+ char sun_path[108]; /* path name (not used) */
+ };
+ #endif
+
#include "screen.h"
#include "window.h"
#include "output.h"
diff -c --recursive old/server.c new/server.c
*** old/server.c Wed Apr 30 15:05:34 1997
--- new/server.c Mon Jul 14 19:29:14 1997
***************
*** 914,920 ****
window_display = 0;
#ifdef SERVERS_FILE
malloc_sprintf(&file_path, "%s%s", irc_lib, SERVERS_FILE);
! if ((fp = fopen(file_path, "r")))
{
fgets(buffer, BIG_BUFFER_SIZE, fp);
while (!feof(fp))
--- 914,920 ----
window_display = 0;
#ifdef SERVERS_FILE
malloc_sprintf(&file_path, "%s%s", irc_lib, SERVERS_FILE);
! if ((fp = fopen(file_path, "r")))
{
fgets(buffer, BIG_BUFFER_SIZE, fp);
while (!feof(fp))
Only in new: sig.inc
diff -c --recursive old/term.c new/term.c
*** old/term.c Wed Apr 23 20:12:14 1997
--- new/term.c Mon Jul 14 22:10:52 1997
***************
*** 18,23 ****
--- 18,29 ----
#include "translat.h"
#endif
+ #ifdef __EMX__
+ #include <sys/fcntl.h>
+ #define INCL_VIO
+ #include <os2.h>
+ #endif
+
#ifdef HAVE_SYS_TERMIOS_H
#include <sys/termios.h>
#else
***************
*** 76,81 ****
--- 82,93 ----
static int co;
static char termcap[1024];
+ #ifdef __EMX__
+ static BYTE pair[1];
+ static USHORT x, y;
+ VIOMODEINFO vmode;
+ #endif
+
/*
* term_echo: if 0, echo is turned off (all characters appear as blanks), if
***************
*** 200,206 ****
extern void term_pause (char unused, char *not_used)
{
term_reset();
! kill(getpid(), SIGSTOP);
}
#endif /* NOT IN WTERM_C */
--- 212,218 ----
extern void term_pause (char unused, char *not_used)
{
term_reset();
! /* kill(getpid(), SIGSTOP); */
}
#endif /* NOT IN WTERM_C */
***************
*** 239,244 ****
--- 251,266 ----
li = 24;
ptr = termcap;
+ #ifdef __EMX__
+ vmode.cb = sizeof(VIOMODEINFO);
+ VioGetMode(&vmode, 0);
+ li = vmode.row - 1;
+ co = vmode.col;
+ LI = vmode.row - 1;
+ CO = vmode.col;
+ #endif
+
+
/*
* Get termcap capabilities
*/
***************
*** 278,285 ****
if (!MD || !ME) { MD = empty_string; ME = empty_string; }
if (!CM || !CL || !CE || !ND || (!LE && !BS) || (!CS && !(AL && DL)))
! {
fprintf(stderr, "\nYour terminal cannot run IRC II in full screen mode.\n");
fprintf(stderr, "The following features are missing from your TERM setting.\n");
--- 300,308 ----
if (!MD || !ME) { MD = empty_string; ME = empty_string; }
+ #ifndef __EMX__
if (!CM || !CL || !CE || !ND || (!LE && !BS) || (!CS && !(AL && DL)))
! {
fprintf(stderr, "\nYour terminal cannot run IRC II in full screen mode.\n");
fprintf(stderr, "The following features are missing from your TERM setting.\n");
***************
*** 295,300 ****
--- 318,326 ----
fprintf(stderr, "Try using VT100 emulation or better.\n");
exit(1);
}
+ #else
+ CS = strdup("OS/2 rules!");
+ #endif
if (!LE) LE = "\010";
***************
*** 344,350 ****
newb.c_iflag &= ~IXON; /* No XON/XOFF */
#endif
! tcsetattr(tty_des, TCSADRAIN, &newb);
}
--- 370,376 ----
newb.c_iflag &= ~IXON; /* No XON/XOFF */
#endif
! tcsetattr(tty_des, TCSADRAIN, &newb);
}
***************
*** 359,364 ****
--- 385,391 ----
{
static int old_li = -1,
old_co = -1;
+ #ifndef __EMX_
# if defined (TIOCGWINSZ)
{
***************
*** 383,390 ****
CO = co;
}
# endif
-
CO--;
if ((old_li != LI) || (old_co != CO))
{
old_li = LI;
--- 410,417 ----
CO = co;
}
# endif
CO--;
+ #endif
if ((old_li != LI) || (old_co != CO))
{
old_li = LI;
***************
*** 416,434 ****
int i;
char *thing;
! if (n > 0)
thing = SF ? SF : NL;
else if (n < 0)
{
if (SR)
! thing = SR;
else
return 1;
}
else
return 0;
! tputs_x(tgoto(CS, line2, line1)); /* shouldn't do this each time */
if (n < 0)
{
term_move_cursor(0, line1);
--- 443,462 ----
int i;
char *thing;
! #ifndef __EMX__
! if (n > 0)
thing = SF ? SF : NL;
else if (n < 0)
{
if (SR)
! thing = SR;
else
return 1;
}
else
return 0;
! tputs_x(tgoto(CS, line2, line1)); /* shouldn't do this each time */
if (n < 0)
{
term_move_cursor(0, line1);
***************
*** 439,444 ****
--- 467,480 ----
for (i = 0; i < n; i++)
tputs_x(thing);
tputs_x(tgoto(CS, LI - 1, 0)); /* shouldn't do this each time */
+ #else
+ // printf("%d, %d, %d", line1, line2, n);
+ pair[0] = ' '; pair[1] = 7;
+ vmode.cb = sizeof(VIOMODEINFO);
+ VioGetMode(&vmode, 0);
+ if (n > 0) VioScrollUp(line1, 0, line2, vmode.col, n, (PBYTE)&pair, (HVIO) 0);
+ if (n < 0) { n = -n; VioScrollDn(line1, 0, line2, vmode.col, n, (PBYTE)&pair, (HVIO) 0); }
+ #endif
return (0);
}
diff -c --recursive old/translat.c new/translat.c
*** old/translat.c Wed Apr 23 20:29:28 1997
--- new/translat.c Mon Jul 14 01:32:38 1997
***************
*** 30,36 ****
#include "output.h"
#ifndef TRANSLATION_PATH
! #define TRANSLATION_PATH "/usr/local/lib/irc/translation/"
#endif
--- 30,36 ----
#include "output.h"
#ifndef TRANSLATION_PATH
! #define TRANSLATION_PATH "translat/"
#endif
***************
*** 436,439 ****
}
}
! #endif
\ No newline at end of file
--- 436,439 ----
}
}
! #endif