/* ** Astrolog (Version 4.40) File: charts0.c ** ** IMPORTANT NOTICE: The graphics database and chart display routines ** used in this program are Copyright (C) 1991-1995 by Walter D. Pullen ** (astara@u.washington.edu). Permission is granted to freely use and ** distribute these routines provided one doesn't sell, restrict, or ** profit from them in any way. Modification is allowed provided these ** notices remain with any altered or edited versions of the program. ** ** The main planetary calculation routines used in this program have ** been Copyrighted and the core of this program is basically a ** conversion to C of the routines created by James Neely as listed in ** Michael Erlewine's 'Manual of Computer Programming for Astrologers', ** available from Matrix Software. The copyright gives us permission to ** use the routines for personal use but not to sell them or profit from ** them in any way. ** ** The PostScript code within the core graphics routines are programmed ** and Copyright (C) 1992-1993 by Brian D. Willoughby ** (brianw@sounds.wa.com). Conditions are identical to those above. ** ** The extended accurate ephemeris databases and formulas are from the ** calculation routines in the program "Placalc" and are programmed and ** Copyright (C) 1989,1991,1993 by Astrodienst AG and Alois Treindl ** (alois@azur.ch). The use of that source code is subject to ** regulations made by Astrodienst Zurich, and the code is not in the ** public domain. This copyright notice must not be changed or removed ** by any user of this program. ** ** Initial programming 8/28,30, 9/10,13,16,20,23, 10/3,6,7, 11/7,10,21/1991. ** X Window graphics initially programmed 10/23-29/1991. ** PostScript graphics initially programmed 11/29-30/1992. ** Last code change made 1/29/1995. */ #include "astrolog.h" /* ****************************************************************************** ** Table Display Routines. ****************************************************************************** */ /* A subprocedure of the credit displayed below, this prints out one line */ /* of credit information on the screen. Given a string, it's displayed */ /* centered with left and right borders around it, in the given color. */ void PrintW(sz, col) char *sz; int col; { int i; if (!sz) { /* Null string means print the top, bottom, or a separator row. */ if (col < 0) AnsiColor(kRed); PrintCh((char)(col ? (col > 0 ? chSW : chNW) : chJE)); PrintTab(chH, CREDITWIDTH); PrintCh((char)(col ? (col > 0 ? chSE : chNE) : chJW)); } else { i = CchSz(sz); PrintCh(chV); PrintTab(' ', (CREDITWIDTH-i)/2 + (i&1)); AnsiColor(col); PrintSz(sz); PrintTab(' ', (CREDITWIDTH-i)/2); AnsiColor(kRed); PrintCh(chV); } PrintL(); } /* Display a list of credits showing those who helped create the various */ /* parts of Astrolog, as well as important copyright and version info, as */ /* displayed with the -Hc switch. */ void DisplayCredits() { char sz[cchSzDef]; PrintW(NULL, -1); sprintf(sz, "** %s version %s **", szAppName, szVersionCore); PrintW(sz, kWhite); sprintf(sz, "As of %s", szDateCore); PrintW(sz, kLtGray); sprintf(sz, "By Walter D. Pullen (%s)", szAddressCore); PrintW(sz, kCyan); PrintW(NULL, 0); PrintW("Main planetary calculation formulas were converted from", kGreen); PrintW( "routines by James Neely, as listed in 'Manual of Computer Programming", kGreen); PrintW( "for Astrologers' by Michael Erlewine, available from Matrix Software.", kGreen); PrintW("PostScript graphics routines by Brian D. Willoughby.", kYellow); PrintW( "Extended ephemeris calculation and formulas are by Alois Treindl,", kMagenta); PrintW( "as in the package 'Placalc', available from Astrodienst AG.", kMagenta); PrintW( "IMPORTANT: Astrolog is 'freeware', but is copyrighted and not in public", kLtGray); PrintW( "domain. Permission is granted to freely use and distribute these", kLtGray); PrintW( "routines provided one does not sell, restrict, or profit from the", kLtGray); PrintW( "program or its output in any way. Modification is allowed provided", kLtGray); PrintW( "these exact notices remain with any altered or edited versions of the", kLtGray); PrintW( "program. These conditions are true of both the program in whole and of", kLtGray); PrintW( "all parts by any individual author. Violators are subject to copyright", kLtGray); PrintW( "law penalties, and negative karmic debts to aforementioned contributors.", kLtGray); PrintW(NULL, 0); PrintW( "Special thanks to all those unmentioned, seen and unseen, who have", kBlue); PrintW( "pointed out problems, suggested features, & sent many positive vibes! :)", kBlue); PrintW(NULL, 1); AnsiColor(kDefault); } /* Print out a command switch or keypress info line to the screen, as done */ /* with the -H switch or 'H' key in a graphic window. This is just printing */ /* out the string, except in Ansi mode we set the proper colors: Red for */ /* header lines, Green for individual switches or keys, and White for the */ /* rest of the line telling what it does. We also prefix each switch with */ /* either Unix's '-' or PC's '/', whichever is appropriate for the system. */ void PrintS(sz) char *sz; { int dash; char c; dash = sz[1]; if (*sz != ' ') AnsiColor(kRed); else if (dash != ' ') AnsiColor(dash == 'P' || sz[3] == ' ' || sz[3] == ':' ? kGreen : kDkGreen); else AnsiColor(kDefault); while ((c = *sz) && c != ':' && (dash != 'P' || (c != ' ' || *(sz+1) != 't'))) { if (c != '_') PrintCh(c); else PrintCh(chSwitch); sz++; } if (*sz) PrintCh(*sz++); AnsiColor(kDefault); while (c = *sz) { if (c != '_') PrintCh(c); else PrintCh(chSwitch); sz++; } PrintL(); } /* Print a list of every command switch that can be passed to the program, */ /* and a description of what it does. This is what the -H switch prints. */ void DisplaySwitches() { char sz[cchSzDef]; sprintf(sz, "%s (version %s) command switches:", szAppName, szVersionCore); PrintS(sz); PrintS(" _H: Display this help list."); PrintS(" _Hc: Display program credits and copyrights."); PrintS(" _HC: Display names of zodiac signs and houses."); PrintS(" _HO: Display available planets and other celestial objects."); PrintS(" _HA: Display available aspects, their angles, and present orbs."); #ifdef CONSTEL PrintS(" _HF: Display names of astronomical constellations."); #endif PrintS(" _HS: Display information about planets in the solar system."); #ifdef INTERPRET PrintS(" _HI: Display meanings of signs, houses, planets, and aspects."); #endif sprintf(sz, " _He: Display all info tables together (_Hc_H_Y_HX_HC_HO_HA%s_HS%s).", #ifdef CONSTEL "_HF", #else "", #endif #ifdef INTERPRET "_HI"); #else ""); #endif PrintS(sz); PrintS(" _Q: Prompt for more command switches after display finished."); #ifdef SWITCHES PrintS(" _Q0: Like _Q but prompt for additional switches on startup."); #endif PrintS(" _M <1-48>: Run the specified command switch macro."); PrintS(" _M0 <1-48> : Define the specified command switch macro."); PrintS(" _Y: Display help list of less commonly used command switches."); PrintS("\nSwitches which determine the type of chart to display:"); PrintS(" _v: Display list of object positions (chosen by default)."); PrintS(" _v0: Like _v but express velocities relative to average speed."); PrintS(" _w []: Display chart in a graphic house wheel format."); PrintS(" _w0 [..]: Like _w but reverse order of objects in houses 4..9."); PrintS(" _g: Display aspect and midpoint grid among planets."); PrintS(" _g0: Like _g but flag aspect configurations (e.g. Yod's) too."); PrintS(" _g0: For comparison charts, show midpoints instead of aspects."); PrintS(" _ga: Like _g but indicate applying instead of difference orbs."); PrintS(" _gp: Like _g but generate parallel and contraparallel aspects."); PrintS(" _a: Display list of all aspects ordered by influence."); PrintS(" _a0: Like _a but display aspect summary too."); PrintS(" _a[0]a: Like _a but indicate applying and separating orbs."); PrintS(" _a[0]p: Like _a but do parallel and contraparallel aspects."); PrintS(" _m: Display all object midpoints in sorted zodiac order."); PrintS(" _m0: Like _m but display midpoint summary too."); PrintS(" _Z: Display planet locations with respect to the local horizon."); #ifdef GRAPH PrintS(" _Z0: Like _Z but express coordinates relative to polar center."); #endif PrintS(" _Zd: Search day for object local rising and setting times."); PrintS(" _S: Display x,y,z coordinate positions of planets in space."); PrintS(" _j: Display astrological influences of each object in chart."); PrintS(" _j0: Like _j but include influences of each zodiac sign as well."); PrintS(" _L []: Display astro-graph locations of planetary angles."); PrintS(" _L0 [..]: Like _L but display list of latitude crossings too."); PrintS(" _K: Display a calendar for given month."); PrintS(" _Ky: Like _K but display a calendar for the entire year."); PrintS(" _d []: Print all aspects and changes occurring in a day."); PrintS(" _dm: Like _d but print all aspects for the entire month."); PrintS(" _dy: Like _d but print all aspects for the entire year."); PrintS(" _dY : Like _d but search within a number of years."); PrintS(" _dp : Print aspects within progressed chart."); PrintS(" _dpy : Like _dp but search for aspects within entire year."); PrintS(" _dpY : Like _dp but search within number of years."); PrintS(" _dp[y]n: Search for progressed aspects in current month/year."); PrintS(" _D: Like _d but display aspects by influence instead of time."); PrintS(" _E: Display planetary ephemeris for given month."); PrintS(" _Ey: Display planetary ephemeris for the entire year."); PrintS(" _EY : Display planetary ephemeris for a number of years."); PrintS( " _e: Print all charts together (i.e. _v_w_g0_a_m_Z_S_j0_L0_K_d_D_E)."); PrintS( " _t : Compute all transits to natal planets in month."); PrintS( " _tp : Compute progressions in month for chart."); PrintS(" _t[p]y: : Compute transits/progressions for entire year."); PrintS(" _t[p]Y: : Compute transits for a number of years."); #ifdef TIME PrintS(" _t[py]n: Compute transits to natal planets for current time now."); #endif PrintS(" _T : Display transits ordered by influence."); PrintS(" _Tp : Print progressions instead of transits."); #ifdef TIME PrintS(" _T[p]n: Display transits ordered by influence for current date."); #endif #ifdef ARABIC PrintS(" _P []: Display list of Arabic parts and their positions."); PrintS(" _P0 []: Like _P but display formulas with terms reversed."); PrintS(" _P[z,n,f]: Order parts by position, name, or formula."); #endif #ifdef INTERPRET PrintS(" _I []: Print interpretation of selected charts."); #endif PrintS("\nSwitches which affect how the chart parameters are obtained:"); #ifdef TIME PrintS(" _n: Compute chart for this exact moment using current time."); PrintS(" _n[d,m,y]: Compute chart for start of current day, month, year."); #endif PrintS(" _z []: Change the default time zone (for _d_E_t_q options)."); PrintS(" _z0 []: Change the default daylight time setting."); PrintS(" _zl : Change the default longitude & latitude."); PrintS(" _zt