factorbot fix, starting 0.77
parent
b60dbf0190
commit
cae545f930
|
@ -119,3 +119,6 @@ write1 ( char -- )</pre>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
15
Makefile
15
Makefile
|
@ -7,7 +7,16 @@ else
|
||||||
STRIP = strip
|
STRIP = strip
|
||||||
endif
|
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 \
|
UNIX_OBJS = native/unix/file.o \
|
||||||
native/unix/signal.o \
|
native/unix/signal.o \
|
||||||
|
@ -76,13 +85,13 @@ macosx:
|
||||||
linux:
|
linux:
|
||||||
$(MAKE) f \
|
$(MAKE) f \
|
||||||
CFLAGS="$(DEFAULT_CFLAGS) -export-dynamic" \
|
CFLAGS="$(DEFAULT_CFLAGS) -export-dynamic" \
|
||||||
LIBS="$(DEFAULT_LIBS) -ldl"
|
LIBS="-ldl $(DEFAULT_LIBS)"
|
||||||
$(STRIP) f
|
$(STRIP) f
|
||||||
|
|
||||||
linux-ppc:
|
linux-ppc:
|
||||||
$(MAKE) f \
|
$(MAKE) f \
|
||||||
CFLAGS="$(DEFAULT_CFLAGS) -export-dynamic -mregnames" \
|
CFLAGS="$(DEFAULT_CFLAGS) -export-dynamic -mregnames" \
|
||||||
LIBS="$(DEFAULT_LIBS) -ldl"
|
LIBS="-ldl $(DEFAULT_LIBS)"
|
||||||
$(STRIP) f
|
$(STRIP) f
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
|
|
|
@ -30,15 +30,15 @@ SYMBOL: receiver
|
||||||
"JOIN " irc-write irc-print ;
|
"JOIN " irc-write irc-print ;
|
||||||
|
|
||||||
GENERIC: handle-irc
|
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 -- )
|
M: string handle-irc ( line -- )
|
||||||
drop ;
|
drop ;
|
||||||
|
|
||||||
: parse-privmsg ( line -- text )
|
: parse-privmsg ( line -- text )
|
||||||
":" ?head drop
|
" " split1 nip
|
||||||
"!" split1 swap speaker set
|
"PRIVMSG " ?head drop
|
||||||
"PRIVMSG " split1 nip
|
|
||||||
" " split1 swap receiver set
|
" " split1 swap receiver set
|
||||||
":" ?head drop ;
|
":" ?head drop ;
|
||||||
|
|
||||||
|
@ -48,6 +48,9 @@ M: privmsg handle-irc ( line -- )
|
||||||
[ "factorbot-commands" ] search dup
|
[ "factorbot-commands" ] search dup
|
||||||
[ execute ] [ 2drop ] ifte ;
|
[ execute ] [ 2drop ] ifte ;
|
||||||
|
|
||||||
|
: parse-irc ( line -- )
|
||||||
|
":" ?head [ "!" split1 swap speaker set ] when handle-irc ;
|
||||||
|
|
||||||
: say ( line nick -- )
|
: say ( line nick -- )
|
||||||
"PRIVMSG " irc-write irc-write " :" irc-write irc-print ;
|
"PRIVMSG " irc-write irc-write " :" irc-write irc-print ;
|
||||||
|
|
||||||
|
@ -72,7 +75,7 @@ M: privmsg handle-irc ( line -- )
|
||||||
|
|
||||||
: irc-loop ( -- )
|
: irc-loop ( -- )
|
||||||
irc-stream get stream-readln
|
irc-stream get stream-readln
|
||||||
[ dup print flush handle-irc irc-loop ] when* ;
|
[ dup print flush parse-irc irc-loop ] when* ;
|
||||||
|
|
||||||
: factorbot
|
: factorbot
|
||||||
"irc.freenode.net" connect
|
"irc.freenode.net" connect
|
||||||
|
|
|
@ -6,23 +6,25 @@ parser sequences io unparser words ;
|
||||||
|
|
||||||
"Compiling base..." print
|
"Compiling base..." print
|
||||||
|
|
||||||
unix? [
|
"statically-linked" get [
|
||||||
"sdl" "libSDL.so" "cdecl" add-library
|
unix? [
|
||||||
"sdl-gfx" "libSDL_gfx.so" "cdecl" add-library
|
"sdl" "libSDL.so" "cdecl" add-library
|
||||||
"sdl-ttf" "libSDL_ttf.so" "cdecl" add-library
|
"sdl-gfx" "libSDL_gfx.so" "cdecl" add-library
|
||||||
] when
|
"sdl-ttf" "libSDL_ttf.so" "cdecl" add-library
|
||||||
|
] when
|
||||||
win32? [
|
|
||||||
"kernel32" "kernel32.dll" "stdcall" add-library
|
win32? [
|
||||||
"user32" "user32.dll" "stdcall" add-library
|
"kernel32" "kernel32.dll" "stdcall" add-library
|
||||||
"gdi32" "gdi32.dll" "stdcall" add-library
|
"user32" "user32.dll" "stdcall" add-library
|
||||||
"winsock" "ws2_32.dll" "stdcall" add-library
|
"gdi32" "gdi32.dll" "stdcall" add-library
|
||||||
"mswsock" "mswsock.dll" "stdcall" add-library
|
"winsock" "ws2_32.dll" "stdcall" add-library
|
||||||
"libc" "msvcrt.dll" "cdecl" add-library
|
"mswsock" "mswsock.dll" "stdcall" add-library
|
||||||
"sdl" "SDL.dll" "cdecl" add-library
|
"libc" "msvcrt.dll" "cdecl" add-library
|
||||||
"sdl-gfx" "SDL_gfx.dll" "cdecl" add-library
|
"sdl" "SDL.dll" "cdecl" add-library
|
||||||
"sdl-ttf" "SDL_ttf.dll" "cdecl" add-library
|
"sdl-gfx" "SDL_gfx.dll" "cdecl" add-library
|
||||||
] when
|
"sdl-ttf" "SDL_ttf.dll" "cdecl" add-library
|
||||||
|
] when
|
||||||
|
] unless
|
||||||
|
|
||||||
default-cli-args
|
default-cli-args
|
||||||
parse-command-line
|
parse-command-line
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
IN: kernel
|
IN: kernel
|
||||||
: version "0.76" ;
|
: version "0.77" ;
|
||||||
|
|
Loading…
Reference in New Issue