From 211927f713840512b7461b4bf03b68921156a818 Mon Sep 17 00:00:00 2001 From: zacheiss Date: Sat, 28 Jul 2001 07:53:57 +0000 Subject: [PATCH] Don't artificially limit the format of phone number info. --- clients/chfn/chfn.c | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/clients/chfn/chfn.c b/clients/chfn/chfn.c index 1943739a..357aaa91 100644 --- a/clients/chfn/chfn.c +++ b/clients/chfn/chfn.c @@ -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) -- 2.45.2