mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 09:49:18 -04:00
Add
-z Current -z0 Current functionality. Misc cleanup.
This commit is contained in:
parent
5d9939e941
commit
e3433b69f0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=43054
4 changed files with 63 additions and 3 deletions
|
@ -1,7 +1,6 @@
|
||||||
# New ports collection makefile for: astrolog
|
# New ports collection makefile for: astrolog
|
||||||
#
|
# See some useful stuff at:
|
||||||
# http://rpkalf2.mach.uni-karlsruhe.de/~ferber/astrolog/
|
# http://rpkalf2.mach.uni-karlsruhe.de/~ferber/astrolog/
|
||||||
# http://www.magitech.com/~cruiser1/astrolog.htm
|
|
||||||
#
|
#
|
||||||
# Date created: 31 July 1995
|
# Date created: 31 July 1995
|
||||||
# Whom: faulkner@cactus.org
|
# Whom: faulkner@cactus.org
|
||||||
|
@ -11,6 +10,7 @@
|
||||||
|
|
||||||
PORTNAME= astrolog
|
PORTNAME= astrolog
|
||||||
PORTVERSION= 5.40
|
PORTVERSION= 5.40
|
||||||
|
PORTREVISION= 1
|
||||||
CATEGORIES= misc
|
CATEGORIES= misc
|
||||||
MASTER_SITES= http://www.astrolog.org/ftp/ephem/ \
|
MASTER_SITES= http://www.astrolog.org/ftp/ephem/ \
|
||||||
http://www.astrolog.org/ftp/ \
|
http://www.astrolog.org/ftp/ \
|
||||||
|
|
46
misc/astrolog/files/patch-ac
Normal file
46
misc/astrolog/files/patch-ac
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
--- astrolog.c.orig Wed Dec 23 23:29:16 1998
|
||||||
|
+++ astrolog.c Fri May 25 21:07:58 2001
|
||||||
|
@@ -1146,8 +1146,18 @@
|
||||||
|
case 'z':
|
||||||
|
if (ch1 == '0') {
|
||||||
|
if (argc <= 1 || RParseSz(argv[1], pmZon) == rLarge) {
|
||||||
|
- i = us.dstDef != 0.0;
|
||||||
|
- SwitchF(i);
|
||||||
|
+ if (argc > 1 && strcasecmp(argv[1], "current") == 0) {
|
||||||
|
+ time_t t;
|
||||||
|
+ struct tm *tm;
|
||||||
|
+
|
||||||
|
+ (void) time(&t);
|
||||||
|
+ tm = localtime(&t);
|
||||||
|
+ i = tm->tm_isdst != 0;
|
||||||
|
+ argc--; argv++;
|
||||||
|
+ } else {
|
||||||
|
+ i = us.dstDef != 0.0;
|
||||||
|
+ SwitchF(i);
|
||||||
|
+ }
|
||||||
|
SS = us.dstDef = i ? 1.0 : 0.0;
|
||||||
|
} else {
|
||||||
|
SS = us.dstDef = RParseSz(argv[1], pmZon);
|
||||||
|
@@ -1236,9 +1246,19 @@
|
||||||
|
argc -= 2; argv += 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
- if (argc <= 1 || RParseSz(argv[1], pmZon) == rLarge)
|
||||||
|
- ZZ -= 1.0;
|
||||||
|
- else {
|
||||||
|
+ if (argc <= 1 || RParseSz(argv[1], pmZon) == rLarge) {
|
||||||
|
+ if (argc > 1 && strcasecmp(argv[1], "current") == 0) {
|
||||||
|
+ time_t t;
|
||||||
|
+ struct tm *tm;
|
||||||
|
+
|
||||||
|
+ (void) time(&t);
|
||||||
|
+ tm = localtime(&t);
|
||||||
|
+ ZZ = us.zonDef = (tm->tm_isdst ? 1 : 0) -
|
||||||
|
+ (real)tm->tm_gmtoff/(60*60);
|
||||||
|
+ argc--; argv++;
|
||||||
|
+ } else
|
||||||
|
+ ZZ -= 1.0;
|
||||||
|
+ } else {
|
||||||
|
ZZ = us.zonDef = RParseSz(argv[1], pmZon);
|
||||||
|
if (!FValidZon(us.zonDef)) {
|
||||||
|
ErrorValR("z", us.zonDef);
|
11
misc/astrolog/files/patch-ad
Normal file
11
misc/astrolog/files/patch-ad
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- general.c.bak Wed Dec 23 23:29:21 1998
|
||||||
|
+++ general.c Fri May 25 20:59:09 2001
|
||||||
|
@@ -922,7 +922,7 @@
|
||||||
|
int *mon, *day, *yea;
|
||||||
|
real *tim, zon;
|
||||||
|
{
|
||||||
|
- dword curtimer;
|
||||||
|
+ time_t curtimer;
|
||||||
|
int min, sec;
|
||||||
|
real hr;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
* Astrolog 5.30 is a many featured and
|
Astrolog is a many featured and
|
||||||
customizable astrology chart calculation
|
customizable astrology chart calculation
|
||||||
program for DOS, Windows, Mac, and Unix,
|
program for DOS, Windows, Mac, and Unix,
|
||||||
used in 30+ countries on six continents.
|
used in 30+ countries on six continents.
|
||||||
|
@ -18,3 +18,6 @@ macros, interactive PC & MS/X11 Windows
|
||||||
graphics, smooth animation of charts,
|
graphics, smooth animation of charts,
|
||||||
graphic files in PostScript, Windows
|
graphic files in PostScript, Windows
|
||||||
metafile, and bitmap formats, and more!
|
metafile, and bitmap formats, and more!
|
||||||
|
|
||||||
|
|
||||||
|
WWW: http://www.astrolog.org/astrolog.htm
|
||||||
|
|
Loading…
Add table
Reference in a new issue