From 413d8b60940edd5e7a5c4d0d53431954f91f040f Mon Sep 17 00:00:00 2001 From: jazzkutya Date: Sun, 31 Jul 2016 03:52:29 +0200 Subject: [PATCH 01/14] eliminated CW clicking --- src/Cw.cxx | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/src/Cw.cxx b/src/Cw.cxx index 0bcc574..e0a8021 100644 --- a/src/Cw.cxx +++ b/src/Cw.cxx @@ -123,6 +123,9 @@ static int need; // Nonzero to change freq/wpm/loudness static double amplitude; // New sinewave amplitude static double speed; // New speed (wpm) static double freq; // New (actual!) tone frequency (Hz) +static int doramp=0; +static int rampsize=20; // length of ramp up/down in samples +static int dotsamplecnt=0; static union { // Sinewave buffer (enough for one cycle) Uint8* c; // As char*, (required by waveget) @@ -186,6 +189,7 @@ static bool fill_cb() { * in cycles of the new frequency. */ dot = int(round(1.2*freq/speed)); // Number of cycles in one code element + doramp=rampsize; // start a ramp up immediately, at worst case we ramp up silence return true; } @@ -243,17 +247,47 @@ bool set_cw(double wpm, double freq, double loudness) { * make any frequency, speed or loudness changes while it sleeps. */ void waveget(void*, Uint8* destination, int n) { + Sint16* sdata=(Sint16*)data; + Sint16* sdataend=(Sint16*)dataend; + Sint16* sdestination=(Sint16*)destination; + Sint16 sample; + // SDL probably always ask for multiple of whole (16bit) sample + // so this loop processes 16bit samples now + n>>=1; // yes. i calculate half kingdom by shifting teh bits + int rampdownpos=(sdataend-buffer.s)*dot-rampsize; while (n--) { // Loop to copy waveform data: - *destination++ = shift&1? *data: 0; // Schlepp tone (or silence) - if (++data < dataend) continue; // Structured taboo! (much clearer!) - data = buffer.c; cycles++; // Buffer wrap? Reset, count cycle + sample = shift&1 ? *sdata : 0; + if (doramp>0) { + sample = sample*(rampsize-doramp)/rampsize; + doramp--; + } else if (doramp<0) { + sample = -sample*(doramp)/rampsize; + doramp++; + } + *sdestination++ = sample; // Schlepp tone (or silence) + if (dotsamplecnt==rampdownpos) { + if ((shift&1) && !(shift&2)) { + // start ramp down here + doramp=-rampsize; + } + } + dotsamplecnt++; + if (++sdata < sdataend) continue; // Structured taboo! (much clearer!) + sdata = buffer.s; cycles++; // Buffer wrap? Reset, count cycle Morse|shift? (idle = 0): idle++; // Pending stuff => not idle if (cycles < dot) continue; // See what I mean? We're whittling! + dotsamplecnt=0; + unsigned prevshift=shift; cycles = 0; shift >>= 1; // If element done, get next one. + if (!(prevshift&1) && (((shift>1) && (shift&1)) || ((shift<=1) && (Morse&1)))) { + // start ramp up here + doramp=rampsize; + } if (shift > 1) continue; // More character? whittle rest. shift = Morse; // Exhausted this? Get next if (Morse != 5) Morse = 0; // Not didididi... make way for more } + data=(Uint8*)sdata; if (need && !(shift&1)) fill_cb(); // If silent, make change now. } From c434945b6eb5564fffe89241912131f8e6dc6b5d Mon Sep 17 00:00:00 2001 From: jazzkutya Date: Sun, 31 Jul 2016 03:53:23 +0200 Subject: [PATCH 02/14] changed linux target m to produce dynamic linked binary otherwise i got problems building --- src/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Makefile b/src/Makefile index 4b4c5e2..d98963d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -46,9 +46,9 @@ m.exe: m.fl Bargraph.o Codebox.o Cw.cxx Cw.h Knob.cxx Knob.h Help.h m.o # Regular "make" is what you want for the Linux version m: m.fl Bargraph.o Codebox.o Cw.o Knob.o Help.h m.o - g++ -static -om m.o Bargraph.o Codebox.o Cw.o Knob.o \ - `sdl-config --static-libs` \ - `fltk-config --ldstaticflags` -ldl + g++ -om m.o Bargraph.o Codebox.o Cw.o Knob.o \ + `sdl-config --libs` \ + `fltk-config --ldflags` -ldl strip m rm *.o m.cxx m.h From eae5f84d57a407fe3616313bd0e72c63ce554d67 Mon Sep 17 00:00:00 2001 From: jazzkutya Date: Sun, 31 Jul 2016 03:54:32 +0200 Subject: [PATCH 03/14] added a .gitignore --- src/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 src/.gitignore diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000..018d2db --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,2 @@ +m +*~ \ No newline at end of file From 915301ba38a4c777e0fdcb3d9f04b9a9f72f21fc Mon Sep 17 00:00:00 2001 From: Gareth Howell Date: Wed, 5 Sep 2018 10:28:17 +0100 Subject: [PATCH 04/14] gitignore --- src/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 src/.gitignore diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000..3cf6e29 --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,2 @@ +Morse.app/ +*.pyc From ff43383079f984683c410fb1c09f0ccf0ffd9877 Mon Sep 17 00:00:00 2001 From: Gareth Howell Date: Wed, 5 Sep 2018 10:28:43 +0100 Subject: [PATCH 05/14] High Sierra --- src/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Makefile b/src/Makefile index 4b4c5e2..21a497f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,6 +1,6 @@ # "make" for MacOSX # To compile on MacOSX I used 10.6 with XCode dev tools and then -# used MacPorts to install fltk 1.1.7 and libsdl 1.2.13 +# used MacPorts to install fltk 1.1.7 and libsdl 1.2.13 FLTK_LIBS=`fltk-config --ldstaticflags` SDL_LIBS=`sdl-config --static-libs` CC=g++ @@ -34,13 +34,13 @@ Morse.app: Bargraph.o Codebox.o Cw.o Knob.o Help.h m.o Info.plist m.tgz: m m.exe rm -f m.tgz tar czvf m.tgz * - + # Use "xmake" to generate m.exe m.exe: m.fl Bargraph.o Codebox.o Cw.cxx Cw.h Knob.cxx Knob.h Help.h m.o g++ -c -Os -I/usr/local/include/SDL Cw.cxx g++ -om.exe m.o Bargraph.o Codebox.o Cw.o Knob.o \ -static `fltk-config --ldstaticflags` \ - -lSDL -lmingw32 -lmingwex -lwinmm -lSDLmain + -lSDL -lmingw32 -lmingwex -lwinmm -lSDLmain strip m.exe rm *.o m.cxx m.h From cec935481dc6892f611c80063992490e91e1a47b Mon Sep 17 00:00:00 2001 From: Gareth Howell Date: Wed, 5 Sep 2018 10:36:18 +0100 Subject: [PATCH 06/14] High Sierra --- src/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 21a497f..e5f95af 100644 --- a/src/Makefile +++ b/src/Makefile @@ -7,10 +7,11 @@ CC=g++ CFLGAGS= # This may need to be changed for you. These are the X11 libraries used by # ftlk or sdl -DYLIB=/opt/local/lib/libX11.6.dylib /opt/local/lib/libXext.6.dylib /opt/local/lib/libXrandr.2.dylib /opt/local/lib/libXrender.1.dylib /opt/local/lib/libxcb.1.dylib /opt/local/lib/libXau.6.dylib /opt/local/lib/libXdmcp.6.dylib +DYLIB=/opt/X11/lib/libX11.6.dylib /opt/X11/lib/libXext.6.dylib /opt/X11/lib/libXrandr.2.dylib /opt/X11/lib/libXrender.1.dylib /opt/X11/lib/libxcb.1.dylib /opt/X11/lib/libXau.6.dylib /opt/X11/lib/libXdmcp.6.dylib Morse.app: Bargraph.o Codebox.o Cw.o Knob.o Help.h m.o Info.plist + rm -rf Morse.app mkdir -p Morse.app/Contents/MacOS mkdir Morse.app/Contents/plugins mkdir Morse.app/Contents/Resources From af32ed5332325a47b905f8cfa7aab2d17cc7d84e Mon Sep 17 00:00:00 2001 From: Gareth Howell Date: Wed, 5 Sep 2018 10:36:38 +0100 Subject: [PATCH 07/14] more ignores --- src/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/.gitignore b/src/.gitignore index 3cf6e29..fbf2d87 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,2 +1,4 @@ Morse.app/ *.pyc +*.o +*.cxx From 497154b6ebff5e0cfd2b7939e4cfbedbff6d997e Mon Sep 17 00:00:00 2001 From: Gareth Howell Date: Wed, 5 Sep 2018 10:46:31 +0100 Subject: [PATCH 08/14] more ignores --- src/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/src/.gitignore b/src/.gitignore index fbf2d87..3484c90 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -2,3 +2,4 @@ Morse.app/ *.pyc *.o *.cxx +m.h From 8e934be6b0bd950f40c76d29b300bb2e9f935b56 Mon Sep 17 00:00:00 2001 From: Gareth Howell Date: Wed, 5 Sep 2018 10:52:07 +0100 Subject: [PATCH 09/14] only m.cxx --- src/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/.gitignore b/src/.gitignore index 3484c90..ed3ad9a 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,5 +1,5 @@ Morse.app/ *.pyc *.o -*.cxx +m.cxx m.h From 13637e0730194f4fdd33246e9e15eac2b3d04c0c Mon Sep 17 00:00:00 2001 From: Gareth Howell Date: Wed, 5 Sep 2018 20:11:50 +0100 Subject: [PATCH 10/14] Add SK --- src/m.fl | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/m.fl b/src/m.fl index 76d8ab6..1375e90 100644 --- a/src/m.fl +++ b/src/m.fl @@ -1,6 +1,6 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0105 -header_name {.h} +version 1.0105 +header_name {.h} code_name {.cxx} decl {/* Copyright 1998-2004 Ward Cunningham and Jim Wilson @@ -23,25 +23,25 @@ decl {/* along with Morse; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */} {public -} +} -decl {\#include "Bargraph.h"} {} +decl {\#include "Bargraph.h"} {} -decl {\#include "Codebox.h"} {} +decl {\#include "Codebox.h"} {} decl {\#include "Knob.h"} {public -} +} -decl {\#include "Cw.h"} {} +decl {\#include "Cw.h"} {} -decl {\#include } {} +decl {\#include } {} -decl {\#include "Help.h"} {} +decl {\#include "Help.h"} {} Function {adjust(Fl_Widget*, void*)} {private return_type void } { code {set_cw(Speed->value(), Tone->value(), 1.0);} {} -} +} Function {full_screen(bool fs)} {private } { @@ -52,7 +52,7 @@ if (fs) { W = Morse->w(); H = Morse->h(); Morse->fullscreen(); } else Morse->fullscreen_off(X,Y,W,H);} {} -} +} Function {} {open } { @@ -163,7 +163,7 @@ smaller->activate();} class Knob } Fl_Group Lesson { - label {Q7ZG098O1JPW.LRAM6B/XD=YCKN23?FU45VHSITE} open + label {Q7ZG098O1JPW.LRAM6B/XD=YCKN23?FU45$VHSITE} open private tooltip {Click the white box, below, to start.} xywh {0 25 640 185} box UP_BOX align 5 resizable code0 {o->disable("./=?");} code1 {o->activate("Q7ZG");} @@ -199,7 +199,7 @@ Lesson->redraw();} } menuitem {} { label Symbols - callback {const char* syms = "./=?"; + callback {const char* syms = "./=?$"; if (o->mvalue()->value()) Lesson->enable(syms); else @@ -238,4 +238,4 @@ while (1) { Lesson->grade(c , pass); // Update scores Lesson->graduate(); // Maybe add a letter }} {} -} +} From b8356526c6c159a4040cbed01cb0ceacb072fc53 Mon Sep 17 00:00:00 2001 From: Gareth Howell Date: Thu, 6 Sep 2018 09:59:14 +0100 Subject: [PATCH 11/14] Adjust default speed and tone --- src/Cw.h | 10 +++++----- src/m.fl | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Cw.h b/src/Cw.h index 21d4576..d044ead 100644 --- a/src/Cw.h +++ b/src/Cw.h @@ -25,8 +25,8 @@ extern "C" { // This lets Pyrex find our functions /*** Cw.h - promises made to cw.cxx clients * * Cw.cxx exposes three functions. - * - * The first function, set_cw() is used to initialize the sound system, + * + * The first function, set_cw() is used to initialize the sound system, * the character codespeed, sinewave frequency and loudness. * * The second function accepts an ASCII or Unicode character (negated @@ -38,10 +38,10 @@ extern "C" { // This lets Pyrex find our functions * swallowed up the last audible peep. If this value is zero, code * is being sent. */ -bool set_cw(double WPM = 20, // Words/minute (default 20) - double freq = 1000, // Note (default 1Khz) +bool set_cw(double WPM = 22, // Words/minute (default 20) + double freq = 800, // Note (default 1Khz) double loudness = 1.0); // Loudness (default Maximum) - + bool send_cw(int ASCII); // Send character in Morse Code double idle_cw(); // Seconds we've not been sending diff --git a/src/m.fl b/src/m.fl index 1375e90..9573da1 100644 --- a/src/m.fl +++ b/src/m.fl @@ -153,13 +153,13 @@ smaller->activate();} Fl_Roller Speed { label Speed callback adjust - tooltip {Words per minute} xywh {385 0 80 25} type Horizontal align 8 minimum 10 maximum 30 step 0.5 value 20 + tooltip {Words per minute} xywh {385 0 80 25} type Horizontal align 8 minimum 10 maximum 30 step 0.5 value 22 class Knob } Fl_Roller Tone { label Tone callback adjust - tooltip {Adjust tone frequency} xywh {520 0 80 25} type Horizontal align 8 minimum 440 maximum 2000 step 50 value 1000 + tooltip {Adjust tone frequency} xywh {520 0 80 25} type Horizontal align 8 minimum 440 maximum 2000 step 50 value 800 class Knob } Fl_Group Lesson { From 080eae1f1e8d145b2948a8b02b332bfc6e9c0743 Mon Sep 17 00:00:00 2001 From: Nathan Henrie Date: Wed, 18 Mar 2020 11:36:37 -0600 Subject: [PATCH 12/14] Now compiles and runs on MacOs 10.15.3 --- src/.gitignore | 3 +++ src/Help.h | 2 +- src/Makefile | 7 ++++++- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 src/.gitignore diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000..35adee6 --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,3 @@ +*.o +m.cxx +m.h diff --git a/src/Help.h b/src/Help.h index 0680072..978ab84 100644 --- a/src/Help.h +++ b/src/Help.h @@ -2,7 +2,7 @@ * generated from the original HTML file by the script, help.py. */ -static const char* HelpString = +static char* HelpString = "\n" "\n" "\n" diff --git a/src/Makefile b/src/Makefile index 4b4c5e2..4637fcc 100644 --- a/src/Makefile +++ b/src/Makefile @@ -7,7 +7,7 @@ CC=g++ CFLGAGS= # This may need to be changed for you. These are the X11 libraries used by # ftlk or sdl -DYLIB=/opt/local/lib/libX11.6.dylib /opt/local/lib/libXext.6.dylib /opt/local/lib/libXrandr.2.dylib /opt/local/lib/libXrender.1.dylib /opt/local/lib/libxcb.1.dylib /opt/local/lib/libXau.6.dylib /opt/local/lib/libXdmcp.6.dylib +DYLIB=/opt/X11/lib/libX11.6.dylib /opt/X11/lib/libXext.6.dylib /opt/X11/lib/libXrandr.2.dylib /opt/X11/lib/libXrender.1.dylib /opt/X11/lib/libxcb.1.dylib /opt/X11/lib/libXau.6.dylib /opt/X11/lib/libXdmcp.6.dylib Morse.app: Bargraph.o Codebox.o Cw.o Knob.o Help.h m.o Info.plist @@ -75,3 +75,8 @@ cw.so: cw.pyx Cw.cxx Cw.h Help.h: m.htm ./help.py Help.h + +clean: + rm -rf ./Morse.app m.cxx m.h *.o + +.PHONY: clean From 467704d605bd0567111548e4d68d9d2fd6800daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicente=20Quint=C3=A1ns?= Date: Sat, 12 Feb 2022 11:45:50 +0100 Subject: [PATCH 13/14] Updates tooling to build with modern Linux Updates Makefile to use SDL2 Updates help.py to use recent python Changes to dynamic build Fixes int to char conversion warning Updates README --- README | 21 ++++++++++++++++++++ src/Codebox.cxx | 2 +- src/Makefile | 52 ++++++++++++++++++++++++++----------------------- src/help.py | 12 ++++++------ 4 files changed, 56 insertions(+), 31 deletions(-) diff --git a/README b/README index 1f82ff7..a49e08a 100644 --- a/README +++ b/README @@ -1,3 +1,5 @@ +## Info + Information about this program can be found on the distribution site: http://c2.com/morse @@ -9,3 +11,22 @@ This version is by: Based on original work by: Ward Cunningham + +## Build + +2022-02-12 - It builds fine in Fedora 35. No actual info for MacOS or Windows + +### Fedora 35 + +Install dependencies (package names in Fedora 35) + +* SDL2-devel fluid fltk-devel fltk-fluid + +Build + +`make` + +## Run + +Just execute `m` from terminal or drag somewhere. + diff --git a/src/Codebox.cxx b/src/Codebox.cxx index 073c687..31db3e7 100644 --- a/src/Codebox.cxx +++ b/src/Codebox.cxx @@ -119,7 +119,7 @@ int Codebox::handle(int event) { // Called by FLTK when user twitches * moved to the end of the line, and the character is inserted there. */ void Codebox::append(int c) { // Append character to displayed line - char s[] = { c, '\0' }; // A 1-char string version of c. + char s[] = { (char) c, '\0' }; // A 1-char string version of c. if (size() >= maximum_size()) // If no room for character, cut(0,1); // discard one off left side position(maximum_size()); // Return to right end of buffer diff --git a/src/Makefile b/src/Makefile index 4b4c5e2..f7b5915 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,15 +1,19 @@ -# "make" for MacOSX +.DEFAULT_GOAL := m + +FLTK_LIBS=`fltk-config --ldflags` +FLTK_FLAGS=`fltk-config --cxxflags` +SDL2_LIBS=`sdl2-config --libs` +SDL2_FLAGS=`sdl2-config --cflags` + +###################################################### +# MacOSX # To compile on MacOSX I used 10.6 with XCode dev tools and then # used MacPorts to install fltk 1.1.7 and libsdl 1.2.13 -FLTK_LIBS=`fltk-config --ldstaticflags` -SDL_LIBS=`sdl-config --static-libs` CC=g++ CFLGAGS= -# This may need to be changed for you. These are the X11 libraries used by -# ftlk or sdl +# This may need to be changed for you. These are the X11 libraries used by ftlk or sdl DYLIB=/opt/local/lib/libX11.6.dylib /opt/local/lib/libXext.6.dylib /opt/local/lib/libXrandr.2.dylib /opt/local/lib/libXrender.1.dylib /opt/local/lib/libxcb.1.dylib /opt/local/lib/libXau.6.dylib /opt/local/lib/libXdmcp.6.dylib - Morse.app: Bargraph.o Codebox.o Cw.o Knob.o Help.h m.o Info.plist mkdir -p Morse.app/Contents/MacOS mkdir Morse.app/Contents/plugins @@ -17,7 +21,7 @@ Morse.app: Bargraph.o Codebox.o Cw.o Knob.o Help.h m.o Info.plist cp $(DYLIB) Morse.app/Contents/plugins $(CC) $(CFLAGS) -o Morse m.o Bargraph.o Codebox.o Cw.o Knob.o \ $(FLTK_LIBS) \ - $(SDL_LIBS) \ + `pkg-config --cflags --libs sdl` \ -framework Carbon mv Morse Morse.app/Contents/MacOS/ cp Info.plist Morse.app/Contents/info.plist @@ -29,48 +33,48 @@ Morse.app: Bargraph.o Codebox.o Cw.o Knob.o Help.h m.o Info.plist install_name_tool -change $$j @executable_path/../plugins/`basename $$j` Morse.app/Contents/plugins/`basename $$i`; \ done; \ done +###################################################### -# For some reason, xmake is required to make m.tgz. -m.tgz: m m.exe - rm -f m.tgz - tar czvf m.tgz * - +###################################################### +# Windows # Use "xmake" to generate m.exe m.exe: m.fl Bargraph.o Codebox.o Cw.cxx Cw.h Knob.cxx Knob.h Help.h m.o g++ -c -Os -I/usr/local/include/SDL Cw.cxx g++ -om.exe m.o Bargraph.o Codebox.o Cw.o Knob.o \ - -static `fltk-config --ldstaticflags` \ - -lSDL -lmingw32 -lmingwex -lwinmm -lSDLmain + $(FLTK_LIBS) \ + $(SDL2_LIBS) \ + -lmingw32 -lmingwex -lwinmm strip m.exe rm *.o m.cxx m.h +###################################################### # Regular "make" is what you want for the Linux version m: m.fl Bargraph.o Codebox.o Cw.o Knob.o Help.h m.o - g++ -static -om m.o Bargraph.o Codebox.o Cw.o Knob.o \ - `sdl-config --static-libs` \ - `fltk-config --ldstaticflags` -ldl + g++ -om m.o Bargraph.o Codebox.o Cw.o Knob.o \ + $(SDL2_LIBS) \ + $(FLTK_LIBS) -ldl strip m rm *.o m.cxx m.h m.cxx: m.fl fluid -c m.fl m.o: m.cxx m.h - g++ -c -Os `fltk-config --cxxflags` m.cxx + g++ -c -Os $(FLTK_FLAGS) m.cxx Bargraph.o: Bargraph.cxx Bargraph.h - g++ -c -Os `fltk-config --cxxflags` Bargraph.cxx + g++ -c -Os $(FLTK_FLAGS) Bargraph.cxx Codebox.o: Codebox.cxx Codebox.h - g++ -c -Os `fltk-config --cxxflags` Codebox.cxx + g++ -c -Os $(FLTK_FLAGS) Codebox.cxx Knob.o: Knob.cxx Knob.h - g++ -c -Os `fltk-config --cxxflags` Knob.cxx + g++ -c -Os $(FLTK_FLAGS) Knob.cxx Cw.o: Cw.cxx Cw.h - g++ -c -Os `sdl-config --cflags` Cw.cxx + g++ -c -Os $(SDL2_FLAGS) Cw.cxx # Besemer's Python extension version cw.so: cw.pyx Cw.cxx Cw.h pyrexc cw.pyx gcc -c -fPIC -I/usr/include/python2.5 cw.c - gcc -c -fPIC `sdl-config --cflags` Cw.cxx - g++ -shared cw.o Cw.o -static `sdl-config --static-libs` -ocw.so + gcc -c -fPIC $(SDL2_FLAGS) Cw.cxx + g++ -shared cw.o Cw.o -static $(SDL2_LIBS) -ocw.so rm cw.c *.o Help.h: m.htm diff --git a/src/help.py b/src/help.py index 910a3e7..f1be83d 100755 --- a/src/help.py +++ b/src/help.py @@ -31,13 +31,13 @@ from sys import stdin -print "/* DO NOT EDIT! The following declaration and its initializer are" -print " * generated from the original HTML file by the script, help.py." -print " */\n" +print( "/* DO NOT EDIT! The following declaration and its initializer are") +print( " * generated from the original HTML file by the script, help.py.") +print( " */\n") -print "static char* HelpString =" +print( "static const char* HelpString =" ) for helpline in stdin: - print ' "'+helpline.replace('"','\\"').rstrip()+'\\n"' -print ';' + print( ' "'+helpline.replace('"','\\"').rstrip()+'\\n"') +print( ';' ) From 68c61dceb6632fc680c706074a80341ecc3b447e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicente=20Quint=C3=A1ns?= Date: Sat, 12 Feb 2022 12:07:02 +0100 Subject: [PATCH 14/14] README markdown formatting --- README => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README => README.md (100%) diff --git a/README b/README.md similarity index 100% rename from README rename to README.md