We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3dce815 commit b37461dCopy full SHA for b37461d
hack.rip.c
@@ -6,7 +6,7 @@
6
7
extern char plname[];
8
9
-static char *rip[] = {
+static const char *const rip_const[] = {
10
" ----------",
11
" / \\",
12
" / REST \\",
@@ -24,15 +24,17 @@ static char *rip[] = {
24
0
25
};
26
27
+static char *rip[SIZE(rip_const)];
28
+
29
outrip(){
30
register char **dp = rip;
31
register char *dpx;
32
char buf[BUFSZ];
33
register x,y;
34
35
/* The rip strings are expected to be writable so strdup them. */
- for (int i = 0; rip[i]; i++) {
- rip[i] = strdup(rip[i]);
36
+ for (int i = 0; rip_const[i]; i++) {
37
+ rip[i] = strdup(rip_const[i]);
38
}
39
cls();
40
(void) strcpy(buf, plname);
0 commit comments