git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Usermode/init - Bugfixes
[tpg/acess2.git]
/
Usermode
/
Applications
/
irc_src
/
main.c
diff --git
a/Usermode/Applications/irc_src/main.c
b/Usermode/Applications/irc_src/main.c
index
901e8ac
..
9e5a075
100644
(file)
--- a/
Usermode/Applications/irc_src/main.c
+++ b/
Usermode/Applications/irc_src/main.c
@@
-102,8
+102,8
@@
int main(int argc, const char *argv[], const char *envp[])
\r
atexit(ExitHandler);
\r
\r
\r
atexit(ExitHandler);
\r
\r
- giTerminal_Width =
ioctl(1, 5, NULL);
// getset_width
\r
- giTerminal_Height =
ioctl(1, 6, NULL);
// getset_height
\r
+ giTerminal_Width =
_SysIOCtl(1, 5, NULL);
// getset_width
\r
+ giTerminal_Height =
_SysIOCtl(1, 6, NULL);
// getset_height
\r
\r
printf("\x1B[?1047h");
\r
printf("\x1B[%i;%ir", 0, giTerminal_Height-1);
\r
\r
printf("\x1B[?1047h");
\r
printf("\x1B[%i;%ir", 0, giTerminal_Height-1);
\r
@@
-194,7
+194,7
@@
int main(int argc, const char *argv[], const char *envp[])
{
\r
tServer *srv;
\r
for( srv = gpServers; srv; srv = srv->Next )
\r
{
\r
tServer *srv;
\r
for( srv = gpServers; srv; srv = srv->Next )
\r
-
c
lose(srv->FD);
\r
+
_SysC
lose(srv->FD);
\r
}
\r
return 0;
\r
}
\r
}
\r
return 0;
\r
}
\r
@@
-659,11
+659,11
@@
int ProcessIncoming(tServer *Server)
// ioctl#8 on a TCP client gets the number of bytes in the recieve buffer
\r
// - Used to avoid blocking
\r
#if NON_BLOCK_READ
\r
// ioctl#8 on a TCP client gets the number of bytes in the recieve buffer
\r
// - Used to avoid blocking
\r
#if NON_BLOCK_READ
\r
- while( (len =
ioc
tl(Server->FD, 8, NULL)) > 0 )
\r
+ while( (len =
_SysIOC
tl(Server->FD, 8, NULL)) > 0 )
\r
{
\r
#endif
\r
// Read data
\r
{
\r
#endif
\r
// Read data
\r
- len =
r
ead(Server->FD, &Server->InBuf[Server->ReadPos], BUFSIZ - Server->ReadPos);
\r
+ len =
_SysR
ead(Server->FD, &Server->InBuf[Server->ReadPos], BUFSIZ - Server->ReadPos);
\r
if( len == -1 ) {
\r
return -1;
\r
}
\r
if( len == -1 ) {
\r
return -1;
\r
}
\r
@@
-717,7
+717,7
@@
int writef(int FD, const char *Format, ...)
vsnprintf(buf, len+1, Format, args);
\r
va_end(args);
\r
\r
vsnprintf(buf, len+1, Format, args);
\r
va_end(args);
\r
\r
- return
w
rite(FD, buf, len);
\r
+ return
_SysW
rite(FD, buf, len);
\r
}
\r
}
\r
\r
}
\r
}
\r
\r
@@
-747,12
+747,12
@@
int OpenTCP(const char *AddressString, short PortNumber)
\r
// Set remote port and address
\r
// printf("Setting port and remote address\n");
\r
\r
// Set remote port and address
\r
// printf("Setting port and remote address\n");
\r
-
ioc
tl(fd, 5, &PortNumber);
\r
-
ioc
tl(fd, 6, addrBuffer);
\r
+
_SysIOC
tl(fd, 5, &PortNumber);
\r
+
_SysIOC
tl(fd, 6, addrBuffer);
\r
\r
// Connect
\r
// printf("Initiating connection\n");
\r
\r
// Connect
\r
// printf("Initiating connection\n");
\r
- if(
ioc
tl(fd, 7, NULL) == 0 ) {
\r
+ if(
_SysIOC
tl(fd, 7, NULL) == 0 ) {
\r
// Shouldn't happen :(
\r
fprintf(stderr, "Unable to start connection\n");
\r
return -1;
\r
// Shouldn't happen :(
\r
fprintf(stderr, "Unable to start connection\n");
\r
return -1;
\r
@@
-797,7
+797,7
@@
int SetCursorPos(int Row, int Col)
Row = Col / giTerminal_Width;
\r
Col = Col % giTerminal_Width;
\r
}
\r
Row = Col / giTerminal_Width;
\r
Col = Col % giTerminal_Width;
\r
}
\r
- rv =
ioctl(1, 9, NULL);
// Ugh, constants
\r
+ rv =
_SysIOCtl(1, 9, NULL);
// Ugh, constants
\r
printf("\x1B[%i;%iH", Col, Row);
\r
return rv;
\r
}
\r
printf("\x1B[%i;%iH", Col, Row);
\r
return rv;
\r
}
\r
UCC
git Repository :: git.ucc.asn.au