factorbot fix, starting 0.77

cvs
Slava Pestov 2005-07-24 23:08:32 +00:00
parent b60dbf0190
commit cae545f930
5 changed files with 43 additions and 26 deletions

View File

@ -119,3 +119,6 @@ write1 ( char -- )</pre>
</ul>
</ul>
</body>
</html>

View File

@ -7,7 +7,16 @@ else
STRIP = strip
endif
DEFAULT_LIBS = -lm
ifdef STATIC
DEFAULT_LIBS = -lm -Wl,-static -Wl,-whole-archive \
-Wl,-export-dynamic \
-lSDL -lSDL_gfx -lSDL_ttf \
-Wl,-no-whole-archive \
-lfreetype -lz -L/usr/X11R6/lib -lX11 -lXext \
-Wl,-Bdynamic
else
DEFAULT_LIBS = -lm
endif
UNIX_OBJS = native/unix/file.o \
native/unix/signal.o \
@ -76,13 +85,13 @@ macosx:
linux:
$(MAKE) f \
CFLAGS="$(DEFAULT_CFLAGS) -export-dynamic" \
LIBS="$(DEFAULT_LIBS) -ldl"
LIBS="-ldl $(DEFAULT_LIBS)"
$(STRIP) f
linux-ppc:
$(MAKE) f \
CFLAGS="$(DEFAULT_CFLAGS) -export-dynamic -mregnames" \
LIBS="$(DEFAULT_LIBS) -ldl"
LIBS="-ldl $(DEFAULT_LIBS)"
$(STRIP) f
windows:

View File

@ -30,15 +30,15 @@ SYMBOL: receiver
"JOIN " irc-write irc-print ;
GENERIC: handle-irc
PREDICATE: string privmsg "PRIVMSG" swap subseq? ;
PREDICATE: string privmsg " " split1 nip "PRIVMSG" head? ;
PREDICATE: string ping "PING" head? ;
M: string handle-irc ( line -- )
drop ;
: parse-privmsg ( line -- text )
":" ?head drop
"!" split1 swap speaker set
"PRIVMSG " split1 nip
" " split1 nip
"PRIVMSG " ?head drop
" " split1 swap receiver set
":" ?head drop ;
@ -48,6 +48,9 @@ M: privmsg handle-irc ( line -- )
[ "factorbot-commands" ] search dup
[ execute ] [ 2drop ] ifte ;
: parse-irc ( line -- )
":" ?head [ "!" split1 swap speaker set ] when handle-irc ;
: say ( line nick -- )
"PRIVMSG " irc-write irc-write " :" irc-write irc-print ;
@ -72,7 +75,7 @@ M: privmsg handle-irc ( line -- )
: irc-loop ( -- )
irc-stream get stream-readln
[ dup print flush handle-irc irc-loop ] when* ;
[ dup print flush parse-irc irc-loop ] when* ;
: factorbot
"irc.freenode.net" connect

View File

@ -6,13 +6,14 @@ parser sequences io unparser words ;
"Compiling base..." print
unix? [
"statically-linked" get [
unix? [
"sdl" "libSDL.so" "cdecl" add-library
"sdl-gfx" "libSDL_gfx.so" "cdecl" add-library
"sdl-ttf" "libSDL_ttf.so" "cdecl" add-library
] when
] when
win32? [
win32? [
"kernel32" "kernel32.dll" "stdcall" add-library
"user32" "user32.dll" "stdcall" add-library
"gdi32" "gdi32.dll" "stdcall" add-library
@ -22,7 +23,8 @@ win32? [
"sdl" "SDL.dll" "cdecl" add-library
"sdl-gfx" "SDL_gfx.dll" "cdecl" add-library
"sdl-ttf" "SDL_ttf.dll" "cdecl" add-library
] when
] when
] unless
default-cli-args
parse-command-line

View File

@ -1,2 +1,2 @@
IN: kernel
: version "0.76" ;
: version "0.77" ;