Path: utzoo!mnetor!uunet!wucs1!plus5!hokey From: hokey@plus5.UUCP (Hokey) Newsgroups: news.software.b Subject: Re: Expire doesn't allow 1-day expirations? Message-ID: <2370@plus5.UUCP> Date: 11 Mar 88 16:55:41 GMT References: <8089@tut.cis.ohio-state.edu> Reply-To: hokey@plus5.UUCP (Hokey) Organization: Plus Five Computer Services, St. Louis, MO Lines: 75 Aside from the -[iIp] options to expire which might also be of help, I added this patch to expire a while ago. It lets you specify the expiration time as [days][:hours] . *** expire.c- Fri Oct 31 02:56:41 1986 --- expire.c+ Thu Nov 13 02:26:01 1986 *************** *** 153,158 setbuf(stdout, (char *)NULL); break; case 'e': /* Use this as default expiration time */ if (argc > 2 && argv[2][0] != '-') { argv++; argc--; --- 153,163 ----- setbuf(stdout, (char *)NULL); break; case 'e': /* Use this as default expiration time */ + { + char *exparg; + long expdays = 0L; + long exphours = 0L; + if (argc > 2 && argv[2][0] != '-') { argv++; argc--; *************** *** 156,164 if (argc > 2 && argv[2][0] != '-') { argv++; argc--; ! expincr = atol(argv[1]) * DAYS; ! } else if (isdigit(argv[1][2])) ! expincr = atol(&argv[1][2]) * DAYS; break; case 'E': /* Use this as default forget time */ if (argc > 2 && argv[2][0] != '-') { --- 161,176 ----- if (argc > 2 && argv[2][0] != '-') { argv++; argc--; ! exparg = argv[1]; ! } else ! exparg = &argv[1][2]; ! while(isascii(*exparg) && isdigit(*exparg)) { ! expdays = expdays * 10L + (long)(*exparg++ - '0');} ! if(*exparg == ':') { ! ++exparg; ! while(isascii(*exparg) && isdigit(*exparg)) { ! exphours = exphours * 10L + (long)(*exparg++ - '0');}} ! expincr = (expdays * DAYS) + (exphours * 60L * 60L); break; } case 'E': /* Use this as default forget time */ *************** *** 160,165 } else if (isdigit(argv[1][2])) expincr = atol(&argv[1][2]) * DAYS; break; case 'E': /* Use this as default forget time */ if (argc > 2 && argv[2][0] != '-') { argv++; --- 172,178 ----- exphours = exphours * 10L + (long)(*exparg++ - '0');}} expincr = (expdays * DAYS) + (exphours * 60L * 60L); break; + } case 'E': /* Use this as default forget time */ if (argc > 2 && argv[2][0] != '-') { argv++; -- Hokey