diff -urN oneko/Imakefile oneko-2.0b-sender0.5/Imakefile --- oneko/Imakefile Thu May 23 23:24:00 2002 +++ oneko-2.0b-sender0.5/Imakefile Thu May 23 23:29:57 2002 @@ -16,13 +16,15 @@ BMFILES != bitmaps/"*.xbm" TORA_BMFILES != bitmaps.tora/"*.xbm" #else - BMFILES = bitmaps/\*.xbm - TORA_BMFILES = bitmaps.tora/\*.xbm + BMFILES = bitmaps/*.xbm + TORA_BMFILES = bitmaps.tora/*.xbm #endif KOTATSUCURSOR = kotatsu.xbm kotatsu_mask.xbm POSTCURSOR = post.xbm post_mask.xbm + MARICURSOR = mari.xbm mari_mask.xbm + SENDERCURSOR = sender.xbm sender_mask.xbm MOUSECURSOR = cursor.xbm cursor_mask.xbm - CURSORFILES = $(KOTATSUCURSOR) $(POSTCURSOR) $(MOUSECURSOR) + CURSORFILES = $(KOTATSUCURSOR) $(POSTCURSOR) $(MARICURSOR) $(SENDERCURSOR) $(MOUSECURSOR) HELPFILE = help #if Internationalization diff -urN oneko/Imakefile.R4 oneko-2.0b-sender0.5/Imakefile.R4 --- oneko/Imakefile.R4 Tue Mar 17 23:08:50 1992 +++ oneko-2.0b-sender0.5/Imakefile.R4 Thu May 23 23:29:58 2002 @@ -1,14 +1,16 @@ # $Id: Imakefile.R4,v 1.16 1992/03/17 14:08:41 kato Exp kato $ ONEKOLIBDIR = $(LIBDIR)/oneko - BMFILES = bitmaps/\*.xbm + BMFILES = bitmaps/*.xbm BMDIR = $(ONEKOLIBDIR)/oneko - TORA_BMFILES = bitmaps.tora/\*.xbm + TORA_BMFILES = bitmaps.tora/*.xbm TORA_BMDIR = $(ONEKOLIBDIR)/tora KOTATSUCURSOR = kotatsu.xbm kotatsu_mask.xbm POSTCURSOR = post.xbm post_mask.xbm + MARICURSOR = mari.xbm mari_mask.xbm + SENDERCURSOR = sender.xbm sender_mask.xbm MOUSECURSOR = cursor.xbm cursor_mask.xbm - CURSORFILES = $(KOTATSUCURSOR) $(POSTCURSOR) $(MOUSECURSOR) + CURSORFILES = $(KOTATSUCURSOR) $(POSTCURSOR) $(MARICURSOR) $(SENDERCURSOR) $(MOUSECURSOR) HELPFILE = help LOCAL_LIBRARIES = $(XMULIB) $(XLIB) diff -urN oneko/Makefile oneko-2.0b-sender0.5/Makefile --- oneko/Makefile Thu May 23 23:24:00 2002 +++ oneko-2.0b-sender0.5/Makefile Thu May 23 23:34:41 2002 @@ -19,7 +19,7 @@ KNJCNV=nkf -e exec_prefix = /usr/X11R6 -LIBDIR= ${exec_prefix}/lib +LIBDIR= ${exec_prefix}/lib/X11 ONEKOLIBDIR= /usr/X11R6/lib/X11/oneko MAIL_SPOOL= /var/mail @@ -50,17 +50,19 @@ MANSUFFIX = 1 MANDIR = /usr/X11R6/man/man1 JMANDIR = /usr/X11R6/man/$(LANG)/man1 - XAPPLOADDIR = $(LIBDIR)/X11/app-defaults - XAPPJLOADDIR = $(LIBDIR)/X11/$(LANG)/app-defaults + XAPPLOADDIR = $(LIBDIR)/app-defaults + XAPPJLOADDIR = $(LIBDIR)/$(LANG)/app-defaults - BMFILES = bitmaps/\*.xbm + BMFILES = bitmaps/*.xbm BMDIR = $(ONEKOLIBDIR)/oneko - TORA_BMFILES = bitmaps.tora/\*.xbm + TORA_BMFILES = bitmaps.tora/*.xbm TORA_BMDIR = $(ONEKOLIBDIR)/tora KOTATSUCURSOR = kotatsu.xbm kotatsu_mask.xbm POSTCURSOR = post.xbm post_mask.xbm + MARICURSOR = mari.xbm mari_mask.xbm + SENDERCURSOR = sender.xbm sender_mask.xbm MOUSECURSOR = cursor.xbm cursor_mask.xbm - CURSORFILES = $(KOTATSUCURSOR) $(POSTCURSOR) $(MOUSECURSOR) + CURSORFILES = $(KOTATSUCURSOR) $(POSTCURSOR) $(MARICURSOR) $(SENDERCURSOR) $(MOUSECURSOR) HELPFILE = help APPRESOURCES = Oneko.ad Oneko-uj.ad MAN_EUC = oneko.man.euc diff -urN oneko/Makefile.in oneko-2.0b-sender0.5/Makefile.in --- oneko/Makefile.in Thu May 23 23:24:00 2002 +++ oneko-2.0b-sender0.5/Makefile.in Thu May 23 23:35:06 2002 @@ -18,7 +18,7 @@ KNJCNV=@KNJCNV@ exec_prefix = @exec_prefix@ -LIBDIR= @libdir@ +LIBDIR= @libdir@/X11 ONEKOLIBDIR= @prefix@/lib/X11/oneko MAIL_SPOOL= @mail_spool@ @@ -49,8 +49,8 @@ MANSUFFIX = 1 MANDIR = @mandir@/man1 JMANDIR = @mandir@/$(LANG)/man1 - XAPPLOADDIR = $(LIBDIR)/X11/app-defaults - XAPPJLOADDIR = $(LIBDIR)/X11/$(LANG)/app-defaults + XAPPLOADDIR = $(LIBDIR)/app-defaults + XAPPJLOADDIR = $(LIBDIR)/$(LANG)/app-defaults @bmfiles@ BMDIR = $(ONEKOLIBDIR)/oneko @@ -58,8 +58,10 @@ TORA_BMDIR = $(ONEKOLIBDIR)/tora KOTATSUCURSOR = kotatsu.xbm kotatsu_mask.xbm POSTCURSOR = post.xbm post_mask.xbm + MARICURSOR = mari.xbm mari_mask.xbm + SENDERCURSOR = sender.xbm sender_mask.xbm MOUSECURSOR = cursor.xbm cursor_mask.xbm - CURSORFILES = $(KOTATSUCURSOR) $(POSTCURSOR) $(MOUSECURSOR) + CURSORFILES = $(KOTATSUCURSOR) $(POSTCURSOR) $(MARICURSOR) $(SENDERCURSOR) $(MOUSECURSOR) HELPFILE = help APPRESOURCES = Oneko.ad Oneko-uj.ad MAN_EUC = @man_euc@ diff -urN oneko/Makefile.noimake oneko-2.0b-sender0.5/Makefile.noimake --- oneko/Makefile.noimake Thu May 23 23:24:01 2002 +++ oneko-2.0b-sender0.5/Makefile.noimake Thu May 23 23:29:58 2002 @@ -35,20 +35,22 @@ XAPPUJLOADDIR = $(LIBDIR)/ja_JP.EUC/app-defaults ONEKOLIBDIR = $(LIBDIR)/oneko - BMFILES = bitmaps/\*.xbm + BMFILES = bitmaps/*.xbm BMDIR = $(ONEKOLIBDIR)/oneko - TORA_BMFILES = bitmaps.tora/\*.xbm + TORA_BMFILES = bitmaps.tora/*.xbm TORA_BMDIR = $(ONEKOLIBDIR)/tora KOTATSUCURSOR = kotatsu.xbm kotatsu_mask.xbm POSTCURSOR = post.xbm post_mask.xbm + MARICURSOR = mari.xbm mari_mask.xbm + SENDERCURSOR = sender.xbm sender_mask.xbm MOUSECURSOR = cursor.xbm cursor_mask.xbm - CURSORFILES = $(KOTATSUCURSOR) $(POSTCURSOR) $(MOUSECURSOR) + CURSORFILES = $(KOTATSUCURSOR) $(POSTCURSOR) $(MARICURSOR) $(SENDERCURSOR) $(MOUSECURSOR) HELPFILE = help APPRESOURCES = Oneko.ad Oneko-uj.ad LOCAL_LIBRARIES = $(XMULIB) $(XLIB) $(XEXTLIB) SYS_LIBRARIES = -lm - DEFINES = -DPOP -DMAILACTION -DMAILNOTIFY -DSHAPE -DONEKODIR=\"$(ONEKOLIBDIR)\" -DLIBDIR=\"$(LIBDIR)\" -DHAVE_GETPWUID -DI18N -DSHOWHEADER -DMIME + DEFINES = -DPOP -DMAILACTION -DMAILNOTIFY -DSHAPE -DONEKODIR=\"$(ONEKOLIBDIR)\" -DLIBDIR=\"$(LIBDIR)\" -DHAVE_GETPWUID -DI18N -DSHOWHEADER -DMIME -DSENDER # DEFINES = -DONEKODIR=\"$(ONEKOLIBDIR)\" -DLIBDIR=\"$(LIBDIR)\" SRCS = oneko.c event.c init.c mail.c resource.c state.c action.c mdecode.c OBJS = oneko.o event.o init.o mail.o resource.o state.o action.c mdecode.o diff -urN oneko/README.sender oneko-2.0b-sender0.5/README.sender --- oneko/README.sender Thu Jan 1 09:00:00 1970 +++ oneko-2.0b-sender0.5/README.sender Fri May 24 01:56:24 2002 @@ -0,0 +1,417 @@ + oneko - Neko runs over the windows. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Version 2.0 beta-pop1.1-tip1.7-sender0.5 + + Mar 24th 2002 (sender-0.5) + Sender Window version by Hironori Sakamoto + +$B$O$8$a$K(B + + $B$3$l$O(B oneko 2.0 beta $B$KE~Ce%a!<%k$N:9$7=P$7?M%"%I%l%9$K1~$8$?(B + $B:9$7=P$7?M(B($BG-(B^^;)$B$N%&%#%s%I%&$d!V5E!W$rI=<($9$k$h$&$K$7$?2~B$HG$G$9!#(B + $B$5$i$K(B XPM ($B%+%i!<(B) $BBP1~$b$7$F$$$^$9(B(pixmap $B%U%!%$%k$O$^$"$"$j$^$;$s(B)$B!#(B + Nobuyuki Sasaki$B;a$N(B POP$BBP1~%Q%C%A(B oneko-2.0b-pop1.1.patch $B$H(B + Yoshishige Arai$B;a$N(B $B%j%9%HI=<(%&%#%s%I%&%Q%C%A(B oneko-2.0b-tip1.7.patch + $B$rEv$F$?8e$KEv$F$k%Q%C%A$N7A$K$J$C$F$$$^$9!#(B + + $B$3$N%I%-%e%a%s%H$K$O!"(Bsender$B%Q%C%A$K$FDI2C$5$l$?5!G=!"%j%=!<%9$7$+@bL@(B + $B$,$J$$$3$H$K8fCm0U2<$5$$!#%*%j%8%J%k$N5!G=$d%j%=!<%9$K4X$7$F$O!"$*l9g$G$b?7$7$$%a!<%k$,E~Ce$7$?;~$K$O:9$7=P$7?M(B($BG-(B)$B%&%#%s%I%&(B + $B$rI=<($7$=$A$i$XAv$k$h$&$K$7$^$7$?!#(B + o -mari $B%*%W%7%g%s$G!V5E!W$,8=$l$F%i%s%@%`$KD7$M$k$h$&$K$7$^$7$?!#G-$O(B + $B5E$rDI$$$+$1$^$9!#$3$?$D$H$N@ZBX$($,2DG=$G$9!#(B + o $B%U%k%+%i!$NJQ99E@(B + + o help, oneko.man, oneko.man.jp, configure $B$N99?7!#(B + +$B%Q%C%AIt0J30$N=$@5(B + + o -mail $B$H(B +mail $B%*%W%7%g%s$N0UL#$,H?BP$K$J$C$F$$$?$b$N$N=$@5!#(B + o $BM9JX%]%9%H$N(B geometry $B$,@_Dj$I$*$j$K$J$i$J$$$b$N$r=$@5$7!"%G%U%)%k%H$N(B + geometry $B$rD4@0!#(B + o MAILBOX_DIRECTORY $B$,(B '/' $B$G=*$i$J$$>l9g$K(B '/' $B$rDI2C$9$k$h$&$K$7$?!#(B + o $B:9$7=P$7?M$NL>A0$N:G8e$NJ8;z$,Mn$A$k>l9g$,$"$C$?$b$N$N=$@5!#(B + o strncasecmp() $B$NDj5A%_%9$N=$@5!#(B + +make $B$NJ}K!(B + + 1. $BI,MW$J$b$N(B + + o $B%*%j%8%J%k%=!<%9(B + oneko-2.0b.tar.gz + o Nobuyuki Sasaki$B;a$N(B POP$BBP1~%Q%C%A(B + oneko-2.0b-pop1.1-patch.tar.gz + o Yoshishige Arai$B;a$N%j%9%H%&%#%s%I%&I=<(%Q%C%A(B + oneko-2.0b-tip1.7.tar.gz + o $B$3$N%Q%C%A(B + oneko-2.0b-sender0.4.tar.gz + + 2. $B%=!<%9$NE83+$H(B patch + + % gzip -dc oneko-2.0b.tar.gz | tar -xvf - + oneko/ + : + % gzip -dc oneko-2.0b-pop1.1-patch.tar.gz | tar -xvf - + README.pop + oneko-2.0b-pop1.1.patch + oneko2.au + % gzip -dc oneko-2.0b-tip1.7.tar.gz | tar -xvf - + oneko/ + oneko/README.tip + oneko/oneko-2.0b-tip1.7.patch + oneko/configure + oneko/install.sh + % gzip -dc oneko-2.0b-sender0.4.tar.gz | tar -xvf - + README.sender + oneko-2.0b-sender0.4.patch + + % cd oneko + % patch -p1 < ../oneko-2.0b-pop1.1.patch + % patch -p1 < oneko-2.0b-tip1.7.patch + % patch -p1 < ../oneko-2.0b-sender0.4.patch + + 3. configure $B$H(B make + + README.tip $B$K>\$7$/@bL@$5$l$F$$$^$9$N$G$=$A$i$r8fMw$/$@$5$$!#(B + XPM $BBP1~$K$7$?$$>l9g$O!"(Bconfigure $B$N%*%W%7%g%s$K(B --with-xpm $B$r(B + $B$r;XDj$7$F$/$@$5$$(B($B%G%U%)%k%H$G$O(B XPM $BBP1~$7$^$;$s(B)$B!#(B + + 4. XPM $B%U%!%$%k(B + + $BFC$K(B XPM $B%U%!%$%k$OMQ0U$7$F$$$^$;$s$,!"F1Iu$N(B sh $B%9%/%j%W%H(B + mkpixmap.sh $B$r@\JT=8$7$F;XDj$9$k$3$H$,$G$-$^$9!#(B + + #define SENDER + $B:9$7=P$7?M(B($BG-(B)$B$N3HD%$rM-8z$K$9$k!#%G%U%)%k%H$O(B define$B!#(B + #define NSENERS 10 + $B;XDj$G$-$k%"%I%l%9$N:GBg?t$r;XDj$9$k!#%G%U%)%k%H$O(B 10$B!#(B + #define MARI + $B!V5E!W$N3HD%$rM-8z$K$9$k!#%G%U%)%k%H$O(B define$B!#(B + #define XPM + XPM $BBP1~$rM-8z$K$9$k!#%G%U%)%k%H$O(B undef$B!#(B + #define NO_TOYCURSOR + Toy(Kotatsu,Post,Sender)$B$N0\F0;~$K%+!<%=%k$r;H$o$:(B Motion $B$G=hM}$9$k(B + $BMM$K$7$^$9!#%G%U%)%k%H$G$O(B undef$B!#(BXPM $B$,(B define $B$5$l$?>l9g$O(B define + $B$5$l$k!#(B + + $B0J2<$N%9%$%C%A$O!"(BMakefile $B$rD>@\JT=8$7$F;XDj$9$k$3$H$,$G$-$^$9!#(B + + -DNSENDERS=$B%"%I%l%9?t(B + $B;XDj$G$-$k%"%I%l%9$N:GBg?t$r;XDj$9$k!#%G%U%)%k%H$O(B 10 $B$G!"(B + sender1.address $B!A(B sender10.address $B$^$G;XDj$G$-$^$9!#(B + +$B%j%=!<%9$H%*%W%7%g%s(B + + $BDI2C$5$l$?%j%=!<%9(B($B%/%i%9(B) $BBP1~$9$k%*%W%7%g%s(B + + Oneko.tip.newtext (Tip.NewText) -newtext + $B?7$7$$%a!<%k$,E~Ce$7$?;~$K(B Tip $B%&%#%s%I%&$KI=<($9$kJ8;zNs!#(B + $B$=$NCf$K(B ASCII$B%-%c%i%/%?$G!"(B%d $B$r0l$DF~$l$k$H!"$=$l$,?7$7$$%a!<%k(B + $B$N?t$KCV$-49$o$k!#%G%U%)%k%H$O(B "$B?7$7$$%a!<%k$,(B %d $BDLFO$$$F$$$^$9(B"$B!#(B + + Oneko.tip.newtext1 (Tip.NewText1) -newtext1 + tip.newtext $B$HF1MM$N(B L10N $B$KBP1~$9$k%j%=!<%9(B + $B%G%U%)%k%H$O(B "$B?7$7$$%a!<%k$,(B"$B!#(B + + Oneko.tip.newtext2 (Tip.NewText2) -newtext2 + tip.newtext $B$HF1MM$N(B L10N $B$KBP1~$9$k%j%=!<%9(B + $B%G%U%)%k%H$O(B "$BDLFO$$$F$$$^$9(B"$B!#(B + + Oneko.sender.bitmap (Sender.Bitmap) -sbm, -senderbitmap + $B:9$7=P$7?M(B($BG-(B)$B$rI=<($9$k$?$a$N%S%C%H%^%C%W%U%!%$%kL>$r;XDj$7$^$9!#(B + $B%G%U%)%k%H$G$O(B /usr/lib/X11/oneko/sender.xbm $B$rFI$_9~$_$^$9!#(B + + Oneko.sender.bitmask (Sender.Bitmask) -sbmsk, -senderbitmask + $B:9$7=P$7?M(B($BG-(B)$B$rI=<($9$k$?$a$N%S%C%H%^%C%W%U%!%$%kL>$r;XDj$7$^$9!#(B + $B%G%U%)%k%H$G$O(B /usr/lib/X11/oneko/sender_mask.xbm $B$rFI$_9~$_$^$9!#(B + + Oneko.sender.background (Sender.Background) -sbg, -senderbackground + $B:9$7=P$7?M(B($BG-(B)$B$NGX7J?'$r;XDj$7$^$9!#(B + + Oneko.sender.foreground (Sender.Foreground) -sfg, -senderforeground + $B:9$7=P$7?M(B($BG-(B)$B$NA07J?'$r;XDj$7$^$9!#(B + + Oneko.sender.action (Sender.Action) -sender <-> +sender + $B:9$7=P$7?M(B($BG-(B)$B$rI=<($7$^$9!#(B + + Oneko.sender.multir (Sender.Multi) -multisender <-> +multisender + $BJ#?t$N:9$7=P$7?M(B($BG-(B)$B$rI=<($7$^$9!#(B + + Oneko.sender.geometry (Sender.Geometry) -sgeom, -sendergeometry + $B:9$7=P$7?M(B($BG-(B)$B$rI=<($9$k0LCV$r;XDj$7$^$9!#(B + + Oneko.sender.direction (Sender.Direction) -direction + $BJ#?t$N:9$7=P$7?M(B($BG-(B)$B$rJB$Y$FI=<($9$kJ}8~$r;XDj$7$^$9!#(B + left, right, up, down $B$+$iA*Br2DG=$G$9!#%G%U%)%k%H$O(B right$B!#(B + sender?.geometry $B%j%=!<%9$,;XDj$5$l$F$$$k>l9g$O$=$A$i$,M%@h$5$l$^$9!#(B + + $B0J2<$N%j%=!<%9$r;XDj$9$k$3$H$G%a!<%k$N:9$7=P$7?M$N%"%I%l%9$KBP1~$7$?(B + $B:9$7=P$7?M(B($BG-(B)$B$rI=<($9$k$3$H$,$G$-$^$9!#(B + + Oneko.sender1.address (Sender1.Address) + $B:9$7=P$7?M(B($BG-(B)$B$N%"%I%l%9$r;XDj$7$^$9!#(B`*' $B$r%o%$%k%I%+!<%I$H$7$F(B + $B;HMQ2DG=$G$"$j!"6uGr(B(` ', TAB, $B2~9T(B)$B$d(B `,' $B$G6h@Z$C$FJ#?t$N%"%I%l%9(B + $B$r;XDj2DG=$G$9!#(B "Hironori Sakamoto " $B$J$I(B + $B$KBP1~$9$k$?$aItJ,0lCW$b5v$5$l$^$9!#(B + $B%"%I%l%9$H$7$F@.$jN)$?$J$$$h$&$J$$$+$J$kJ8;zNs$G$b$+$^$$$^$;$s!#(B + Oneko.sender2.address $B!A(B Oneko.sender10.address $B$^$G$bF1MM$K(B + $B;XDj2DG=$G$9!#(B + $BNc(B) + ! "hsaka@mth.biglobe.ne.jp" $B$r4^$`%"%I%l%9(B + Oneko.sender1.address: hsaka@mth.biglobe.ne.jp + ! "hsaka@" $B$H(B ".jp" $B$r4^$`%"%I%l%9(B + Oneko.sender2.address: hsaka@*.jp + ! "hsaka" $B$^$?$O(B "h-saka" $B$r4^$`%"%I%l%9(B + Oneko.sender3.address: hsaka, h-saka + + $B?7$7$$%a!<%k$N%"%I%l%9$,(B Oneko.sender1.address $B!A(B + Oneko.sender10.address $B$^$G=g$K0lCW$9$k$+$I$&$+;n$5$l$^$9!#(B + $B0lCW$7$?;~E@$G$=$N(B sneder? $B$KBP1~$9$k:9$7=P$7?M(B($BG-(B)$B$,I=<($5$l$^$9!#(B + $B$I$l$K$b0lCW$7$J$$>l9g$O(B sender $B$,;HMQ$5$l$^$9!#(B + .multisender $B%j%=!<%9$,(B false $B$N>l9g$O!"@hCe$N%a!<%k$+$i0lCW$9$k(B + $B$+$I$&$+;n$5$l0lCW$7$?;~E@$G$=$N(B sneder? $B$N$_I=<($5$l$^$9!#(B + + $BCm0U(B) + * $B%"%I%l%9$O(B sender?.address $B$K0lCW$7$?;~E@$G!"Nc$(40A4$K0lCW$9$k(B + $B$b$N$,8e$K$"$k$H$7$F$b!":G=i$N$b$N$,;HMQ$5$l$^$9!#=>$C$F%o%$%k%I(B + $B%+!<%I(B`*'$B$N;HMQ$OCm0U$7$F$/$@$5$$!#(B + * $BF1$8(B sender? $B$K0lCW$9$kJ#?t$N%a!<%k$,$"$C$F$bBP1~$9$k:9$7=P$7?M(B + ($BG-(B)$B$O0l$D$7$+I=<($5$l$^$;$s!#(B + * $B6u$NJ8;zNs$d(B `*' $B$@$1$+$i$J$kJ8;zNs$OA4$F$K0lCW$7$^$;$s!#(B + + Oneko.sender1.headerkey (Sender1.Headerkey) + $B:9$7=P$7?M(B($BG-(B)$B$N%"%I%l%9$rF@$k$?$a%a!<%k%X%C%@$N%-!<%o!<%I(B(From $B$d(B + Reply-To $B$J$I(B)$B$r;XDj$7$^$9!#BgJ8;z$H>.J8;z$O0c$$$OL5;k$5$l$^$9!#(B + $B%G%U%)%k%H$O!"(BFrom $B$G$9$,!"%a!<%j%s%0%j%9%H$J$I$KBP1~$9$k$?$a$K$O(B + Reply-To $B$d(B Subject $B$J$I$r;XDj$7$?J}$,$h$$$+$b$7$l$^$;$s!#(B + Oneko.sender2.headerkey $B!A(B Oneko.sender10.headerkey $B$^$G$bF1MM$K(B + $B;XDj2DG=$G$9!#(B + + Oneko.sender1.bitmap (Sender1.Bitmap) + Oneko.sender1.address $B$G%"%I%l%9;XDj$7$?:9$7=P$7?M(B($BG-(B)$B$rI=<($9$k(B + $B$?$a$N%S%C%H%^%C%W%U%!%$%kL>$r;XDj$7$^$9!#%G%U%)%k%H$G$O(B + Oneko.sender.bitmap $B$G;XDj$7$?$b$N$H$J$j$^$9!#(B + Oneko.sender2.bitmap $B!A(B Oneko.sender10.bitmap $B$^$G$bF1MM$K;XDj2DG=(B + $B$G$9!#$^$?!"(BOneko.sender1.bitmask, Oneko.sender1.background, + Oneko.sender1.foreground, Oneko.sender1.geometry, + $B!A(B Oneko.sender10.bitmask, Oneko.sender10.background, + Oneko.sender10.foreground, Oneko.sender10.geometry, $B$bF1MM$K;XDj(B + $B2DG=$G$9!#(B + + $B0J2<$N%j%=!<%9$O!V5E!W$N$?$a$N$b$N$G$9!#(B + + Oneko.mari.action (Mari.Action) -mari <-> +mari + $B5E$,I=<($5$l%i%s%@%`$KD7$M$kMM$K$J$j$^$9!#(B + + Oneko.mari.bitmap (Mari.Bitmap) -mabm, -maribitmap + $B5E$rI=<($9$k$?$a$N%S%C%H%^%C%W%U%!%$%kL>$r;XDj$7$^$9!#%G%U%)%k%H$G(B + $B$O(B /usr/lib/X11/oneko/sender.xbm $B$rFI$_9~$_$^$9!#(B + + Oneko.mari.bitmask (Mari.Bitmask) -mabmsk, -maribitmask + $B5E$rI=<($9$k$?$a$N%S%C%H%^%C%W%U%!%$%kL>$r;XDj$7$^$9!#%G%U%)%k%H$G(B + $B$O(B /usr/lib/X11/oneko/sender_mask.xbm $B$rFI$_9~$_$^$9!#(B + + Oneko.mari.background (Mari.Background) -mabg, -maribackground + $B5E$NGX7J?'$r;XDj$7$^$9!#(B + + Oneko.mari.foreground (Mari.Foreground) -mafg, -mariforeground + $B5E$NA07J?'$r;XDj$7$^$9!#(B + + Oneko.mari.speed (Mari.Speed) -marispeed + $B5E$NB.$5$N:GBgCM$r;XDj$7$^$9!#(B-time $B%*%W%7%g%s$G;XDj$7$?;~4VFb$K(B + $B0\F02DG=$J%T%/%;%kCM$G$9!#%G%U%)%k%H$O(B 24 $B$G$9!#(B + + Oneko.mari.next (Mari.Next) -marinext + $B5E$,Dd;_$7$?8e!"(B-time $B%*%W%7%g%s$G;XDj$7$?;~4VFb$K5E$,D7$M$k3NN((B + $B$G$9!#%G%U%)%k%H$O(B 0.2 (%)$B$G$9!#(B + + Oneko.mari.acceration (Mari.Acceration) -mariaccel + $B5E$,%^%&%9$KEv$?$C$?;~$K2?(B % $B$^$GA}B.$9$k$+$r;XDj$7$^$9!#(B0 $B!A(B 200 % + $B$^$G;XDj2DG=$G$9!#%G%U%)%k%H$O(B 120 (%)$B$G$9!#(B + + Oneko.mari.deceration (Mari.Deceration) -maridecel + $B5E$,DlLL$GH? +kotatsu + $B:G=i$+$i!"$3$?$D$rI=<($7$^$9!#(B + + Oneko.kotatsu.geometry (Kotatsu.Geometry) -kgeom, -kotatsugeometry + $B$3$?$D$rI=<($9$k0LCV$r;XDj$7$^$9!#(B + + $B0J2<$N%j%=!<%9$O(B XPM $BBP1~;~$K$N$_;XDj2DG=$G$9!#(B + + Oneko.pixmapdir(Pixmapdir) -pixmapdir + $B%"%K%a!<%7%g%s$N$?$a$N(B XPM $B%U%!%$%k$,$"$k%G%#%l%/%H%j$r;XDj$7$^$9!#(B + $B$3$N%j%=!<%9$^$?$O%*%W%7%g%s$,;XDj$5$l$k$H!"(B.bitmapdir$B!"A07J?'(B + (.foreground)$B!"GX7J?'(B(.background)$B$OL5;k$5$l$^$9!#%G%U%)%k%H$G$O(B + $B%S%C%H%^%C%W%U%!%$%k$r;HMQ$7$^$9!#(B + + Oneko.kotatsu.pixmap(Kotatsu.pixmap) -kpm, -kotatsupixmap + $B$3$?$D$rI=<($9$k$?$a$N(B XPM $B%U%!%$%k$r;XDj$7$^$9!#(B + $B$3$N%j%=!<%9$^$?$O%*%W%7%g%s$,;XDj$5$l$k$H!"(B.kotatsu.bitmap$B!"(B + .kotatsu.bitmask$B!"A07J?'!"GX7J?'$OL5;k$5$l$^$9!#%G%U%)%k%H$G$O(B + $B%S%C%H%^%C%W%U%!%$%k$r;HMQ$7$^$9!#(B + + Oneko.post.pixmap(Post.pixmap) -ppm, -postpixmap + $BM9JX%]%9%H$rI=<($9$k$?$a$N(B XPM $B%U%!%$%k$r;XDj$7$^$9!#(B + $B$3$N%j%=!<%9$^$?$O%*%W%7%g%s$,;XDj$5$l$k$H!"(B.post.bitmap$B!"(B + .post.bitmask$B!"A07J?'!"GX7J?'$OL5;k$5$l$^$9!#%G%U%)%k%H$G$O(B + $B%S%C%H%^%C%W%U%!%$%k$r;HMQ$7$^$9!#(B + + Oneko.mari.pixmap(Post.pixmap) -mapm, -maripixmap + $B5E$rI=<($9$k$?$a$N(B XPM $B%U%!%$%k$r;XDj$7$^$9!#(B + $B$3$N%j%=!<%9$^$?$O%*%W%7%g%s$,;XDj$5$l$k$H!"(B.mari.bitmap$B!"(B + .mari.bitmask$B!"A07J?'!"GX7J?'$OL5;k$5$l$^$9!#%G%U%)%k%H$G$O(B + $B%S%C%H%^%C%W%U%!%$%k$r;HMQ$7$^$9!#(B + + Oneko.sender.pixmap(Sender.pixmap) -spm, -senderpixmap + $B:9$7=P$7?M(B($BG-(B)$B$rI=<($9$k$?$a$N(B XPM $B%U%!%$%k$r;XDj$7$^$9!#(B + $B$3$N%j%=!<%9$^$?$O%*%W%7%g%s$,;XDj$5$l$k$H!"(B.sender.bitmap$B!"(B + .sender.bitmask$B!"A07J?'!"GX7J?'$OL5;k$5$l$^$9!#%G%U%)%k%H$G$O(B + $B%S%C%H%^%C%W%U%!%$%k$r;HMQ$7$^$9!#(B + Oneko.sender1.pixmap $B!A(B Oneko.sender10.pixmap $B$bF1MM$K;XDj2DG=(B + $B$G$9!#(B + +$BF0:n3NG'(B + + $B$3$N%Q%C%A$r$"$F$?(B oneko $B$re(B) + $B$,I,MW$G$9!#$^$?!"(BXPM $BBP1~$K$9$k$K$O(B XPM $B%i%$%V%i%j$,I,MW$G$9!#(B + $B8=:_0J2<$N4D6-$GF0:n3NG'$,$NJQ99!#(B + nosender -> sender.actoin + multisender -> sender.multi + gravity -> mari.gravity + + Oneko version 2.0beta Patchlevel 6 + pop-1.1.1 + tip-1.7 + sender-0.4 + (1999 Apr 12) + $B!&$3$?$D$H!V5E!W$,F1;~$K=P$F$7$^$&%P%0$N=$@5!#(B + + (1999 Apr 03) + $B!&!V5E!W$NItJ,$N$7!#(B + + (1999 Mar 25) + Oneko version 2.0beta Patchlevel 6 + pop-1.1.1 + tip-1.7 + sender-0.4a + $B!&!V5E!W$rDI2C!#(B + ($B$=$m$=$m%Q%C%A$NL>A0$rBX$($J$$$H$$$1$J$$$h$&$J5$$,!D(B) + + (1999 Mar 22) + Oneko version 2.0beta Patchlevel 6 + pop-1.1.1 + tip-1.7 + sender-0.3 + $B!&(BXPM $B$N;n83E*%5%]!<%H(B($B%G%U%)%k%H$G$O(B off)$B!#(B + $B%^%K%e%"%k!"(Bhelp $B$N99?7$O0BDj2=$7(B XPM $B%U%!%$%k$,B7$C$F$+$i9T$&M=Dj!#(B + $B%S%C%H%^%C%W%U%!%$%k$r(B XPM $B%U%!%$%k$KJQ49$9$k$?$a$N(B perl $B%9%/%j%W%H(B + xbm2xpm.pl $B$H(B sh $B%9%/%j%W%H(B mkpixmap.sh $B$rMQ0U!#(B + $B!&(BToy(Kotatsu,Post,Sender)$B$N0\F0;~$K%+!<%=%k$r;H$o$:(B Motion $B$G=hM}$9$k(B + $B$3$H$b2DG=$K$7$?(B($B%G%U%)%k%H$G$O(B off)$B!#(BXPM $BBP1~$N$?$a$H!"Bg$-$J%+!<%=(B + $B%k$,;H$($J$$%7%9%F%`$N$?$a!"$^$?(B Post $B$d(B Sender $B$N0\F0;~$KG-$,$=$l$i(B + $B$rL5;k$7$F$7$^$&LdBj$KBP1~$9$k$?$a!#(B + + (1999 Mar 20) + $B!&J#?t$N:9$7=P$7?M(B($BG-(B)$B$rJB$Y$FI=<($9$kJ}8~$r;XDj2DG=$K$7$?(B(-direction + $B%*%W%7%g%sDI2C(B)$B!#(B + $B!&(BFrom $B0J30$N%a!<%k%X%C%@$+$i:9$7=P$7?M$N%"%I%l%9$rF@$i$l$kMM$K$7$?!#(B + (.sender?.headerkey $B%j%=!<%9DI2C(B)$B!#(B + $B!&$=$NB>!"$$$/$D$+$N%P%0=$@5!#(B + + (1999 Mar 18) + $B!&J#?t$N:9$7=P$7?M(B($BG-(B)$B$rI=<(2DG=$K$7$?(B(-multisender $B%*%W%7%g%sDI2C(B)$B!#(B + $B!&(B-nosender $B%*%W%7%g%sDI2C(B($B:9$7=P$7?M(B($BG-(B)$B$NI=<($r(B off)$B!#(B + $B!&(BL10N $BMQ(B .newtext1, .newtext2 $B%j%=!<%9DI2C!#(B + $B!&%"%I%l%9H=DjIt$N%3!<%I$NBgI}$JJQ99!#(B + $B!&$=$NB>!"B?$/$N%P%0=$@5!#(B + + (1999 Mar 15) + Oneko version 2.0beta Patchlevel 6 + pop-1.1.1 + tip-1.7 + sender-0.2 + $B!&(BFrom: $B%X%C%@$NA4It$NJ8;zNs$r%"%I%l%9$H$7$F07$&MM$K$7$?!#(B + (README.sender $B$K$O$=$&=q$$$F$"$C$?$N$K%P%0$G$=$&$J$C$F$J$+$C$?!#(B) + $B!&%^%/%m(B SENDER $B$G%Q%C%AItJ,$rJ,N%$7$?(B($BK\BN$N=$@5$O=|$/(B)$B!#%^%/%m(B SENDER + $B$r(B define $B$9$k$H(B $B%^%/%m(B MAILNOTIFY, SHOWHEADER $B$b(B define $B$5$l$k!#(B + $B!&(BNSENDERS $B$r;XDj$G$-$k%"%I%l%9?t$=$N$b$N$H$7$?!#(B + $B!&(Bstrsep() $B4X?t$r$d$a$F(B strtok() $B4X?t$r;H$&MM$K$7$?!#(B + $B!&$=$NB>!"B?$/$N%P%0=$@5!#(B + + (1999 Mar 14) + Oneko version 2.0beta Patchlevel 6 + pop-1.1.1 + tip-1.7 + sender-0.1 + $B!&=iHG(B + + +$BHG8"$K$D$$$F(B + + $B$3$N%Q%C%A$O!"<+M3$K2~B$!":FG[I[$7$F2<$5$C$F7k9=$G$9!#$=$N:]$K$O!";d!"(B + $B:dK\9@B'(B $B$^$GO"Mm$r$$$?$@$1$k$H9,$$$G$9!#(B + $BF0:nJs9p!"%P%0%l%]!<%HEy$b!"$b$A$m$s4?7^CW$7$^$9!#(B + $B$?$@$7!":n5CN$*$-$/$@$5$$!#(B + +$BDI5-(B($B;d$H(Boneko) + + oneko $B$r0lL\8+$?;~$+$i%U%!%s$G$7$?!#(BC $B$d(B X11 $B$rJY6/$7;O$a$?$N$b(B oneko $B$,(B + $B$-$C$+$1$G$9!#(Boneko $B$K(B biff $B5!G=$,$"$l$P$$$$$J$!$H;W$C$F$$$?$H$3$m$b$&=P(B + $BMh$F$$$^$7$?!#$7$+$b(B POP$BBP1~!"(BMIME$B%G%3!<%I$5$l$?%X%C%@I=<(5!G=$b$"$k$G$O(B + $B$"$j$^$;$s$+!#8e$O:9$7=P$7?M$K$h$C$FF0:n$,JQ$o$l$P$$$$$J$!$H;W$C$F:n$C$?(B + $B$N$,$3$N%Q%C%A$G$9!#$^$@!"%S%C%H%^%C%W$rJQ99$9$k$@$1$J$N$G$9$,!#<+J,@lMQ(B + $B$N%S%C%H%^%C%W$r:n@.$9$k$J$I$7$F3'MM$K$b3Z$7$s$G$$$?$@$1$l$P9,$$$G$9!#(B + +$B $B$K$O5.=E$J%"%I%P%$%9$r$$$?$@$-$^$7$?!#(B + $B46 + http://www2u.biglobe.ne.jp/~hsaka/ + diff -urN oneko/action.c oneko-2.0b-sender0.5/action.c --- oneko/action.c Thu May 23 23:24:01 2002 +++ oneko-2.0b-sender0.5/action.c Thu May 23 23:29:58 2002 @@ -13,7 +13,9 @@ #include #include #include - +#if HAVE_UNISTD_H +#include +#endif /* HAVE_UNISTD_H */ char *MailActionCmd = NULL; diff -urN oneko/config.h oneko-2.0b-sender0.5/config.h --- oneko/config.h Thu May 23 23:24:01 2002 +++ oneko-2.0b-sender0.5/config.h Thu May 23 23:29:58 2002 @@ -36,6 +36,20 @@ the middle button of a mouse */ #define SHOWHEADER +/* Make sender windows enable on new mail arrival */ +#define SENDER + +#ifdef SENDER +#define MAILNOTIFY +#define SHOWHEADER +#ifndef NSENDERS +#define NSENDERS 10 +#endif +#endif + +/* Make Mari action enable instead of Kotatsu */ +#define MARI + /* ........ END OF USER CONFIGRATION ........ */ @@ -43,6 +57,14 @@ #define SHAPE 1 /* #undef NO_SHADOW */ +/* Enable XPM support */ +/* #undef XPM */ +/* #undef NO_TOYCURSOR */ + +#ifdef XPM +#define NO_TOYCURSOR +#endif + /* Make all functions available on AIX. See AC_AIX. */ /* #undef _ALL_SOURCE */ @@ -74,6 +96,9 @@ #define HAVE_GETPWUID 1 /* #undef HAVE_CUSERID */ #define HAVE_STRNCASECMP 1 +#define HAVE_DRAND48 1 +/* #undef HAVE_RANDROM */ +/* #undef HAVE_RAND */ #define HAVE_SYS_RESOURCE_H 1 #define HAVE_SETPRIORITY 1 diff -urN oneko/config.h.in oneko-2.0b-sender0.5/config.h.in --- oneko/config.h.in Thu May 23 23:24:01 2002 +++ oneko-2.0b-sender0.5/config.h.in Thu May 23 23:46:49 2002 @@ -35,6 +35,20 @@ the middle button of a mouse */ #define SHOWHEADER +/* Make sender windows enable on new mail arrival */ +#define SENDER + +#ifdef SENDER +#define MAILNOTIFY +#define SHOWHEADER +#ifndef NSENDERS +#define NSENDERS 10 +#endif +#endif + +/* Make Mari action enable instead of Kotatsu */ +#define MARI + /* ........ END OF USER CONFIGRATION ........ */ @@ -42,6 +56,14 @@ #undef SHAPE #undef NO_SHADOW +/* Enable XPM support */ +#undef XPM +#undef NO_TOYCURSOR + +#ifdef XPM +#define NO_TOYCURSOR +#endif + /* Make all functions available on AIX. See AC_AIX. */ #undef _ALL_SOURCE @@ -73,6 +95,9 @@ #undef HAVE_GETPWUID #undef HAVE_CUSERID #undef HAVE_STRNCASECMP +#undef HAVE_DRAND48 +#undef HAVE_RANDOM +#undef HAVE_RAND #undef HAVE_SYS_RESOURCE_H #undef HAVE_SETPRIORITY diff -urN oneko/configure oneko-2.0b-sender0.5/configure --- oneko/configure Thu May 28 02:00:37 1998 +++ oneko-2.0b-sender0.5/configure Thu May 23 23:35:56 2002 @@ -31,6 +31,8 @@ ac_help="$ac_help --with-shape enable shape extension forcedly" ac_help="$ac_help + --with-xpm enable XPM support [default=no]" +ac_help="$ac_help --with-mail-spool=DIR mail spool directory is DIR" ac_help="$ac_help --with-lang=TYPE Use TYPE language feature (i18n, l10n, no) [i18n]" @@ -546,7 +548,7 @@ -CFLAGS=-O +CFLAGS=${CFLAGS-'-O'} # Check whether --with-gnu-make or --without-gnu-make was given. if test "${with_gnu_make+set}" = set; then @@ -583,6 +585,12 @@ : fi +# Check whether --with-xpm or --without-xpm was given. +if test "${with_xpm+set}" = set; then + withval="$with_xpm" + : +fi + # Check whether --with-mail_spool or --without-mail_spool was given. if test "${with_mail_spool+set}" = set; then withval="$with_mail_spool" @@ -598,7 +606,7 @@ # Extract the first word of "uname -a", so it can be a program name with args. set dummy uname -a; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:602: checking for $ac_word" >&5 +echo "configure:610: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_UNAME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -628,7 +636,7 @@ # Extract the first word of "uname", so it can be a program name with args. set dummy uname; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:632: checking for $ac_word" >&5 +echo "configure:640: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_UNAME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -659,7 +667,7 @@ if test "$UNAME" != ""; then uname=`$UNAME` echo $ac_n "checking 'checking cached value of \$uname'""... $ac_c" 1>&6 -echo "configure:663: checking 'checking cached value of \$uname'" >&5 +echo "configure:671: checking 'checking cached value of \$uname'" >&5 if eval "test \"`echo '$''{'ac_cv_prog_uname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -683,7 +691,7 @@ # Extract the first word of "makedepend", so it can be a program name with args. set dummy makedepend; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:687: checking for $ac_word" >&5 +echo "configure:695: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKEDEPEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -712,7 +720,7 @@ # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:716: checking for $ac_word" >&5 +echo "configure:724: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -741,7 +749,7 @@ # Extract the first word of "ctags", so it can be a program name with args. set dummy ctags; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:745: checking for $ac_word" >&5 +echo "configure:753: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_TAG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -770,7 +778,7 @@ # Extract the first word of "mkdirhier", so it can be a program name with args. set dummy mkdirhier; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:774: checking for $ac_word" >&5 +echo "configure:782: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MKDIRHIER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -786,7 +794,7 @@ fi done IFS="$ac_save_ifs" - test -z "$ac_cv_prog_MKDIRHIER" && ac_cv_prog_MKDIRHIER="make -p" + test -z "$ac_cv_prog_MKDIRHIER" && ac_cv_prog_MKDIRHIER="mkdir -p" fi fi MKDIRHIER="$ac_cv_prog_MKDIRHIER" @@ -797,7 +805,7 @@ fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:801: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:809: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -855,7 +863,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:859: checking for a BSD compatible install" >&5 +echo "configure:867: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -905,7 +913,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:909: checking whether ln -s works" >&5 +echo "configure:917: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -931,7 +939,7 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:935: checking for $ac_word" >&5 +echo "configure:943: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -960,7 +968,7 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:964: checking for $ac_word" >&5 +echo "configure:972: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1008,7 +1016,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1012: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1020: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1018,11 +1026,11 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1042,12 +1050,12 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1046: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1054: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1051: checking whether we are using GNU C" >&5 +echo "configure:1059: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1056,7 +1064,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1071,7 +1079,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1075: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1083: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1103,7 +1111,7 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1107: checking for $ac_word" >&5 +echo "configure:1115: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1132,7 +1140,7 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1136: checking for $ac_word" >&5 +echo "configure:1144: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1180,7 +1188,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1184: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1192: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1190,11 +1198,11 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1214,12 +1222,12 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1218: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1226: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1223: checking whether we are using GNU C" >&5 +echo "configure:1231: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1228,7 +1236,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1243,7 +1251,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1247: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1255: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1275,7 +1283,7 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1279: checking for $ac_word" >&5 +echo "configure:1287: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1304,7 +1312,7 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1308: checking for $ac_word" >&5 +echo "configure:1316: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1352,7 +1360,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1356: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1364: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1362,11 +1370,11 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1386,12 +1394,12 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1390: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1398: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1395: checking whether we are using GNU C" >&5 +echo "configure:1403: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1400,7 +1408,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1415,7 +1423,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1419: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1427: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1472,7 +1480,7 @@ test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1476: checking how to run the C preprocessor" >&5 +echo "configure:1484: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1487,13 +1495,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1504,13 +1512,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1534,21 +1542,21 @@ -for ac_hdr in sys/timeb.h sys/time.h sys/param.h unistd.h times.h +for ac_hdr in sys/timeb.h sys/time.h sys/times.h sys/param.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1542: checking for $ac_hdr" >&5 +echo "configure:1550: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1578,17 +1586,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1582: checking for $ac_hdr" >&5 +echo "configure:1590: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1615,12 +1623,12 @@ done echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1619: checking for ANSI C header files" >&5 +echo "configure:1627: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1628,7 +1636,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1645,7 +1653,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1663,7 +1671,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1684,7 +1692,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1695,7 +1703,7 @@ exit (0); } EOF -if { (eval echo configure:1699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -1719,12 +1727,12 @@ fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1723: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1731: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1733,7 +1741,7 @@ struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1756,9 +1764,9 @@ echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:1760: checking for AIX" >&5 +echo "configure:1768: checking for AIX" >&5 cat > conftest.$ac_ext <&6 -echo "configure:1787: checking for connect" >&5 +echo "configure:1795: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -1833,7 +1841,7 @@ if test "$oneko_checkSocket" = 1; then echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:1837: checking for main in -lsocket" >&5 +echo "configure:1845: checking for main in -lsocket" >&5 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1841,14 +1849,14 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1874,12 +1882,12 @@ oneko_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" echo $ac_n "checking for accept""... $ac_c" 1>&6 -echo "configure:1878: checking for accept" >&5 +echo "configure:1886: checking for accept" >&5 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_accept=yes" else @@ -1924,7 +1932,7 @@ fi echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:1928: checking for main in -lXbsd" >&5 +echo "configure:1936: checking for main in -lXbsd" >&5 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1932,14 +1940,14 @@ ac_save_LIBS="$LIBS" LIBS="-lXbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1960,7 +1968,7 @@ fi echo $ac_n "checking for setlocale in -lxpg4""... $ac_c" 1>&6 -echo "configure:1964: checking for setlocale in -lxpg4" >&5 +echo "configure:1972: checking for setlocale in -lxpg4" >&5 ac_lib_var=`echo xpg4'_'setlocale | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1968,7 +1976,7 @@ ac_save_LIBS="$LIBS" LIBS="-lxpg4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2000,7 +2008,7 @@ fi echo $ac_n "checking for setpriority in -lucb""... $ac_c" 1>&6 -echo "configure:2004: checking for setpriority in -lucb" >&5 +echo "configure:2012: checking for setpriority in -lucb" >&5 ac_lib_var=`echo ucb'_'setpriority | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2008,7 +2016,7 @@ ac_save_LIBS="$LIBS" LIBS="-lucb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2042,12 +2050,12 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2046: checking for working const" >&5 +echo "configure:2054: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2119,12 +2127,12 @@ echo $ac_n "checking for setpriority""... $ac_c" 1>&6 -echo "configure:2123: checking for setpriority" >&5 +echo "configure:2131: checking for setpriority" >&5 if eval "test \"`echo '$''{'ac_cv_func_setpriority'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_setpriority=yes" else @@ -2169,12 +2177,67 @@ for ac_func in uname strncasecmp getpwuid cuserid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2173: checking for $ac_func" >&5 +echo "configure:2181: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in drand48 random rand +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2236: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2222,12 +2285,12 @@ done echo $ac_n "checking for getpwuid""... $ac_c" 1>&6 -echo "configure:2226: checking for getpwuid" >&5 +echo "configure:2289: checking for getpwuid" >&5 if eval "test \"`echo '$''{'ac_cv_func_getpwuid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_getpwuid=yes" else @@ -2268,7 +2331,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for getpwuid in -lsun""... $ac_c" 1>&6 -echo "configure:2272: checking for getpwuid in -lsun" >&5 +echo "configure:2335: checking for getpwuid in -lsun" >&5 ac_lib_var=`echo sun'_'getpwuid | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2276,7 +2339,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsun $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2310,12 +2373,12 @@ fi echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:2314: checking for gethostbyname" >&5 +echo "configure:2377: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -2356,7 +2419,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:2360: checking for main in -lnsl" >&5 +echo "configure:2423: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2364,14 +2427,14 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2395,7 +2458,7 @@ for lib in c bsd; do echo $ac_n "checking for setpriority in -l$lib""... $ac_c" 1>&6 -echo "configure:2399: checking for setpriority in -l$lib" >&5 +echo "configure:2462: checking for setpriority in -l$lib" >&5 ac_lib_var=`echo $lib'_'setpriority | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2403,7 +2466,7 @@ ac_save_LIBS="$LIBS" LIBS="-l$lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2447,7 +2510,7 @@ # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:2451: checking for X" >&5 +echo "configure:2514: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -2509,12 +2572,12 @@ # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2583,14 +2646,14 @@ ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -2696,17 +2759,17 @@ case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:2700: checking whether -R must be followed by a space" >&5 +echo "configure:2763: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_nospace=yes else @@ -2722,14 +2785,14 @@ else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_space=yes else @@ -2761,7 +2824,7 @@ # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:2765: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:2828: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2769,7 +2832,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2802,7 +2865,7 @@ if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:2806: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:2869: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2810,7 +2873,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2850,12 +2913,12 @@ # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:2854: checking for gethostbyname" >&5 +echo "configure:2917: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -2899,7 +2962,7 @@ if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:2903: checking for gethostbyname in -lnsl" >&5 +echo "configure:2966: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2907,7 +2970,7 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2948,12 +3011,12 @@ # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:2952: checking for connect" >&5 +echo "configure:3015: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -2997,7 +3060,7 @@ if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:3001: checking for connect in -lsocket" >&5 +echo "configure:3064: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3005,7 +3068,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3040,12 +3103,12 @@ # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:3044: checking for remove" >&5 +echo "configure:3107: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -3089,7 +3152,7 @@ if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:3093: checking for remove in -lposix" >&5 +echo "configure:3156: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3097,7 +3160,7 @@ ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3132,12 +3195,12 @@ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:3136: checking for shmat" >&5 +echo "configure:3199: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -3181,7 +3244,7 @@ if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:3185: checking for shmat in -lipc" >&5 +echo "configure:3248: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3189,7 +3252,7 @@ ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3233,7 +3296,7 @@ # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:3237: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:3300: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3241,7 +3304,7 @@ ac_save_LIBS="$LIBS" LIBS="-lICE $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3279,17 +3342,17 @@ libs_x="${X_PRE_LIBS} -lX11 -lXmu" echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6 -echo "configure:3283: checking the version of X11 being used" >&5 +echo "configure:3346: checking the version of X11 being used" >&5 if test "$cross_compiling" = yes; then x11_release=5 else cat > conftest.$ac_ext < main(int c, char* v[]) { return c>1 ? XlibSpecificationRelease : 0; } EOF -if { (eval echo configure:3293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ./conftest foobar; x11_release=$? else @@ -3316,15 +3379,15 @@ if test "$with_shape" != "yes" -a "$with_shape" != "no"; then echo $ac_n "checking for XShapeQueryExtension in -lXext""... $ac_c" 1>&6 -echo "configure:3320: checking for XShapeQueryExtension in -lXext" >&5 +echo "configure:3383: checking for XShapeQueryExtension in -lXext" >&5 ac_lib_var=`echo Xext'_'XShapeQueryExtension | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lXext $LIBS" +LIBS="-lXext $X_LIBS $libs_x $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3354,21 +3417,21 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for -lXext""... $ac_c" 1>&6 -echo "configure:3358: checking for -lXext" >&5 +echo "configure:3421: checking for -lXext" >&5 if eval "test \"`echo '$''{'ac_cv_lib_Xext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lXext $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_lib_Xext=yes else @@ -3403,6 +3466,98 @@ fi +if test "$with_xpm" = "yes"; then + echo $ac_n "checking for XpmReadFileToPixmap in -lXpm""... $ac_c" 1>&6 +echo "configure:3472: checking for XpmReadFileToPixmap in -lXpm" >&5 +ac_lib_var=`echo Xpm'_'XpmReadFileToPixmap | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lXpm $X_LIBS $libs_x $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + with_xpm=yes +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for -lXpm""... $ac_c" 1>&6 +echo "configure:3510: checking for -lXpm" >&5 +if eval "test \"`echo '$''{'ac_cv_lib_Xpm'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lXpm $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_cv_lib_Xpm=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_lib_Xpm=no +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +echo "$ac_t""$ac_cv_lib_Xpm" 1>&6 +if test "$ac_cv_lib_Xpm" = yes; then + with_xpm=yes +fi + +fi + + if test "$with_xpm" != "yes"; then + # if more than two X11 directory, select one that includes Xpm. + for dir in "/usr/X11R6/lib" "/usr/lib/X11R6" "/usr/X11R5/lib" \ + "/usr/lib/X11R5" "/usr/lib/X11" "/usr/local/lib" "/usr/XFree86/lib/X11" \ + "/usr/X386/lib" "/usr/x386/lib" "/usr/local/x11r5/lib" \ + "/var/X11R${x11_release}/lib" "/usr/local/lib/X11" "/usr/local/lib" \ + "/usr/local/lib/X11R${x11_release}" "/usr/X11/lib" "/usr/athena/lib" \ + "/usr/XFree86/lib/X11" "/usr/unsupported/lib" \ + "/usr/openwin/lib" "/usr/openwin/share/lib" "/usr/lib"; do + if test -f "$dir/libXpm.a"; then X_LIBS="$X_LIBS -L$dir"; with_xpm=yes; break; fi + done + if test "$with_xpm" != "yes"; then + echo "Warning! cannot find libXpm.a." + fi + fi +fi + + if test "x$x_includes" = "x"; then for dir in "$prefix/include" "/usr/X11R6/include" "/usr/include/X11R6" \ @@ -3424,7 +3579,7 @@ fi echo "checking for X defines extracted by xmkmf" 1>&6 -echo "configure:3428: checking for X defines extracted by xmkmf" >&5 +echo "configure:3583: checking for X defines extracted by xmkmf" >&5 rm -fr conftestdir if mkdir conftestdir; then cd conftestdir @@ -3564,8 +3719,8 @@ bmfiles='BMFILES != bitmaps/"*.xbm"' tora_bmfiles='TORA_BMFILES != bitmaps.tora/"*.xbm"' else - bmfiles='BMFILES = bitmaps/\*.xbm' - tora_bmfiles='TORA_BMFILES = bitmaps.tora/\*.xbm' + bmfiles='BMFILES = bitmaps/*.xbm' + tora_bmfiles='TORA_BMFILES = bitmaps.tora/*.xbm' fi if test "$with_shape" = "yes"; then libs_x="$libs_x -lXext" @@ -3574,6 +3729,14 @@ EOF fi +if test "$with_xpm" = "yes"; then + libs_x="$libs_x -lXpm" + cat >> confdefs.h <<\EOF +#define XPM 1 +EOF + +fi + @@ -3739,6 +3902,7 @@ s%@tora_bmfiles@%$tora_bmfiles%g s%@USE_GNU_MAKE@%$USE_GNU_MAKE%g s%@SHAPE@%$SHAPE%g +s%@XPM@%$XPM%g s%@MIME@%$MIME%g CEOF diff -urN oneko/configure.in oneko-2.0b-sender0.5/configure.in --- oneko/configure.in Thu May 23 23:24:01 2002 +++ oneko-2.0b-sender0.5/configure.in Thu May 23 23:29:59 2002 @@ -25,7 +25,7 @@ AC_PREREQ(2.10) AC_CONFIG_HEADER(config.h) -CFLAGS=-O +CFLAGS=${CFLAGS-'-O'} AC_PREFIX_DEFAULT(/usr/X11R6) AC_ARG_WITH(gnu-make,[ --with-gnu-make use GNU make command], AC_DEFINE(USE_GNU_MAKE)) @@ -33,6 +33,7 @@ AC_ARG_WITH(pop,[ --with-pop enable feature to access POP server]) AC_ARG_ENABLE(mime,[ --enable-mime enable MIME decoding]) AC_ARG_WITH(shape,[ --with-shape enable shape extension forcedly]) +AC_ARG_WITH(xpm,[ --with-xpm enable XPM support [default=no]]) AC_ARG_WITH(mail_spool,[ --with-mail-spool=DIR mail spool directory is DIR],mail_spool=$with_mail_spool) AC_ARG_WITH(lang,[ --with-lang=TYPE Use TYPE language feature (i18n, l10n, no) [i18n]]) AC_CHECK_PROG(UNAME, uname -a, [uname -a], "") @@ -63,7 +64,7 @@ AC_CHECK_PROG(MAKEDEPEND, makedepend, makedepend, makedepend) AC_CHECK_PROG(RM, rm, rm -f, rm -f) AC_CHECK_PROG(TAG, ctags, ctags, ctags) -AC_CHECK_PROG(MKDIRHIER, mkdirhier, mkdirhier, make -p) +AC_CHECK_PROG(MKDIRHIER, mkdirhier, mkdirhier, mkdir -p) AC_PROG_MAKE_SET dnl ------------------ @@ -123,7 +124,7 @@ dnl ------------------ dnl Checks for header files -AC_CHECK_HEADERS(sys/timeb.h sys/time.h sys/param.h unistd.h times.h) +AC_CHECK_HEADERS(sys/timeb.h sys/time.h sys/times.h sys/param.h unistd.h) AC_CHECK_HEADERS(pwd.h sys/pstat.h sys/resource.h) AC_HEADER_STDC AC_HEADER_TIME @@ -163,6 +164,7 @@ AC_CHECK_FUNC(setpriority) AC_CHECK_FUNCS(uname strncasecmp getpwuid cuserid) +AC_CHECK_FUNCS(drand48 random rand) AC_CHECK_FUNC(getpwuid, , AC_CHECK_LIB(sun, getpwuid, [LIBS="$LIBS -lnsl"])) AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"])) for lib in c bsd; do @@ -197,7 +199,7 @@ if test "$with_shape" != "yes" -a "$with_shape" != "no"; then AC_CHECK_LIB(Xext, XShapeQueryExtension, with_shape=yes, - AC_HAVE_LIBRARY(-lXext, with_shape=yes)) + AC_HAVE_LIBRARY(-lXext, with_shape=yes), $X_LIBS $libs_x) if test "$with_shape" != "yes"; then # if more than two X11 directory, select one that includes Xext. for dir in "/usr/X11R6/lib" "/usr/lib/X11R6" "/usr/X11R5/lib" \ @@ -212,6 +214,32 @@ fi fi +dnl ------------------ +dnl autodetect -lXpm +dnl Although AC_HAVE_LIBRARY is obsolete, AC_HAVE_LIBRARY had to be left +dnl here because of AC_CHECK_LIB(Xpm) failure on some systems(SunOS4 etc). +dnl It seems that the behavior of sed on each system may differs. + +if test "$with_xpm" = "yes"; then + AC_CHECK_LIB(Xpm, XpmReadFileToPixmap, with_xpm=yes, + AC_HAVE_LIBRARY(-lXpm, with_xpm=yes), $X_LIBS $libs_x) + if test "$with_xpm" != "yes"; then + # if more than two X11 directory, select one that includes Xpm. + for dir in "/usr/X11R6/lib" "/usr/lib/X11R6" "/usr/X11R5/lib" \ + "/usr/lib/X11R5" "/usr/lib/X11" "/usr/local/lib" "/usr/XFree86/lib/X11" \ + "/usr/X386/lib" "/usr/x386/lib" "/usr/local/x11r5/lib" \ + "/var/X11R${x11_release}/lib" "/usr/local/lib/X11" "/usr/local/lib" \ + "/usr/local/lib/X11R${x11_release}" "/usr/X11/lib" "/usr/athena/lib" \ + "/usr/XFree86/lib/X11" "/usr/unsupported/lib" \ + "/usr/openwin/lib" "/usr/openwin/share/lib" "/usr/lib"; do + if test -f "$dir/libXpm.a"; then X_LIBS="$X_LIBS -L$dir"; with_xpm=yes; break; fi + done + if test "$with_xpm" != "yes"; then + echo "Warning! cannot find libXpm.a." + fi + fi +fi + dnl quit to autodetect -lXmu dnl test -z "$with_xmu" && { AC_CHECK_LIB(Xmu, XmuReadBitmapDataFromFile, dnl with_xmu=yes, with_xmu=no) } @@ -371,16 +399,21 @@ bmfiles='BMFILES != bitmaps/"*.xbm"' tora_bmfiles='TORA_BMFILES != bitmaps.tora/"*.xbm"' else - bmfiles='BMFILES = bitmaps/\*.xbm' - tora_bmfiles='TORA_BMFILES = bitmaps.tora/\*.xbm' + bmfiles='BMFILES = bitmaps/*.xbm' + tora_bmfiles='TORA_BMFILES = bitmaps.tora/*.xbm' fi if test "$with_shape" = "yes"; then libs_x="$libs_x -lXext" AC_DEFINE(SHAPE) fi +if test "$with_xpm" = "yes"; then + libs_x="$libs_x -lXpm" + AC_DEFINE(XPM) +fi AC_SUBST(bmfiles) AC_SUBST(tora_bmfiles) AC_SUBST(USE_GNU_MAKE) AC_SUBST(SHAPE) +AC_SUBST(XPM) AC_SUBST(MIME) AC_OUTPUT(Makefile) diff -urN oneko/event.c oneko-2.0b-sender0.5/event.c --- oneko/event.c Thu May 23 23:24:01 2002 +++ oneko-2.0b-sender0.5/event.c Thu May 23 23:29:59 2002 @@ -60,7 +60,8 @@ SetToyState(toy, TOY_APPEAR); - ClipInWindow(&x, &y, toy->width, toy->height, toy->hot_x, toy->hot_y); +/* ClipInWindow(&x, &y, toy->width, toy->height, toy->hot_x, toy->hot_y); */ + ClipInWindow(&x, &y, toy->width, toy->height, 0, 0); changes.x = toy->x = x; changes.y = toy->y = y; @@ -88,12 +89,39 @@ } } +#if defined(NO_TOYCURSOR) || defined(MARI) +/* + * move Toy + */ + +void +ToyMove(toy, x, y) +Toy *toy; +int x, y; +{ + XWindowChanges changes; + +/* ClipInWindow(&x, &y, toy->width, toy->height, toy->hot_x, toy->hot_y); */ + ClipInWindow(&x, &y, toy->width, toy->height, 0, 0); + + changes.x = toy->x = x; + changes.y = toy->y = y; + + if (NoShape) { + XCopyArea(theDisplay, theRoot, toy->save, SaveGC, + toy->x, toy->y, toy->width, toy->height, 0, 0); + } + XConfigureWindow(theDisplay, toy->window, CWX | CWY, &changes); +} +#endif /* NO_TOYCURSOR || MARI */ + /* * Expose event for Toy */ -static void +/* static void */ +void ToyExpose(toy) Toy *toy; { @@ -106,14 +134,119 @@ 0, 0, toy->width, toy->height); } +#ifdef SENDER +void +SetSenderGeometry(sender) +SenderToy *sender; +{ + int x = SenderX, y = SenderY; + int dx = 0, dy = 0; + SenderToy *p; + + p = sender; + while (p != NULL) { + if (p->setgeometry == False) { + if (SenderShiftX == 1) { + p->toy.x = x; + p->toy.y = y; + x += SenderShiftX * p->toy.width; + } else if (SenderShiftX == -1) { + x += SenderShiftX * p->toy.width; + p->toy.x = x; + p->toy.y = y; + } else if (SenderShiftY == 1) { + p->toy.x = x; + p->toy.y = y; + y += SenderShiftY * p->toy.height; + } else if (SenderShiftY == -1) { + y += SenderShiftY * p->toy.height; + p->toy.x = x; + p->toy.y = y; + } + } + p = p -> next; + } + if (SenderShiftX == 1) { + if (x > theRootWidth) + dx = theRootWidth - x; + } else if (SenderShiftX == -1) { + if (x < 0) + dx = - x; + } else if (SenderShiftY == 1) { + if (y > theRootHeight) + dy = theRootHeight - y; + } else if (SenderShiftY == -1) { + if (y < 0) + dy = - y; + } + p = sender; + while (p != NULL) { + if (p->setgeometry == False) { + p->toy.x += dx; + p->toy.y += dy; + } + p = p->next; + } +} + +void +SenderAppear(sender) +SenderToy *sender; +{ + if (sender == NULL) + return; + ToyAppear(&sender->toy, sender->toy.x, sender->toy.y); + SenderAppear(sender->next); +} + +void +SenderDisappear(sender) +SenderToy *sender; +{ + if (sender == NULL) + return; + ToyDisappear(&sender->toy); + SenderDisappear(sender->next); +} + +void +SenderExpose(sender) +SenderToy *sender; +{ + if (sender == NULL) + return; + ToyExpose(&sender->toy); + SenderExpose(sender->next); +} + +SenderToy * +NextSender(sender) +SenderToy *sender; +{ + if (sender == NULL) + return(NULL); + ToyDisappear(&sender->toy); + return(sender->next); +} +#endif /* SENDER */ + NekoChangeVisibility(window) Window window; { - Window nekoKotastu[3]; +#ifdef SENDER +#define NWindow NTOYS + 1 + NSENDERS + 1 + int i; + Window nekoKotastu[NWindow]; +#else + Window nekoKotastu[NTOYS + 1]; +#endif /* SENDER */ nekoKotastu[0] = theNeko; nekoKotastu[1] = Post.window; nekoKotastu[2] = Kotatsu.window; +#ifdef MARI + nekoKotastu[3] = Mari.window; +#endif /* MARI */ if (window == theNeko) { XRaiseWindow(theDisplay, theNeko); @@ -121,7 +254,18 @@ } ToyExpose(&Kotatsu); ToyExpose(&Post); - XRestackWindows(theDisplay, nekoKotastu, 3); +#ifdef MARI + ToyExpose(&Mari); +#endif /* MARI */ +#ifdef SENDER + for (i = 0; i <= NSENDERS; i++) { + nekoKotastu[NTOYS + 1 + i] = Senders[i].toy.window; + ToyExpose(&Senders[i].toy); + } + XRestackWindows(theDisplay, nekoKotastu, NWindow); +#else + XRestackWindows(theDisplay, nekoKotastu, NTOYS + 1); +#endif /* SENDER */ } /* @@ -165,15 +309,45 @@ WindowToToy(window) Window window; { +#ifdef SENDER + int i; +#endif /* SENDER */ if (window == Kotatsu.window) { return &Kotatsu; } else if (window == Post.window) { return &Post; +#ifdef MARI + } else if (window == Mari.window) { + return &Mari; +#endif /* MARI */ +#ifdef SENDER + } else { + for (i = 0; i <= NSENDERS; i++) { + if (window == Senders[i].toy.window) { + return &Senders[i].toy; + } + } +#endif /* SENDER */ } return (Toy *) NULL; } +#ifdef SENDER +static SenderToy * +WindowToSender(window) +Window window; +{ + int i; + for (i = 0; i <= NSENDERS; i++) { + if (window == Senders[i].toy.window) { + return &Senders[i]; + } + } + + return (SenderToy *) NULL; +} +#endif /* SENDER */ /* * Events @@ -184,6 +358,9 @@ { XEvent event; Toy *toy; +#ifdef SENDER + SenderToy *sender; +#endif /* SENDER */ Bool continue_state = True; static Window grabwindow = None; @@ -202,9 +379,19 @@ if (event.xbutton.window != theNeko) { break; } +#ifdef MARI + if (MariAction == True && Kotatsu.state == TOY_NO) { + toy = &Mari; + Mari.stop = True; + } else { + toy = &Kotatsu; + } +#else toy = &Kotatsu; +#endif /* MARI */ } grabwindow = toy->window; +#ifndef NO_TOYCURSOR ToyDisappear(toy); if (XGrabPointer(theDisplay, theNeko, False, ButtonPressMask | ButtonReleaseMask, @@ -213,6 +400,7 @@ CurrentTime) != GrabSuccess) { Warning("can't grab."); } +#endif /* !NO_TOYCURSOR */ break; #ifdef SHOWHEADER case Button2: @@ -231,15 +419,32 @@ switch (event.xbutton.button) { case Button1: if ((toy = WindowToToy(grabwindow)) != NULL) { +#ifdef NO_TOYCURSOR + ToyDisappear(toy); +#else XUngrabPointer(theDisplay, CurrentTime); +#endif /* NO_TOYCURSOR */ ToyAppear(toy, event.xbutton.x_root - toy->hot_x, event.xbutton.y_root - toy->hot_y); +#ifdef SENDER + if ((sender = WindowToSender(grabwindow)) != NULL) { + sender->setgeometry = True; + } +#endif /* SENDER */ } break; case Button2: if (&Kotatsu == WindowToToy(event.xbutton.window)) { ToyDisappear(&Kotatsu); } +#ifdef MARI + else if (MariAction == True && + &Mari == WindowToToy(event.xbutton.window)) { + ToyDisappear(&Mari); + ToyAppear(&Kotatsu, event.xbutton.x_root - Kotatsu.hot_x, + event.xbutton.y_root - Kotatsu.hot_y); + } +#endif /* MARI */ #ifdef SHOWHEADER else if (event.xbutton.window == Post.window) { if (Header.win != None) @@ -252,6 +457,14 @@ break; } break; +#ifdef NO_TOYCURSOR + case MotionNotify: + if ((toy = WindowToToy(grabwindow)) != NULL) { + ToyMove(toy, event.xmotion.x_root - toy->hot_x, + event.xmotion.y_root - toy->hot_y); + } + break; +#endif /* NO_TOYCURSOR */ #ifdef MAILNOTIFY case EnterNotify: /* Only Post window */ if (event.xcrossing.mode != NotifyNormal) break; diff -urN oneko/help oneko-2.0b-sender0.5/help --- oneko/help Thu May 23 23:24:00 2002 +++ oneko-2.0b-sender0.5/help Thu May 23 23:58:25 2002 @@ -5,6 +5,12 @@ -bitmapdir specifies the directory name contains bitmap files. -kotatsubitmap specifies a bitmap file name for "kotatsu". -kotatsubitmask specifies a bitmap mask file name for "kotatsu". +-postbitmap specifies a bitmap file name for mail post. +-postbitmask specifies a bitmap mask file name for mail post. +-maribitmap specifies a bitmap file name for "mari". +-maribitmask specifies a bitmap mask file name for "mari". +-senderbitmap specifies a bitmap file name for sender. +-senderbitmask specifies a bitmap mask file name for sender. -mousebitmap specifies a bitmap file name for mouse cursor. -mousebitmask specifies a bitmap mask file name for mouse cursor. -speed specifies the speed of the cat. @@ -15,8 +21,12 @@ -bg specifies the background color of the cat. -kfg specifies the foreground color of the "kotatsu". -kbg specifies the background color of the "kotatsu". --pfg specifies the foreground color of the mail post." --pbg specifies the background color of the mail post." +-pfg specifies the foreground color of the mail post." +-pbg specifies the background color of the mail post." +-mafg specifies the foreground color of the "mari"." +-mabg specifies the background color of the "mari"." +-sfg specifies the foreground color of the sender." +-sbg specifies the background color of the sender." -mfg specifies the foreground color of the mouse cursor. -mbg specifies the background color of the mouse cursor. -tfg specifies the foreground color of the tip window. @@ -34,7 +44,20 @@ -mailaction execute some program on mail arrival. -popserver check pop server instead of mail spool. -geometry post geometry at root window of X. +-kotatsu show the "kotatsu" when oneko starts. +-koratsugeometry the "kotatsu" geometry at root window of X. +-sender show the bitmap of senders. +-multisender show the multiple bitmaps of senders. +-sendergeometry sender geometry at root window of X. +-direction direction to show the bitmaps of senders. +-mari tells oneko to use "mari" action. +-marispeed maximum velocity of "mari". +-marinext probability of "mari" next moving. +-mariaccel acceleration of the speed of "mari" at the cursor. +-maridecel deceleration of the speed of "mari" on the bottom. +-gravity gravity for "mari" action. -text strings to show on mail arrival. +-newtext strings to show on new mail arrival. -fn font set to use with the mail list window. -space line space in the mail list window. -w specifies width in characters of mail list. diff -urN oneko/init.c oneko-2.0b-sender0.5/init.c --- oneko/init.c Thu May 23 23:24:00 2002 +++ oneko-2.0b-sender0.5/init.c Thu May 23 23:34:01 2002 @@ -17,11 +17,18 @@ #include "oneko.h" +#ifdef XPM +#include +#endif /* XPM */ + #ifdef SHAPE #include #endif /* SHAPE */ #include +#ifdef SENDER +#include +#endif /* SENDER */ #include #include "state.h" @@ -52,8 +59,12 @@ char *CursorBitmask; /* cursor bitmask */ char *BitmapDir; /* bitmapdir */ +#ifdef XPM +char *PixmapDir; /* pixmapdir */ +#endif /* XPM */ char *Geometry; /* post geometry */ +char *KotatsuGeometry; /* kotatsu geometry */ Cursor theCursor; /* Mouse cursor ID */ @@ -77,6 +88,10 @@ XFontStruct *StatusFont; char *Statusfontstr = NULL, *text; int fontheight, tips_width, tips_height, tips_border = 4; +#ifdef SENDER +char *newtext; +int newtips_width; +#endif /* SENDER */ int TipOffsetX = 0, TipOffsetY = 0; #ifdef I18N XFontSet StatusFontset; @@ -88,6 +103,10 @@ char *text1, *text2; int textn_width; int text1_width, text2_width; +#ifdef SENDER +char *newtext1, *newtext2; +int newtext1_width, newtext2_width; +#endif /* SENDER */ #endif /* L10N */ int ShowTips = True; Tips Tip; @@ -96,6 +115,11 @@ int LineSpace; int Column; #endif /* SHOWHEADER */ +#ifdef SENDER +char *SenderDirection; +int SenderX, SenderY; +int SenderShiftX = 0, SenderShiftY = 0; +#endif /* SENDER */ unsigned char gray_bits[] = { 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55 }; #endif /* MAILNOTIFY */ @@ -106,6 +130,9 @@ Toy Toys[NTOYS]; /* Post, Kotatsu */ +#ifdef SENDER +SenderToy Senders[NSENDERS + 1]; /* Sender, Sender1, Sender2, ... */ +#endif /* SENDER */ /* * Toy status @@ -143,6 +170,29 @@ return MakeFileName(filename); } +#ifdef XPM +/* + * make pixmap file name + */ + +static char * +MakePixmapFileName(base, add) +char *base; +char *add; +{ + static char filename[MAXPATHLEN]; + + if (PixmapDir && *PixmapDir) { + (void) sprintf(filename, "%s/%s%s.xpm", + PixmapDir, base, add); + } else { + return(NULL); + } + + return MakeFileName(filename); +} +#endif /* XPM */ + int ReadPixmapFromBitmapFile(display, d, filename, width, height, pixmap, x_hot, y_hot, fg, bg, depth) @@ -188,6 +238,9 @@ unsigned long valuemask = GCMASK; int x_hot, y_hot; int i; +#ifdef XPM + XpmAttributes xpmattr; +#endif /* XPM */ *max_width = *max_height = 0; values.function = GXcopy; @@ -207,6 +260,31 @@ } for (i = 0; i < Nanimes; i++) { +#ifdef XPM + bitmap_file = MakePixmapFileName(AnimationTable[i].base_name, ""); + if (bitmap_file != NULL && bitmap_file[0] != '\0') { + xpmattr.valuemask = XpmSize | XpmHotspot; + if (XpmReadFileToPixmap(theDisplay, theRoot, bitmap_file, + &pixmap, &AnimationTable[i].mask_pattern, + &xpmattr) != XpmSuccess) { + Error("can't read pixmap file %s", bitmap_file); + } + AnimationTable[i].width = xpmattr.width; + AnimationTable[i].height = xpmattr.height; + AnimationTable[i].x_hot = xpmattr.x_hotspot; + AnimationTable[i].y_hot = xpmattr.y_hotspot; + if (AnimationTable[i].x_hot < 0 || + AnimationTable[i].x_hot > theRootWidth) { + AnimationTable[i].x_hot = (AnimationTable[i].width - 1) / 2; + } + if (AnimationTable[i].y_hot < 0 || + AnimationTable[i].y_hot > theRootHeight) { + AnimationTable[i].y_hot = AnimationTable[i].height - 1; + } + values.tile = pixmap; + values.clip_mask = AnimationTable[i].mask_pattern; + } else { +#endif /* XPM */ bitmap_file = MakeBitmapFileName(AnimationTable[i].base_name, ""); if (ReadPixmapFromBitmapFile(theDisplay, theRoot, bitmap_file, @@ -242,6 +320,9 @@ bitmap_file, bitmask_file); } values.clip_mask = AnimationTable[i].mask_pattern; +#ifdef XPM + } +#endif /* XPM */ AnimationTable[i].draw_GC = XCreateGC(theDisplay, theRoot, valuemask, &values); @@ -289,7 +370,7 @@ x_hot, y_hot); } - +#ifndef NO_TOYCURSOR /* * Make kotatsu cursor */ @@ -313,7 +394,7 @@ &toy->fg_color, &toy->bg_color, x_hot, y_hot); } - +#endif /* !NO_TOYCURSOR */ /* * Allocate colors @@ -337,6 +418,9 @@ SetupColors() { Colormap colormap; +#ifdef SENDER + int i; +#endif /* SENDER */ colormap = DefaultColormap(theDisplay, theScreen); @@ -346,6 +430,18 @@ AllocateColor(Kotatsu.background, &Kotatsu.bg_color, colormap); AllocateColor(Post.foreground, &Post.fg_color, colormap); AllocateColor(Post.background, &Post.bg_color, colormap); +#ifdef MARI + AllocateColor(Mari.foreground, &Mari.fg_color, colormap); + AllocateColor(Mari.background, &Mari.bg_color, colormap); +#endif /* AMRI */ +#ifdef SENDER + for (i = 0; i <= NSENDERS; i++) { + AllocateColor(Senders[i].toy.foreground, + &Senders[i].toy.fg_color, colormap); + AllocateColor(Senders[i].toy.background, + &Senders[i].toy.bg_color, colormap); + } +#endif /* SENDER */ #ifdef MAILNOTIFY AllocateColor(TipForeground, &TipFgColor, colormap); AllocateColor(TipBackground, &TipBgColor, colormap); @@ -423,9 +519,32 @@ unsigned long valuemask = GCMASK; unsigned long mask; char *bitmap_file; +#ifdef XPM + XpmAttributes xpmattr; +#endif /* XPM */ SetToyState(toy, TOY_NO); +#ifdef XPM + if (toy->pixmap != NULL && toy->pixmap[0] != '\0') { + bitmap_file = MakeFileName(toy->pixmap); + xpmattr.valuemask = XpmSize | XpmHotspot; + if (XpmReadFileToPixmap(theDisplay, theRoot, bitmap_file, + &pixmap, &toy->mask, &xpmattr) != XpmSuccess) { + Error("can't read pixmap file %s", bitmap_file); + } + toy->width = xpmattr.width; + toy->height = xpmattr.height; + toy->hot_x = xpmattr.x_hotspot; + toy->hot_y = xpmattr.y_hotspot; + if (toy->hot_x < 0 || toy->hot_x > theRootWidth) { + toy->hot_x = (toy->width - 1) / 2; + } + if (toy->hot_y < 0 || toy->hot_y > theRootHeight) { + toy->hot_y = toy->height - 1; + } + } else { +#endif /* XPM */ bitmap_file = MakeFileName(toy->bitmask); if (XReadBitmapFile(theDisplay, theRoot, bitmap_file, &toy->width, &toy->height, &toy->mask, @@ -441,6 +560,9 @@ theDepth) != BitmapSuccess) { Error("can't read pixmap file %s", bitmap_file); } +#ifdef XPM + } +#endif /* XPM */ values.function = GXcopy; values.foreground = toy->fg_color.pixel; @@ -503,12 +625,70 @@ int dummy; char defgeom[24]; - sprintf(defgeom, "%dx%d-10+10", Post.width, Post.height); +/* sprintf(defgeom, "%dx%d-10+10", Post.width, Post.height); */ + sprintf(defgeom, "%dx%d-0+24", Post.width, Post.height); XGeometry(theDisplay, theScreen, Geometry, defgeom, 0, 1, 1, 0, 0, &Post.x, &Post.y, &dummy, &dummy); } /* + * Initialize kotatsu geometry + */ + +void +InitKotatsuGeometry() +{ + int dummy; + char defgeom[24]; + + sprintf(defgeom, "%dx%d-0-0", Kotatsu.width, Kotatsu.height); + XGeometry(theDisplay, theScreen, KotatsuGeometry, defgeom, 0, 1, 1, 0, 0, + &Kotatsu.x, &Kotatsu.y, &dummy, &dummy); +} + +#ifdef SENDER +/* + * Initialize sender geometry + */ + +void +InitSenderGeometry() +{ + int i; + int width, height; + char defgeom[24]; + char *geom; + + for (i = 0; i <= NSENDERS; i++) { + geom = Senders[i].geometry; + Senders[i].setgeometry = (geom != NULL && *geom != '\0') ? True : False; + sprintf(defgeom, "%dx%d+0+0", + Senders[i].toy.width, Senders[i].toy.height); + XGeometry(theDisplay, theScreen, geom, defgeom, 0, 1, 1, 0, 0, + &Senders[i].toy.x, &Senders[i].toy.y, &width, &height); + } + Senders[0].setgeometry = False; + SenderX = Senders[0].toy.x; + SenderY = Senders[0].toy.y; + if (strncmp(SenderDirection, "right", 5) == 0) { + SenderShiftX = 1; + } else if (strncmp(SenderDirection, "left", 4) == 0) { + SenderX += width; + SenderShiftX = -1; + } else if (strncmp(SenderDirection, "down", 4) == 0 || + strncmp(SenderDirection, "bottom", 6) == 0) { + SenderShiftY = 1; + } else if (strncmp(SenderDirection, "up", 2) == 0 || + strncmp(SenderDirection, "top", 3) == 0) { + SenderY += height; + SenderShiftY = -1; + } else { + SenderShiftX = 1; + } +} +#endif /* SENDER */ + +/* * Initialize screen */ @@ -521,6 +701,9 @@ unsigned int border_width; unsigned int max_width, max_height; int event_base, error_base; +#ifdef SENDER + int i; +#endif /* SENDER */ #ifdef SHAPE if (!NoShape && XShapeQueryExtension(theDisplay, @@ -550,10 +733,30 @@ CreateNekoWindow(max_width, max_height); CreateToyWindow(&Kotatsu); CreateToyWindow(&Post); +#ifdef MARI + CreateToyWindow(&Mari); +#endif /* MARI */ +#ifdef SENDER + for (i = 0; i <= NSENDERS; i++) + CreateToyWindow(&Senders[i].toy); +#endif /* SENDER */ +#ifndef NO_TOYCURSOR MakeToyCursor(&Kotatsu); MakeToyCursor(&Post); +#ifdef MARI + MakeToyCursor(&Mari); +#endif /* MARI */ +#ifdef SENDER + for (i = 0; i <= NSENDERS; i++) + MakeToyCursor(&Senders[i].toy); +#endif /* SENDER */ +#endif /* NO_TOYCURSOR */ InitPostGeometry(); + InitKotatsuGeometry(); +#ifdef SENDER + InitSenderGeometry(); +#endif /* SENDER */ /* SetProperty(); */ } diff -urN oneko/mail.c oneko-2.0b-sender0.5/mail.c --- oneko/mail.c Thu May 23 23:24:01 2002 +++ oneko-2.0b-sender0.5/mail.c Thu May 23 23:53:05 2002 @@ -42,9 +42,9 @@ #include #endif /* HAVE_GETPWUID */ -#ifdef POP #include #include +#ifdef POP #include #include #include @@ -104,13 +104,25 @@ static void CreateTipWindow(Tips *Tip, Bool use_arc, int x, int y, int w, int h); #ifdef SHOWHEADER void CreateHeaderPixmap(int nmail); +#ifdef SENDER +int store1Header (char *from, char *subject, char *keys[]); +#else int store1Header (char *from, char *subject); +#endif /* SENDER */ void PopupHeaderWindow(int px, int py, int nmail); char *pickupName (char *from); #if defined(POP) && !defined(HAVE_STRNCASECMP) int strncasecmp(char *s1, char *s2, unsigned int len); #endif +#ifdef SENDER +static SenderToy *getSender(); +static Bool matchAddress(char *str, char ***subaddr); +static int setAddress(char *str, char ****subaddr); +static int setHeaderKey(char *str); +static char **splitString(char *str, char *sep); +#endif /* SENDER */ + int *mail_num = NULL; #ifdef MIME void (*to_locale)(); @@ -154,6 +166,12 @@ #endif /* SHOWHEADER */ #endif /* MAILNOTIFY */ static Bool MailArrive = False; +#ifdef SENDER +SenderToy *CurrentSender = NULL; +static Bool MailReceived = False; +static int NHeaderKey = 0; +static char *HeaderKeys[NSENDERS]; +#endif /* SENDER */ long UpdateTime; char *MailFile; #ifdef POP @@ -167,6 +185,9 @@ SetMail() { static char buf[1024]; +#ifdef SENDER + int i; +#endif /* SENDER */ #ifdef HAVE_GETPWUID pwent = getpwuid(geteuid()); @@ -174,6 +195,8 @@ if (MailFile == NULL) { MailFile = buf; (void) strcpy(MailFile, MAILBOX_DIRECTORY); + if (MailFile[strlen(MailFile) - 1] != '/' ) + (void) strcat(MailFile, "/"); #ifdef HAVE_GETPWUID (void) strcat(MailFile, pwent->pw_name); #else /* !HAVE_GETPWUID */ @@ -186,6 +209,10 @@ } MailCount = 0; MailArrive = False; +#ifdef SENDER + MailReceived = False; + CurrentSender = NULL; +#endif /* SENDER */ #ifdef MAILNOTIFY TipWinCount = 0; Tip.win = None; @@ -194,6 +221,15 @@ #endif /* SHOWHEADER */ #endif /* MAILNOTIFY */ SetToyState(&Post, TOY_NO); +#ifdef SENDER + for (i = 0; i <= NSENDERS; i++) + SetToyState(&Senders[i].toy, TOY_NO); + HeaderKeys[0] = NULL; + for (i = 1; i <= NSENDERS; i++) { + setAddress(Senders[i].address, &Senders[i].subaddr); + Senders[i].keyindex = setHeaderKey(Senders[i].headerkey); + } +#endif /* SENDER */ } void @@ -209,6 +245,9 @@ if (--MailCount > 0) { #ifdef MAILNOTIFY if (Tip.win != None && TipWinCount -10 > MailCount) +#ifdef SENDER + if (CurrentSender == NULL) +#endif /* SENDER */ DestroyTipWindow(); #endif /* MAILNOTIFY */ return; @@ -227,6 +266,20 @@ && (stat(MailFile, &file_stat) == 0) && (file_stat.st_size != 0) ){ #ifdef MAILNOTIFY nmail = countStoredMail(MailFile); +#ifdef SENDER + if (SenderAction == True) { + if ((MailReceived == True) && (nmail > Tip.number)) { + SenderDisappear(CurrentSender); + MailReceived = False; + } + if (MailReceived == False) { + CurrentSender = getSender(); + SetSenderGeometry(CurrentSender); + SenderAppear(CurrentSender); + SenderExpose(CurrentSender); + } + } +#endif /* SENDER */ #ifdef SHOWHEADER CreateHeaderPixmap(nmail); #endif /* SHOWHEADER */ @@ -236,13 +289,38 @@ MailAction(); #endif /* MAILACTION */ ToyAppear(&Post, Post.x, Post.y); + ToyExpose(&Post); #ifdef MAILNOTIFY +#ifdef SENDER + if (MailReceived == True) +#endif /* SENDER */ CreateMailTip(nmail); #endif /* MAILNOTIFY */ } +#ifdef SENDER + if (SenderAction == True) { + if (MailReceived == False) + CreateMailTip(nmail - Tip.number); + } + MailReceived = True; +#endif /* SENDER */ MailArrive = True; } else if ( PopServer && (nmail = popMailCheck()) > 0 ){ +#ifdef SENDER + if (SenderAction == True) { + if ((MailReceived == True) && (nmail > Tip.number)) { + SenderDisappear(CurrentSender); + MailReceived = False; + } + if (MailReceived == False) { + CurrentSender = getSender(); + SetSenderGeometry(CurrentSender); + SenderAppear(CurrentSender); + SenderExpose(CurrentSender); + } + } +#endif /* SENDER */ #ifdef SHOWHEADER CreateHeaderPixmap(nmail); #endif /* SHOWHEADER */ @@ -251,13 +329,31 @@ MailAction(); #endif /* MAILACTION */ ToyAppear(&Post, Post.x, Post.y); + ToyExpose(&Post); #ifdef MAILNOTIFY +#ifdef SENDER + if (MailReceived == True) +#endif /* SENDER */ CreateMailTip(nmail); #endif /* MAILNOTIFY */ } +#ifdef SENDER + if (SenderAction == True) { + if (MailReceived == False) + CreateMailTip(nmail - Tip.number); + } + MailReceived = True; +#endif /* SENDER */ MailArrive = True; } else { +#ifdef SENDER + if (MailReceived == True) { + SenderDisappear(CurrentSender); + CurrentSender = NULL; + } + MailReceived = False; +#endif /* SENDER */ if (MailArrive == True) { ToyDisappear(&Post); } @@ -267,6 +363,20 @@ if ((stat(MailFile, &file_stat) == 0) && (file_stat.st_size != 0)) { #ifdef MAILNOTIFY nmail = countStoredMail(MailFile); +#ifdef SENDER + if (SenderAction == True) { + if ((MailReceived == True) && (nmail > Tip.number)) { + SenderDisappear(CurrentSender); + MailReceived = False; + } + if (MailReceived == False) { + CurrentSender = getSender(); + SetSenderGeometry(CurrentSender); + SenderAppear(CurrentSender); + SenderExpose(CurrentSender); + } + } +#endif /* SENDER */ #ifdef SHOWHEADER CreateHeaderPixmap(nmail); #endif /* SHOWHEADER */ @@ -276,13 +386,31 @@ MailAction(); #endif ToyAppear(&Post, Post.x, Post.y); + ToyExpose(&Post); #ifdef MAILNOTIFY +#ifdef SENDER + if (MailReceived == True) +#endif /* SENDER */ CreateMailTip(nmail); #endif } +#ifdef SENDER + if (SenderAction == True) { + if (MailReceived == False) + CreateMailTip(nmail - Tip.number); + } + MailReceived = True; +#endif /* SENDER */ MailArrive = True; } else { +#ifdef SENDER + if (MailReceived == True) { + SenderDisappear(CurrentSender); + CurrentSender = NULL; + } + MailReceived = False; +#endif /* SENDER */ if (MailArrive == True) { ToyDisappear(&Post); } @@ -516,11 +644,22 @@ #ifdef MIME char buff[HEADER_LEN]; #endif +#ifdef SENDER + char keys_buf[NSENDERS][HEADER_LEN]; + char *keys[NSENDERS]; + char *p2; + int n, l; +#endif /* SENDER */ Bool msg_id_exist = False, from_exist = False; initializeHeaderList(); DestroyHeaderWindow(); +#ifdef SENDER + for (n = 0; n < NHeaderKey; n++) + keys[n] = keys_buf[n]; +#endif /* SENDER */ + *pb = buf; for (i = 0; i < num ; i++) { sprintf(buf, "TOP %d 0", mail_num[i]); @@ -537,11 +676,29 @@ fflush(stderr); #endif p = buf; subject[0] = CNULL; from[0] = CNULL; +#ifdef SENDER + for (n = 0; n < NHeaderKey; n++) + *keys[n] = CNULL; +#endif /* SENDER */ /* search 'subject' and 'from' fields in buf */ for (;*p != '\n' && *p != CNULL; p++) ; /* skip +OK line */ ++p; while (*p != CNULL) { +#ifdef SENDER + p2 = p; + for (n = 0; n < NHeaderKey; n++) { + l = strlen(HeaderKeys[n]); + if (strncasecmp(HeaderKeys[n], p2, l) == 0 && p2[l] == ':') { + p2 = strncat_eol(keys[n], p2+l+1, HEADER_LEN); + while (isblank(*p2)) + p2 = strncat_eol(keys[n], ++p2, HEADER_LEN); + break; + } + } + if (subject[0] != CNULL && from[0] != CNULL) continue; +#else if (subject[0] != CNULL && from[0] != CNULL) break; +#endif /* SENDER */ if (strncasecmp("subject:", p, 8) == 0) { p = strncat_eol(subject, p+9, HEADER_LEN); while (isblank(*p)) @@ -560,14 +717,29 @@ #ifdef NOTCNVT_ILLEGAL_JP if (mime_decode(buff, subject) > 0) to_locale(subject, buff); if (mime_decode(buff, from) > 0) to_locale(from, buff); +#ifdef SENDER + for (n = 0; n < NHeaderKey; n++) { + if (mime_decode(buff, keys[n]) >0) to_locale(keys[n], buff); + } +#endif /* SENDER */ #else /* !NOTCNVT_ILLEGAL_JP */ mime_decode(buff, subject); to_locale(subject, buff); mime_decode(buff, from); to_locale(from, buff); +#ifdef SENDER + for (n = 0; n < NHeaderKey; n++) { + mime_decode(buff, keys[n]); + to_locale(keys[n], buff); + } +#endif /* SENDER */ #endif /* !NOTCNVT_ILLEGAL_JP */ #endif /* MIME && I18N */ +#ifdef SENDER + if (!store1Header(from, subject, keys)) +#else if (!store1Header(from, subject)) +#endif /* SENDER */ perror("failed to store header"); } } @@ -997,7 +1169,12 @@ #define INCLUDE_HEADER_KEY 2 #define JUST_AFTER_SUBJECT 4 #define JUST_AFTER_FROM 8 +#ifdef SENDER +#define JUST_AFTER_KEY 16 +#define ADDITIONAL_LINE 32 +#else #define ADDITIONAL_LINE 16 +#endif /* SENDER */ static int countStoredMail (filename) char *filename; @@ -1011,6 +1188,12 @@ char buff[HEADER_LEN]; #endif /* MIME */ #endif /* SHOWHEADER */ +#ifdef SENDER + char keys_buf[NSENDERS][HEADER_LEN]; + char *keys[NSENDERS]; + int n, l, l2; + int previous_key = -1; +#endif /* SENDER */ Bool msg_id_exist = False, from_exist = False; Bool in_header = False; if ( (fp = fopen(filename, "r")) == NULL ){ @@ -1021,6 +1204,14 @@ initializeHeaderList(); #endif DestroyHeaderWindow(); + +#ifdef SENDER + for (n = 0; n < NHeaderKey; n++) { + keys[n] = keys_buf[n]; + *keys[n] = '\0'; + } +#endif /* SENDER */ + while ((c= getHeaderLine(fp, in_header, previous_result, key, value)) != EOF){ previous_result = c; @@ -1035,16 +1226,36 @@ to_locale(subject, buff); if (mime_decode(buff, from) > 0) to_locale(from, buff); +#ifdef SENDER + for (n = 0; n < NHeaderKey; n++) { + if (mime_decode(buff, keys[n]) > 0) + to_locale(keys[n], buff); + } +#endif /* SENDER */ #else /* !NOTCNVT_ILLEGAL_JP */ mime_decode(buff, subject); to_locale(subject, buff); mime_decode(buff, from); to_locale(from, buff); +#ifdef SENDER + for (n = 0; n < NHeaderKey; n++) { + mime_decode(buff, keys[n]); + to_locale(keys[n], buff); + } +#endif /* SENDER */ #endif /* !NOTCNVT_ILLEGAL_JP */ #endif /* MIME && I18N */ +#ifdef SENDER + if (!store1Header(from, subject, keys)) +#else if (!store1Header(from, subject)) +#endif /* SENDER */ perror("failed to store header"); #endif /* SHOWHEADER */ +#ifdef SENDER + for (n = 0; n < NHeaderKey; n++) + *keys[n] = '\0'; +#endif /* SENDER */ } in_header = False; continue; } @@ -1063,11 +1274,42 @@ previous_result = JUST_AFTER_SUBJECT; #endif } +#ifdef SENDER + previous_key = -1; + for (n = 0; n < NHeaderKey; n++) { + if (strcmp(HeaderKeys[n], key) == 0) { + previous_result = previous_result | JUST_AFTER_KEY; + previous_key = n; + l = strlen(keys[n]); + l2 = strlen(value); + if (l + l2 >= HEADER_LEN) { + l2 = HEADER_LEN - l - 1; + value[l2] = '\0'; + previous_key = -1; + } + if (l2) strcat(keys[n], value); + break; + } + } +#endif /* SENDER */ } else if (ADDITIONAL_LINE) { if (previous_result & JUST_AFTER_SUBJECT) strcat(subject, value); else if (previous_result & JUST_AFTER_FROM) strcat(from, value); +#ifdef SENDER + if ((previous_result & JUST_AFTER_KEY) && + (n = previous_key) >= 0) { + l = strlen(keys[n]); + l2 = strlen(value); + if (l + l2 >= HEADER_LEN) { + l2 = HEADER_LEN - l - 1; + value[l2] = '\0'; + previous_key = -1; + } + if (l2) strcat(keys[n], value); + } +#endif /* SENDER */ } } else if (c == INCLUDE_HEADER_KEY && (strcmp("from%", key) == 0)){ @@ -1139,7 +1381,12 @@ if (!in_header || in_key) { *p = '\0'; return NO_HEADER_KEY; } +#ifdef SENDER + if (*p == ' ' && (previous_result & + (JUST_AFTER_SUBJECT + JUST_AFTER_FROM + JUST_AFTER_KEY))) +#else if (*p == ' ' && (previous_result & (JUST_AFTER_SUBJECT+JUST_AFTER_FROM))) +#endif /* SENDER */ return (previous_result | ADDITIONAL_LINE); return INCLUDE_HEADER_KEY; } @@ -1163,6 +1410,12 @@ msglen = strlen((char *)msg); #ifdef L10N textn_width = XTextWidth(StatusFont, msg, msglen); +#ifdef SENDER + if (MailReceived == False) + Tip.w = newtext1_width + newtext2_width + + XTextWidth(StatusFont, msg, msglen) -4; + else +#endif /* SENDER */ Tip.w = text1_width + text2_width + XTextWidth(StatusFont, msg, msglen) -4; #else @@ -1182,6 +1435,17 @@ XMapWindow(theDisplay, Tip.win); #ifdef L10N XSetFont(theDisplay, Tip.GC, StatusKFont->fid); +#ifdef SENDER + if (MailReceived == False) { + XDrawString16(theDisplay, Tip.win, Tip.GC, DRAWSTR_OFS, + Tip.h-5, (XChar2b *)Tip.newtext1, strlen((char *)Tip.newtext1)); + XDrawString16(theDisplay, Tip.win, Tip.GC, DRAWSTR_OFS +newtext1_width +textn_width, + Tip.h-5, (XChar2b *)Tip.newtext2, strlen((char *)Tip.newtext2)); + XSetFont(theDisplay, Tip.GC, StatusFont->fid); + XDrawString(theDisplay, Tip.win, Tip.GC, DRAWSTR_OFS +newtext1_width, Tip.h-5, + msg, msglen); + } else { +#endif /* SENDER */ XDrawString16(theDisplay, Tip.win, Tip.GC, DRAWSTR_OFS, Tip.h-5, (XChar2b *)Tip.text1, strlen((char *)Tip.text1)); XDrawString16(theDisplay, Tip.win, Tip.GC, DRAWSTR_OFS +text1_width +textn_width, @@ -1189,6 +1453,9 @@ XSetFont(theDisplay, Tip.GC, StatusFont->fid); XDrawString(theDisplay, Tip.win, Tip.GC, DRAWSTR_OFS +text1_width, Tip.h-5, msg, msglen); +#ifdef SENDER + } +#endif /* SENDER */ #else XDrawString(theDisplay, Tip.win, Tip.GC, DRAWSTR_OFS, Tip.h-5, msg, msglen); @@ -1209,11 +1476,21 @@ #ifdef L10N sprintf(str, " %d ", nmail); #else +#ifdef SENDER + if (MailReceived == False) + sprintf(str, (char *)Tip.newtext, nmail); + else +#endif /* SENDER */ sprintf(str, (char *)Tip.text, nmail); if ((nmail == 50) && ((p= strstr(str, "mails")) != NULL || (p= strstr(str, "Mails")) != NULL) || (p= strstr(str, "MAILS")) != NULL) p[4] = ' '; #endif +#ifdef SENDER + if (MailReceived == False) + PopupTipWindow(newtips_width, 0, str); + else +#endif /* SENDER */ PopupTipWindow(tips_width, 0, str); } @@ -1492,13 +1769,29 @@ if (Header.open) XMapRaised(theDisplay, Header.win); } +#ifdef SENDER +int store1Header (from, subject, keys) +char *from, *subject; +char *keys[]; +#else int store1Header (from, subject) char *from, *subject; +#endif /* SENDER */ { char *name; char *p; int i; +#ifdef SENDER + int n; + + for (n = 0; n < NHeaderKey; n++) { + if (NULL == (CurrentHeader->keys[n] = (char *)malloc( + (strlen(keys[n]) + 1) * sizeof(char)))) + return(0); + strcpy(CurrentHeader->keys[n], keys[n]); + } +#endif /* SENDER */ name = pickupName(from); if (NULL == (p = (char *)malloc( (strlen(name)+strlen(subject)+2)*sizeof(char)))) @@ -1508,6 +1801,10 @@ CurrentHeader->subject = p; if (NULL == (CurrentHeader->next = (HeaderL *)malloc(sizeof(HeaderL)))) { free(CurrentHeader->name); +#ifdef SENDER + for (n = 0; n < NHeaderKey; n++) + free(CurrentHeader->keys[n]); +#endif /* SENDER */ return(0); } strcpy(CurrentHeader->name, name); @@ -1545,7 +1842,8 @@ if (strchr(p, '@') != NULL) { p3 = p2; while (*++p3) ; while (*--p3 == ' ' || *p3 == ')' || *p3 == '/') ; - *p3 = '\0'; +/* *p3 = '\0'; */ + *++p3 = '\0'; p = ++p2; } } @@ -1554,8 +1852,169 @@ return str; } +#ifdef SENDER +static SenderToy* +getSender() +{ + SenderToy *s, *first = NULL, *current = NULL; + HeaderL *h; + int i, n; + + for (i = 0; i <= NSENDERS; i++) + Senders[i].used = False; + h = FirstHeader; + for (i = 0; i < Tip.number; i++) { + h = h->next; + if (h->next == NULL) + return(0); /* ? */ + } + while (h->next != NULL) { + for (i = 1; i <= NSENDERS; i++) { + s = &Senders[i]; + if ((n = s->keyindex) < 0) + continue; + if (matchAddress(h->keys[n], s->subaddr) == True) { + if (s->used == False) { + if (first == NULL) { + first = s; + if (MultiSender == False) { + first->next = NULL; + return(first); + } + } else + current->next = s; + current = s; + s->used = True; + } + goto next; + } + } + if (MultiSender == True) { + s = &Senders[0]; + if (s->used == False) { + if (first == NULL) + first = s; + else + current->next = s; + current = s; + s->used = True; + } + } + +next: + h = h->next; + } + if (current != NULL) + current->next = NULL; + if (MultiSender == False) { + first = &Senders[0]; + first->next = NULL; + return(first); + } + return(first); +} + +static Bool +matchAddress(str, subaddr) +char *str; +char ***subaddr; +{ + char **s; + char *p; + int m; + + if (subaddr == NULL) + return(False); + while (*subaddr != NULL) { + s = *subaddr++; + p = str; + m = 1; + while (*s != NULL) { + if ((p = strstr(p, *s++)) == NULL) { + m = 0; + break; + } + } + if (m) return(True); + } + return(False); +} + +static int +setAddress(str, subaddr) +char *str; +char ****subaddr; +{ + char *buf; + char **a, **b; + char ***s; + int n = 0; + + if (str == NULL) { + *subaddr = NULL; + return(0); + } + buf = (char *)malloc((strlen(str) + 1) * sizeof(char)); + strcpy(buf, str); +/* ' ', '\t', '\r', '\n', ',' で指定文字列を複数に分割する */ + a = splitString(buf, " \t\r\n,"); + b = a; + while (*b++ != NULL) + n++; + s = (char ***)malloc((n + 1) * sizeof(char **)); + *subaddr = s; +/* '*' をワイルドカードにするため、'*' で部分文字列に分割 */ + while (*a != NULL) + *s++ = splitString(*a++, "*"); + *s = NULL; + return(n); +} + +static int +setHeaderKey(str) +char *str; +{ + int n, l; + + l = strlen(str); + if (l && str[l - 1] == ':') + str[--l] = '\0'; + if (! l) + return(-1); + for (n = 0; n < NHeaderKey; n++) { + if (strcmp(str, HeaderKeys[n]) == 0) + return(n); + } + HeaderKeys[NHeaderKey] = (char *)malloc((strlen(str) + 1) * sizeof(char)); + strcpy(HeaderKeys[NHeaderKey], str); + return(NHeaderKey++); +} + +/* + * split a string into tokens + */ +static char** +splitString(str, sep) +char *str; +char *sep; +{ + char **s; + char *p; + int n = 0; + + s = (char **)malloc(sizeof(char *)); + p = strtok(str, sep); + while ((s[n++] = p) != NULL) { + s = (char**)realloc(s, (n + 1) * sizeof(char *)); + p = strtok(NULL, sep); + } + return(s); +} +#endif /* SENDER */ + #if defined(POP) && !defined(HAVE_STRNCASECMP) -int strncasecmp(*s1, *s2, len) { +/* int strncasecmp(*s1, *s2, len) { */ +int strncasecmp(s1, s2, len) char *s1, *s2; unsigned int len; { diff -urN oneko/mari.xbm oneko-2.0b-sender0.5/mari.xbm --- oneko/mari.xbm Thu Jan 1 09:00:00 1970 +++ oneko-2.0b-sender0.5/mari.xbm Thu May 23 23:29:59 2002 @@ -0,0 +1,8 @@ +#define mari_width 16 +#define mari_height 16 +#define mari_x_hot 7 +#define mari_y_hot 0 +static unsigned char mari_bits[] = { + 0xe0, 0x03, 0x18, 0x0c, 0x04, 0x18, 0x3e, 0x28, 0xe2, 0x2c, 0x83, 0x47, + 0x07, 0x4e, 0x05, 0x5a, 0x0d, 0x73, 0x89, 0x61, 0xba, 0x20, 0xe2, 0x20, + 0xb4, 0x13, 0x18, 0x0e, 0xe0, 0x03, 0x00, 0x00}; diff -urN oneko/mari_mask.xbm oneko-2.0b-sender0.5/mari_mask.xbm --- oneko/mari_mask.xbm Thu Jan 1 09:00:00 1970 +++ oneko-2.0b-sender0.5/mari_mask.xbm Thu May 23 23:29:59 2002 @@ -0,0 +1,6 @@ +#define mari_mask_width 16 +#define mari_mask_height 16 +static unsigned char mari_mask_bits[] = { + 0xe0, 0x03, 0xf8, 0x0f, 0xfc, 0x1f, 0xfe, 0x3f, 0xfe, 0x3f, 0xff, 0x7f, + 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xfe, 0x3f, 0xfe, 0x3f, + 0xfc, 0x1f, 0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00}; diff -urN oneko/mkpixmap.sh oneko-2.0b-sender0.5/mkpixmap.sh --- oneko/mkpixmap.sh Thu Jan 1 09:00:00 1970 +++ oneko-2.0b-sender0.5/mkpixmap.sh Thu May 23 23:29:59 2002 @@ -0,0 +1,69 @@ +#!/bin/sh + +PERL=perl +# BMTOA=bmtoa +# export BMTOA + + oneko=yes + tora=yes +kotatsu=yes + ocha=yes + post=yes + mari=yes + sender=yes + + oneko_fg=black + tora_fg=sienna +kotatsu_fg=black + ocha_fg=black + post_fg=black + mari_fg=yellow + sender_fg=black + + oneko_bg=white + tora_bg=moccasin +kotatsu_bg=#DD8800 + ocha_bg=#DD8800 + post_bg=red + mari_bg=red + sender_bg=white + +oneko_xbm_dir=bitmaps +oneko_xpm_dir=pixmaps + tora_xbm_dir=bitmaps.tora + tora_xpm_dir=pixmaps.tora + +if [ ! -f xbm2xpm.pl ]; then + echo 'can not run in this directory' + exit 1 +fi + +test "$oneko" = yes && ( + echo "mkdir $oneko_xpm_dir" + test -d $oneko_xpm_dir || mkdir -p $oneko_xpm_dir + echo "cd $oneko_xpm_dir" + cd $oneko_xpm_dir + $PERL ../xbm2xpm.pl -bg $oneko_bg -fg $oneko_fg \ + `find ../$oneko_xbm_dir/* | grep -v _mask` +) + +test "$tora" = yes && ( + echo "mkdir $tora_xpm_dir" + test -d $tora_xpm_dir || mkdir -p $tora_xpm_dir + echo "cd $tora_xpm_dir" + cd $tora_xpm_dir + $PERL ../xbm2xpm.pl -bg $tora_bg -fg $tora_fg \ + `find ../$tora_xbm_dir/* | grep -v _mask` +) + +test "$kotatsu" = yes && \ + $PERL ./xbm2xpm.pl -bg $kotatsu_bg -fg $kotatsu_fg kotatsu +test "$ocha" = yes && \ + $PERL ./xbm2xpm.pl -bg $ocha_bg -fg $ocha_fg ocha +test "$post" = yes && \ + $PERL ./xbm2xpm.pl -bg $post_bg -fg $post_fg post +test "$mari" = yes && \ + $PERL ./xbm2xpm.pl -bg $mari_bg -fg $mari_fg post +test "$sender" = yes && \ + $PERL ./xbm2xpm.pl -bg $sender_bg -fg $sender_fg sender + diff -urN oneko/oneko.c oneko-2.0b-sender0.5/oneko.c --- oneko/oneko.c Thu May 23 23:24:02 2002 +++ oneko-2.0b-sender0.5/oneko.c Thu May 23 23:53:42 2002 @@ -16,6 +16,13 @@ #endif /* SHAPE */ #include +#include +#include +#if (defined(SYSV) || defined(SVR4)) +#define rindex(a, b) strrchr(a, b) +#else +#include +#endif /* SYSV */ #include #include @@ -44,6 +51,32 @@ #endif /* HAVE_SYS_RESOURCE_H */ #endif /* HAVE_SETPRIORITY */ +#ifdef MARI +#ifdef HAVE_UNISTD_H +#include +#endif /* HAVE_UNISTD_H */ +#ifndef PI +#ifdef M_PI +#define PI M_PI +#else +#define PI (3.14159265358979323846) +#endif /* M_PI */ +#endif /* !PI */ +#ifndef HAVE_DRAND48 +#ifdef HAVE_RANDOM +#define srand48(x) srandom((unsigned long)(x)) +#define drand48() ((double)random() / 0x7fffffff) +#else +#ifdef HAVE_RAND +#define srand48(x) srand((unsigned)(x)) +#define drand48() ((double)rand() / RAND_MAX) +#else +/* srand48(), drand48() */ +#endif /* HAVE_RAND */ +#endif /* HAVE_RANDOM */ +#endif /* HAVE_DRAND48 */ +#endif /* MARI */ + #ifdef MAILNOTIFY /* * font initialization @@ -91,9 +124,22 @@ Bool BackingStore; /* backingstore */ Bool CheckMail; /* mail */ Bool AutoRaise; /* autoraise */ +Bool KotatsuInit; /* kotatsu initial state */ +#ifdef SENDER +Bool SenderAction; /* use sender action */ +Bool MultiSender; /* multiple senders */ +#endif /* SENDER */ #ifdef HAVE_SETPRIORITY int Priority; /* process priority */ #endif +#ifdef MARI +int MariAction; /* use mari action */ +int MariSpeed; /* maximum mari speed */ +double MariNext; /* probability of mari next moving */ +double MariAccel; /* mari acceleration */ +double MariDecel; /* mari deceleration */ +int Gravity; /* gravity */ +#endif /* MARI */ /* @@ -363,6 +409,13 @@ PrevMouseX = MouseX; PrevMouseY = MouseY; +#ifdef SENDER + if ((CurrentSender != NULL) && (Sender.state == TOY_YES)) { + MouseX = Sender.x + Sender.hot_x; + MouseY = Sender.y + Sender.hot_y; + } + else +#endif /* SENDER */ if (Post.state == TOY_YES) { MouseX = Post.x + Post.hot_x; MouseY = Post.y + Post.hot_y; @@ -371,6 +424,12 @@ MouseX = Kotatsu.x + Kotatsu.hot_x; MouseY = Kotatsu.y + Kotatsu.hot_y; } +#ifdef MARI + else if ((MariAction == True) && (Mari.state == TOY_YES)) { + MouseX = Mari.x + Mari.hot_x; + MouseY = Mari.y + Mari.hot_y; + } +#endif /* MARI */ else { XQueryPointer(theDisplay, theNeko, &query_root, &query_child, @@ -404,6 +463,137 @@ NekoMoveDy = Dy; } +#ifdef MARI +/* + * Initialize Mari moving + */ + +static void +InitMari() { + time_t t; + + if (MariAction == False) + return; + + srand48((long)time(&t)); + + if (MariSpeed < 0.0) + MariSpeed *= -1; + if (MariSpeed > theRootHeight) + MariSpeed = theRootHeight; + if (MariSpeed > theRootWidth) + MariSpeed = theRootWidth; + + if (MariNext > 100.0) + MariNext = 100.0; + else + if (MariNext < 0.0) + MariNext = 0.0; + MariNext /= 100.0; + + if (MariAccel > 200.0) + MariAccel = 200.0; + else + if (MariAccel < 0.0) + MariAccel = 0.0; + MariAccel /= 100.0; + + if (MariDecel > 100.0) + MariDecel = 100.0; + else + if (MariDecel < 0.0) + MariDecel = 0.0; + MariDecel /= 100.0; + + if (Gravity > theRootHeight) + Gravity = theRootHeight; + else + if (Gravity <= 0) + Gravity = 1; + + ToyAppear(&Mari, NekoX - Mari.hot_x, NekoY - Mari.hot_y); + Mari.stop = True; +} + +/* + * Mari moving + */ + +static void +MariMove(toy) +Toy *toy; +{ + Window query_root, query_child; + int mouse_x, mouse_y; + int relative_x, relative_y; + unsigned int modkey_mask; + int x, y; + double v, a; + + if (toy->state != TOY_YES) + return; + if (toy->stop == True) { + if (drand48() < MariNext) { + v = drand48() * MariSpeed; + a = drand48() * PI; + toy->vx = (int)(v * cos(a)); + toy->vy = - (int)(v * sin(a)); + if (toy->vx || toy->vy) { + toy->stop = False; + ToyMove(toy, toy->x, toy->y); + } + } + } else { + toy->x += toy->vx; + toy->y += toy->vy; + if (toy->x <= 0) { + toy->x = 0; + toy->vx *= -1; + } else if (toy->x >= theRootWidth - toy->width) { + toy->x = theRootWidth - toy->width; + toy->vx *= -1; + } + if (toy->y <= 0) { + toy->y = 0; + toy->vy *= - 1; + } else if (toy->y >= theRootHeight - toy->height) { + toy->y = theRootHeight - toy->height; + toy->vx = (int)(MariDecel * toy->vx); + toy->vy = - (int)(MariDecel * toy->vy); + toy->vy = toy->vy / Gravity * Gravity; + if (toy->vx == 0 && toy->vy == 0) + toy->stop = True; + } else if (NekoX >= toy->x && NekoX <= toy->x + toy->width && + NekoY >= toy->y && NekoY <= toy->y + toy->height) { + toy->stop = True; + } else { + XQueryPointer(theDisplay, theNeko, + &query_root, &query_child, + &mouse_x, &mouse_y, + &relative_x, &relative_y, + &modkey_mask); + if (mouse_x >= toy->x && mouse_x <= toy->x + toy->width && + mouse_y >= toy->y && mouse_y <= toy->y + toy->height) { + x = toy->x - toy->vx / 2 - mouse_x; + y = toy->y - toy->vy / 2 - mouse_y; + if (x || y) { + v = sqrt((double)(toy->vx * toy->vx + toy->vy * toy->vy)); + a = atan2(x, y); + toy->vx = (int)(MariAccel * v * cos(a)); + toy->vy = (int)(MariAccel * v * sin(a)); + } else { + toy->vx = - (int)(MariAccel * toy->vx); + toy->vy = - (int)(MariAccel * toy->vy); + } + } else { + toy->vy += Gravity; + } + } + ToyMove(toy, toy->x, toy->y); + } +} +#endif /* MARI */ + /* * Thinking ....... @@ -419,8 +609,30 @@ animation = GetAnimation(); DrawNeko(NekoX, NekoY, animation); +#ifdef MARI + if ((MariAction == True) && (Mari.state == TOY_YES)) { + MariMove(&Mari); + } +#endif /* MARI */ + TickCount(); +#ifdef SENDER + if (CurrentSender != NULL) { + switch (Sender.state) { + case TOY_APPEAR: + SetNekoState(NOTICE_STATE); + SetToyState(&Sender, TOY_YES); + Interval(); + return; + case TOY_DISAPPEAR: + SetNekoState(NOTICE_STATE); + SetToyState(&Sender, TOY_NO); + Interval(); + return; + } + } +#endif /* SENDER */ switch (Post.state) { case TOY_APPEAR: SetNekoState(NOTICE_STATE); @@ -444,6 +656,23 @@ SetToyState(&Kotatsu, TOY_NO); Interval(); return; +#ifdef MARI + default: + if (MariAction == True) { + switch (Mari.state) { + case TOY_APPEAR: + SetNekoState(NOTICE_STATE); + SetToyState(&Mari, TOY_YES); + Interval(); + return; + case TOY_DISAPPEAR: + SetNekoState(NOTICE_STATE); + SetToyState(&Mari, TOY_NO); + Interval(); + return; + } + } +#endif /* MARI */ } } @@ -468,6 +697,13 @@ if (StatusTable[NekoState].next_state != NO_STATE) { SetNekoState(StatusTable[NekoState].next_state); } +#ifdef SENDER + if (StatusTable[NekoState].state_when_moved != NO_STATE) { + if ((CurrentSender != NULL) && (Sender.state == TOY_YES)) { + CurrentSender = NextSender(CurrentSender); + } + } +#endif /* SENDER */ end: Interval(); @@ -487,7 +723,14 @@ /* Initialize Neko */ SetNekoState(INITIAL_STATE); - SetToyState(&Kotatsu, TOY_NO); +#ifdef MARI + if (MariAction == False) +#endif + if (KotatsuInit == True) { + ToyAppear(&Kotatsu, Kotatsu.x, Kotatsu.y); + } else { + SetToyState(&Kotatsu, TOY_NO); + } animation = GetAnimation(); @@ -518,6 +761,9 @@ (void) setitimer(ITIMER_REAL, &value, (struct itimerval *) 0); +#ifdef MARI + InitMari(); +#endif /* MARI */ /* main loop */ do { @@ -627,12 +873,28 @@ text2_width = XTextWidth16(StatusKFont, (XChar2b *)Tip.text2, strlen((char *)Tip.text2)/2); textn_width = XTextWidth(StatusFont, Tip.textn, strlen(Tip.textn)); tips_width = text1_width + textn_width + text2_width + 12; +#ifdef SENDER + euc2jis((char *)Tip.newtext1, newtext1); + euc2jis((char *)Tip.newtext2, newtext2); + newtext1_width = XTextWidth16(StatusKFont, (XChar2b *)Tip.newtext1, strlen((char *)Tip.newtext1)/2); + newtext2_width = XTextWidth16(StatusKFont, (XChar2b *)Tip.newtext2, strlen((char *)Tip.newtext2)/2); + newtips_width = newtext1_width + textn_width + newtext2_width + 12; +#endif /* SENDER */ #else /* !L10N */ strcpy((char *)Tip.text, text); +#ifdef SENDER + strcpy((char *)Tip.newtext, newtext); +#endif /* SENDER */ #ifdef I18N tips_width = XTextWidth(StatusFont, Tip.text, strlen((char *)Tip.text))+12; +#ifdef SENDER + newtips_width = XTextWidth(StatusFont, Tip.newtext, strlen((char *)Tip.newtext))+12; +#endif /* SENDER */ #else /* !I18N */ tips_width = XTextWidth(StatusFont, Tip.text, strlen((char *)Tip.text))+6; +#ifdef SENDER + newtips_width = XTextWidth(StatusFont, Tip.newtext, strlen((char *)Tip.newtext))+6; +#endif /* SENDER */ #endif /* !I18N */ #endif /* !L10N */ Tip.number = 0; diff -urN oneko/oneko.h oneko-2.0b-sender0.5/oneko.h --- oneko/oneko.h Thu May 23 23:24:02 2002 +++ oneko-2.0b-sender0.5/oneko.h Thu May 23 23:52:36 2002 @@ -33,6 +33,7 @@ ButtonReleaseMask | \ VisibilityChangeMask) +#ifdef NO_TOYCURSOR #ifdef MAILNOTIFY #define TOY_EVENT_MASK (ExposureMask | \ KeyPressMask | \ @@ -41,6 +42,7 @@ EnterWindowMask | \ LeaveWindowMask | \ ButtonReleaseMask | \ + Button1MotionMask | \ VisibilityChangeMask) #else #define TOY_EVENT_MASK (ExposureMask | \ @@ -48,15 +50,39 @@ KeyReleaseMask | \ ButtonPressMask | \ ButtonReleaseMask | \ + Button1MotionMask | \ VisibilityChangeMask) #endif /* MAILNOTIFY */ +#else +#ifdef MAILNOTIFY +#define TOY_EVENT_MASK (ExposureMask | \ + KeyPressMask | \ + KeyReleaseMask | \ + ButtonPressMask | \ + EnterWindowMask | \ + LeaveWindowMask | \ + ButtonReleaseMask | \ + VisibilityChangeMask) +#else +#define TOY_EVENT_MASK (ExposureMask | \ + KeyPressMask | \ + KeyReleaseMask | \ + ButtonPressMask | \ + ButtonReleaseMask | \ + VisibilityChangeMask) +#endif /* MAILNOTIFY */ +#endif /* NO_TOYCURSOR */ #define ALL_EVENT_MASK (NEKO_EVENT_MASK | TOY_EVENT_MASK) #define Post Toys[0] #define Kotatsu Toys[1] +#ifdef MARI +#define Mari Toys[2] +#define NTOYS 3 +#else #define NTOYS 2 - +#endif /* MARI */ /* * Toy structure @@ -71,12 +97,40 @@ XColor fg_color, bg_color; char *foreground, *background; char *bitmap, *bitmask; +#ifdef XPM + char *pixmap; +#endif /* XPM */ int state; int x, y; int hot_x, hot_y; unsigned int width, height; +#ifdef MARI + int vx, vy; + Bool stop; +#endif /* MARI */ } Toy; +#ifdef SENDER +#define Sender CurrentSender->toy + +/* + * SenderToy structure + */ + +typedef struct SenderToy { + Toy toy; + char *geometry; + Bool setgeometry; + char *address; + char ***subaddr; + char *headerkey; + int keyindex; + Bool used; + struct SenderToy *next; +} SenderToy; + +#endif /* SENDER */ + #ifdef MAILNOTIFY /* * Tips structure @@ -84,9 +138,16 @@ typedef struct { int x, y, w, h, open, number; char text[MAX_TXTLEN]; +#ifdef SENDER + char newtext[MAX_TXTLEN]; +#endif /* SENDER */ #ifdef L10N wchar_t text1[MAX_TXTLEN_HALF]; wchar_t text2[MAX_TXTLEN_HALF]; +#ifdef SENDER + wchar_t newtext1[MAX_TXTLEN_HALF]; + wchar_t newtext2[MAX_TXTLEN_HALF]; +#endif /* SENDER */ char textn[8]; #endif /* L10N */ Window win; @@ -100,6 +161,9 @@ struct HeaderL *next; char *name; char *subject; +#ifdef SENDER + char *keys[NSENDERS]; +#endif /* SENDER */ } HeaderL; @@ -150,6 +214,9 @@ extern int NekoSpeed; /* speed */ extern int IdleSpace; /* idle */ extern char *BitmapDir; /* bitmapdir */ +#ifdef XPM +extern char *PixmapDir; /* pixmapdir */ +#endif /* XPM */ extern char *CursorBitmap; /* cursor bitmap */ extern char *CursorBitmask; /* cursor bitmask */ extern Cursor theCursor; /* mouse cursor id */ @@ -162,9 +229,28 @@ extern char *MailFile; /* mail file name */ extern Bool AutoRaise; /* auto raise */ extern char *Geometry; /* post geometry */ +extern char *KotatsuGeometry; /* kotatsu geometry */ +extern Bool KotatsuInit; /* kotatsu initial state */ +#ifdef SENDER +extern Bool SenderAction; /* use sender action */ +extern Bool MultiSender; /* multiple senders */ +extern char *SenderDirection; /* sender direction */ +extern int SenderX; /* sender x position */ +extern int SenderY; /* sender y position */ +extern int SenderShiftX; /* sender x direction */ +extern int SenderShiftY; /* sender y direction */ +#endif /* SENDER */ #ifdef HAVE_SETPRIORITY extern int Priority; /* process priority */ #endif +#ifdef MARI +extern Bool MariAction; /* use mari action */ +extern int MariSpeed; /* maximum mari speed */ +extern double MariNext; /* probability of mari next moving */ +extern double MariAccel; /* mari acceleration */ +extern double MariDecel; /* mari deceleration */ +extern int Gravity; /* gravity */ +#endif /* MARI */ #ifdef MAILACTION extern char *MailActionCmd; /* mail action command */ #endif @@ -173,11 +259,18 @@ extern char *Statusfontstr; extern char *text; extern int fontheight, tips_width, tips_height, tips_border; +#ifdef SENDER +extern char *newtext; +extern int newtips_width; +#endif /* SENDER */ extern int TipOffsetX, TipOffsetY; extern XColor TipBgColor, TipFgColor, TipBdColor; #ifdef I18N extern XFontSet StatusFontset; -extern int text1_width, textn_width; +extern int text1_width; +#ifdef SENDER +extern int newtext1_width; +#endif /* SENDER */ extern char *lang; #endif /* I18N */ #ifdef L10N @@ -186,6 +279,10 @@ extern char *Statuskfontstr; extern char *text1, *text2; extern int text1_width, text2_width, textn_width; +#ifdef SENDER +#endif /* SENDER */ +extern char *newtext1, *newtext2; +extern int newtext1_width, newtext2_width; #endif /* L10N */ extern int ShowTips; extern unsigned char gray_bits[]; @@ -198,6 +295,10 @@ #define gray_width 8 #define gray_height 8 #define TEXTSTR "You have %d mails " /* default tip strings */ +#ifdef SENDER +#define NEWTEXTSTR "You received %d new mails " + /* default (new) tip strings */ +#endif /* SENDER */ #endif /* MAILNOTIFY */ extern long MailCount; @@ -206,6 +307,10 @@ #endif extern Toy Toys[]; /* 0 := Post, 1 := Kotatsu */ +#ifdef SENDER +extern SenderToy Senders[]; /* Sender, Sender1, Sender2, ... */ +extern SenderToy *CurrentSender; /* current sender */ +#endif /* SENDER */ extern Pixmap NekoSave; /* copy neko pixmap */ extern GC SaveGC; /* copy GC id */ @@ -217,6 +322,17 @@ void SetToyState(); void ToyAppear(); void ToyDisappear(); +void ToyExpose(); +#if defined(NO_TOYCURSOR) || defined(MARI) +void ToyMove(); +#endif /* NO_TOYCURSOR || MARI */ +#ifdef SENDER +void SetSenderGeometry(); +void SenderAppear(); +void SenderDisappear(); +void SenderExpose(); +SenderToy *NextSender(); +#endif /* SENDER */ void SetMail(); void MailCheck(); diff -urN oneko/oneko.man oneko-2.0b-sender0.5/oneko.man --- oneko/oneko.man Thu May 23 23:24:00 2002 +++ oneko-2.0b-sender0.5/oneko.man Fri May 24 00:06:12 2002 @@ -17,6 +17,24 @@ .B -kotatsubitmask .I bitmapmask ] [ +.B -postbitmap +.I bitmapfile +] [ +.B -postbitmask +.I bitmapmask +] [ +.B -maribitmap +.I bitmapfile +] [ +.B -maribitmask +.I bitmapmask +] [ +.B -senderbitmap +.I bitmapfile +] [ +.B -senderbitmask +.I bitmapmask +] [ .B -mousebitmap .I bitmapfile ] [ @@ -50,6 +68,18 @@ .B -pbg .I color ] [ +.B -mafg +.I color +] [ +.B -mabg +.I color +] [ +.B -sfg +.I color +] [ +.B -sbg +.I color +] [ .B -mfg .I color ] [ @@ -83,7 +113,7 @@ .I seconds ] [ .B -file -.I filename +.I file_name ] [ .B -autoraise ] [ @@ -93,11 +123,49 @@ .B -popserver .I server ] [ +.B -geometry +.I geometry +] [ +.B -kotatsu +] [ +.B -kotatsugeometry +.I geometry +] [ +.B -sender +] [ +.B -multisender +] [ +.B -sendergeometry +.I sendergeometry +] [ +.B -direction +.I direction +] [ +.B -mari +] [ +.B -marispeed +.I pixel +] [ +.B -marinext +.I percent +] [ +.B -mariaccel +.I percent +] [ +.B -maridecel +.I percent +] [ +.B -gravity +.I pixel +] [ .B -text .I strings ] [ +.B -newtext +.I strings +] [ .B -fn -.I fontset +.I font_set ] [ .B -space .I dots @@ -144,6 +212,30 @@ specifies a bitmap mask file name for "kotatsu". It takes /usr/lib/X11/oneko/kotatsu_mask.xbm as default value. .TP +.BI -postbitmap " bitmapfile" +specifies a bitmap file name for mail post. It takes +/usr/lib/X11/oneko/post.xbm as default value. +.TP +.BI -postbitmask " bitmapmask" +specifies a bitmap mask file name for mail post. It takes +/usr/lib/X11/oneko/post_mask.xbm as default value. +.TP +.BI -maribitmap " bitmapfile" +specifies a bitmap file name for "mari". It takes +/usr/lib/X11/oneko/mari.xbm as default value. +.TP +.BI -maribitmask " bitmapmask" +specifies a bitmap mask file name for "mari". It takes +/usr/lib/X11/oneko/mari_mask.xbm as default value. +.TP +.BI -senderbitmap " bitmapfile" +specifies a bitmap file name for sender. It takes +/usr/lib/X11/oneko/sender.xbm as default value. +.TP +.BI -senderbitmask " bitmapmask" +specifies a bitmap mask file name for sender. It takes +/usr/lib/X11/oneko/post_mask.xbm as default value. +.TP .BI -mousebitmap " bitmapfile" specifies a bitmap file name for mouse cursor. It takes /usr/lib/X11/oneko/cursor.xbm as default value. @@ -176,10 +268,22 @@ specifies the background color of the "kotatsu". .TP .BI -pfg " color" -specifies the foreground color of the mail box. +specifies the foreground color of the mail post. .TP .BI -pbg " color" -specifies the background color of the mail box. +specifies the background color of the mail post. +.TP +.BI -mafg " color" +specifies the foreground color of the "mari". +.TP +.BI -mabg " color" +specifies the background color of the "mari". +.TP +.BI -sfg " color" +specifies the foreground color of the sender. +.TP +.BI -sbg " color" +specifies the background color of the sender. .TP .BI -mfg " color" specifies the foreground color of the mouse cursor. @@ -243,10 +347,64 @@ .BI -popserver " server" asks the pop server instead of cheking local mail spool. .TP +.BI -geometry " geometry" +set the mail post geometry at root window of X. +.TP +.B -kotatsu +tells +.I oneko +show the bitmap of kotatsu when oneko starts. +.TP +.BI -kotatsugeometry " geometry" +set the "kotatsu" geometry at root window of X. +.TP +.B -sender +tells +.I oneko +show the bitmap of sender. +.TP +.BI -multisender +tells +.I oneko +to show the multiple bitmaps of senders. +.TP +.BI -sendergeometry " geometry" +set the sender geometry at root window of X. +.TP +.BI -direction " direction" +set the direction to show the bitmaps of senders. +.TP +.BI -mari +tells +.I oneko +to use "mari" action. +.TP +.BI -marispeed " pixel" +specifies the maximum speed of "mari" (the default is 24 pixels per move). +.TP +.BI -marinext " percent" +specifies the probability of next "mari" moving. +.TP +.BI -mariaccel " percent" +specifies the acceleration of the speed when "mari" reflects +at the mouse cursor. +.TP +.BI -maridecel " percent" +specifies the deceleration of the speed when "mari" reflects +on the bottom of the root window. +.TP +.BI -gravity " pixel" +specifies the gravity for "mari" action (the default is 2). +.TP .BI -text " strings" specifies the message to notify how many mails arrives in the tip -window. `%s' in the message will be replaced the number of arrived +window. `%d' in the message will be replaced the number of arrived mails. +.TP +.BI -newtext " strings" +specifies the message to notify how many new mails arrives in the tip +window. `%d' in the message will be replaced the number of arrived +new mails. .TP .BI -fn " font_set" set the font set to display in the tip windows. diff -urN oneko/oneko.man.jp oneko-2.0b-sender0.5/oneko.man.jp --- oneko/oneko.man.jp Thu May 23 23:24:00 2002 +++ oneko-2.0b-sender0.5/oneko.man.jp Fri May 24 01:56:24 2002 @@ -1,4 +1,4 @@ -.TH ONEKO 6 "29 October 1991" "X Version 11" +.TH ONEKO 6 "24 May 2002" "X Version 11" .SH $@L>A0(J oneko \- X Window $@$N2hLL>e$GG-$H$M$:$_$,$*$C$+$1$C$3$9$k%W%m%0%i%`(J .SH $@7A<0(J @@ -17,6 +17,24 @@ .B -kotatsubitmask .I bitmapmask ] [ +.B -postbitmap +.I bitmapfile +] [ +.B -postbitmask +.I bitmapmask +] [ +.B -maribitmap +.I bitmapfile +] [ +.B -maribitmask +.I bitmapmask +] [ +.B -senderbitmap +.I bitmapfile +] [ +.B -senderbitmask +.I bitmapmask +] [ .B -mousebitmap .I bitmapfile ] [ @@ -50,6 +68,18 @@ .B -pbg .I color ] [ +.B -mafg +.I color +] [ +.B -mabg +.I color +] [ +.B -sfg +.I color +] [ +.B -sbg +.I color +] [ .B -mfg .I color ] [ @@ -93,9 +123,48 @@ .B -popserver .I server ] [ +.B -geometry +.I geometry +] [ +.B -kotatsu +.I kotatsu +] [ +.B -kotatsugeometry +.I geometry +] [ +.B -sender +] [ +.B -multisender +] [ +.B -sendergeometry +.I geometry +] [ +.B -direction +.I direction +] [ +.B -mari +] [ +.B -marispeed +.I pixel +] [ +.B -marinext +.I percent +] [ +.B -mariaccel +.I percent +] [ +.B -maridecel +.I percent +] [ +.B -gravity +.I pixel +] [ .B -text .I strings ] [ +.B -newtext +.I strings +] [ .B -fn .I font_set ] [ @@ -122,9 +191,17 @@ $@Cf1{%^%&%9%\%?%s$G$3$?$D$,2hLL$+$i>C$($^$9!#1&%^%&%9%\%?%s$G%/%j%C%/$9(J $@$k$H!V$*G-!W$,=*N;$7$^$9!#(J .PP -$@%a!<%k$,E~Ce$9$k$H!"M9JX%]%9%H$,8=$l$FG-$,%]%9%H$KAv$j$^$9!#%]%9%H$N>e(J +$@%a!<%k$,E~Ce$9$k$H!":9$7=P$7?M(J($@G-(J)$@$HM9JX%]%9%H$,8=$l$FG-$O:9$7=P$7?M(J +$@$N=j$^$GAv$C$F%a!<%k$re(J $@$K%^%&%9%+!<%=%k$rCV$/$HE~Ce$7$?%a!<%k$N?t$,I=<($5$l!"Cf%^%&%9%\%?%s$G(J $@%a!<%k$N0lMw$,I=<($5$l$^$9!#(J +.PP +$@:9$7=P$7?M(J($@G-(J)$@$O%"%I%l%9$K1~$8$FJL$K$9$k$3$H$,$G$-$^$9!#(J +.PP +.B -mari +$@%*%W%7%g%s$H$H$b$K!V$*G-!W$r5/F0$9$k$H!V5E!W$,8=$l$F%i%s%@%`$K(J +$@D7$M$^$9!#!V$*G-!W$O!V5E!W$rDI$$$+$1$^$9!#(J +$@!V5E!W$rCf1{%^%&%9%\%?%s$G%/%j%C%/$9$k$H!V$3$?$D!W$KJQ$o$j$^$9!#(J .SH $@%*%W%7%g%s(J .I oneko $@$K$O$r;XDj$7$^$9!#%G%U%)(J $@%k%H$G$O(J /usr/lib/X11/oneko/kotatsu_mask.xbm $@$rFI$_9~$_$^$9!#(J .TP +.BI -postbitmap " bitmapfile" +$@M9JX%]%9%H$rI=<($9$k$?$a$N%S%C%H%^%C%W%U%!%$%kL>$r;XDj$7$^$9!#%G%U%)%k%H$G(J +$@$O(J /usr/lib/X11/oneko/post.xbm $@$rFI$_9~$_$^$9!#(J +.TP +.BI -postbitmask " bitmapmask" +$@M9JX%]%9%H$rI=<($9$k$?$a$N%S%C%H%^%C%W%^%9%/%U%!%$%kL>$r;XDj$7$^$9!#%G%U%)(J +$@%k%H$G$O(J /usr/lib/X11/oneko/post_mask.xbm $@$rFI$_9~$_$^$9!#(J +.TP +.BI -maribitmap " bitmapfile" +$@5E$rI=<($9$k$?$a$N%S%C%H%^%C%W%U%!%$%kL>$r;XDj$7$^$9!#%G%U%)%k%H$G(J +$@$O(J /usr/lib/X11/oneko/mari.xbm $@$rFI$_9~$_$^$9!#(J +.TP +.BI -maribitmask " bitmapmask" +$@5E$rI=<($9$k$?$a$N%S%C%H%^%C%W%^%9%/%U%!%$%kL>$r;XDj$7$^$9!#%G%U%)(J +$@%k%H$G$O(J /usr/lib/X11/oneko/mari_mask.xbm $@$rFI$_9~$_$^$9!#(J +.TP +.BI -senderbitmap " bitmapfile" +$@:9$7=P$7?M(J($@G-(J)$@$rI=<($9$k$?$a$N%S%C%H%^%C%W%U%!%$%kL>$r;XDj$7$^$9!#%G%U%)%k%H$G(J +$@$O(J /usr/lib/X11/oneko/sender.xbm $@$rFI$_9~$_$^$9!#(J +.TP +.BI -senderbitmask " bitmapmask" +$@:9$7=P$7?M(J($@G-(J)$@$rI=<($9$k$?$a$N%S%C%H%^%C%W%^%9%/%U%!%$%kL>$r;XDj$7$^$9!#%G%U%)(J +$@%k%H$G$O(J /usr/lib/X11/oneko/sender_mask.xbm $@$rFI$_9~$_$^$9!#(J +.TP .BI -mousebitmap " bitmapfile" $@%^%&%9%+!<%=%k$rI=<($9$k$?$a$N%S%C%H%^%C%W%U%!%$%kL>$r;XDj$7$^$9!#%G%U%)(J $@%k%H$G$O(J /usr/lib/X11/oneko/cursor.xbm $@$rFI$_9~$_$^$9!#(J @@ -190,6 +291,18 @@ .BI -pbg " color" $@M9JX%]%9%H$NGX7J?'$r;XDj$7$^$9!#(J .TP +.BI -mafg " color" +$@5E$NA07J?'$r;XDj$7$^$9!#(J +.TP +.BI -mabg " color" +$@5E$NGX7J?'$r;XDj$7$^$9!#(J +.TP +.BI -sfg " color" +$@:9$7=P$7?M(J($@G-(J)$@$NA07J?'$r;XDj$7$^$9!#(J +.TP +.BI -sbg " color" +$@:9$7=P$7?M(J($@G-(J)$@$NGX7J?'$r;XDj$7$^$9!#(J +.TP .BI -mfg " color" $@%^%&%9%+!<%=%k$NA07J?'$r;XDj$7$^$9!#(J .TP @@ -247,9 +360,59 @@ $@%m!<%+%k%a!<%k%9%W!<%k$G$J$/!"(JPOP $@%5!<%P$KLd$$9g$o$;$FE~Ce$7$?%a!<%k$N(J $@3NG'$r$7$^$9!#(J .TP +.BI -geometry " geometry" +$@M9JX%]%9%H$rI=<($9$k0LCV$r;XDj$7$^$9!#(J +.TP +.BI -kotatsu +$@:G=i$+$i$3$?$D$rI=<($7$^$9!#(J +.TP +.BI -kotatsugeometry " geometry" +$@$3$?$D$rI=<($9$k0LCV$r;XDj$7$^$9!#(J +.TP +.BI -sender +$@$3$N%*%W%7%g%s$r;XDj$9$k$H!":9$7=P$7?M(J($@G-(J)$@$rI=<($7$^$9!#(J +.TP +.BI -multisender +$@$3$N%*%W%7%g%s$r;XDj$9$k$H!"J#?t$N:9$7=P$7?M(J($@G-(J)$@$rI=<($7$^$9!#(J +$@%G%U%)%k%HF0:n$G$9!#(J +.TP +.BI -sendergeometry " geometry" +$@:9$7=P$7?M(J($@G-(J)$@$rI=<($9$k0LCV$r;XDj$7$^$9!#(J +.TP +.BI -direction " direction" +$@J#?t$N:9$7=P$7?M(J($@G-(J)$@$rJB$Y$FI=<($9$kJ}8~$r;XDj$7$^$9!#(J +left, right, up, down $@$+$iA*Br2DG=$G$9!#%G%U%)%k%H$O(J left $@$G$9!#(J +.TP +.BI -mari +$@$3$N%*%W%7%g%s$r;XDj$9$k$H!":G=i$K5E$,8=$l%i%s%@%`$KD7$M$^$9!#(J +.TP +.BI -marispeed "pixel" +$@5E$NB.$5$N:GBgCM$r;XDj$7$^$9!#(J-time $@%*%W%7%g%s$G;XDj$7$?;~4VFb$K(J +$@0\F02DG=$J%T%/%;%kCM$G$9!#%G%U%)%k%H$O(J 24 $@$G$9!#(J +.TP +.BI -marinext " percent" +$@5E$,Dd;_$7$?8e!"(J-time $@%*%W%7%g%s$G;XDj$7$?;~4VFb$K5E$,D7$M$k3NN($G$9!#(J +$@%G%U%)%k%H$O(J 0.2 (%)$@$G$9!#(J +.TP +.BI -mariaccel " percent" +$@5E$,%^%&%9$KEv$?$C$?;~$K2?(J % $@$^$GA}B.$9$k$+$r;XDj$7$^$9!#(J +0 $@!A(J 200 % $@$^$G;XDj2DG=$G$9!#%G%U%)%k%H$O(J 120 (%)$@$G$9!#(J +.TP +.BI -maridecel " percent" +$@5E$,DlLL$GH?$r;XDj$7$^$9!#(J .TP -.B .speed +.B .mari.bitmap +$@5E$rI=<($9$k$?$a$N%S%C%H%^%C%W%U%!%$%kL>$r;XDj$7$^$9!#(J +.TP +.B .mari.bitmask +$@5E$rI=<($9$k$?$a$N%S%C%H%^%C%W%^%9%/%U%!%$%kL>$r;XDj$7$^$9!#(J +.TP +.B .sender.bitmap +$@:9$7=P$7?M(J($@G-(J)$@$rI=<($9$k$?$a$N%S%C%H%^%C%W%U%!%$%kL>$r;XDj$7$^$9!#(J +.TP +.B .sender.bitmask +$@:9$7=P$7?M(J($@G-(J)$@$rI=<($9$k$?$a$N%S%C%H%^%C%W%^%9%/%U%!%$%kL>$r;XDj$7$^$9!#(J +.TP +.B .nekospeed $@G-$NB.$5$r;XDj$7$^$9!#(J .TP -.B .time +.B .intervaltime $@G-$N%"%K%a!<%7%g%s$N:FIA2h;~4V$r%^%$%/%mICC10L$G;XDj$7$^$9!#(J .TP .B .idle @@ -322,6 +497,12 @@ .B .post.background $@M9JX%]%9%H$NGX7J?'$r;XDj$7$^$9!#(J .TP +.B .sender.foreground +$@:9$7=P$7?M(J($@G-(J)$@$NA07J?'$r;XDj$7$^$9!#(J +.TP +.B .sender.background +$@:9$7=P$7?M(J($@G-(J)$@$NGX7J?'$r;XDj$7$^$9!#(J +.TP .B .tip.foreground $@%a!<%k0lMw$NA07J?'$r;XDj$7$^$9!#(J .TP @@ -358,6 +539,51 @@ .BI .post.geometry " geometry" $@M9JX%]%9%H$rI=<($9$k0LCV$r;XDj$7$^$9!#(J .TP +.BI .kotatsu.init +$@:G=i$+$i$3$?$D$rI=<($7$^$9!#(J +.TP +.BI .kotatsu.geometry " geometry" +$@$3$?$D$rI=<($9$k0LCV$r;XDj$7$^$9!#(J +.TP +.BI .sender.action +$@$3$N%j%=!<%9$r;XDj$9$k$H!":9$7=P$7?M(J($@G-(J)$@$rI=<($7$^$9!#(J +$@%G%U%)%k%H$O(J false $@$G$9!#(J +.TP +.BI .sender.multi +$@$3$N%j%=!<%9$r;XDj$9$k$H!"J#?t$N:9$7=P$7?M(J($@G-(J)$@$rI=<($7$^$9!#(J +false $@$K$9$k$HJ#?t$N?7$7$$%a!<%k$,$"$C$F$b0l$D$N:9$7=P$7?M(J($@G-(J)$@$7$+(J +$@I=<($7$^$;$s!#%G%U%)%k%H$O(J true $@$G$9!#(J +.TP +.BI .sender.geometry " geometry" +$@:9$7=P$7?M(J($@G-(J)$@$rI=<($9$k0LCV$r;XDj$7$^$9!#(J +.TP +.BI .sender.direction " direction" +$@J#?t$N:9$7=P$7?M(J($@G-(J)$@$rJB$Y$FI=<($9$kJ}8~$r;XDj$7$^$9!#(J +left, right, up, down $@$+$iA*Br2DG=$G$9!#%G%U%)%k%H$O(J right $@$G$9!#(J +.TP +.B .mari.action +$@$3$N%j%=!<%9$r;XDj$9$k$H!":G=i$K5E$,8=$l%i%s%@%`$KD7$M$^$9!#(J +.TP +.BI .mari.speed "pixel" +$@5E$NB.$5$N:GBgCM$r;XDj$7$^$9!#(J.intervaltime $@%j%=!<%9$G;XDj$7$?;~4VFb$K(J +$@0\F02DG=$J%T%/%;%kCM$G$9!#%G%U%)%k%H$O(J 24 $@$G$9!#(J +.TP +.BI .mari.next " percent" +$@5E$,Dd;_$7$?8e!"(J.intervaltime $@%j%=!<%9$G;XDj$7$?;~4VFb$K5E$,D7$M$k3NN($G$9!#(J +$@%G%U%)%k%H$O(J 0.2 (%)$@$G$9!#(J +.TP +.BI .mari.acceleraion " percent" +$@5E$,%^%&%9%+!<%=%k$KEv$?$C$?;~$K2?(J % $@$^$GA}B.$9$k$+$r;XDj$7$^$9!#(J +0 $@!A(J 200 % $@$^$G;XDj2DG=$G$9!#%G%U%)%k%H$O(J 120 (%)$@$G$9!#(J +.TP +.BI .mari.deceleraion " percent" +$@5E$,DlLL$GH?.J8;z$O0c$$$OL5;k$5$l$^$9!#(J +$@%G%U%)%k%H$O!"(JFrom $@$G$9$,!"%a!<%j%s%0%j%9%H$J$I$KBP1~$9$k$?$a$K(J +Reply-To $@$d(J Subject $@$J$I$r;XDj$7$?J}$,$h$$$+$b$7$l$^$;$s!#(J +.B .sender2.headerkey +$@$+$i(J +.B .sender10.headerkey +$@$^$G$bF1MM$K;XDj2DG=$G$9!#(J +.TP +.B .sender1.bitmap +.B .sender1.address +$@$G%"%I%l%9;XDj$7$?:9$7=P$7?M(J($@G-(J)$@$rI=<($9$k$?$a$N%S%C%H%^%C%W%U%!%$%kL>$r;XDj$7$^$9!#(J +$@%G%U%)%k%H$G$O(J +.B .sender.bitmap +$@$G;XDj$7$?$b$N$H$J$j$^$9!#(J +.B .sender2.bitmap +$@$+$i(J +.B .sender10.bitmap +$@$^$G$bF1MM$K;XDj2DG=$G$9!#(J +$@$^$?!"(J +.B .sender1.bitmask, .sender1.geometry, .sender1.foreground, .sender1.background +$@$+$i(J +.B .sender10.bitmask, .sender10.geometry, .sender10.foreground, .sender10.background +$@$^$G$bF1MM$K;XDj2DG=$G$9!#(J .SH $@4XO"%U%!%$%k(J .TP 4 .I /var/spool/mail/* diff -urN oneko/patchlevel.h oneko-2.0b-sender0.5/patchlevel.h --- oneko/patchlevel.h Thu May 23 23:24:02 2002 +++ oneko-2.0b-sender0.5/patchlevel.h Thu May 23 23:30:00 2002 @@ -1,4 +1,4 @@ /* $Id: patchlevel.h,v 1.9 1992/03/17 14:08:41 kato Exp kato $ */ #define VERSION 2 -#define MINOR_VERSION "00 beta with pop1.1 and tip1.7b2" +#define MINOR_VERSION "00 beta with pop1.1, tip1.7b2 and sender0.4" #define PATCHLEVEL 6 diff -urN oneko/resource.c oneko-2.0b-sender0.5/resource.c --- oneko/resource.c Thu May 23 23:24:01 2002 +++ oneko-2.0b-sender0.5/resource.c Thu May 23 23:58:50 2002 @@ -13,6 +13,7 @@ #include #include "oneko.h" #include +#include #include #include #if (!defined(SYSV) && !defined(SVR4)) @@ -39,6 +40,14 @@ #define KOTATSUBGCOL "white" /* default kotatsu background color */ #define POSTFGCOL "black" /* default post foreground color */ #define POSTBGCOL "white" /* default post background color */ +#ifdef MARI +#define MARIFGCOL "black" /* default mari foreground color */ +#define MARIBGCOL "white" /* default mari background color */ +#endif /* MARI */ +#ifdef SENDER +#define SENDERFGCOL "black" /* default sender foreground color */ +#define SENDERBGCOL "white" /* default sender background color */ +#endif /* SENDER */ #ifdef MAILNOTIFY #define TIPFGCOL "black" /* default tip foreground color */ #define TIPBGCOL "white" /* default tip background color */ @@ -48,6 +57,10 @@ #ifdef L10N #define TEXTSTR1 "メールが" /* default tip strings */ #define TEXTSTR2 "通届いています" /* default tip strings */ +#ifdef SENDER +#define NEWTEXTSTR1 "新しいメールが" /* default (new) tip strings */ +#define NEWTEXTSTR2 "通届いています" /* default (new) tip strings */ +#endif /* SENDER */ #endif /* L10N */ #ifdef SHOWHEADER #define LINESPACE "2" @@ -60,6 +73,14 @@ #define KOTATSUBITMASK "%/kotatsu_mask.xbm" /* default kotatsu bitmask */ #define POSTBITMAP "%/post.xbm" /* default post bitmap */ #define POSTBITMASK "%/post_mask.xbm" /* default post bitmask */ +#ifdef MARI +#define MARIBITMAP "%/mari.xbm" /* default mari bitmap */ +#define MARIBITMASK "%/mari_mask.xbm" /* default mari bitmask */ +#endif /* MARI */ +#ifdef SENDER +#define SENDERBITMAP "%/sender.xbm" /* default sender bitmap */ +#define SENDERBITMASK "%/sender_mask.xbm" /* default sender bitmask */ +#endif /* SENDER */ #define CURSORBITMAP "%/cursor.xbm" /* default cursor bitmap */ #define CURSORBITMASK "%/cursor_mask.xbm" /* default cursor bitmask */ #define HELPFILE "%/help" /* default help message file */ @@ -67,10 +88,24 @@ #define NEKO_SPEED "16" /* in pixel */ #define IDLE_SPACE "6" /* threshold for idle */ #define UPDATE_TIME "60" /* check mail box interval (sec) */ -#define GEOMETRY "-0+0" /* default geometry */ +/* #define GEOMETRY "-0+0" */ +#define GEOMETRY "-0+24" /* default geometry */ +#define KOTATSU_GEOMETRY "-0-0" /* default kotatsu geometry */ +#ifdef SENDER +#define SENDER_GEOMETRY "+0+0" /* default sender geometry */ +#define SENDER_DIRECTION "right" /* default sender direction */ +#define SENDER_HEADERKEY "from" /* default header key */ +#endif /* SENDER */ #ifdef HAVE_SETPRIORITY #define PRIORITY "0" /* process priority */ #endif +#ifdef MARI +#define MARI_SPEED "24" /* maximum mari speed */ +#define MARI_ACCEL "120" /* mari acceleration(%) */ +#define MARI_DECEL "80" /* mari deceleration(%) */ +#define MARI_NEXT "0.2" /* probability of mari next moving(%) */ +#define GRAVITY "2" /* gravity */ +#endif /* MARI */ char *ClassName = "Oneko"; /* class name */ char *ProgramName = NULL; /* program name */ @@ -84,14 +119,45 @@ {"-display", ".display", XrmoptionSepArg, (caddr_t) NULL}, {"-name", ".name", XrmoptionSepArg, (caddr_t) NULL}, {"-bitmapdir", ".bitmapdir", XrmoptionSepArg, (caddr_t) NULL}, +#ifdef XPM + {"-pixmapdir", ".pixmapdir", XrmoptionSepArg, (caddr_t) NULL}, +#endif /* XPM */ {"-kbm", ".kotatsu.bitmap", XrmoptionSepArg, (caddr_t) NULL}, {"-kbmsk", ".kotatsu.bitmask", XrmoptionSepArg, (caddr_t) NULL}, {"-kotatsubitmap", ".kotatsu.bitmap", XrmoptionSepArg, (caddr_t) NULL}, {"-kotatsubitmask", ".kotatsu.bitmask", XrmoptionSepArg, (caddr_t) NULL}, +#ifdef XPM + {"-kpm", ".kotatsu.pixmap", XrmoptionSepArg, (caddr_t) NULL}, + {"-kotatsupixmap", ".kotatsu.pixmap", XrmoptionSepArg, (caddr_t) NULL}, +#endif /* XPM */ {"-pbm", ".post.bitmap", XrmoptionSepArg, (caddr_t) NULL}, {"-pbmsk", ".post.bitmask", XrmoptionSepArg, (caddr_t) NULL}, {"-postbitmap", ".post.bitmap", XrmoptionSepArg, (caddr_t) NULL}, {"-postbitmask", ".post.bitmask", XrmoptionSepArg, (caddr_t) NULL}, +#ifdef XPM + {"-ppm", ".post.pixmap", XrmoptionSepArg, (caddr_t) NULL}, + {"-postpixmap", ".post.pixmap", XrmoptionSepArg, (caddr_t) NULL}, +#endif /* XPM */ +#ifdef MARI + {"-mabm", ".mari.bitmap", XrmoptionSepArg, (caddr_t) NULL}, + {"-mabmsk", ".mari.bitmask", XrmoptionSepArg, (caddr_t) NULL}, + {"-maribitmap", ".mari.bitmap", XrmoptionSepArg, (caddr_t) NULL}, + {"-maribitmask", ".mari.bitmask", XrmoptionSepArg, (caddr_t) NULL}, +#ifdef XPM + {"-mapm", ".mari.pixmap", XrmoptionSepArg, (caddr_t) NULL}, + {"-maripixmap", ".mari.pixmap", XrmoptionSepArg, (caddr_t) NULL}, +#endif /* XPM */ +#endif /* MARI */ +#ifdef SENDER + {"-sbm", ".sender.bitmap", XrmoptionSepArg, (caddr_t) NULL}, + {"-sbmsk", ".sender.bitmask", XrmoptionSepArg, (caddr_t) NULL}, + {"-senderbitmap", ".sender.bitmap", XrmoptionSepArg, (caddr_t) NULL}, + {"-senderbitmask", ".sender.bitmask", XrmoptionSepArg, (caddr_t) NULL}, +#ifdef XPM + {"-spm", ".sender.pixmap", XrmoptionSepArg, (caddr_t) NULL}, + {"-senderpixmap", ".sender.pixmap", XrmoptionSepArg, (caddr_t) NULL}, +#endif /* XPM */ +#endif /* SENDER */ {"-mbm", ".cursor.bitmap", XrmoptionSepArg, (caddr_t) NULL}, {"-mbmsk", ".cursor.bitmask", XrmoptionSepArg, (caddr_t) NULL}, {"-mousebitmap", ".cursor.bitmap", XrmoptionSepArg, (caddr_t) NULL}, @@ -113,6 +179,20 @@ {"-pfg", ".post.foreground", XrmoptionSepArg, (caddr_t) NULL}, {"-postbackground", ".post.background", XrmoptionSepArg, (caddr_t) NULL}, {"-postforeground", ".post.foreground", XrmoptionSepArg, (caddr_t) NULL}, +#ifdef MARI + {"-mabg", ".mari.background", XrmoptionSepArg, (caddr_t) NULL}, + {"-mafg", ".mari.foreground", XrmoptionSepArg, (caddr_t) NULL}, + {"-maribackground", ".mari.background", XrmoptionSepArg, (caddr_t) NULL}, + {"-mariforeground", ".mari.foreground", XrmoptionSepArg, (caddr_t) NULL}, +#endif /* MARI */ +#ifdef SENDER + {"-sbg", ".sender.background", XrmoptionSepArg, (caddr_t) NULL}, + {"-sfg", ".sender.foreground", XrmoptionSepArg, (caddr_t) NULL}, + {"-senderbackground", ".sender.background", + XrmoptionSepArg, (caddr_t) NULL}, + {"-senderforeground", ".sender.foreground", + XrmoptionSepArg, (caddr_t) NULL}, +#endif /* SENDER */ {"-mbg", ".cursor.background", XrmoptionSepArg, (caddr_t) NULL}, {"-mfg", ".cursor.foreground", XrmoptionSepArg, (caddr_t) NULL}, {"-mousebackground", ".cursor.background", @@ -130,15 +210,37 @@ {"-helpfile", ".helpfile", XrmoptionSepArg, (caddr_t) NULL}, {"-xrm", NULL, XrmoptionResArg, (caddr_t) NULL}, {"-update", ".update", XrmoptionSepArg, (caddr_t) NULL}, - {"-mail", ".mail", XrmoptionNoArg, (caddr_t) "off"}, - {"+mail", ".mail", XrmoptionNoArg, (caddr_t) "on"}, + {"-mail", ".mail", XrmoptionNoArg, (caddr_t) "on"}, + {"+mail", ".mail", XrmoptionNoArg, (caddr_t) "off"}, {"-autoraise", ".autoraise", XrmoptionNoArg, (caddr_t) "on"}, {"+autoraise", ".autoraise", XrmoptionNoArg, (caddr_t) "off"}, {"-file", ".file", XrmoptionSepArg, (caddr_t) NULL}, {"-geometry", ".post.geometry", XrmoptionSepArg, (caddr_t) NULL}, + {"-kotatsu", ".kotatsu.init", XrmoptionNoArg, (caddr_t) "on"}, + {"+kotatsu", ".kotatsu.init", XrmoptionNoArg, (caddr_t) "off"}, + {"-kgeom", ".kotatsu.geometry", XrmoptionSepArg, (caddr_t) NULL}, + {"-kotatsugeometry", ".kotatsu.geometry", XrmoptionSepArg, (caddr_t) NULL}, +#ifdef SENDER + {"-sender", ".sender.action", XrmoptionNoArg, (caddr_t) "on"}, + {"+sender", ".sender.action", XrmoptionNoArg, (caddr_t) "off"}, + {"-multisender", ".sender.multi", XrmoptionNoArg, (caddr_t) "on"}, + {"+multisender", ".sender.multi", XrmoptionNoArg, (caddr_t) "off"}, + {"-sgeom", ".sender.geometry", XrmoptionSepArg, (caddr_t) NULL}, + {"-sendergeometry", ".sender.geometry", XrmoptionSepArg, (caddr_t) NULL}, + {"-direction", ".sender.direction", XrmoptionSepArg, (caddr_t) NULL}, +#endif /* SENDER */ #ifdef HAVE_SETPRIORITY {"-priority", ".priority", XrmoptionSepArg, (caddr_t) NULL}, #endif +#ifdef MARI + {"-mari", ".mari.action", XrmoptionNoArg, (caddr_t) "on"}, + {"+mari", ".mari.action", XrmoptionNoArg, (caddr_t) "off"}, + {"-marispeed", ".mari.speed", XrmoptionSepArg, (caddr_t) NULL}, + {"-marinext", ".mari.next", XrmoptionSepArg, (caddr_t) NULL}, + {"-mariaccel", ".mari.acceleration", XrmoptionSepArg, (caddr_t) NULL}, + {"-maridecel", ".mari.deceleration", XrmoptionSepArg, (caddr_t) NULL}, + {"-gravity", ".mari.gravity", XrmoptionSepArg, (caddr_t) NULL}, +#endif #ifdef MAILNOTIFY {"-tfg", ".tip.foreground", XrmoptionSepArg, (caddr_t) NULL}, {"-tbg", ".tip.background", XrmoptionSepArg, (caddr_t) NULL}, @@ -158,8 +260,15 @@ {"-fk", ".tip.kanjifont", XrmoptionSepArg, (caddr_t) NULL}, {"-text1", ".tip.text1", XrmoptionSepArg, (caddr_t) NULL}, {"-text2", ".tip.text2", XrmoptionSepArg, (caddr_t) NULL}, +#ifdef SENDER + {"-newtext1", ".tip.newtext1", XrmoptionSepArg, (caddr_t) NULL}, + {"-newtext2", ".tip.newtext2", XrmoptionSepArg, (caddr_t) NULL}, +#endif /* SENDER */ #else {"-text", ".tip.text", XrmoptionSepArg, (caddr_t) NULL}, +#ifdef SENDER + {"-newtext", ".tip.newtext", XrmoptionSepArg, (caddr_t) NULL}, +#endif /* SENDER */ #endif /* L10N */ #ifdef SHOWHEADER {"-space", ".tip.linespace", XrmoptionSepArg, (caddr_t) NULL}, @@ -177,8 +286,14 @@ #define optionNum (sizeof optionRec / sizeof optionRec[0]) typedef enum { +#ifdef SENDER + type_strcase, +#endif /* SENDER */ type_string, type_int, +#ifdef MARI + type_double, +#endif /* MARI */ type_bool, } value_types; @@ -194,14 +309,45 @@ {"display", "Display", type_string, NULL, (caddr_t *) &DisplayName}, {"name", "Name", type_string, NULL, (caddr_t *) &ResourceName}, {"bitmapdir", "Bitmapdir", type_string, NULL, (caddr_t *) &BitmapDir}, +#ifdef XPM + {"pixmapdir", "Pixmapdir", type_string, NULL, (caddr_t *) &PixmapDir}, +#endif /* XPM */ {"kotatsu.bitmap", "Kotatsu.Bitmap", type_string, KOTATSUBITMAP, (caddr_t *) &Kotatsu.bitmap}, {"kotatsu.bitmask", "Kotatsu.Bitmask", type_string, KOTATSUBITMASK, (caddr_t *) &Kotatsu.bitmask}, +#ifdef XPM + {"kotatsu.pixmap", "Kotatsu.Pixmap", type_string, NULL, + (caddr_t *) &Kotatsu.pixmap}, +#endif /* XPM */ {"post.bitmap", "Post.Bitmap", type_string, POSTBITMAP, (caddr_t *) &Post.bitmap}, {"post.bitmask", "Post.Bitmask", type_string, POSTBITMASK, (caddr_t *) &Post.bitmask}, +#ifdef XPM + {"post.pixmap", "Post.Pixmap", type_string, NULL, + (caddr_t *) &Post.pixmap}, +#endif /* XPM */ +#ifdef MARI + {"mari.bitmap", "Mari.Bitmap", type_string, MARIBITMAP, + (caddr_t *) &Mari.bitmap}, + {"mari.bitmask", "Mari.Bitmask", type_string, MARIBITMASK, + (caddr_t *) &Mari.bitmask}, +#ifdef XPM + {"mari.pixmap", "Mari.Pixmap", type_string, NULL, + (caddr_t *) &Mari.pixmap}, +#endif /* XPM */ +#endif /* MARI */ +#ifdef SENDER + {"sender.bitmap", "Sender.Bitmap", type_string, SENDERBITMAP, + (caddr_t *) &Senders[0].toy.bitmap}, + {"sender.bitmask", "Sender.Bitmask", type_string, SENDERBITMASK, + (caddr_t *) &Senders[0].toy.bitmask}, +#ifdef XPM + {"sender.pixmap", "Sender.Pixmap", type_string, NULL, + (caddr_t *) &Senders[0].toy.pixmap}, +#endif /* XPM */ +#endif /* SENDER */ {"cursor.bitmap", "Cursor.Bitmap", type_string, CURSORBITMAP, (caddr_t *) &CursorBitmap}, {"cursor.bitmask", "Cursor.Bitmask", type_string, CURSORBITMASK, @@ -224,6 +370,18 @@ type_string, POSTBGCOL, (caddr_t *) &Post.background}, {"post.foreground", "Post.Foreground", type_string, POSTFGCOL, (caddr_t *) &Post.foreground}, +#ifdef MARI + {"mari.background", "Mari.Background", + type_string, MARIBGCOL, (caddr_t *) &Mari.background}, + {"mari.foreground", "Mari.Foreground", + type_string, MARIFGCOL, (caddr_t *) &Mari.foreground}, +#endif /* MARI */ +#ifdef SENDER + {"sender.background", "Sender.Background", + type_string, SENDERBGCOL, (caddr_t *) &Senders[0].toy.background}, + {"sender.foreground", "Sender.Foreground", + type_string, SENDERFGCOL, (caddr_t *) &Senders[0].toy.foreground}, +#endif /* SENDER */ #ifdef HAVE_SETPRIORITY {"priority", "Priority", type_int, (char *) PRIORITY, (caddr_t *) &Priority}, @@ -245,13 +403,20 @@ (caddr_t *) &Statuskfontstr}, {"tip.text1", "Tip.Text1", type_string, TEXTSTR1, (caddr_t *) &text1}, {"tip.text2", "Tip.Text2", type_string, TEXTSTR2, (caddr_t *) &text2}, +#ifdef SENDER + {"tip.newtext1", "Tip.NewText1", type_string, NEWTEXTSTR1, (caddr_t *) &newtext1}, + {"tip.newtext2", "Tip.NewText2", type_string, NEWTEXTSTR2, (caddr_t *) &newtext2}, +#endif /* SENDER */ #else {"tip.text", "Tip.Text", type_string, TEXTSTR, (caddr_t *) &text}, +#ifdef SENDER + {"tip.newtext", "Tip.NewText", type_string, NEWTEXTSTR, (caddr_t *) &newtext}, +#endif /* SENDER */ #endif /* L10N */ #ifdef SHOWHEADER {"tip.linespace", "Tip.LineSpace", type_int, (char *) LINESPACE, (caddr_t *) &LineSpace}, - {"tip.column", "Tip.LineSpace", type_int, (char *) COLUMN, + {"tip.column", "Tip.Column", type_int, (char *) COLUMN, (caddr_t *) &Column}, #endif #endif /* MAILNOTIFY */ @@ -273,6 +438,26 @@ {"file", "File", type_string, NULL, (caddr_t *) &MailFile}, {"post.geometry", "Post.Geometry", type_string, GEOMETRY, (caddr_t *) &Geometry}, + {"kotatsu.geometry", "Kotatsu.Geometry", type_string, KOTATSU_GEOMETRY, (caddr_t *) &KotatsuGeometry}, + {"kotatsu.init", "Kotatsu.Init", type_bool, "off", (caddr_t *) &KotatsuInit}, +#ifdef SENDER + {"sender.action", "Sender.Action", type_bool, "off", (caddr_t *) &SenderAction}, + {"sender.multi", "Sender.Multi", type_bool, "on", (caddr_t *) &MultiSender}, + {"sender.geometry", "Sender.Geometry", type_string, SENDER_GEOMETRY, + (caddr_t *) &Senders[0].geometry}, + {"sender.direction", "Sender.Direction", type_strcase, SENDER_DIRECTION, + (caddr_t *) &SenderDirection}, +#endif /* SENDER */ +#ifdef MARI + {"mari.action", "Mari.Action", type_bool, "off", (caddr_t *) &MariAction}, + {"mari.speed", "Mari.Speed", type_int, MARI_SPEED, (caddr_t *) &MariSpeed}, + {"mari.next", "Mari.Next", type_double, MARI_NEXT, (caddr_t *) &MariNext}, + {"mari.acceleration", "Mari.Acceleration", type_double, MARI_ACCEL, + (caddr_t *) &MariAccel}, + {"mari.deceleration", "Mari.Deceleration", type_double, MARI_DECEL, + (caddr_t *) &MariDecel}, + {"mari.gravity", "Mari.Gravity", type_int, GRAVITY, (caddr_t *) &Gravity}, +#endif /* MARI */ #ifdef MAILACTION {"mailaction", "Mailaction", type_string, NULL, (caddr_t *) &MailActionCmd}, #endif @@ -460,12 +645,18 @@ buffer[len] = '\0'; switch (valueType) { +#ifdef SENDER + case type_strcase: +#endif /* SENDER */ + lower(buffer); case type_string: if (string) { char *ptr; - char *malloc(); +/* char *malloc(); */ - if ((ptr = malloc(strlen(buffer) + 1)) == NULL) { +/* if ((ptr = malloc(strlen(buffer) + 1)) == NULL) { */ + if ((ptr = (char *)malloc((strlen(buffer) + 1) * sizeof(char))) + == NULL) { Error("GetValue - couldn't allocate memory"); } (void) strcpy(ptr, buffer); @@ -485,6 +676,9 @@ case type_int: *((int *) valuep) = atoi(buffer); break; + case type_double: + *((double *) valuep) = atof(buffer); + break; } } @@ -586,6 +780,52 @@ resourceValuses[i].type, resourceValuses[i].defvalue, resourceValuses[i].variable); } +#ifdef SENDER + for (i = 1; i <= NSENDERS; i++) { + char name[32], class[32]; + sprintf( name, "sender%d.bitmap", i ); + sprintf( class, "Sender%d.Bitmap", i ); + GetValue(RDB, name, class, type_string, + Senders[0].toy.bitmap, &Senders[i].toy.bitmap ); + + sprintf( name, "sender%d.bitmask", i ); + sprintf( class, "Sender%d.Bitmaask", i ); + GetValue(RDB, name, class, type_string, + Senders[0].toy.bitmask, &Senders[i].toy.bitmask ); + +#ifdef XPM + sprintf( name, "sender%d.pixmap", i ); + sprintf( class, "Sender%d.Pixmap", i ); + GetValue(RDB, name, class, type_string, + Senders[0].toy.pixmap, &Senders[i].toy.pixmap ); +#endif /* XPM */ + + sprintf( name, "sender%d.background", i ); + sprintf( class, "Sender%d.Background", i ); + GetValue(RDB, name, class, type_string, + Senders[0].toy.background, &Senders[i].toy.background ); + + sprintf( name, "sender%d.foreground", i ); + sprintf( class, "Sender%d.Foreground", i ); + GetValue(RDB, name, class, type_string, + Senders[0].toy.foreground, &Senders[i].toy.foreground ); + + sprintf( name, "sender%d.geometry", i ); + sprintf( class, "Sender%d.Geometry", i ); + GetValue(RDB, name, class, type_string, + NULL, &Senders[i].geometry ); + + sprintf( name, "sender%d.address", i ); + sprintf( class, "Sender%d.Address", i ); + GetValue(RDB, name, class, type_string, + NULL, &Senders[i].address ); + + sprintf( name, "sender%d.headerkey", i ); + sprintf( class, "Sender%d.Headerkey", i ); + GetValue(RDB, name, class, type_strcase, + SENDER_HEADERKEY, &Senders[i].headerkey ); + } +#endif /* SENDER */ /* Parse the rest of the command line */ for (argc--, argv++; argc > 0; argc--, argv++) { diff -urN oneko/restest.c oneko-2.0b-sender0.5/restest.c --- oneko/restest.c Thu May 23 23:24:02 2002 +++ oneko-2.0b-sender0.5/restest.c Thu May 23 23:53:24 2002 @@ -8,22 +8,46 @@ char *TipForeground, *TipBackground, *TipBordercolor; char *CursorBitmap, *CursorBitmask; char *BitmapDir, *Geometry; +#ifdef XPM +char *PixmapDir; +#endif /* XPM */ char *HelpFile, *MailFile; long IntervalTime, UpdateTime; int NekoSpeed, IdleSpace; Bool NoShape, NoMouse, SaveUnder; Bool BackingStore, CheckMail, AutoRaise; Toy Toys[NTOYS]; +#ifdef SENDER +SenderToy Senders[NSENDERS + 1]; +SenderToy *CurrentSender = &Senders[0]; +Bool SenderAction, MultiSender; +char *SenderDirection; +#endif /* SENDER */ #ifdef HAVE_SETPRIORITY int Priority; #endif +#ifdef MARI +Bool MariAction; +int MariSpeed, Graviyty; +double MariAccel, MariDecel, MariNext; +#endif /* MARI */ #ifdef MAILNOTIFY int TipOffsetX = 0, TipOffsetY = 0; char *Statusfontstr = NULL; #ifdef L10N char *text1, *text2; +#ifdef SENDER +char *newtext1, *newtext2; +#endif /* SENDER */ #else char *text; +#ifdef SENDER +char *newtext; +#endif /* SENDER */ +#endif +#ifdef SHOWHEADER +int LineSpace; +int Column; #endif #ifdef MAILACTION char *MailActionCmd = NULL; @@ -32,6 +56,9 @@ char *PopServer = NULL; #endif #endif +#ifdef I18N +char *lang; +#endif main(argc, argv) int argc; @@ -48,24 +75,55 @@ (void) printf("Background\t\t= %s\n", Background); (void) printf("Kotatsu.foreground\t= %s\n", Kotatsu.foreground); (void) printf("Kotatsu.background\t= %s\n", Kotatsu.background); - (void) printf("Post.foreground\t= %s\n", Post.foreground); - (void) printf("Post.background\t= %s\n", Post.background); + (void) printf("Post.foreground\t\t= %s\n", Post.foreground); + (void) printf("Post.background\t\t= %s\n", Post.background); +#ifdef MARI + (void) printf("Mari.foreground\t\t= %s\n", Mari.foreground); + (void) printf("Mari.background\t\t= %s\n", Mari.background); +#endif /* MARI */ +#ifdef SENDER + (void) printf("Sender.foreground\t= %s\n", Sender.foreground); + (void) printf("Sender.background\t= %s\n", Sender.background); +#endif /* SENDER */ #ifdef MAILNOTIFY - (void) printf("Tip.Foreground\t= %s\n", TipForeground); - (void) printf("Tip.Background\t= %s\n", TipBackground); - (void) printf("Tip.Bordercolor\t= %s\n", TipBordercolor); - (void) printf("Tip.OffsetX\t= %s\n", TipOffsetX); - (void) printf("Tip.OffsetY\t= %s\n", TipOffsetY); + (void) printf("Tip.Foreground\t\t= %s\n", TipForeground); + (void) printf("Tip.Background\t\t= %s\n", TipBackground); + (void) printf("Tip.Bordercolor\t\t= %s\n", TipBordercolor); + (void) printf("Tip.OffsetX\t\t= %s\n", TipOffsetX); + (void) printf("Tip.OffsetY\t\t= %s\n", TipOffsetY); #endif (void) printf("CursorForeground\t= %s\n", CursorForeground); (void) printf("CursorBackground\t= %s\n", CursorBackground); (void) printf("Kotatsu.bitmap\t\t= %s\n", Kotatsu.bitmap); (void) printf("Kotatsu.bitmask\t\t= %s\n", Kotatsu.bitmask); +#ifdef XPM + (void) printf("Kotatsu.pixmap\t\t= %s\n", Kotatsu.pixmap); +#endif /* XPM */ (void) printf("Post.bitmap\t\t= %s\n", Post.bitmap); (void) printf("Post.bitmask\t\t= %s\n", Post.bitmask); +#ifdef XPM + (void) printf("Post.pixmap\t\t= %s\n", Post.pixmap); +#endif /* XPM */ +#ifdef MARI + (void) printf("Mari.bitmap\t\t= %s\n", Mari.bitmap); + (void) printf("Mari.bitmask\t\t= %s\n", Mari.bitmask); +#ifdef XPM + (void) printf("Mari.pixmap\t\t= %s\n", Mari.pixmap); +#endif /* XPM */ +#endif /* MARI */ +#ifdef SENDER + (void) printf("Sender.bitmap\t\t= %s\n", Sender.bitmap); + (void) printf("Sender.bitmask\t\t= %s\n", Sender.bitmask); +#ifdef XPM + (void) printf("Sender.pixmap\t\t= %s\n", Sender.pixmap); +#endif /* XPM */ +#endif /* SENDER */ (void) printf("CursorBitmap\t\t= %s\n", CursorBitmap); (void) printf("CursorBitmask\t\t= %s\n", CursorBitmask); (void) printf("BitmapDir\t\t= %s\n", BitmapDir? BitmapDir: "(null)"); +#ifdef XPM + (void) printf("PixmapDir\t\t= %s\n", PixmapDir? PixmapDir: "(null)"); +#endif /* XPM */ (void) printf("IntervalTime\t\t= %d\n", IntervalTime); (void) printf("NekoSpeed\t\t= %d\n", NekoSpeed); (void) printf("IdleSpace\t\t= %d\n", IdleSpace); @@ -82,14 +140,35 @@ (void) printf("MailFile\t\t= %s\n", MailFile); (void) printf("AutoRaise\t\t= %s\n", AutoRaise ? "True" : "False"); (void) printf("Geometry\t\t= %s\n", Geometry); +#ifdef SENDER + (void) printf("SenderAction\t\t= %s\n", SenderAction ? "True" : "False"); + (void) printf("MultiSender\t\t= %s\n", MultiSender ? "True" : "False"); + (void) printf("Sender.Geometry\t\t= %s\n", Senders[0].geometry); + (void) printf("SenderDirection\t\t= %s\n", SenderDirection); +#endif /* SENDER */ +#ifdef MARI + (void) printf("MariAction\t\t= %s\n", MariAction ? "True" : "False"); + (void) printf("MariSpeed\t\t= %d\n", MariSpeed); + (void) printf("MariNext\t\t= %f\n", MariNext); + (void) printf("MariAccel\t\t= %f\n", MariAccel); + (void) printf("MariDecel\t\t= %f\n", MariDecel); + (void) printf("Gravity\t\t= %d\n", Gravity); +#endif /* MARI */ #ifdef MAILNOTIFY (void) printf("Tip.Font\t\t= %s\n", Statusfontstr); #ifdef L10N - (void) printf(Tip.KanjiFont\t\t= %s\n", Statuskfontstr); - (void) printf(Tip.Text1\t\t= %s\n", text1); - (void) printf(Tip.Text2\t\t= %s\n", text2); + (void) printf("Tip.KanjiFont\t\t= %s\n", Statuskfontstr); + (void) printf("Tip.Text1\t\t= %s\n", text1); + (void) printf("Tip.Text2\t\t= %s\n", text2); +#ifdef SENDER + (void) printf("Tip.NewText1\t\t= %s\n", newtext1); + (void) printf("Tip.NewText2\t\t= %s\n", newtext2); +#endif /* SENDER */ #else - (void) printf(Tip.Text\t\t= %s\n", text); + (void) printf("Tip.Text\t\t= %s\n", text); +#ifdef SENDER + (void) printf("Tip.NewText\t\t= %s\n", newtext); +#endif /* SENDER */ #endif /* L10N */ #endif /* MAILNOTIFY */ } diff -urN oneko/sender.xbm oneko-2.0b-sender0.5/sender.xbm --- oneko/sender.xbm Thu Jan 1 09:00:00 1970 +++ oneko-2.0b-sender0.5/sender.xbm Thu May 23 23:30:00 2002 @@ -0,0 +1,16 @@ +#define sender_width 32 +#define sender_height 32 +#define sender_x_hot 15 +#define sender_y_hot 31 +static unsigned char sender_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x04, + 0x40, 0x10, 0x10, 0x02, 0x80, 0x28, 0x28, 0x01, 0x00, 0x49, 0x24, 0x00, + 0x06, 0x44, 0x44, 0x60, 0x18, 0x84, 0x42, 0x18, 0x60, 0x82, 0x83, 0x06, + 0x00, 0x02, 0x80, 0x00, 0x00, 0x22, 0x88, 0x00, 0x0f, 0x22, 0x88, 0x78, + 0x00, 0x22, 0x88, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x3a, 0xb9, 0x00, + 0x00, 0x04, 0x40, 0x00, 0x00, 0x7f, 0xfc, 0x01, 0x00, 0x81, 0x03, 0x03, + 0x00, 0x0d, 0x50, 0x05, 0x00, 0x0d, 0x00, 0x05, 0x00, 0x01, 0x00, 0x03, + 0x00, 0xf1, 0x3f, 0x01, 0x00, 0x01, 0x00, 0x01, 0x80, 0xf1, 0x3f, 0x03, + 0x40, 0x01, 0x00, 0x05, 0x40, 0xff, 0xff, 0x05, 0xc0, 0x11, 0x11, 0x07, + 0x60, 0x90, 0x13, 0x0c, 0xe0, 0xff, 0xfe, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff -urN oneko/sender_mask.xbm oneko-2.0b-sender0.5/sender_mask.xbm --- oneko/sender_mask.xbm Thu Jan 1 09:00:00 1970 +++ oneko-2.0b-sender0.5/sender_mask.xbm Thu May 23 23:30:00 2002 @@ -0,0 +1,16 @@ +#define sender_mask_width 32 +#define sender_mask_height 32 +#define sender_mask_x_hot 15 +#define sender_mask_y_hot 31 +static unsigned char sender_mask_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x04, + 0x40, 0x10, 0x10, 0x02, 0x80, 0x38, 0x38, 0x01, 0x00, 0x79, 0x3c, 0x00, + 0x06, 0x7c, 0x7c, 0x60, 0x18, 0xfc, 0x7e, 0x18, 0x60, 0xfe, 0xff, 0x06, + 0x00, 0xfe, 0xff, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x0f, 0xfe, 0xff, 0x78, + 0x00, 0xfe, 0xff, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x00, 0xfe, 0xff, 0x00, + 0x00, 0xfc, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x03, + 0x00, 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x03, + 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x80, 0xff, 0xff, 0x03, + 0xc0, 0xff, 0xff, 0x07, 0xc0, 0xff, 0xff, 0x07, 0xc0, 0xff, 0xff, 0x07, + 0xe0, 0xff, 0xff, 0x0f, 0xe0, 0xff, 0xfe, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff -urN oneko/state.c oneko-2.0b-sender0.5/state.c --- oneko/state.c Tue Mar 17 23:09:59 1992 +++ oneko-2.0b-sender0.5/state.c Thu May 23 23:30:00 2002 @@ -225,8 +225,9 @@ return True; } #endif - return ClipInWindow(&NekoX, &NekoY, animation->width, animation->height, +/* return */ ClipInWindow(&NekoX, &NekoY, animation->width, animation->height, animation->x_hot, animation->y_hot); + return True; } @@ -255,6 +256,13 @@ { int i; +#ifdef SENDER + if ((CurrentSender != NULL) && (Sender.state == TOY_YES)) { + CurrentSender = NextSender(CurrentSender); + SetNekoState(NEKO_STOP); + return False; + } +#endif /* SENDER */ if (Post.state == TOY_YES) { SetNekoState(NEKO_MANEKI); return False; diff -urN oneko/xbm2xpm.pl oneko-2.0b-sender0.5/xbm2xpm.pl --- oneko/xbm2xpm.pl Thu Jan 1 09:00:00 1970 +++ oneko-2.0b-sender0.5/xbm2xpm.pl Thu May 23 23:30:01 2002 @@ -0,0 +1,147 @@ +#!/usr/local/bin/perl + +# usage: xbm2xpm.pl [-fg ] [-bg ] [.xbm] [...] +# +# .xbm, .xbm -> .xpm + +$none = ' '; +$black = '#'; +$white = '.'; +$BMTOA = $ENV{'BMTOA'} || 'bmtoa'; +$BMTOA .= " -char '$white$black'"; + +$foreground = 'black'; +$background = 'white'; + +while( @ARGV ) { + $_ = shift; + if ( ! /^-/o ) { + unshift( @ARGV, $_ ); + last; + } + if ( /^-fg$/o ) { + @ARGV || &Usage; + $foreground = shift; + } elsif ( /^-bg$/o ) { + @ARGV || &Usage; + $background = shift; + } else { + &Usage(); + } +} + +@ARGV || &Usage(); + +while( @ARGV ) { + +$xbm = shift; +if ( $xbm !~ /\.xbm$/ ) { + $xbm .= '.xbm'; +} +( $xbmmask = $xbm ) =~ s/\.xbm$/_mask.xbm/io; +( $xpm = $xbm ) =~ s/\.xbm$/.xpm/io; +$xpm =~ s:^.*/::o; + +if ( ! open( XBM, "< $xbm" ) ) { + print STDERR "$0: Error: could not open $xbm.\n"; + next; +} +if ( ! open( MASK, "< $xbmmask" ) ) { + print STDERR "$0: Error: could not open $xbmmask.\n"; + next; +} +close( MASK ); +undef( $width, $height, $x_hot, $y_hot ); +while( ) { + /^#\s*define\s/o || next; + chop; + if ( s/^.*width\s+//o ) { + $width = $_; + } elsif ( s/^.*height\s+//o ) { + $height = $_; + } elsif ( s/^.*x_hot\s+//o ) { + $x_hot = $_; + } elsif ( s/^.*y_hot\s+//o ) { + $y_hot = $_; + } +} +close( XBM ); +if ( ! ( defined( $width ) && defined( $height ) ) ) { + printf STDERR "$0: Error: $xbm: width or height is not set.\n"; + next; +} + +if ( ! open( XPM, "> $xpm" ) ) { + printf "$0: Error: could not open $xpm.\n"; + next; +} + +( $var = $xpm ) =~ s/\./_/o; +print XPM <<"EOF"; +/* XPM */ +static char *${var}[] = { +EOF +if ( defined( $x_hot ) && defined( $y_hot ) ) { + printf STDERR "$xbm, $xbmmask -> $xpm: $width $height $x_hot $y_hot\n"; + print XPM <<"EOF"; +/* width height num_colors chars_per_pixel x_hot y_hot */ +"$width $height 3 1 $x_hot $y_hot", +EOF +} else { + printf STDERR "$0: Warning: $xbm: x_hot or y_hot is not set.\n"; + printf STDERR "$xbm, $xbmmask -> $xpm: $width $height\n"; + print XPM <<"EOF"; +/* width height num_colors chars_per_pixel */ +"$width $height 3 1", +EOF +} +print XPM <<"EOF"; +/* colors */ +"$none s None c None", +"$black c $foreground", +"$white c $background", +/* pixels */ +EOF + +open( XBM, "$BMTOA $xbm |" ); +open( MASK, "$BMTOA $xbmmask |" ); + +$n = 0; +while( ) { + $M = ; + chop; + chop( $M );; + @bs = split( "", $_ ); + @ms = split( "", $M ); + $p = ''; + while( @bs ) { + $b = shift( @bs ); + $m = shift( @ms ); + $p .= ( $m eq $black ) ? $b : $none; + } + if ( ++$n == $height ) { + print XPM "\"$p\"};\n"; + last; + } else { + print XPM "\"$p\",\n"; + } +} +close( XBM ); +close( MASK ); +close( XPM ); +if ( $n != $height ) { + printf STDERR "$0: Error: could not convert.\n"; + unlink( $xpm ); + exit 1; +} + +} + +sub Usage { + print STDERR <<"EOF"; +usage: $0 [-fg ] [-bg ] [.xbm] [...] + + .xbm, .xbm -> .xpm +EOF + exit(1); +}