MCPcopy Create free account
hub / github.com/CruiserOne/Astrolog / PrintHeader

Function PrintHeader

charts1.cpp:66–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64// This is used by ChartListing() and other charts in PrintChart().
65
66void PrintHeader(int nSpace)
67{
68 char sz[cchSzDef];
69 int day, fNam, fLoc, fProg;
70
71 if (nSpace < 0) {
72 // If another chart has been printed, just skip a couple lines instead.
73 PrintL2();
74 return;
75 }
76
77 fNam = FSzSet(ciMain.nam); fLoc = FSzSet(ciMain.loc);
78 AnsiColor(kWhiteA);
79 sprintf(sz, "%s %s", szAppName, szVersionCore); PrintSz(sz);
80 if (!us.fSeconds || fNam)
81 PrintSz(" chart ");
82 else
83 PrintSz(": ");
84 if (FNoTimeOrSpace(ciMain))
85 PrintSz("(No time or space)\n");
86 else if (us.nRel == rcComposite)
87 PrintSz("(Composite)\n");
88 else {
89 if (!us.fSeconds || fNam)
90 PrintSz("for ");
91 sprintf(sz, "%s%s", fNam ? ciMain.nam : "", fNam ? "\n" : "");
92 PrintSz(sz);
93 day = DayOfWeek(Mon, Day, Yea);
94 sprintf(sz, "%.3s %s %s (%s)", szDay[day], SzDate(Mon, Day, Yea, 3),
95 SzTim(Tim), SzOffset(Zon, Dst, Lon)); PrintSz(sz);
96 sprintf(sz, "%c%s%s%s\n", fLoc && !fNam ? '\n' : ' ',
97 fLoc ? ciMain.loc : "", fLoc ? " " : "", SzLocation(Lon, Lat));
98 PrintSz(sz);
99 if (us.fProgress) {
100 sprintf(sz, "Progressed To: %.3s %s %s (%s)\n",
101 szDay[DayOfWeek(MonT, DayT, YeaT)], SzDate(MonT, DayT, YeaT, 3),
102 SzTim(TimT), SzOffset(ciDefa.zon, ciDefa.dst, LonT)); PrintSz(sz);
103 }
104 }
105
106 // Print second set of chart information.
107 if (us.nRel < rcNone || us.nRel == rcSynastry) {
108 AnsiColor(kDkGray);
109 fNam = FSzSet(ciTwin.nam); fLoc = FSzSet(ciTwin.loc);
110 fProg = us.nRel == rcProgress;
111 sprintf(sz, "Chart %s %s%s", !us.fSeconds || fNam ?
112 (!fProg ? "#2 comparison for" : "#2 progressed for") :
113 (!fProg ? "Number2:" : "Progr.2:"), fNam ? ciTwin.nam : "",
114 fNam ? "\n" : ""); PrintSz(sz);
115 if (FNoTimeOrSpace(ciTwin))
116 PrintSz("(No time or space)\n");
117 else {
118 day = DayOfWeek(ciTwin.mon, ciTwin.day, ciTwin.yea);
119 sprintf(sz, "%.3s %s %s (%s)", szDay[day],
120 SzDate(ciTwin.mon, ciTwin.day, ciTwin.yea, 3), SzTim(ciTwin.tim),
121 SzOffset(ciTwin.zon, ciTwin.dst, ciTwin.lon)); PrintSz(sz);
122 sprintf(sz, "%c%s%s%s\n", fLoc && !fNam ? '\n' : ' ',
123 fLoc ? ciTwin.loc : "", fLoc ? " " : "",

Callers 2

ChartListingFunction · 0.85
PrintChartFunction · 0.85

Calls 7

AnsiColorFunction · 0.85
PrintSzFunction · 0.85
DayOfWeekFunction · 0.85
SzDateFunction · 0.85
SzTimFunction · 0.85
SzOffsetFunction · 0.85
SzLocationFunction · 0.85

Tested by

no test coverage detected