1: # include <sccs.h> 2: 3: SCCSID(@(#)capital.c 8.1 12/31/84) 4: 5: capital(lower, upper) 6: char *lower, *upper; 7: { 8: register char *l, *u; 9: 10: l = lower; 11: u = upper; 12: while (*l) 13: { 14: if (*l == ' ') 15: { 16: do 17: { 18: *u++ = *l++; 19: } while (*l); 20: break; 21: } 22: if (*l >= 'a' && *l <= 'z') 23: *u++ = *l++ + 'A' - 'a'; 24: else 25: *u++ = *l++; 26: } 27: *u = '\0'; 28: }