1: #include "opcode.h" 2: 3: char pd_date[] = { 4: 8, 9, 10, 4, 5, 6, 10, 22, 23, 10, 0 5: }; 6: 7: pdattim(op, alfap) 8: char *alfap; 9: { 10: register char *ap, *cp, *dp; 11: long a; 12: int i; 13: 14: time(&a); 15: cp = ctime(&a); 16: ap = alfap; 17: if (op == O_DATE) 18: for (dp = pd_date; *dp; *ap++ = cp[*dp++]); 19: else 20: for (cp += 10, i = 10; i; *ap++ = *cp++, i--); 21: }