mirror of
https://github.com/ksherlock/qserver.git
synced 2025-01-02 00:30:16 +00:00
build with golden gate.
This commit is contained in:
parent
e3bfd5f549
commit
30799b1e96
32
GNUmakefile
Normal file
32
GNUmakefile
Normal file
@ -0,0 +1,32 @@
|
||||
#for use with iix/make(1)
|
||||
|
||||
CC = occ
|
||||
CHTYP = iix chtyp
|
||||
COPYFORK = iix copyfork
|
||||
LDFLAGS =
|
||||
LDLIBS =
|
||||
CFLAGS += $(DEFINES) -v #-O
|
||||
OBJS = qserver.a macroman.a common.a config.a
|
||||
|
||||
qserver: $(OBJS) qserver.r
|
||||
$(CC) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@
|
||||
$(COPYFORK) qserver.r $@ -r
|
||||
$(CHTYP) -t nda $@
|
||||
|
||||
|
||||
common.a: common.c macroman.h
|
||||
config.a: config.c qserver.h
|
||||
macroman.a: macroman.c macroman.h
|
||||
qserver.a: qserver.c qserver.h
|
||||
qserver.r: qserver.rez qserver.h
|
||||
|
||||
clean:
|
||||
$(RM) *.a *.root *.r
|
||||
|
||||
clobber: clean
|
||||
|
||||
%.a: %.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
%.r: %.rez
|
||||
$(CC) $< -o $@
|
5
config.c
5
config.c
@ -10,8 +10,7 @@
|
||||
#include <stdfile.h>
|
||||
#include <window.h>
|
||||
|
||||
|
||||
#include <kstring.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "qserver.h"
|
||||
|
||||
@ -136,7 +135,7 @@ Handle newPath = NULL;
|
||||
|
||||
oldPort = GetPort();
|
||||
|
||||
memzero(&event, sizeof(event));
|
||||
memset(&event, 0, sizeof(event));
|
||||
event.wmTaskMask = 0x001f0004;
|
||||
|
||||
win = NewWindow2(NULL, NULL, NULL, NULL,
|
||||
|
10
makefile.mk
10
makefile.mk
@ -1,10 +1,7 @@
|
||||
#for use iwith dmake(1)
|
||||
# for compiling
|
||||
#for use with GNO/dmake(1)
|
||||
|
||||
CFLAGS += $(DEFINES) -v #-O
|
||||
LDLIBS += -l /usr/local/lib/libk
|
||||
OBJS = qserver.o macroman.o common.o config.o
|
||||
CFLAGS += -I /usr/local/include/
|
||||
|
||||
qserver: $(OBJS) qserver.r
|
||||
$(CC) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@
|
||||
@ -12,6 +9,9 @@ qserver: $(OBJS) qserver.r
|
||||
copyfork qserver.r $@ -r
|
||||
|
||||
|
||||
common.o: common.c macroman.h
|
||||
config.o: config.c qserver.h
|
||||
macroman.o: macroman.c macroman.h
|
||||
qserver.o: qserver.c qserver.h
|
||||
qserver.r: qserver.rez qserver.h
|
||||
|
||||
@ -20,4 +20,4 @@ clean:
|
||||
$(RM) *.o *.root *.r
|
||||
|
||||
clobber: clean
|
||||
$(RM) -f qotdd
|
||||
$(RM) -f qserver
|
||||
|
16
qserver.c
16
qserver.c
@ -21,7 +21,7 @@
|
||||
#include <TCPIP.h>
|
||||
#include <misctool.h>
|
||||
|
||||
#include <kstring.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "qserver.h"
|
||||
|
||||
@ -81,7 +81,7 @@ void fixstats(void)
|
||||
static char stats[16];
|
||||
Word i;
|
||||
|
||||
i = ksprintf(stats + 1, "%D : %D", current, total);
|
||||
i = sprintf(stats + 1, "%u : %u", current, total);
|
||||
stats[0] = i; // pascal string
|
||||
|
||||
SetInfoRefCon((LongWord)stats, MyWindow);
|
||||
@ -234,7 +234,7 @@ int i;
|
||||
TCPIPConvertIPToASCII(srBuffer.srDestIP,
|
||||
buffer, 0);
|
||||
|
||||
j = ksprintf(line, "%p:%D\r",
|
||||
j = sprintf(line, "%p:%u\r",
|
||||
buffer, srBuffer.srDestPort);
|
||||
|
||||
InsertString(j, line);
|
||||
@ -253,6 +253,7 @@ int i;
|
||||
word oFile;
|
||||
word oDepth;
|
||||
static char err[256];
|
||||
GSString255 *path;
|
||||
|
||||
total = current = 0;
|
||||
|
||||
@ -262,11 +263,13 @@ static char err[256];
|
||||
return false;
|
||||
}
|
||||
HLock(rPath);
|
||||
path = *(GSString255 **)rPath;
|
||||
|
||||
rFile = OpenResourceFile(readEnable, NULL, (pointer)*rPath);
|
||||
rFile = OpenResourceFile(readEnable, NULL, (pointer)path);
|
||||
if (_toolErr)
|
||||
{
|
||||
InsertString(ksprintf(err, "Fatal: Unable to open %g\r", *rPath),
|
||||
/* todo */
|
||||
InsertString(sprintf(err, "Fatal: Unable to open %.*s\r", path->length, path->text),
|
||||
err);
|
||||
return false;
|
||||
}
|
||||
@ -280,7 +283,8 @@ static char err[256];
|
||||
|
||||
if (!rCount)
|
||||
{
|
||||
InsertString(ksprintf(err, "Fatal: Invalid quote file %g\r", *rPath),
|
||||
/* todo */
|
||||
InsertString(sprintf(err, "Fatal: Invalid quote file %.*s\r", path->length, path->text),
|
||||
err);
|
||||
|
||||
CloseResourceFile(rFile);
|
||||
|
@ -2,6 +2,10 @@
|
||||
#include "qserver.h"
|
||||
|
||||
|
||||
#ifndef fSquishText
|
||||
#define fSquishText $0010
|
||||
#endif
|
||||
|
||||
//#define WaitCodeRID 0x00700000
|
||||
//read rCtlDefProc (WaitCodeRID, fixed, convert) "waitctrl";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user