summaryrefslogtreecommitdiffstats
path: root/x11/xbanner/files/patch-ab
blob: 48705ce3cfff268aff9498ec3aafb0e6a57cd33d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
*** xb_check.c.orig	Mon May 12 17:55:59 1997
--- xb_check.c	Tue May 18 20:51:35 1999
***************
*** 145,151 ****
  }
  
  /* boolean that checks if a string is numeric */
! int isnumber(char *s)
  {
    if(atoi(s)==0 && *s!='0')
      return 0;
--- 145,151 ----
  }
  
  /* boolean that checks if a string is numeric */
! int isnumb(char *s)
  {
    if(atoi(s)==0 && *s!='0')
      return 0;
***************
*** 303,309 ****
      }
    }
  
!   while(gets(line)!=NULL)
    {
      if(line[0]=='!')
        continue;
--- 303,309 ----
      }
    }
  
!   while(fgets(line, LNLEN, stdin)!=NULL)
    {
      if(line[0]=='!')
        continue;
***************
*** 363,369 ****
              printf("Valid resource name with unknown program name:\n%s\n",line);
            if(val[0]=='\0')
              printf("No value in line containing valid resource name:\n%s\n",line);
! 	  if(!isnumber(val))
  	    printf("Value in line requiring a numerical value is not numerical:\n%s\n",line);
          }
          else
--- 363,369 ----
              printf("Valid resource name with unknown program name:\n%s\n",line);
            if(val[0]=='\0')
              printf("No value in line containing valid resource name:\n%s\n",line);
! 	  if(!isnumb(val))
  	    printf("Value in line requiring a numerical value is not numerical:\n%s\n",line);
          }
          else
***************
*** 373,379 ****
              printf("Valid resource class name with unknown program name:\n%s\n",line);
            if(val[0]=='\0')
              printf("No value in line containing valid resource class name:\n%s\n",line);
! 	  if(!isnumber(val))
  	    printf("Value in line requiring a numerical value is not numerical:\n%s\n",line);
          }
          break;
--- 373,379 ----
              printf("Valid resource class name with unknown program name:\n%s\n",line);
            if(val[0]=='\0')
              printf("No value in line containing valid resource class name:\n%s\n",line);
! 	  if(!isnumb(val))
  	    printf("Value in line requiring a numerical value is not numerical:\n%s\n",line);
          }
          break;
OpenPOWER on IntegriCloud