Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package sl for openSUSE:Factory checked in at 2023-07-12 17:27:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sl (Old) and /work/SRC/openSUSE:Factory/.sl.new.8922 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sl" Wed Jul 12 17:27:13 2023 rev:3 rq:1098173 version:5.05 Changes: -------- --- /work/SRC/openSUSE:Factory/sl/sl.changes 2019-09-02 13:25:50.257306919 +0200 +++ /work/SRC/openSUSE:Factory/.sl.new.8922/sl.changes 2023-07-12 17:27:38.786625371 +0200 @@ -1,0 +2,9 @@ +Mon Jul 10 13:10:14 UTC 2023 - Andrea Manzini <andrea.manz...@suse.com> + +- Update to versione 5.05: + * add -G option that add an orange TGV +- Changed upstream repository to new fork https://github.com/eyJhb/sl +- removed patch update_to_master_at_923e7d7.patch +- run spec-cleaner + +------------------------------------------------------------------- Old: ---- sl-5.02.tar.gz update_to_master_at_923e7d7.patch New: ---- sl-5.05.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sl.spec ++++++ --- /var/tmp/diff_new_pack.ucs1iD/_old 2023-07-12 17:27:39.586630909 +0200 +++ /var/tmp/diff_new_pack.ucs1iD/_new 2023-07-12 17:27:39.586630909 +0200 @@ -1,7 +1,7 @@ # # spec file for package sl # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2023 SUSE LLC # Copyright (c) 2012 <vo...@vakw.ch> # # All modifications and additions to the file contributed by third parties @@ -18,15 +18,14 @@ Name: sl -Version: 5.02 +Version: 5.05 Release: 0 Summary: Steam Locomotive in ASCII art # The warranty claim is a bit different, but the rights are the same as in ISC License: ISC Group: Amusements/Toys/Other -URL: https://github.com/mtoyoda/sl -Source: https://github.com/mtoyoda/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -Patch0: update_to_master_at_923e7d7.patch +URL: https://github.com/eyJhb/sl +Source: https://github.com/eyJhb/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ncurses-devel Conflicts: python3-softlayer @@ -35,11 +34,10 @@ It is a joke command intended to catch any mistypings of "ls". %prep -%setup -q -%patch0 -p1 +%autosetup -p1 %build -make OPTFLAGS="%{optflags}" %{?_smp_mflags} +%make_build OPTFLAGS="%{optflags}" %install install -d %{buildroot}%{_bindir} ++++++ sl-5.02.tar.gz -> sl-5.05.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sl-5.02/Makefile new/sl-5.05/Makefile --- old/sl-5.02/Makefile 2014-06-16 09:27:59.000000000 +0200 +++ new/sl-5.05/Makefile 2019-08-14 18:13:13.000000000 +0200 @@ -1,13 +1,20 @@ #========================================== -# Makefile: makefile for sl 5.1 -# Copyright 1993, 1998, 2014 +# Makefile: makefile for sl 5.04 +# Copyright 1993, 1998, 2014, 2019 # Toyoda Masashi # (mtoy...@acm.org) -# Last Modified: 2014/03/31 +# Last Modified: 2019/03/19 #========================================== CC=gcc -CFLAGS=-O +CFLAGS=-O3 -Wall + +all: sl sl: sl.c sl.h $(CC) $(CFLAGS) -o sl sl.c -lncurses + +clean: + rm -f sl + +distclean: clean diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sl-5.02/README.md new/sl-5.05/README.md --- old/sl-5.02/README.md 2014-06-16 09:27:59.000000000 +0200 +++ new/sl-5.05/README.md 2019-08-14 18:13:13.000000000 +0200 @@ -5,4 +5,15 @@ you meant to type "ls". It's just a joke command, and not useful at all. -Copyright 1993,1998,2014 Toyoda Masashi (mtoy...@acm.org) +# Update notes from eyJhb +I have merged the following + +- [Add SIGIN configuration and disco mode](https://github.com/mtoyoda/sl/pull/55) +- [Add option for the number of cars](https://github.com/mtoyoda/sl/pull/56) + +I have also added `-v` and updated the last updated and version number to 5.04. + + +Copyright 1993,1998,2014,2019 Toyoda Masashi (mtoy...@acm.org) + + Binary files old/sl-5.02/demo.gif and new/sl-5.05/demo.gif differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sl-5.02/sl.1 new/sl-5.05/sl.1 --- old/sl-5.02/sl.1 2014-06-16 09:27:59.000000000 +0200 +++ new/sl-5.05/sl.1 2019-08-14 18:13:13.000000000 +0200 @@ -3,30 +3,51 @@ .\" .\" @(#)sl.1 .\" -.TH SL 1 "March 31, 2014" +.TH SL 1 "March 19, 2019 - Version 5.04" .SH NAME -sl \- cure your bad habit of mistyping +sl \- display animations aimed to correct users who accidentally enter sl instead of ls. .SH SYNOPSIS .B sl [ -.B \-alFc +.B \-acdeFlw ] .SH DESCRIPTION .B sl -is a highly advanced animation program for curing your bad habit of mistyping. +Displays animations aimed to correct users who accidentally enter sl instead of ls. SL stands for Steam Locomotive. .PP .TP .B \-a An accident is occurring. People cry for help. .TP -.B \-l -Little version +.B \-c +C51 appears instead of D51. +.TP +.B \-d +Disco mode. Alternate colors during animation. +.TP +.B \-e +Escape. Allow interrupt by Ctrl+C. .TP .B \-F It flies like the galaxy express 999. .TP +.B \-G +It's French like Oscar. +.TP .B \-c C51 appears instead of D51. +.TP +.B \-<number of cars> +Specify the number of cars like `sl -5`. +.TP +.B \-l +Little version. +.TP +.B \-w +Windy day. Locomotive moves faster. +.TP +.B \-v +Prints the version and last updated. .PP .SH SEE ALSO .BR ls (1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sl-5.02/sl.c new/sl-5.05/sl.c --- old/sl-5.02/sl.c 2014-06-16 09:27:59.000000000 +0200 +++ new/sl-5.05/sl.c 2019-08-14 18:13:13.000000000 +0200 @@ -1,11 +1,22 @@ /*======================================== - * sl.c: SL version 5.02 - * Copyright 1993,1998,2014 + * sl.c: SL version 5.05 + * Copyright 1993,1998,2014-2015,2019 * Toyoda Masashi * (mtoy...@acm.org) - * Last Modified: 2014/06/03 + * Last Modified: 2019/03/19 *======================================== */ +/* sl version 5.05 : by eyJhb 2019-08-14 + * - Merged pull request from cosmo-ray adding orange TGV (-G) + * sl version 5.04 : by eyJhb 2019-03-19 + * - Merged pull request from EverNine allowing to specify the number of cars + * - Merged pull request from ddugovic which adds + * `-e` for `ctrl+c` to work + * `-d` to enable disco mode + * `-w` making the locomotive go faster + */ +/* sl version 5.03 : Fix some more compiler warnings. */ +/* by Ryan Jacobs 2015/01/19 */ /* sl version 5.02 : Fix compiler warnings. */ /* by Jeff Schwab 2014/06/03 */ /* sl version 5.01 : removed cursor and handling of IO */ @@ -33,26 +44,37 @@ /* 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. */ +/* sl version 1.00 : SL runs vomiting out smoke. */ /* by Toyoda Masashi 1992/12/11 */ +#include <ctype.h> #include <curses.h> +#include <limits.h> #include <signal.h> +#include <stdlib.h> #include <unistd.h> #include "sl.h" +#define VERSION "5.04" + void add_smoke(int y, int x); void add_man(int y, int x); int add_C51(int x); int add_D51(int x); +int add_TGV(int x); int add_sl(int x); void option(char *str); int my_mvaddstr(int y, int x, char *str); int ACCIDENT = 0; -int LOGO = 0; -int FLY = 0; int C51 = 0; +int NUMBER = -1; +int DISCO = 0; +int SIGNAL = 1; +int FLY = 0; +int LOGO = 0; +int WIND = 0; +int TGV = 0; int my_mvaddstr(int y, int x, char *str) { @@ -65,22 +87,35 @@ void option(char *str) { - extern int ACCIDENT, FLY, LONG; + extern int ACCIDENT, C51, DISCO, SIGNAL, FLY, LOGO, WIND, TGV; while (*str != '\0') { - switch (*str++) { + switch (*str) { case 'a': ACCIDENT = 1; break; + case 'c': C51 = 1; break; + case 'G': TGV = 1; break; + case 'd': DISCO = 1; break; + case 'e': SIGNAL = 0; break; case 'F': FLY = 1; break; case 'l': LOGO = 1; break; - case 'c': C51 = 1; break; - default: break; + case 'w': WIND = 200; break; + case 'v': + printf("Version: %s, last updated: 2019-03-19\n", VERSION); + exit(0); + break; + default: + if (isdigit(*str)) + NUMBER = (NUMBER < 0 ? 0 : NUMBER*10) + *str - '0'; + break; } + str++; } } int main(int argc, char *argv[]) { int x, i; + int base_usleep = 40000; for (i = 1; i < argc; ++i) { if (*argv[i] == '-') { @@ -88,12 +123,34 @@ } } initscr(); - signal(SIGINT, SIG_IGN); + if (DISCO == 1) { + start_color(); + init_pair(4, COLOR_RED, COLOR_BLACK); + init_pair(3, COLOR_YELLOW, COLOR_BLACK); + init_pair(2, COLOR_GREEN, COLOR_BLACK); + init_pair(1, COLOR_CYAN, COLOR_BLACK); + } + if (SIGNAL) signal(SIGINT, SIG_IGN); noecho(); curs_set(0); nodelay(stdscr, TRUE); leaveok(stdscr, TRUE); scrollok(stdscr, FALSE); +/* + * first Non prototype TGV was orange, first 1 was red + */ + if (TGV == 1) { + if (has_colors()) { + start_color(); + init_pair(1, COLOR_WHITE, COLOR_BLACK); + init_pair(2, COLOR_YELLOW, COLOR_BLACK); + base_usleep /= 2; + if (WIND) + WIND = 150; + } else { + TGV = 0; + } + } for (x = COLS - 1; ; --x) { if (LOGO == 1) { @@ -102,21 +159,26 @@ else if (C51 == 1) { if (add_C51(x) == ERR) break; } + else if (TGV == 1) { + if (add_TGV(x) == ERR) break; + } else { if (add_D51(x) == ERR) break; } getch(); refresh(); - usleep(40000); + usleep(base_usleep - (WIND * 100)); } mvcur(0, COLS - 1, LINES - 1, 0); endwin(); + + return(EXIT_FAILURE); } int add_sl(int x) { - static char *sl[LOGOPATTERNS][LOGOHIGHT + 1] + static char *sl[LOGOPATTERNS][LOGOHEIGHT + 1] = {{LOGO1, LOGO2, LOGO3, LOGO4, LWHL11, LWHL12, DELLN}, {LOGO1, LOGO2, LOGO3, LOGO4, LWHL21, LWHL22, DELLN}, {LOGO1, LOGO2, LOGO3, LOGO4, LWHL31, LWHL32, DELLN}, @@ -124,31 +186,36 @@ {LOGO1, LOGO2, LOGO3, LOGO4, LWHL51, LWHL52, DELLN}, {LOGO1, LOGO2, LOGO3, LOGO4, LWHL61, LWHL62, DELLN}}; - static char *coal[LOGOHIGHT + 1] + static char *coal[LOGOHEIGHT + 1] = {LCOAL1, LCOAL2, LCOAL3, LCOAL4, LCOAL5, LCOAL6, DELLN}; - static char *car[LOGOHIGHT + 1] + static char *car[LOGOHEIGHT + 1] = {LCAR1, LCAR2, LCAR3, LCAR4, LCAR5, LCAR6, DELLN}; - int i, y, py1 = 0, py2 = 0, py3 = 0; + if (NUMBER < 0) + NUMBER = 2; + + int i, j, y, py = 0; + int LOGOLENGTH = 42 + 21*NUMBER; 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; + y = (x / 6) + LINES - (COLS / 6) - LOGOHEIGHT; + py = 2; } - for (i = 0; i <= LOGOHIGHT; ++i) { + for (i = 0; i <= LOGOHEIGHT; ++i) { my_mvaddstr(y + i, x, sl[(LOGOLENGTH + x) / 3 % LOGOPATTERNS][i]); - my_mvaddstr(y + i + py1, x + 21, coal[i]); - my_mvaddstr(y + i + py2, x + 42, car[i]); - my_mvaddstr(y + i + py3, x + 63, car[i]); + my_mvaddstr(y + i + py, x + 21, coal[i]); + for (j = 2; j <= NUMBER + 1; ++j) + my_mvaddstr(y + i + py*j, x + 21*j, 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); + for (j = 2; j <= NUMBER + 1; ++j) { + add_man(y + 1 + py*j, x + 3 + 21*j); add_man(y + 1 + py*j, x + 11 + 21*j); + } } add_smoke(y - 1, x + LOGOFUNNEL); return OK; @@ -157,7 +224,7 @@ int add_D51(int x) { - static char *d51[D51PATTERNS][D51HIGHT + 1] + static char *d51[D51PATTERNS][D51HEIGHT + 1] = {{D51STR1, D51STR2, D51STR3, D51STR4, D51STR5, D51STR6, D51STR7, D51WHL11, D51WHL12, D51WHL13, D51DEL}, {D51STR1, D51STR2, D51STR3, D51STR4, D51STR5, D51STR6, D51STR7, @@ -170,22 +237,27 @@ D51WHL51, D51WHL52, D51WHL53, D51DEL}, {D51STR1, D51STR2, D51STR3, D51STR4, D51STR5, D51STR6, D51STR7, D51WHL61, D51WHL62, D51WHL63, D51DEL}}; - static char *coal[D51HIGHT + 1] + static char *coal[D51HEIGHT + 1] = {COAL01, COAL02, COAL03, COAL04, COAL05, COAL06, COAL07, COAL08, COAL09, COAL10, COALDEL}; - int y, i, dy = 0; + if (NUMBER < 0) + NUMBER = 1; + + int y, i, j, dy = 0; + int D51LENGTH = 54 + 29*NUMBER; if (x < - D51LENGTH) return ERR; y = LINES / 2 - 5; if (FLY == 1) { - y = (x / 7) + LINES - (COLS / 7) - D51HIGHT; + y = (x / 7) + LINES - (COLS / 7) - D51HEIGHT; dy = 1; } - for (i = 0; i <= D51HIGHT; ++i) { + for (i = 0; i <= D51HEIGHT; ++i) { my_mvaddstr(y + i, x, d51[(D51LENGTH + x) % D51PATTERNS][i]); - my_mvaddstr(y + i + dy, x + 53, coal[i]); + for (j = 1; j <= NUMBER; ++j) + my_mvaddstr(y + i + dy*j, x + 24 + 29*j, coal[i]); } if (ACCIDENT == 1) { add_man(y + 2, x + 43); @@ -195,9 +267,46 @@ return OK; } +int add_TGV(int x) +{ + static char *tgv[TGVPATTERNS][TGVHEIGHT + 1] + = {{TGVSTR0, TGVSTR1, TGVSTR2, TGVSTR3, TGVSTR4, TGVSTR5, TGVSTR6, + TGVWHL1, TGVDEL}, + {TGVSTR0, TGVSTR1, TGVSTR2, TGVSTR3, TGVSTR4, TGVSTR5, TGVSTR6, + TGVWHL2, TGVDEL}}; + static char *vagoon[TGVHEIGHT + 1] + = {TGVVAG0, TGVVAG1, TGVVAG2, TGVVAG3, TGVVAG4, TGVVAG5, TGVVAG6, TGVVAG7, TGVDEL}; + + int y, i, dy = 0; + + if (x < - TGVLENGTH) return ERR; + y = LINES / 2 - 5; + + if (FLY == 1) { + y = (x / 7) + LINES - (COLS / 7) - TGVHEIGHT; + dy = 1; + } + attron(COLOR_PAIR(2)); + for (i = 0; i <= TGVHEIGHT; ++i) { + my_mvaddstr(y + i, x, tgv[((TGVLENGTH + x) / 2) % TGVPATTERNS][i]); + my_mvaddstr(y + i + dy, x + 55, vagoon[i]); + } + attroff(COLOR_PAIR(2)); + + if (ACCIDENT == 1) { + add_man(y + 2, x + 14); + + add_man(y + dy + 3, x + 85); + add_man(y + dy + 3, x + 90); + add_man(y + dy + 3, x + 95); + add_man(y + dy + 3, x + 100); + } + return OK; +} + int add_C51(int x) { - static char *c51[C51PATTERNS][C51HIGHT + 1] + static char *c51[C51PATTERNS][C51HEIGHT + 1] = {{C51STR1, C51STR2, C51STR3, C51STR4, C51STR5, C51STR6, C51STR7, C51WH11, C51WH12, C51WH13, C51WH14, C51DEL}, {C51STR1, C51STR2, C51STR3, C51STR4, C51STR5, C51STR6, C51STR7, @@ -210,22 +319,27 @@ C51WH51, C51WH52, C51WH53, C51WH54, C51DEL}, {C51STR1, C51STR2, C51STR3, C51STR4, C51STR5, C51STR6, C51STR7, C51WH61, C51WH62, C51WH63, C51WH64, C51DEL}}; - static char *coal[C51HIGHT + 1] + static char *coal[C51HEIGHT + 1] = {COALDEL, COAL01, COAL02, COAL03, COAL04, COAL05, COAL06, COAL07, COAL08, COAL09, COAL10, COALDEL}; - int y, i, dy = 0; + if (NUMBER < 0) + NUMBER = 1; + + int y, i, j, dy = 0; + int C51LENGTH = 58 + 29*NUMBER; if (x < - C51LENGTH) return ERR; y = LINES / 2 - 5; if (FLY == 1) { - y = (x / 7) + LINES - (COLS / 7) - C51HIGHT; + y = (x / 7) + LINES - (COLS / 7) - C51HEIGHT; dy = 1; } - for (i = 0; i <= C51HIGHT; ++i) { + for (i = 0; i <= C51HEIGHT; ++i) { my_mvaddstr(y + i, x, c51[(C51LENGTH + x) % C51PATTERNS][i]); - my_mvaddstr(y + i + dy, x + 55, coal[i]); + for (j = 1; j <= NUMBER; j++) + my_mvaddstr(y + i + dy*j, x + 26 + 29*j, coal[i]); } if (ACCIDENT == 1) { add_man(y + 3, x + 45); @@ -242,7 +356,7 @@ int i; for (i = 0; i < 2; ++i) { - my_mvaddstr(y + i, x, man[(LOGOLENGTH + x) / 12 % 2][i]); + my_mvaddstr(y + i, x, man[(42 + 21*NUMBER + x) / 12 % 2][i]); } } @@ -275,6 +389,8 @@ 2, 2, 2, 3, 3, 3 }; int i; + if (DISCO && (x + INT_MAX/2) % 4 == 2) + attron(COLOR_PAIR((x + INT_MAX/2) / 16 % 4 + 1)); if (x % 4 == 0) { for (i = 0; i < sum; ++i) { my_mvaddstr(S[i].y, S[i].x, Eraser[S[i].ptrn]); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sl-5.02/sl.h new/sl-5.05/sl.h --- old/sl-5.02/sl.h 2014-06-16 09:27:59.000000000 +0200 +++ new/sl-5.05/sl.h 2019-08-14 18:13:13.000000000 +0200 @@ -7,12 +7,36 @@ *======================================== */ -#define D51HIGHT 10 +#define TGVHEIGHT 8 +#define TGVLENGTH 114 +#define TGVPATTERNS 2 + +#define TGVSTR0 " ______________ / " +#define TGVSTR1 " ____________/______________|__\\_______ " +#define TGVSTR2 " _____/ |IIIIIIIIIII|_______________________| " +#define TGVSTR3 " __/__/_|_| ______________________________| " +#define TGVSTR4 " __/ | | / |||||||||||| TGV || | " +#define TGVSTR5 " /> [] | | /___________||||||||||||______|| | " +#define TGVSTR6 " \\_==================================================| " +#define TGVWHL1 " |___/==0==0==|_________________________/===0==0==\\| " + +#define TGVWHL2 " |___/0==0==0=|_________________________/=0==0==0=\\| " + +#define TGVDEL " " + +#define TGVVAG0 " ___________ " +#define TGVVAG1 " |_====____|\\________________________________________ " +#define TGVVAG2 "o| |||| ___ | " +#define TGVVAG3 "H|______________|___|_________________________________| " +#define TGVVAG4 "H| |||| |[]| |[]1| [] [ ] [ ] [ ] [ ] | " +#define TGVVAG5 "H|__||||_|__|___|___|_________________________________| " +#define TGVVAG6 "D|==============|===|=================================| " +#define TGVVAG7 " _/ 0==0 |____________________________________/ 0=| " + +#define D51HEIGHT 10 #define D51FUNNEL 7 -#define D51LENGTH 83 #define D51PATTERNS 6 - #define D51STR1 " ==== ________ ___________ " #define D51STR2 " _D _| |_______/ \\__I_I_____===__|_________| " #define D51STR3 " |(_)--- | H\\________/ | | =|___ ___| " @@ -60,9 +84,8 @@ #define COALDEL " " -#define LOGOHIGHT 6 +#define LOGOHEIGHT 6 #define LOGOFUNNEL 4 -#define LOGOLENGTH 84 #define LOGOPATTERNS 6 #define LOGO1 " ++ +------ " @@ -104,9 +127,8 @@ #define DELLN " " -#define C51HIGHT 11 +#define C51HEIGHT 11 #define C51FUNNEL 7 -#define C51LENGTH 87 #define C51PATTERNS 6 #define C51DEL " "