factorbot fix, starting 0.77
parent
b60dbf0190
commit
cae545f930
|
@ -119,3 +119,6 @@ write1 ( char -- )</pre>
|
|||
</ul>
|
||||
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
15
Makefile
15
Makefile
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -6,23 +6,25 @@ parser sequences io unparser words ;
|
|||
|
||||
"Compiling base..." print
|
||||
|
||||
unix? [
|
||||
"sdl" "libSDL.so" "cdecl" add-library
|
||||
"sdl-gfx" "libSDL_gfx.so" "cdecl" add-library
|
||||
"sdl-ttf" "libSDL_ttf.so" "cdecl" add-library
|
||||
] when
|
||||
|
||||
win32? [
|
||||
"kernel32" "kernel32.dll" "stdcall" add-library
|
||||
"user32" "user32.dll" "stdcall" add-library
|
||||
"gdi32" "gdi32.dll" "stdcall" add-library
|
||||
"winsock" "ws2_32.dll" "stdcall" add-library
|
||||
"mswsock" "mswsock.dll" "stdcall" add-library
|
||||
"libc" "msvcrt.dll" "cdecl" add-library
|
||||
"sdl" "SDL.dll" "cdecl" add-library
|
||||
"sdl-gfx" "SDL_gfx.dll" "cdecl" add-library
|
||||
"sdl-ttf" "SDL_ttf.dll" "cdecl" add-library
|
||||
] when
|
||||
"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
|
||||
|
||||
win32? [
|
||||
"kernel32" "kernel32.dll" "stdcall" add-library
|
||||
"user32" "user32.dll" "stdcall" add-library
|
||||
"gdi32" "gdi32.dll" "stdcall" add-library
|
||||
"winsock" "ws2_32.dll" "stdcall" add-library
|
||||
"mswsock" "mswsock.dll" "stdcall" add-library
|
||||
"libc" "msvcrt.dll" "cdecl" add-library
|
||||
"sdl" "SDL.dll" "cdecl" add-library
|
||||
"sdl-gfx" "SDL_gfx.dll" "cdecl" add-library
|
||||
"sdl-ttf" "SDL_ttf.dll" "cdecl" add-library
|
||||
] when
|
||||
] unless
|
||||
|
||||
default-cli-args
|
||||
parse-command-line
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
IN: kernel
|
||||
: version "0.76" ;
|
||||
: version "0.77" ;
|
||||
|
|
Loading…
Reference in New Issue