summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcvs2git2004-10-28 06:48:40 (GMT)
committercvs2git2012-06-24 12:13:13 (GMT)
commit7d8eafe12a58ed6d1f01955b664572b20815e8b5 (patch)
treefe54cfcd9c8bed56eb844fdedd8420a6e62b3f78
parent8fa6ad24842e96dce1380b17a58ff17dfbdf7b4a (diff)
downloadtypespeed-AC-branch.zip
typespeed-AC-branch.tar.gz
This commit was manufactured by cvs2git to create branch 'AC-branch'.AC-branch
Sprout from master 2004-10-28 06:48:40 UTC Adam Gołębiowski <adamg@pld-linux.org> '- updated to 0.4.4 (by Lukasz Klimek <casa(at)fajni.net>)' Delete: typespeed-buff_over_fix.patch
-rw-r--r--typespeed-buff_over_fix.patch184
1 files changed, 0 insertions, 184 deletions
diff --git a/typespeed-buff_over_fix.patch b/typespeed-buff_over_fix.patch
deleted file mode 100644
index 019fd6f..0000000
--- a/typespeed-buff_over_fix.patch
+++ /dev/null
@@ -1,184 +0,0 @@
---- typespeed-0.4.1.orig/file.c
-+++ typespeed-0.4.1/file.c
-@@ -4,6 +4,11 @@
-
- #include "typespeed.h"
-
-+#ifdef DEBIAN
-+#define DEBIAN__HIGHSCORE "/var/games/typespeed"
-+#define DEBIAN__WORDLIST "/usr/share/games/typespeed"
-+#endif /* DEBIAN */
-+
- int loadwords(char *stringi)
- {
- FILE *wordfile;
-@@ -14,6 +19,9 @@
- wordcount = -1;
- nakkimakkara = 0;
-
-+#ifdef DEBIAN
-+chdir(DEBIAN__WORDLIST);
-+#endif /* DEBIAN */
- if ((wordfile = fopen(stringi, "r")) == NULL) {
- return 1;
- }
-@@ -59,7 +67,7 @@
- int i;
-
- for (i = 0; i < wordcount; i++)
-- free(word[wordcount]);
-+ free(word[i]);
-
- }
-
-@@ -77,7 +85,7 @@
- char *info;
- //char *thingie[50];
- char thingie[WORDFILE_MAX][62];
-- char merkk;
-+ int merkk;
-
-
- filena = malloc(4 * sizeof(char));
-@@ -86,6 +94,9 @@
- k = 0;
- a = 1;
-
-+#ifdef DEBIAN
-+chdir(DEBIAN__WORDLIST);
-+#endif /* DEBIAN */
- dcolor_set(5, NULL);
- n = scandir(".", &namelist, 0, alphasort);
- tot = n;
-@@ -269,6 +280,9 @@
- {"3l33t", "Pro", "VeryGood", "Good", "Average", "NoGood", "ADP-Pro", "Looser", "None", "None"};
-
-
-+#ifdef DEBIAN
-+chdir(DEBIAN__HIGHSCORE);
-+#endif /* DEBIAN */
- filetys = (char *) malloc(sizeof(char) * (strlen(sanafile) + strlen(".high") + 1));
- strcpy(filetys, "");
- strcat(filetys, "high.");
-@@ -308,6 +322,9 @@
- float typoratio;
- char faim[21];
- } high;
-+#ifdef DEBIAN
-+chdir(DEBIAN__HIGHSCORE);
-+#endif /* DEBIAN */
- filetys = (char *) malloc(sizeof(char) * (strlen(sanafile) + strlen(".high") + 1));
- strcpy(filetys, "");
- strcat(filetys, "high.");
-@@ -383,6 +400,9 @@
- strlen(".high")
- + 1));
-
-+#ifdef DEBIAN
-+chdir(DEBIAN__HIGHSCORE);
-+#endif /* DEBIAN */
- dcolor_set(5, NULL);
- strcpy(filet, "");
- strcat(filet, "high.");
-@@ -485,7 +505,7 @@
- {
-
- FILE *conffile;
-- char wordhakemisto[81];
-+ char wordhakemisto[1025];
- char tmp[10];
- char *userhome;
-
-@@ -493,14 +513,16 @@
- sprintf(userhome,getenv("HOME"));
- strcat(userhome,"/");
- strcat(userhome,LOCALCONF);
-- hakemisto = malloc(82 * sizeof(char));
-- getcwd(hakemisto, 80);
-+ hakemisto = malloc(1026 * sizeof(char));
-+ getcwd(hakemisto, 1024);
- conffile = fopen(CONFIGFILE, "r");
- if (conffile != NULL) {
- // didn't work | fgets(wordhakemisto,80,conffile);
- // we use fscanf then :D | fgets(tmp,6,conffile);
-- fscanf(conffile, "%s", wordhakemisto);
-- fscanf(conffile, "%s", tmp);
-+ fgets(wordhakemisto, 1024, conffile);
-+ while (iscntrl(wordhakemisto[strlen(wordhakemisto)-1]))
-+ wordhakemisto[strlen(wordhakemisto)-1] = '\0';
-+ fgets(tmp, 6, conffile);
- if (!strcmp(tmp, "cheat"))
- opt.cheat = 1;
- fclose(conffile);
-@@ -508,8 +530,10 @@
- }
- conffile = fopen(userhome, "r");
- if (conffile != NULL) {
-- fscanf(conffile, "%s", wordhakemisto);
-- fscanf(conffile, "%s", tmp);
-+ fgets(wordhakemisto, 1024, conffile);
-+ while (iscntrl(wordhakemisto[strlen(wordhakemisto)-1]))
-+ wordhakemisto[strlen(wordhakemisto)-1] = '\0';
-+ fgets(tmp, 6, conffile);
- if (!strcmp(tmp, "cheat"))
- opt.cheat = 1;
- fclose(conffile);
-@@ -523,6 +547,9 @@
- struct dirent **namelist;
- int n;
-
-+#ifdef DEBIAN
-+chdir(DEBIAN__WORDLIST);
-+#endif /* DEBIAN */
- n = scandir(".", &namelist, 0, alphasort);
- if (n < 0) {
- printf("scandir failed.\n");
---- typespeed-0.4.1.orig/network.c
-+++ typespeed-0.4.1/network.c
-@@ -243,7 +243,7 @@
- }
- }
-
-- number=malloc(10*sizeof(char));
-+ number=malloc(80*sizeof(char));
- temp=malloc(80*sizeof(char));
-
- i=0;
-@@ -266,7 +266,7 @@
- }
- free(temp);
-
-- number=malloc(10*sizeof(char));
-+ number=malloc(80*sizeof(char));
- strncpy(number,temp2,strcspn(temp2," "));
- stat2->speed=(float) atof(number);
- free(number);
-@@ -279,7 +279,7 @@
- }
- free(temp2);
-
-- number=malloc(10*sizeof(char));
-+ number=malloc(80*sizeof(char));
- strncpy(number,temp,strcspn(temp," "));
- stat2->totalspeed= (float) atof(number);
- temp2=malloc(80*sizeof(char));
---- typespeed-0.4.1.orig/typespeed.c
-+++ typespeed-0.4.1/typespeed.c
-@@ -622,7 +622,7 @@
- int wheretogo=0;
- int want_help = 0;
-
-- char serv[64];
-+ char serv[256];
-
- opt.cheat = DEFAULT_CHEAT;
- opt.training = DEFAULT_TRAINING;
-@@ -672,7 +672,7 @@
- opt.client = 1;
- if (!optarg)
- abort(); /* getopt should handle this... */
-- strcpy(serv, optarg);
-+ strncpy(serv, optarg, 255);
- break;
- case 'p':
- if (optarg) opt.port = atoi(optarg);