This is a Debian patch file for "sl" 3.03. This file was obtained originally from: http://ftp.debian.org/debian/pool/main/s/sl/sl_3.03-14.diff.gz The contents are unchanged except for these comments. --- sl-3.03.orig/sl.c +++ sl-3.03/sl.c @@ -35,6 +35,7 @@ int ACCIDENT = 0; int LOGO = 0; int FLY = 0; +int INTR = 0; int my_mvaddstr(int y, int x, char *str) { @@ -47,19 +48,20 @@ void option(char *str) { - extern int ACCIDENT, FLY, LONG; + extern int ACCIDENT, FLY; while (*str != '\0') { switch (*str++) { case 'a': ACCIDENT = 1; break; case 'F': FLY = 1; break; case 'l': LOGO = 1; break; + case 'e': INTR = 1; break; default: break; } } } -void main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int x, i; @@ -69,7 +71,9 @@ } } initscr(); - signal(SIGINT, SIG_IGN); + if (INTR == 0) { + signal(SIGINT, SIG_IGN); + } noecho(); leaveok(stdscr, TRUE); scrollok(stdscr, FALSE); @@ -85,6 +89,8 @@ } mvcur(0, COLS - 1, LINES - 1, 0); endwin(); + + return 0; } @@ -129,7 +135,7 @@ } -add_D51(int x) +int add_D51(int x) { static char *d51[D51PATTERNS][D51HIGHT + 1] = {{D51STR1, D51STR2, D51STR3, D51STR4, D51STR5, D51STR6, D51STR7, @@ -178,6 +184,8 @@ for (i = 0; i < 2; ++i) { my_mvaddstr(y + i, x, man[(LOGOLENGTH + x) / 12 % 2][i]); } + + return 0; } @@ -222,4 +230,6 @@ S[sum].ptrn = 0; S[sum].kind = sum % 2; sum ++; } + + return 0; } --- sl-3.03.orig/sl.h +++ sl-3.03/sl.h @@ -102,3 +102,9 @@ #define LCAR6 " (O) (O) " #define DELLN " " + +extern int add_D51(); +extern int add_sl(); +extern int add_man(); +extern int add_smoke(); + --- sl-3.03.orig/Makefile +++ sl-3.03/Makefile @@ -3,12 +3,38 @@ # Copyright 1993,1998 Toyoda Masashi # (toyoda@is.titech.ac.jp) # Last Modified: 1998/ 7/22 +# Modify for Debian by Kenshi Muto +# 1999/ 6/14 #========================================== CC=cc -CFLAGS=-O +CFLAGS=-Wall -O # -DDEBUG +LDFLAGS= -lcurses # -ltermcap + +PREFIX=$(DESTDIR)/usr +BINDIR=$(PREFIX)/bin +MANDIR=$(PREFIX)/man +INSTALL=install + +all: sl sl-h sl: sl.c sl.h - $(CC) $(CFLAGS) -o sl sl.c -lcurses -ltermcap -# $(CC) $(CFLAGS) -o sl sl.c -lcurses + $(CC) $(CFLAGS) -o sl sl.c $(LDFLAGS) + +sl-h: sl-h.c sl-h.h header.h + $(CC) $(CFLAGS) -o sl-h sl-h.c $(LDFLAGS) + +clean:: + rm -f sl sl-h + +distclean:: clean + +install:: + $(INSTALL) -m 755 sl $(BINDIR)/ + $(INSTALL) -m 755 sl-h $(BINDIR)/ + $(INSTALL) -m 644 sl.6 $(MANDIR)/man6/ + $(INSTALL) -m 644 sl-h.6 $(MANDIR)/man6/ + $(INSTALL) -m 644 sl.6j $(MANDIR)/ja/man6/sl.6 + $(INSTALL) -m 644 sl.6de $(MANDIR)/de/man6/sl.6 + $(INSTALL) -m 644 sl-h.6de $(MANDIR)/de/man6/sl-h.6 --- sl-3.03.orig/README +++ sl-3.03/README @@ -1,12 +1,10 @@ =========================================== - SL: $B%-!<%?%$%W6:@5%=%U%H(B + SL: Type cure software Copyright 1993,1998 Toyoda Masashi (toyoda@is.titech.ac.jp) =========================================== -$B$`$+$7$K$bEj9F$5$l$?>iCL%=%U%H$N(B sl $B$N9k2ZHG$G$9!#(B -$B%"%$%G%"$O +.UC 5 +.SH NAME +sl-h \- zeigt Animationen mit dem Ziel, Benutzer, die SL auf Ihrem Bildschirm mögen, zu unterhalten +.SH "ÜBERSICHT" +.B sl-h +[ +.B \-alFe +] +.SH BESCHREIBUNG +.B sl-h +zeigt Animationen um Benutzer zu vergnügen, die SL gerne auf Ihrem +Bildschirm anschauen. Dies ist eine leicht modifizierte Version von +.BR sl (6), +läuft aber viel länger, um Ihnen viel Spaß zu machen :) +.SH OPTIONEN +.TP +.B \-a +Ärger ist passiert! Sie werden Mitleid mit den hilfebedürftigen Leuten haben :-) +.TP +.B \-l +Zeigt ein mini SL an. +.TP +.B \-F +SL fliegt! (Kennen Sie die japanische Animation »Galaxy Express 999«?) +.TP +.B \-e +Erlaubt die Unterbrechung mit Strg+C (standardmäßig, da dieses massiv +und intervenierend ist) +.PP +.SH "SIEHE AUCH" +.BR ls (1) +.SH FEHLER +Es zeigt niemals den Inhalt des aktuellen Verzeichnisses. +.SH AUTOR +.BR sl (6) +wurde von Toyoda Masashi geschrieben. Der +Code in +.B sl-h +stammt von einem Patch der unter http://www.linet.gr.jp/~izumi/sl/ +vertrieben wird und von Izumi Tomonori geschrieben +wurde. +Diese Handbuchseite +wurde von Brian Ristuccia und Kenshi Muto +für das Debian GNU/Linux-System geschrieben aber darf auch von anderen unter der +gleichen Lizenz wie +.BR sl (6) +verwendet werden. --- sl-3.03.orig/sl.6 +++ sl-3.03/sl.6 @@ -0,0 +1,44 @@ +.TH SL 6 "Jan 18, 2001" +.UC 5 +.SH NAME +sl \- display animations aimed to correct users who accidentally enter +.B sl +instead of +.BR ls . +.SH SYNOPSIS +.B sl +[ +.B \-alFe +] +.SH DESCRIPTION +.B sl +Displays animations aimed to correct users who accidentally enter +.B sl +instead of +.BR ls . +.SH OPTIONS +.TP +.B \-a +An accident seems to happen. You'll feel pity for people who cry for help. +.TP +.B \-l +shows little one. +.TP +.B \-F +It flies. +.TP +.B \-e +Allow interrupt by Ctrl+C. +.PP +.SH "SEE ALSO" +.BR ls (1) +.SH BUGS +It rarely shows contents of current directory. +.SH AUTHOR +.B sl +was written by Toyoda Masashi . This manual page was +written by Brian Ristuccia + and Kenshi Muto for the Debian GNU/Linux system but may be used by +others under the same license as +.B sl +itself. --- sl-3.03.orig/sl.6de +++ sl-3.03/sl.6de @@ -0,0 +1,49 @@ +.TH SL 6 "16. Juli 2004" +\" +\" Translated into german by Helge Kreutzmann +.UC 5 +.SH NAME +sl \- stellt Animationen für Benutzer, die versehentlich +.B sl +anstatt +.BR ls +eingeben, dar. +.SH "ÜBERSICHT" +.B sl +[ +.B \-alFe +] +.SH BESCHREIBUNG +.B sl +stellt Animationen mit dem Ziel dar, Benutzer, die versehentlich +.B sl +anstatt +.BR ls +eingeben, zu korrigieren. +.SH OPTIONEN +.TP +.B \-a +Ein Unfall scheint zu passieren. Sie werden mit den um Hilfe rufenden Personen +Mitleid haben. +.TP +.B \-l +Zeigt einen kleinen. +.TP +.B \-F +Er fliegt. +.TP +.B \-e +Erlaubt die Unterbrechung mit Strg+C. +.PP +.SH "SIEHE AUCH" +.BR ls (1) +.SH FEHLER +Selten wird der Inhalt des aktuellen Verzeichnisses angezeigt. +.SH AUTOR +.B sl +wurde von Toyoda Masashi geschrieben. Diese Handbuchseite +wurde von Brian Ristuccia und Kenshi Muto +für das Debian GNU/Linux-System geschrieben aber darf auch von anderen unter der +gleichen Lizenz wie +.B sl +verwendet werden. --- sl-3.03.orig/sl-h.6 +++ sl-3.03/sl-h.6 @@ -0,0 +1,47 @@ +.TH SL-H 6 "Apr 3, 2001" +.UC 5 +.SH NAME +sl-h \- display animations aimed to entertain users who liked to see SL runs +on their screen. +.SH SYNOPSIS +.B sl-h +[ +.B \-alFe +] +.SH DESCRIPTION +.B sl-h +displays animations aimed to entertain users who like to see SL runs +on their screen. This is a slightly modified version of +.B sl +command, but it runs much long to please you very well :) +.SH OPTIONS +.TP +.B \-a +Some trouble happen! You'll feel pity for people who need help :-) +.TP +.B \-l +Display mini SL. +.TP +.B \-F +SL flys! (Do you know Japanese animation, "Galaxy Express 999" ?) +.TP +.B \-e +Allow interrupt by Ctrl+C (Default, as this is so heavy and violent). +.PP +.SH "SEE ALSO" +.BR ls (1) +.SH BUGS +It never shows contents of current directory. +.SH AUTHOR +.BR sl (6) +was written by Toyoda Masashi . +The code in +.B sl-h +is taken from a patch which is distributed from +http://www.linet.gr.jp/~izumi/sl/ and written by Izumi Tomonori +. +This manual page was written by Brian Ristuccia +and Kenshi Muto for the Debian GNU/Linux system +but may be used by others under the same license as +.BR sl (6) +itself. --- sl-3.03.orig/sl.6j +++ sl-3.03/sl.6j @@ -0,0 +1,37 @@ +.\" +.\" Copyright 1993 Toyoda Masashi. +.\" (toyoda@is.titech.ac.jp) +.\" @(#)sl.1 2.02 19/01/93 +.\" +.TH SL 1 "Jan 24, 2001" +.SH ̾¾Î +sl \- ¥­¡¼¥¿¥¤¥×¤ò¶ºÀµ¤·¤Þ¤¹¡£ +.SH ·Á¼° +.B sl +[ +.B \-alF +] +.SH ²òÀâ +.B sl +¤Ï¡¢¹âÅÙ¤ËȯŸ¤·¤¿¡¢¥­¡¼¥¿¥¤¥×¶ºÀµ¤òÌÜŪ¤È¤¹¤ë¥¢¥Ë¥á¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤Ç¤¹¡£ +.PP +¼¡¤Î¤è¤¦¤Ê¥ª¥×¥·¥ç¥ó¤¬¤¢¤ê¤Þ¤¹¡£ +.TP +.B \-a +¤Ê¤Ë¤«¥¢¥¯¥·¥Ç¥ó¥È¤¬¤¢¤Ã¤¿¤è¤¦¤Ç¤¹¤Í¡£½õ¤±¤òµá¤á¤ë¿Í¡¹¤¬ÈáÄˤǤ¹¡£ +.TP +.B \-l +¾®¤µ¤¯¤Ê¤ê¤Þ¤¹¡£ +.TP +.B \-F +Èô¤Ó¤Þ¤¹¡£ +.TP +.B \-e +Ctrl+C ¤ÇÅÓÃæ¤Ç»ß¤á¤ë¤³¤È¤òµö¤·¤Þ¤¹¡£ +.PP +.SH ´ØÏ¢»ö¹à +.BR ls (1) +.SH ¥Ð¥° +¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤ÎÆâÍƤ¬É½¼¨¤µ¤ì¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£ +.SH Ãø¼Ô +Ë­ÅÄ Àµ»Ë¡Êtoyoda@isea.is.titech.ac.jp¡Ë --- sl-3.03.orig/README.jp +++ sl-3.03/README.jp @@ -0,0 +1,12 @@ +=========================================== + SL: $B%-!<%?%$%W6:@5%=%U%H(B + Copyright 1993,1998 Toyoda Masashi + (toyoda@is.titech.ac.jp) +=========================================== + +$B$`$+$7$K$bEj9F$5$l$?>iCL%=%U%H$N(B sl $B$N9k2ZHG$G$9!#(B +$B%"%$%G%"$O&2 'source and diff are obsolete - use dpkg-source -b'; false + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary --- sl-3.03.orig/debian/postinst +++ sl-3.03/debian/postinst @@ -0,0 +1,3 @@ +#!/bin/sh +set -e +#DEBHELPER# --- sl-3.03.orig/debian/control +++ sl-3.03/debian/control @@ -0,0 +1,14 @@ +Source: sl +Section: games +Priority: optional +Maintainer: Kenshi Muto +Standards-Version: 3.5.2.0 +Build-Depends: debhelper, libncurses5-dev + +Package: sl +Architecture: any +Depends: ${shlibs:Depends} +Description: Correct you if you type `sl' by mistake + . + Sl is a program that can display animations aimed to correct you + if you type 'sl' by mistake. --- sl-3.03.orig/debian/changelog +++ sl-3.03/debian/changelog @@ -0,0 +1,93 @@ +sl (3.03-14) unstable; urgency=low + + * Fix minor mistake/typo in manpage (closes: Bug#259723, Bug#259724). + * Add German manpage translation (closes: Bug#259728). Thanks Helge. + + -- Kenshi Muto Sat, 17 Jul 2004 13:33:35 +0900 + +sl (3.03-13) unstable; urgency=low + + * Fix manpage typo (closes: Bug#177784). Thanks Martin. + + -- Kenshi Muto Wed, 22 Jan 2003 12:23:02 +0900 + +sl (3.03-12) unstable; urgency=low + + * Modify build-depends (closes: bug#98471). Thanks, Ryan. + + -- Kenshi Muto Wed, 23 May 2001 15:10:54 +0900 + +sl (3.03-11) unstable; urgency=low + + * Fix manpage (closes: bug#92657). Thanks, Nakano. + * The segfaults bug #61066 was caused by libncurses, and it seems + already be fixed (closes: bug#61066). Thanks, Sano. + * Apply sl enhancement (You can use by sl-h). Thanks, Sano. + + -- Kenshi Muto Mon, 9 Apr 2001 00:26:05 +0900 + +sl (3.03-10) unstable; urgency=low + + * Add -e option for intrrupting SL (closes: Bug#83321). + + -- Kenshi Muto Thu, 25 Jan 2001 00:26:53 +0900 + +sl (3.03-9) unstable; urgency=low + + * Oops, I'd missed orig.tar.gz. I rebuilded it. + + -- Kenshi Muto Tue, 23 Jan 2001 22:51:50 +0900 + +sl (3.03-8) unstable; urgency=low + + * Remove SIGINT line by Simon's request. (closes: Bug#83143) + + -- Kenshi Muto Tue, 23 Jan 2001 22:47:12 +0900 + +sl (3.03-7) unstable; urgency=low + + * Recompile with glibc 2.1.97. + + -- Kenshi Muto Tue, 14 Nov 2000 22:45:39 +0900 + +sl (3.03-6) unstable; urgency=low + + * Modify English manpage (Bug#63812). Thanks your report, Bunk. + + -- Kenshi Muto Tue, 9 May 2000 20:10:36 +0900 + +sl (3.03-5) unstable; urgency=low + + * Change to FHS. + + -- Kenshi Muto Mon, 1 Nov 1999 13:43:34 +0900 + +sl (3.03-4) unstable; urgency=low + + * Change architecture from "i386" to "any" (Bug#39604). + + -- Kenshi Muto Wed, 16 Jun 1999 17:35:46 +0900 + +sl (3.03-3) unstable; urgency=low + + * New English man page added (Bug#39379 fixed). Thanks,Brian Ristuccia. + * All man pages moved man section 6. + + -- Kenshi Muto Mon, 14 Jun 1999 10:42:27 +0900 + +sl (3.03-2) unstable; urgency=low + + * Initial official release for Debian Project. + + -- Kenshi Muto Wed, 26 May 1999 14:27:09 +0900 + +sl (3.03-1) unstable; urgency=low + + * Initial Release. + + -- Teruyuki Morimura Mon, 8 Mar 1999 16:52:58 +0900 + +Local variables: +mode: debian-changelog +add-log-mailing-address: "terubou@sandalwood.net" +End: --- sl-3.03.orig/debian/copyright +++ sl-3.03/debian/copyright @@ -0,0 +1,15 @@ +This package was debianized by Teruyuki Morimura terubou@sandalwood.net on +Mon, 8 Mar 1999 16:52:58 +0900. + +It was downloaded from http://www.is.titech.ac.jp/~toyoda/ + +Upstream Author(s): Toyoda Masashi + +Copyright: + + Copyright 1993,1998 Toyoda Masashi (toyoda@is.titech.ac.jp) + + Everyone is permitted to do anything on this program including copying, + modifying, and improving, unless you try to pretend that you wrote it. + i.e., the above copyright notice has to appear in all copies. + THE AUTHOR DISCLAIMS ANY RESPONSIBILITY WITH REGARD TO THIS SOFTWARE. --- sl-3.03.orig/sl-h.c +++ sl-3.03/sl-h.c @@ -0,0 +1,750 @@ +/*======================================== + * sl.c: + * Copyright 1993,1998 Toyoda Masashi + * (toyoda@is.titech.ac.jp) + * Last Modified: 1998/ 7/22 + *======================================== + */ +/* sl version 3.03 : add usleep(20000) */ +/* by Toyoda Masashi 1998/ 7/22 */ +/* sl version 3.02 : D51 flies! Change options. */ +/* by Toyoda Masashi 1993/ 1/19 */ +/* sl version 3.01 : Wheel turns smoother */ +/* by Toyoda Masashi 1992/12/25 */ +/* sl version 3.00 : Add d(D51) option */ +/* by Toyoda Masashi 1992/12/24 */ +/* sl version 2.02 : Bug fixed.(dust remains in screen) */ +/* by Toyoda Masashi 1992/12/17 */ +/* sl version 2.01 : Smoke run and disappear. */ +/* Change '-a' to accident option. */ +/* by Toyoda Masashi 1992/12/16 */ +/* sl version 2.00 : Add a(all),l(long),F(Fly!) options. */ +/* by Toyoda Masashi 1992/12/15 */ +/* sl version 1.02 : Add turning wheel. */ +/* by Toyoda Masashi 1992/12/14 */ +/* sl version 1.01 : Add more complex smoke. */ +/* by Toyoda Masashi 1992/12/14 */ +/* sl version 1.00 : SL runs vomitting out smoke. */ +/* by Toyoda Masashi 1992/12/11 */ + +#include +#include +#include +#include +#include +#include +#include +#include "sl-h.h" +#include "header.h" + +#define RTOL 0 +#define LTOR 1 + +#ifndef useconds_t + #define USLEEP_ARG0_TYPE unsigned +#else + #define USLEEP_ARG0_TYPE useconds_t +#endif + +int ACCIDENT = 0; +int LOGO = 0; +int FLY = 0; +int INTR = 1; +int PASSNUM = 5; +int ALL_LENGTH = 0; +int DIREC = RTOL; +int WAIT_TIME = 20000; + +int my_mvaddstr(int y, int x, char *str) +{ + int i = 0; + + for ( ; x < 0; ++x, ++i) + if (str[i] == '\0') return ERR; + if (mvaddnstr(y, x, &str[i], (int)COLS - x) == ERR) return ERR; + return OK; +} + +int my_mvaddstr_r(int y, int x, char *str) +{ + int i = 0; + char c; + + for ( ; x >= COLS; --x, ++i) + if (str[i] == '\0') return ERR; + for ( ; str[i] != '\0'; ++i, --x) { + c = str[i]; + switch (c) { + case '\\': c = '/'; break; + case '/': c = '\\'; break; + case '(': c = ')'; break; + case ')': c = '('; break; + case '[': c = ']'; break; + case ']': c = '['; break; + } + if (mvaddch(y, x, str[i]) == ERR) return ERR; + } + return OK; +} + +void option(char *str) +{ + extern int ACCIDENT, FLY; + + while (*str != '\0') { + switch (*str++) { + case 'a': ACCIDENT = 1; break; + case 'F': FLY = 1; break; + case 'l': LOGO = 1; break; + case 'e': INTR = 1; break; + default: break; + } + } +} + +int dirc(int y, int x) + { + if (DIREC == RTOL) { + my_mvaddstr(y + 5, cros0l[5] + x - 1, "<-- "); + } else { + my_mvaddstr(y + 5, cros0l[5] + x - 1, " -->"); + } + return 0; +} + +int main(int argc, char *argv[]) +{ + int x, i, j, k, p, ONEDIREC, len; + int (*sl_func)(); + time_t t; + char num[10]; + unsigned short int s; + char *pp; + char *c[D51PATTERNS][D51HIGHT+1]; + + for (i = 1; i < argc; ++i) { + if (*argv[i] == '-') { + option(argv[i] + 1); + } + } + time(&t); + s = (unsigned short int)t; + seed48(&s); +#ifdef DEBUG + PASSNUM = 3; + ONEDIREC = 1; + WAIT_TIME = (USLEEP_ARG0_TYPE)100; + signal(SIGINT, end_proc); +#else + if (INTR == 0) { + signal(SIGINT, SIG_IGN); + } + PASSNUM = (int)(drand48() * 20.0) + 10; + if (drand48() > 0.5) { + ONEDIREC = 1; + } else { + ONEDIREC = 0; + } + WAIT_TIME = (USLEEP_ARG0_TYPE)(drand48() * 50000.0); +#endif + ALL_LENGTH = (3 * D51LENGTH + (PASSLENGTH * (PASSNUM - 1)) + LPASSLENGTH); + + initscr(); + noecho(); +#ifdef DEBUG + printf("%d,%d\n\r", COLS, LINES); + printf("Hit any key\n\r"); + fflush(stdout); + getc(stdin); +#endif + leaveok(stdscr, TRUE); + scrollok(stdscr, FALSE); + + DIREC = RTOL; + p = 3 * COLS / 10; + pp = (char*)malloc((size_t)(COLS + ALL_LENGTH + 10) * (D51HIGHT + 1) * (D51PATTERNS + 1)); + for (i = 0; i <= (COLS + ALL_LENGTH + 1) * (D51HIGHT + 1) * D51PATTERNS; ++i) { + pp[i] = (char)NULL; + } + + for (j = 0; j < D51PATTERNS; ++j) { + for (i = 0; i <= D51HIGHT; ++i) { + c[j][i] = pp + (COLS + ALL_LENGTH + 2) * i + (COLS + ALL_LENGTH + 1) * (D51HIGHT + 1) * j; + for (k = 0; k < COLS; ++k) { + strcat(c[j][i], " "); + } + strncat(c[j][i], d51[j][i], 53); + strncat(c[j][i], coal[i], 29); + strncat(c[j][i], d51[j][i], 53); + strncat(c[j][i], coal[i], 29); + strncat(c[j][i], d51[j][i], 53); + strncat(c[j][i], coal[i], 29); + for (k = 0; k < PASSNUM - 1; ++k) { + strncat(c[j][i], coach[i], 88); + if ( i == 3 ) { + sprintf(num, "%d", k + 1); + len = strlen(num); + strncpy(c[j][i] + COLS + 254 + (PASSLENGTH * k), num, len); + } + } + strncat(c[j][i], lcoach[i], 89); + if ( i == 3 ) { + sprintf(num, "%d", k + 1); + len = strlen(num); + strncpy(c[j][i] + COLS + 254 + (PASSLENGTH * k), num, len); + } + } + } + if (FLY != 1) { + begin_gate(p); + } + if (LOGO == 0) { + sl_func = add_D51_coach; + } else { + sl_func = add_sl; + } + for (x = COLS - 1; ; --x) { + if ((*sl_func)(x, c) == ERR) break; + if (FLY != 1) { + if (add_cross(p) == ERR) break; + } + refresh(); + usleep((USLEEP_ARG0_TYPE)WAIT_TIME); + } + if (FLY != 1 && LOGO == 0 && ONEDIREC == 1) { + x_gate(p); + for (x = 0; ; ++x) { + if (add_D51_coach_r(x) == ERR) break; + if (add_cross(p) == ERR) break; + refresh(); + usleep((USLEEP_ARG0_TYPE)WAIT_TIME); + } + } + if (FLY != 1) { + end_gate(p); + } + mvcur(0, COLS - 1, LINES - 1, 0); + endwin(); + + return 0; +} + +void end_proc() { + mvcur(0, COLS - 1, LINES - 1, 0); + endwin(); + exit(SIGINT); +} + + +int add_cross(int p) +{ + int i, y, n = 20, hn; + static int tt; +#ifdef DEBUG + char buf[100]; +#endif + + hn = n / 2; + if ( LOGO == 0) { + y = LINES / 2 - 5; + } else { + y = LINES / 2 - 7; + } + for (i = 2; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, cros0l[i] + p, cros0[i]); + } + for (i = 8; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, p + 5, cros3[i]); + } +#ifdef DEBUG + sprintf(buf, "%d", tt); + my_mvaddstr(0, 0, buf); +#endif + + if ( tt % n >= 0 && tt % n < hn) { + my_mvaddstr(y + 4, cros0l[5] + p - 1, "O"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "X"); + my_mvaddstr(y + 5, cros0l[5] + p - 1, " || "); + } else if ( tt % n >= hn && tt % n < n) { + my_mvaddstr(y + 4, cros0l[5] + p - 1, "X"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "O"); + dirc(y, p); + } + ++tt; + + return 0; +} + + +int begin_gate(int p) +{ + int i, y, n = 20, hn; + int tt; + + hn = n / 2; + if ( LOGO == 0) { + y = LINES / 2 - 5; + } else { + y = LINES / 2 - 7; + } + + for (tt = 0; tt < 80; ++tt) { + for (i = 0; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, p + 5, cros1[i]); + } + for (i = 2; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, cros0l[i] + p, cros0[i]); + } + if ( tt % n >= 0 && tt % n < hn) { + my_mvaddstr(y + 4, cros0l[5] + p - 1, "O"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "X"); + my_mvaddstr(y + 5, cros0l[5] + p - 1, " || "); + } else if ( tt % n >= hn && tt % n < n) { + my_mvaddstr(y + 4, cros0l[5] + p - 1, "X"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "O"); + dirc(y, p); + } + my_mvaddstr(LINES + 1, COLS + 1, ""); + refresh(); + usleep((USLEEP_ARG0_TYPE)WAIT_TIME); + } + for (tt = 0; tt <= 15; ++tt) { + for (i = 0; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, p + 5, cros2[i]); + } + for (i = 2; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, cros0l[i] + p, cros0[i]); + } + if ( tt % n >= 0 && tt % n < hn) { + my_mvaddstr(y + 4, cros0l[5] + p - 1, "O"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "X"); + my_mvaddstr(y + 5, cros0l[5] + p - 1, " || "); + } else if ( tt % n >= hn && tt % n < n) { + my_mvaddstr(y + 4, cros0l[5] + p - 1, "X"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "O"); + dirc(y, p); + } + my_mvaddstr(LINES + 1, COLS + 1, ""); + refresh(); + usleep((USLEEP_ARG0_TYPE)WAIT_TIME); + } + for (tt = 0; tt <= 20; ++tt) { + for (i = 0; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, p + 5, cros3[i]); + } + for (i = 2; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, cros0l[i] + p, cros0[i]); + } + if ( tt % n >= 0 && tt % n < hn) { + my_mvaddstr(y + 4, cros0l[5] + p - 1, "O"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "X"); + my_mvaddstr(y + 5, cros0l[5] + p - 1, " || "); + } else if ( tt % n >= hn && tt % n < n) { + my_mvaddstr(y + 4, cros0l[5] + p - 1, "X"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "O"); + dirc(y, p); + } + my_mvaddstr(LINES + 1, COLS + 1, ""); + refresh(); + usleep((USLEEP_ARG0_TYPE)WAIT_TIME); + } + + return 0; +} + +int end_gate(int p) +{ + int i, y, n = 20, hn; + int tt; + + hn = n / 2; + if ( LOGO == 0) { + y = LINES / 2 - 5; + } else { + y = LINES / 2 - 7; + } + + for (tt = 0; tt <= 20; ++tt) { + for (i = 0; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, p + 5, cros3[i]); + } + for (i = 2; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, cros0l[i] + p, cros0[i]); + } + if ( tt % n >= 0 && tt % n < hn) { + my_mvaddstr(y + 4, cros0l[5] + p - 1, "O"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "X"); + my_mvaddstr(y + 5, cros0l[5] + p - 1, " || "); + } else if ( tt % n >= hn && tt % n < n) { + my_mvaddstr(y + 4, cros0l[5] + p - 1, "X"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "O"); + dirc(y, p); + } + my_mvaddstr(LINES + 1, COLS + 1, ""); + refresh(); + usleep((USLEEP_ARG0_TYPE)WAIT_TIME); + } + for (tt = 0; tt <= 15; ++tt) { + for (i = 0; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, p + 5, cros2[i]); + } + for (i = 2; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, cros0l[i] + p, cros0[i]); + } + if ( tt % n >= 0 && tt % n < hn) { + my_mvaddstr(y + 4, cros0l[5] + p - 1, "O"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "X"); + my_mvaddstr(y + 5, cros0l[5] + p - 1, " || "); + } else if ( tt % n >= hn && tt % n < n) { + my_mvaddstr(y + 4, cros0l[5] + p - 1, "X"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "O"); + dirc(y, p); + } + my_mvaddstr(LINES + 1, COLS + 1, ""); + refresh(); + usleep((USLEEP_ARG0_TYPE)WAIT_TIME); + } + for (tt = 0; tt < 80; ++tt) { + for (i = 0; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, p + 5, cros1[i]); + } + for (i = 2; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, cros0l[i] + p, cros0[i]); + } + my_mvaddstr(y + 4, cros0l[5] + p - 1, "X"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "X"); + my_mvaddstr(LINES + 1, COLS + 1, ""); + my_mvaddstr(y + 5, cros0l[5] + p - 1, " || "); + refresh(); + usleep((USLEEP_ARG0_TYPE)WAIT_TIME); + } + + return 0; +} + + +int x_gate(int p) + { + int i, y, n = 20, hn; + int tt; + + hn = n / 2; + if ( LOGO == 0) { + y = LINES / 2 - 5; + } else { + y = LINES / 2 - 7; + } + + for (tt = 0; tt <= 20; ++tt) { + for (i = 0; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, p + 5, cros3[i]); + } + for (i = 2; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, cros0l[i] + p, cros0[i]); + } + if ( tt % n >= 0 && tt % n < hn) { + my_mvaddstr(y + 4, cros0l[5] + p - 1, "O"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "X"); + my_mvaddstr(y + 5, cros0l[5] + p - 1, " || "); + } else if ( tt % n >= hn && tt % n < n) { + my_mvaddstr(y + 4, cros0l[5] + p - 1, "X"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "O"); + dirc(y, p); + } + my_mvaddstr(LINES + 1, COLS + 1, ""); + refresh(); + usleep((USLEEP_ARG0_TYPE)WAIT_TIME); + } + for (tt = 0; tt <= 10; ++tt) { + for (i = 0; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, p + 5, cros2[i]); + } + for (i = 2; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, cros0l[i] + p, cros0[i]); + } + if ( tt % n >= 0 && tt % n < hn) { + my_mvaddstr(y + 4, cros0l[5] + p - 1, "O"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "X"); + my_mvaddstr(y + 5, cros0l[5] + p - 1, " || "); + } else if ( tt % n >= hn && tt % n < n) { + my_mvaddstr(y + 4, cros0l[5] + p - 1, "X"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "O"); + dirc(y, p); + } + my_mvaddstr(LINES + 1, COLS + 1, ""); + refresh(); + usleep((USLEEP_ARG0_TYPE)WAIT_TIME); + } + DIREC = ( DIREC + 1 ) % 2; + for (tt = 0; tt <= 10; ++tt) { + for (i = 0; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, p + 5, cros2[i]); + } + for (i = 2; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, cros0l[i] + p, cros0[i]); + } + if ( tt % n >= 0 && tt % n < hn) { + my_mvaddstr(y + 4, cros0l[5] + p - 1, "O"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "X"); + my_mvaddstr(y + 5, cros0l[5] + p - 1, " || "); + } else if ( tt % n >= hn && tt % n < n) { + my_mvaddstr(y + 4, cros0l[5] + p - 1, "X"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "O"); + dirc(y, p); + } + my_mvaddstr(LINES + 1, COLS + 1, ""); + refresh(); + usleep((USLEEP_ARG0_TYPE)WAIT_TIME); + } + for (tt = 0; tt <= 20; ++tt) { + for (i = 0; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, p + 5, cros3[i]); + } + for (i = 2; i < D51HIGHT; ++i) { + my_mvaddstr(y + i, cros0l[i] + p, cros0[i]); + } + if ( tt % n >= 0 && tt % n < hn) { + my_mvaddstr(y + 4, cros0l[5] + p - 1, "O"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "X"); + my_mvaddstr(y + 5, cros0l[5] + p - 1, " || "); + } else if ( tt % n >= hn && tt % n < n) { + my_mvaddstr(y + 4, cros0l[5] + p - 1, "X"); + my_mvaddstr(y + 4, cros0l[5] + p + 2, "O"); + dirc(y, p); + } + my_mvaddstr(LINES + 1, COLS + 1, ""); + refresh(); + usleep((USLEEP_ARG0_TYPE)WAIT_TIME); + } + + return 0; +} + +int add_sl(int x, char *c[]) +{ + static char *sl[LOGOPATTERNS][LOGOHIGHT + 1] + = {{LOGO1, LOGO2, LOGO3, LOGO4, LWHL11, LWHL12, DELLN}, + {LOGO1, LOGO2, LOGO3, LOGO4, LWHL21, LWHL22, DELLN}, + {LOGO1, LOGO2, LOGO3, LOGO4, LWHL31, LWHL32, DELLN}, + {LOGO1, LOGO2, LOGO3, LOGO4, LWHL41, LWHL42, DELLN}, + {LOGO1, LOGO2, LOGO3, LOGO4, LWHL51, LWHL52, DELLN}, + {LOGO1, LOGO2, LOGO3, LOGO4, LWHL61, LWHL62, DELLN}}; + + static char *car[LOGOHIGHT + 1] + = {LCAR1, LCAR2, LCAR3, LCAR4, LCAR5, LCAR6, DELLN}; + + int i, y, py1 = 0, py2 = 0, py3 = 0; + if (x < - LOGOLENGTH) return ERR; + y = LINES / 2 - 3; + + if (FLY == 1) { + y = (x / 6) + LINES - (COLS / 6) - LOGOHIGHT; + py1 = 2; py2 = 4; py3 = 6; + } + for (i = 0; i <= LOGOHIGHT; ++i) { + my_mvaddstr(y + i, x, sl[(LOGOLENGTH + x) / 3 % LOGOPATTERNS][i]); + my_mvaddstr(y + i + py1, x + 21, lcoal[i]); + my_mvaddstr(y + i + py2, x + 42, car[i]); + my_mvaddstr(y + i + py3, x + 63, car[i]); + } + if (ACCIDENT == 1) { + add_man(y + 1, x + 14); + add_man(y + 1 + py2, x + 45); add_man(y + 1 + py2, x + 53); + add_man(y + 1 + py3, x + 66); add_man(y + 1 + py3, x + 74); + } + add_smoke(y - 1, x + LOGOFUNNEL); + return OK; +} + + +int add_D51_coach(int x, char *c[]) +{ + int y, i, dy = 0; +#ifdef DEBUG + char buf[100]; +#endif + + if (x < ( 4 - ALL_LENGTH )) return ERR; + y = LINES / 2 - 5; + +#ifdef DEBUG + sprintf(buf, "%d", x); + my_mvaddstr(1, 0, buf); +#endif + if (FLY == 1) { + y = (x / 7) + LINES - (COLS / 7) - D51HIGHT; + dy = 1; + } + for (i = 0; i <= D51HIGHT; ++i) { + my_mvaddstr(y + i, 0, c[(D51HIGHT + 1) * ((ALL_LENGTH + x) % D51PATTERNS) + i] + COLS - x); + } + if (ACCIDENT == 1) { + add_man(y + 2, x + 43); + add_man(y + 2, x + 47); + add_man(y + 2, x + 125); + add_man(y + 2, x + 129); + add_man(y + 2, x + 207); + add_man(y + 2, x + 211); + } + add_smoke(y - 1, x + D51FUNNEL); + add_smoke(y - 1, x + D51FUNNEL + 81); + add_smoke(y - 1, x + D51FUNNEL + 162); + return OK; +} + + +int add_D51_coach_r(int x) +{ + int y, i, j; + char num[10]; + + if (x > ALL_LENGTH + COLS) return ERR; + y = LINES / 2 - 5; + + for (i = 0; i <= D51HIGHT; ++i) { + my_mvaddstr_r(y + i, x, d51_r[(ALL_LENGTH + x) % D51PATTERNS][i]); + my_mvaddstr_r(y + i, x - 53, coal[i]); + my_mvaddstr_r(y + i, x - 82, d51_r[(ALL_LENGTH + x) % D51PATTERNS][i]); + my_mvaddstr_r(y + i, x - 135, coal[i]); + my_mvaddstr_r(y + i, x - 164, d51_r[(ALL_LENGTH + x) % D51PATTERNS][i]); + my_mvaddstr_r(y + i, x - 217, coal[i]); + for (j = 0; j < PASSNUM - 1; ++j) { + my_mvaddstr_r(y + i, x - 246 - (PASSLENGTH * j), coach[i]); + if ( i == 3 ) { + sprintf(num, "%d", j + 1); + my_mvaddstr(y + i, x - 255 - (PASSLENGTH * j), num); + } + } + my_mvaddstr_r(y + i, x - 246 - (PASSLENGTH * (PASSNUM - 1)), lcoach[i]); + if ( i == 3 ) { + sprintf(num, "%d", j + 1); + my_mvaddstr(y + i, x - 255 - (PASSLENGTH * (PASSNUM - 1)), num); + } + } + if (ACCIDENT == 1) { + add_man(y + 2, x - 45); + add_man(y + 2, x - 49); + add_man(y + 2, x - 127); + add_man(y + 2, x - 131); + add_man(y + 2, x - 209); + add_man(y + 2, x - 213); + + } + add_smoke_r(y - 1, x - D51FUNNEL - 3); + add_smoke_r(y - 1, x - D51FUNNEL - 84); + add_smoke_r(y - 1, x - D51FUNNEL - 167); + return OK; +} + + +int add_man(int y, int x) +{ + static char *man[2][2] = {{"", "(O)"}, {"Help!", "\\O/"}}; + int i; + + if ( x < 0 ) { + return 0; + } + for (i = 0; i < 2; ++i) { + my_mvaddstr(y + i, x, man[(LOGOLENGTH + x) / 12 % 2][i]); + } + return 0; +} + + +int add_smoke(int y, int x) +#define SMOKEPTNS 16 +{ + static struct smokes { + int y, x; + int ptrn, kind; + } S[1000]; + static int sum = 0; + static char *Smoke[2][SMOKEPTNS] + = {{"( )", "( )", "( )", "( )", "( )", + "( )" , "( )" , "( )" , "()" , "()" , + "O" , "O" , "O" , "O" , "O" , + " " }, + {"(@@@)", "(@@@@)", "(@@@@)", "(@@@)", "(@@)", + "(@@)" , "(@)" , "(@)" , "@@" , "@@" , + "@" , "@" , "@" , "@" , "@" , + " " }}; + static char *Eraser[SMOKEPTNS] + = {" ", " ", " ", " ", " ", + " " , " " , " " , " " , " " , + " " , " " , " " , " " , " " , + " " }; + static int dy[SMOKEPTNS] = { 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0 }; + static int dx[SMOKEPTNS] = {-2, -1, 0, 1, 1, 1, 1, 1, 2, 2, + 2, 2, 2, 3, 3, 3 }; + int i; + + if (x < - COLS) { + return 0; + } + + if (x % 4 == 0) { + for (i = 0; i < sum; ++i) { + my_mvaddstr(S[i].y, S[i].x, Eraser[S[i].ptrn]); + S[i].y -= dy[S[i].ptrn]; + S[i].x += dx[S[i].ptrn]; + S[i].ptrn += (S[i].ptrn < SMOKEPTNS - 1) ? 1 : 0; + my_mvaddstr(S[i].y, S[i].x, Smoke[S[i].kind][S[i].ptrn]); + } + my_mvaddstr(y, x, Smoke[sum % 2][0]); + S[sum].y = y; S[sum].x = x; + S[sum].ptrn = 0; S[sum].kind = sum % 2; + sum ++; + } + return 0; +} + + +int add_smoke_r(int y, int x) +#define SMOKEPTNS 16 +{ + static struct smokes { + int y, x; + int ptrn, kind; + } S[1000]; + static int sum = 0; + static char *Smoke[2][SMOKEPTNS] + = {{"( )", "( )", "( )", "( )", "( )", + "( )" , "( )" , "( )" , "()" , "()" , + "O" , "O" , "O" , "O" , "O" , + " " }, + {"(@@@)", "(@@@@)", "(@@@@)", "(@@@)", "(@@)", + "(@@)" , "(@)" , "(@)" , "@@" , "@@" , + "@" , "@" , "@" , "@" , "@" , + " " }}; + static char *Eraser[SMOKEPTNS] + = {" ", " ", " ", " ", " ", + " " , " " , " " , " " , " " , + " " , " " , " " , " " , " " , + " " }; + static int dy[SMOKEPTNS] = { 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0 }; + static int dx[SMOKEPTNS] = {-2, -1, 0, 1, 1, 1, 1, 1, 2, 2, + 2, 2, 2, 3, 3, 3 }; + int i; + + if (x > 2 * COLS) { + return 0; + } + + if (x % 4 == 0) { + for (i = 0; i < sum; ++i) { + my_mvaddstr_r(S[i].y, S[i].x, Eraser[S[i].ptrn]); + S[i].y -= dy[S[i].ptrn]; + S[i].x -= dx[S[i].ptrn]; + S[i].ptrn += (S[i].ptrn < SMOKEPTNS - 1) ? 1 : 0; + my_mvaddstr_r(S[i].y, S[i].x, Smoke[S[i].kind][S[i].ptrn]); + } + my_mvaddstr(y, x, Smoke[sum % 2][0]); + S[sum].y = y; S[sum].x = x; + S[sum].ptrn = 0; S[sum].kind = sum % 2; + sum ++; + } + return 0; +} --- sl-3.03.orig/sl-h.h +++ sl-3.03/sl-h.h @@ -0,0 +1,237 @@ +/*======================================== + * sl.h: Text data of SL version 3.01 + * Copyright 1993 Toyoda Masashi + * (toyoda@is.titech.ac.jp) + * Last Modified: 1992/12/23 + *======================================== + */ + +#define D51HIGHT 10 +#define D51FUNNEL 7 +/*#define D51LENGTH 82*/ +#define D51LENGTH 172 +#define D51PATTERNS 6 + + +#define D51STR1 " ==== ________ ___________ " +#define D51STR2 " _D _| |_______/ \\__I_I_____===__|_________| " +#define D51STR3 " |(_)--- | H\\________/ | | =|___ ___| " +#define D51STR4 " / | | H | | | | ||_| |_|| " +#define D51STR5 " | | | H |__--------------------| [___] | " +#define D51STR6 " | ________|___H__/__|_____/[][]~\\_______| | " +#define D51STR7 " |/ | |-----------I_____I [][] [] D |=======|__ " + +#define D51WHL11 "__/ =| o |=-~~\\ /~~\\ /~~\\ /~~\\ ____Y___________|__ " +#define D51WHL12 " |/-=|___|= || || || |_____/~\\___/ " +#define D51WHL13 " \\_/ \\O=====O=====O=====O_/ \\_/ " + +#define D51WHL21 "__/ =| o |=-~~\\ /~~\\ /~~\\ /~~\\ ____Y___________|__ " +#define D51WHL22 " |/-=|___|=O=====O=====O=====O |_____/~\\___/ " +#define D51WHL23 " \\_/ \\__/ \\__/ \\__/ \\__/ \\_/ " + +#define D51WHL31 "__/ =| o |=-O=====O=====O=====O \\ ____Y___________|__ " +#define D51WHL32 " |/-=|___|= || || || |_____/~\\___/ " +#define D51WHL33 " \\_/ \\__/ \\__/ \\__/ \\__/ \\_/ " + +#define D51WHL41 "__/ =| o |=-~O=====O=====O=====O\\ ____Y___________|__ " +#define D51WHL42 " |/-=|___|= || || || |_____/~\\___/ " +#define D51WHL43 " \\_/ \\__/ \\__/ \\__/ \\__/ \\_/ " + +#define D51WHL51 "__/ =| o |=-~~\\ /~~\\ /~~\\ /~~\\ ____Y___________|__ " +#define D51WHL52 " |/-=|___|= O=====O=====O=====O|_____/~\\___/ " +#define D51WHL53 " \\_/ \\__/ \\__/ \\__/ \\__/ \\_/ " + +#define D51WHL61 "__/ =| o |=-~~\\ /~~\\ /~~\\ /~~\\ ____Y___________|__ " +#define D51WHL62 " |/-=|___|= || || || |_____/~\\___/ " +#define D51WHL63 " \\_/ \\_O=====O=====O=====O/ \\_/ " + +#define D51DEL " " + +#define COAL01 " " +#define COAL02 " " +#define COAL03 " _________________ " +#define COAL04 " _| \\_____A " +#define COAL05 " =| | " +#define COAL06 " -| | " +#define COAL07 "__|________________________|_" +#define COAL08 "|__________________________|_" +#define COAL09 " |_D__D__D_| |_D__D__D_| " +#define COAL10 " \\_/ \\_/ \\_/ \\_/ " + +#define COALDEL " " + +#define LOGOHIGHT 6 +#define LOGOFUNNEL 4 +#define LOGOLENGTH 84 +#define LOGOPATTERNS 6 + +#define LOGO1 " ++ +------ " +#define LOGO2 " || |+-+ | " +#define LOGO3 " /---------|| | | " +#define LOGO4 " + ======== +-+ | " + +#define LWHL11 " _|--O========O~\\-+ " +#define LWHL12 "//// \\_/ \\_/ " + +#define LWHL21 " _|--/O========O\\-+ " +#define LWHL22 "//// \\_/ \\_/ " + +#define LWHL31 " _|--/~O========O-+ " +#define LWHL32 "//// \\_/ \\_/ " + +#define LWHL41 " _|--/~\\------/~\\-+ " +#define LWHL42 "//// \\_O========O " + +#define LWHL51 " _|--/~\\------/~\\-+ " +#define LWHL52 "//// \\O========O/ " + +#define LWHL61 " _|--/~\\------/~\\-+ " +#define LWHL62 "//// O========O_/ " + +#define LCOAL1 "____ " +#define LCOAL2 "| \\@@@@@@@@@@@ " +#define LCOAL3 "| \\@@@@@@@@@@@@@_ " +#define LCOAL4 "| | " +#define LCOAL5 "|__________________| " +#define LCOAL6 " (O) (O) " + +#define LCAR1 "____________________ " +#define LCAR2 "| ___ ___ ___ ___ | " +#define LCAR3 "| |_| |_| |_| |_| | " +#define LCAR4 "|__________________| " +#define LCAR5 "|__________________| " +#define LCAR6 " (O) (O) " + +#define DELLN " " + +#define PASSLENGTH 88 + +#define PASS01 " _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ " +#define PASS02 " _________|___|__|___|__|___|__|___|__|___|__|___|__|___|__|___|__|___|__|___|_________ " +#define PASS03 " | ____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ ____ | " +#define PASS04 " | | | | | | | | | | | | | | | | | | | | | | | | | | " +#define PASS05 " | | | |___| |___| |___| |___| |___| |___| |___| |___| |___| |___| | | | " +#define PASS06 " | | | | | | " +#define PASS07 " | | | @@ | | | " +#define PASS08 "__|_|__|________________________________________________________________________|__|_|__" +#define PASS09 "\\==|_/_\\____/_\\_| |______|Z +--|_________________|------+ |_/_\\____/_\\_|==/" +#define PASS10 " \\_/ \\_/ +++~~ \\_/ \\_/ " + +#define PASSDEL " " + +#define LPASSLENGTH 88 + +#define LPASS01 " _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ " +#define LPASS02 " _________|___|__|___|__|___|__|___|__|___|__|___|__|___|__|___|__|___|__|___|________ " +#define LPASS03 " | ____ _____ _____ _____ _____ _____ _____ _____ _____ _____ ____ _____| " +#define LPASS04 " | | | | | | | | | | | | | | | | | | | | | | | | | " +#define LPASS05 " | | | |___| |___| |___| |___| |___| |___| |___| |___| |___| | | | | " +#define LPASS06 " | | | | | |___| " +#define LPASS07 " | | | @@ | | |_|_| " +#define LPASS08 "__|_|__|_________________________________________________________________|__|___|_|_|___ " +#define LPASS09 "\\==|_/_\\____/_\\_| |______|XX +-|_______|------+ |_/_\\____/_\\_|==/ " +#define LPASS10 " \\_/ \\_/ \\_/ \\_/ " + +#define LPASSDEL " " + +#define CROS001 "" +#define CROS002 "" +#define CROS003 "-_||_-" +#define CROS004 "_><_" +#define CROS005 "- || -" +#define CROS006 "||" +#define CROS007 "||" +#define CROS008 "||" +#define CROS009 "||" +#define CROS010 "\\&||~" + +static int cros0l[] = {0, 0, 0, 1, 0, 2, 2, 2, 2, 0}; + +#define CROS101 " | " +#define CROS102 " | " +#define CROS103 " | " +#define CROS104 " | " +#define CROS105 " | " +#define CROS106 " | " +#define CROS107 " | " +#define CROS108 " | " +#define CROS109 "_|_ " +#define CROS110 "||| " + +#define CROS201 " / " +#define CROS202 " / " +#define CROS203 " / " +#define CROS204 " / " +#define CROS205 " / " +#define CROS206 " / " +#define CROS207 " / " +#define CROS208 " / " +#define CROS209 "__/ " +#define CROS210 "|/| " + +#define CROS301 " " +#define CROS302 " " +#define CROS303 " " +#define CROS304 " " +#define CROS305 " " +#define CROS306 " " +#define CROS307 " " +#define CROS308 " " +#define CROS309 "___" +#define CROS310 "|-+-----------------" + +/*#define PASSNUM 5*/ +/*#define ALL_LENGTH (D51LENGTH + (PASSLENGTH * (PASSNUM - 1)) + LPASSLENGTH)*/ + +static char *cros0[D51HIGHT] += {CROS001, CROS002, CROS003, CROS004, CROS005, + CROS006, CROS007, CROS008, CROS009, CROS010}; +static char *cros1[D51HIGHT] += {CROS101, CROS102, CROS103, CROS104, CROS105, + CROS106, CROS107, CROS108, CROS109, CROS110}; +static char *cros2[D51HIGHT] += {CROS201, CROS202, CROS203, CROS204, CROS205, + CROS206, CROS207, CROS208, CROS209, CROS210}; +static char *cros3[D51HIGHT] += {CROS301, CROS302, CROS303, CROS304, CROS305, + CROS306, CROS307, CROS308, CROS309, CROS310}; + +static char *lcoal[LOGOHIGHT + 1] += {LCOAL1, LCOAL2, LCOAL3, LCOAL4, LCOAL5, LCOAL6, DELLN}; + +static char *d51[D51PATTERNS][D51HIGHT + 1] += {{D51STR1, D51STR2, D51STR3, D51STR4, D51STR5, D51STR6, D51STR7, + D51WHL11, D51WHL12, D51WHL13, D51DEL}, + {D51STR1, D51STR2, D51STR3, D51STR4, D51STR5, D51STR6, D51STR7, + D51WHL21, D51WHL22, D51WHL23, D51DEL}, + {D51STR1, D51STR2, D51STR3, D51STR4, D51STR5, D51STR6, D51STR7, + D51WHL31, D51WHL32, D51WHL33, D51DEL}, + {D51STR1, D51STR2, D51STR3, D51STR4, D51STR5, D51STR6, D51STR7, + D51WHL41, D51WHL42, D51WHL43, D51DEL}, + {D51STR1, D51STR2, D51STR3, D51STR4, D51STR5, D51STR6, D51STR7, + D51WHL51, D51WHL52, D51WHL53, D51DEL}, + {D51STR1, D51STR2, D51STR3, D51STR4, D51STR5, D51STR6, D51STR7, + D51WHL61, D51WHL62, D51WHL63, D51DEL}}; +static char *coal[D51HIGHT + 1] += {COAL01, COAL02, COAL03, COAL04, COAL05, + COAL06, COAL07, COAL08, COAL09, COAL10, COALDEL}; +static char *coach[D51HIGHT + 1] += {PASS01, PASS02, PASS03, PASS04, PASS05, + PASS06, PASS07, PASS08, PASS09, PASS10, PASSDEL}; +static char *lcoach[D51HIGHT + 1] += {LPASS01, LPASS02, LPASS03, LPASS04, LPASS05, + LPASS06, LPASS07, LPASS08, LPASS09, LPASS10, LPASSDEL}; + +static char *d51_r[D51PATTERNS][D51HIGHT + 1] += {{D51STR1, D51STR2, D51STR3, D51STR4, D51STR5, D51STR6, D51STR7, + D51WHL11, D51WHL12, D51WHL13, D51DEL}, + {D51STR1, D51STR2, D51STR3, D51STR4, D51STR5, D51STR6, D51STR7, + D51WHL61, D51WHL62, D51WHL63, D51DEL}, + {D51STR1, D51STR2, D51STR3, D51STR4, D51STR5, D51STR6, D51STR7, + D51WHL51, D51WHL52, D51WHL53, D51DEL}, + {D51STR1, D51STR2, D51STR3, D51STR4, D51STR5, D51STR6, D51STR7, + D51WHL41, D51WHL42, D51WHL43, D51DEL}, + {D51STR1, D51STR2, D51STR3, D51STR4, D51STR5, D51STR6, D51STR7, + D51WHL31, D51WHL32, D51WHL33, D51DEL}, + {D51STR1, D51STR2, D51STR3, D51STR4, D51STR5, D51STR6, D51STR7, + D51WHL21, D51WHL22, D51WHL23, D51DEL}}; --- sl-3.03.orig/README.sl-h.jp +++ sl-3.03/README.sl-h.jp @@ -0,0 +1,72 @@ + +sl5-1.patch $B$K$D$$$F(B + + 2000 $BG/(B 6 $B7n(B 24 $BF|(B + $BEl5~ETN)2J3X5;=QBg3X(B $B@t(B $BCR5*(B + + +$B!&$O$8$a$K(B + +$B$3$N%Q%C%A$OElBg$NK-ED$5$s:n(B sl $B$K?75!G=$rDI2C$9$k$?$a$N%Q%C%A$G$9(B. +$B?75!G=$O(B, + +(1) $BF'@Z$NDI2C(B +(2) $B5Rl9g$O(B, $Be$,$j$+$1$F$+$i:F$S9_$j$k5!G=(B +(8) D51 $B;0=EO"(B ($BK\Ev$O2_J*NseED$5(B +$B$s$H=);3$5$s$K$h$k2~B$$G$9(B. $B>eED$5$s(B, $B=);3$5$s$"$j$,$H$&$4$6$$$^$9(B. +$B$^$?(B, $BIA2h$N8zN($r>e$2$k$?$a$K(B 5-1 $B$G$OL\$K8+$($J$$JQ99E@$,B??t$"$j$^(B +$B$9(B. + + +$B!&(Bbug fixes + +1. JAIST $B$NEDCf$5$s$K(B sl -aF $B$rL\$G(B core dump $B$9$k$H$$$&%P%0$rH/8+(B. 5-1 $B$G$O(B fix $B$7$^$7(B +$B$?(B. + + +$B!&F0:n4D6-(B + +$BF0:n3NG'$O0J2<$N(B OS $B$G$7$F$"$j$^$9(B. + +sparc-sun-solaris 2.3 +sparc-sun-solaris 2.4 +sparc-sun-solaris 2.6 +ix86-unknown-linux 2.0 (Slackware 3.5) +ix86-unknown-linux 2.0 (Plamo Linux 1.4.5) + +$B$^$?(B, $B>r7oIU$-(B($BCm0UE@(B 2 $B;2>H(B)$B$G(B AIX 4.1.5 $B$G$bF0:n$9$k$H$$$&Js9p$r$$$?(B +$B$@$$$F$$$^$9(B. + + +$B!&:n$jJ}(B + +% tar zxvf sl.tgz +% cd sl +% patch -p1 < ../sl5-1.patch +% make + +$B$G%P%$%J%j(B sl $B$,$G$-$k$O$:$G$9(B. + + +$B!&Cm0UE@(B + +1. Solaris 2.3, 2.4 $B$G$O(B Makefile $B$N(B LDFLAGS $B$K!V(B-lucb -L/usr/ucblib$B!W(B +$B$r2C$($J$$$H%3%s%Q%$%k$G$-$J$$$H;W$$$^$9(B. + +2. AIX 4.1.5 $B$G$O(B sl.h $B$NCf$GJ8;zNs$NDj5A$K(B static char * $B$r;H$&$H(B +core dump $B$9$k$H$$$&Js9p$r?7Eg$5$s$K$$$?$@$-$^$7$?(B. static $B$r$O$:$9$H(B +$BF0:n$9$k$h$&$G$9(B. $B?7Eg$5$s$"$j$,$H$&$4$6$$$^$9(B. + +3. $B$3$N%Q%C%A$N2~B$$O$O$C$-$j$$$C$F$&$C$H$*$7$$$G$9(B. $B@h@8$r$*E\$j$r$+$C(B +$B$F?JO)$K1F6A$r5Z$\$9$h$&$J$3$H$,$"$C$F$b(B, $BEvJ}$G$O0l@Z4XCN$7$^$;$s(B. + --- sl-3.03.orig/header.h +++ sl-3.03/header.h @@ -0,0 +1,15 @@ +/* * + * * + * */ + +extern int add_D51_coach(); +extern int add_D51_coach_r(); +extern int add_sl(); +extern int add_man(); +extern int add_smoke(); +extern int add_smoke_r(); +extern int add_cross(); +extern int begin_gate(); +extern int end_gate(); +extern int x_gate(); +extern void end_proc();