summaryrefslogtreecommitdiff
path: root/testing/toxic
diff options
context:
space:
mode:
authorSean Qureshi <stqism@risingstormgames.com>2013-08-02 19:58:00 -0700
committerSean Qureshi <stqism@risingstormgames.com>2013-08-02 19:58:00 -0700
commit62bf320b6e3cb946cc70a972c35c114b0bcdbad1 (patch)
tree54e97e6d65ec185288ee6a8df9ce21d5badda6c4 /testing/toxic
parent7dd63b45caef2d86b6b48c4e822b931422faf44d (diff)
Removed the seconds patch, it breaks things
Diffstat (limited to 'testing/toxic')
-rw-r--r--testing/toxic/PATCH.md2
-rw-r--r--testing/toxic/seconds.patch61
2 files changed, 0 insertions, 63 deletions
diff --git a/testing/toxic/PATCH.md b/testing/toxic/PATCH.md
deleted file mode 100644
index 4af250f3..00000000
--- a/testing/toxic/PATCH.md
+++ /dev/null
@@ -1,2 +0,0 @@
1Seconds.patch adds support for seconds to the timestamp in toxic.
2To use seconds.patch run patch < seconds.patch while in the directory testing/toxic
diff --git a/testing/toxic/seconds.patch b/testing/toxic/seconds.patch
deleted file mode 100644
index d7ce33a2..00000000
--- a/testing/toxic/seconds.patch
+++ /dev/null
@@ -1,61 +0,0 @@
1--- chat.c 2013-08-02 17:41:08.866583333 -0700
2+++ chat2.c 2013-08-02 17:38:13.672991322 -0700
3@@ -49,8 +49,10 @@
4
5 int inthour = timeinfo->tm_hour;
6 int intmin = timeinfo->tm_min;
7+ int intsec = timeinfo->tm_sec;
8 char min[2];
9 char hour[2];
10+ char sec[2];
11 sprintf(hour,"%d",inthour);
12 if (intmin < 10) {
13 sprintf(min,"0%d",intmin);
14@@ -58,10 +60,17 @@
15 sprintf(min,"%d",intmin);
16 }
17
18+ if (intsec < 10) {
19+ sprintf(sec,"0%d",intsec);
20+ } else {
21+ sprintf(sec,"%d",intsec);
22+ }
23+
24
25 wattron(ctx->history, COLOR_PAIR(2));
26 wprintw(ctx->history,"%s",hour);
27- wprintw(ctx->history,":%s ",min);
28+ wprintw(ctx->history,":%s",min);
29+ wprintw(ctx->history,":%s",sec);
30 wattron(ctx->history, COLOR_PAIR(4));
31 wprintw(ctx->history, "%s: ", now);
32 wattron(ctx->history, COLOR_PAIR(4));
33@@ -111,8 +120,10 @@
34
35 int inthour = timeinfo->tm_hour; //Pretty bad, but it gets the job done
36 int intmin = timeinfo->tm_min;
37+ int intsec = timeinfo ->tm_sec;
38 char min[2];
39 char hour[2];
40+ char sec[2];
41 sprintf(hour,"%d",inthour);
42 if (intmin < 10) {
43 sprintf(min,"0%d",intmin);
44@@ -120,9 +131,16 @@
45 sprintf(min,"%d",intmin);
46 }
47
48+ if (intsec < 10) {
49+ sprintf(sec,"0%d",intsec);
50+ } else {
51+ sprintf(sec,"%d",intsec);
52+ }
53+
54 wattron(ctx->history, COLOR_PAIR(2));
55 wprintw(ctx->history,"%s",hour);
56- wprintw(ctx->history,":%s ",min);
57+ wprintw(ctx->history,":%s",min);
58+ wprintw(ctx->history,":%s ",sec);
59 wattron(ctx->history, COLOR_PAIR(1));
60 wprintw(ctx->history, "you: ", ctx->line);
61 wattroff(ctx->history, COLOR_PAIR(1));