Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!accuvax.nwu.edu!nucsrl!telecom-request From: Jim Thompson Newsgroups: comp.dcom.telecom Subject: Re: New Phone Surmounts Barrier For the Deaf Message-ID: <5295@accuvax.nwu.edu> Date: 18 Mar 90 10:02:12 GMT Sender: news@accuvax.nwu.edu Organization: Sun Microsystems, Mt. View, Ca. Lines: 39 Approved: Telecom@eecs.nwu.edu X-Submissions-To: telecom@eecs.nwu.edu X-Administrivia-To: telecom-request@eecs.nwu.edu X-Telecom-Digest: Volume 10, Issue 181, Message 6 of 12 Oh, I don't know, try it yourself: (You'll have to add support for the '*' -> '.' and '#' -> ' ' mapping.) Jim -------- foneno.c ------- char buf[64]; main(argc, argv) char **argv; { while (*++argv) digit(*argv, buf); } digit(str, p) char *str, *p; { int i; if (!*str) { puts(buf); return; } for (i = 0; i < 3; i++) { *p = "000111ABCdEFGHIJKLMNOPRSTUVWXY"[((*str - '0') * 3) + i]; digit(str + 1, p + 1); } } ------------------------ Jim Thompson - Network Engineering - Sun Microsystems - jthomp@central.sun.com Charter Member - Fatalistic International Society for Hedonistic Youth (FISHY) "Confusing yourself is a way to stay honest." -Jenny Holzer