]> andersk Git - moira.git/commitdiff
Don't artificially limit the format of phone number info.
authorzacheiss <zacheiss>
Sat, 28 Jul 2001 07:53:57 +0000 (07:53 +0000)
committerzacheiss <zacheiss>
Sat, 28 Jul 2001 07:53:57 +0000 (07:53 +0000)
clients/chfn/chfn.c

index 1943739a2a55abb75ff2240a3a78db5d36db4bc2..357aaa91abaa91b0c9260d5bd002f11329f289c4 100644 (file)
@@ -220,38 +220,8 @@ char *ask(char *question, char *def_val, int phone_num)
          if (!ok)
            break;
        }
-
-      if (phone_num && ok)
-       {
-         len = strlen(result);
-         for (i = 0; i < len; i++)
-           {
-             if (!isdigit(result[i]) && (result[i] != '-'))
-               {
-                 printf("Phone numbers can contain only digits.\n");
-                 ok = FALSE;
-                 break;
-               }
-             if (result[i] == '-')
-               dashes = TRUE;
-            }
-        }
     }
-
-  /* Remove dashes if necessary */
-  if (dashes && result == buf)
-    {
-      char *tmp1, *tmp2;
-      tmp1 = tmp2 = (char *)buf;
-      do
-       {
-         if (*tmp1 != '-')
-           *tmp2++ = *tmp1;
-       }
-      while (*tmp1++);
-    }
-
-    return result;
+  return result;
 }
 
 void get_new_info(struct finger_info *old_info, struct finger_info *new_info)
This page took 1.459391 seconds and 5 git commands to generate.