pom.c (17201) | pom.c (28979) |
---|---|
1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software posted to USENET. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 65 unchanged lines hidden (view full) --- 74int 75main() 76{ 77 time_t tt; 78 struct tm *GMT; 79 double days, today, tomorrow; 80 int cnt; 81 | 1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software posted to USENET. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 65 unchanged lines hidden (view full) --- 74int 75main() 76{ 77 time_t tt; 78 struct tm *GMT; 79 double days, today, tomorrow; 80 int cnt; 81 |
82 /* revoke */ 83 setegid(getgid()); 84 setgid(getgid()); 85 |
|
82 (void) time(&tt); 83 GMT = gmtime(&tt); 84 days = (GMT->tm_yday + 1) + ((GMT->tm_hour + 85 (GMT->tm_min / 60.0) + (GMT->tm_sec / 3600.0)) / 24.0); 86 for (cnt = EPOCH; cnt < GMT->tm_year; ++cnt) 87 days += isleap(cnt) ? 366 : 365; 88 today = potm(days) + .5; 89 (void)printf("The Moon is "); --- 88 unchanged lines hidden --- | 86 (void) time(&tt); 87 GMT = gmtime(&tt); 88 days = (GMT->tm_yday + 1) + ((GMT->tm_hour + 89 (GMT->tm_min / 60.0) + (GMT->tm_sec / 3600.0)) / 24.0); 90 for (cnt = EPOCH; cnt < GMT->tm_year; ++cnt) 91 days += isleap(cnt) ? 366 : 365; 92 today = potm(days) + .5; 93 (void)printf("The Moon is "); --- 88 unchanged lines hidden --- |