rename packages/ to recipes/ per earlier agreement
[openembedded.git] / recipes / mgetty / mgetty-1.1.30 / 43-moreinfo-cnd.c_bug112163
1 --- mgetty-1.1.30.orig/cnd.c    2002-11-05 16:43:04.000000000 -0500
2 +++ mgetty-1.1.30/cnd.c 2003-04-28 00:07:35.000000000 -0400
3 @@ -94,6 +94,9 @@
4      /* Swedish Telia/ZyXEL Omni 52k - Torulf Lundgren, torulf@upsys.se */
5      {"Diverting number:",       &CallerId},
6  
7 +    /* FALCOM A2D gsm modem              */
8 +    {"+CLIP: ",              &CallerId},
9 +
10      {NULL}
11  };
12      
13 @@ -163,6 +166,23 @@
14                     if ( *p == '\'' || *p == '\"' || !isprint(*p) ) *p = ' ';
15                     p++;
16                 }
17 +
18 +               if ( strcmp(cp->string,"+CLIP: ") == 0 ) {
19 +                 char *q ;
20 +
21 +                 p = *(cp->variable) ;
22 +                 q = *(cp->variable) ;
23 +                 /* strip non digit charaters */
24 +                 while( ! isdigit(*p) ) p++;
25 +                 /* shift only digit characters */
26 +                 while( isdigit(*p) ) {
27 +                   *q=*p ;
28 +                   p++ ;
29 +                   q++ ;
30 +                 }
31 +                 *q = 0;
32 +               }
33 +
34             }
35             lprintf(L_JUNK, "CND: found: %s", *(cp->variable));
36             return;