commit aff3674
chld
·
2026-07-13 16:06:45 +0000 UTC
parent 6794f20
remove txt and txt_len
1 files changed,
+4,
-6
M
xl.c
M
xl.c
+4,
-6
1@@ -50,10 +50,6 @@ int main(int ac, char **av)
2 XFillRectangle(d, w,gc,0,0,wi,hi);
3 XSetForeground(d, gc, BlackPixel(d,s));
4
5- char txt[255]; int txt_len=0;
6- strcpy(txt, av[1]);
7- txt_len=strlen(txt);
8-
9 XFontStruct *font = XLoadQueryFont(d, "fixed");
10 XSetFont(d, gc, font->fid);
11
12@@ -66,6 +62,7 @@ int main(int ac, char **av)
13 char *prg=fbuf(path);
14 if(!prg)
15 {
16+ fprintf(stderr, "could not read from %s\n", path);
17 free(prg);
18 goto q;
19 }
20@@ -83,7 +80,7 @@ int main(int ac, char **av)
21 prgs[p_i++]=t;
22 t=strtok(NULL, "\n");
23 }
24- fprintf(stderr, "%d\n", (int)p_i);
25+ //fprintf(stderr, "%d\n", (int)p_i);
26
27 while(1)
28 {
29@@ -140,7 +137,8 @@ int main(int ac, char **av)
30 goto q;
31 break;
32 case ButtonPress:
33- fprintf(stderr, "%s: last sel %d\n", prgs[sel], sel);
34+ printf("%s\n", prgs[sel]);
35+ //fprintf(stderr, "%s: last sel %d\n", prgs[sel], sel);
36 goto q;
37 break;
38 case ButtonRelease: