Skip to content

Commit 0739128

Browse files
authored
Merge pull request #582 from cse-sim/64bit-fixes
64-bit cleanup
2 parents 6713227 + ce97f29 commit 0739128

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+10193
-1087
lines changed

src/CNDTYPES.DEF

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
??? UPDATE FOR CSE some done.
1212
dtypes.h #included in cnglob.h
1313
dttab.cpp data types table C source code
14-
rcdef.exe some values derived from here (incl DTANAME, DTTI
15-
1-91) are compiled into rcdef: if changed,
14+
rcdef.exe some values derived from here (incl DTTI, )
15+
are compiled into rcdef: if changed,
1616
run rcdef to produce dtypes.h, recompile
1717
& link same, run AGAIN for other files.
1818

@@ -94,7 +94,6 @@ VOIDP -- "void *"
9494
DOW -- "short" // day of week, sun=0 in tdpak (1 less than DOWCH)
9595
MONTH -- "short" // month, jan=1 in tdpak
9696

97-
ANAME -- "char[64]" // name string for use in RATs:
9897
IDATE -- "struct {SI year;SI month;SI mday;SI wday;}"
9998
ITIME -- "struct {SI hour;SI min;SI sec;}"
10099
DOY -- "short"
@@ -153,13 +152,8 @@ TOWLOADCASE -- "enum { tldMIN, tldSP, tldMAX }"
153152
// pointer to XFILE structure (xiopak.h), added 1-94 for use in WFILE.
154153
XFILEP -- "XFILE *"
155154
//
156-
// arrays used in WFILE record, 1-94
157-
WFLOC -- "char[32]" // weather file location string (+ \0 + fill byte)
158-
WFLID -- "char[18]" // weather file location id string ( + \0 + fill byte)
159-
160155
WFileFormat -- "enum WFileFormat { UNK=-1,BSGS=1,BSGSdemo,ET1,ET2,CSW,T24DLL,EPW }"
161156
// open wthr file type (comments: wfpak.h)
162-
WFLOC2 -- "char[22]" // "location 2" field in ET1 weather files
163157
YACAMP -- "class YACAM *"
164158
WDYEARP -- "class WDYEAR *"
165159

src/CNFIELDS.DEF

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ DBL DBL LMNONE UNNONE
5656
IDATE IDATE LMNONE UNNONE
5757

5858
//----- Types required re RATs (Record Array Tables):
59-
// string for use in RATs:
60-
ANAME ANAME LMNONE UNNONE
6159
// for reference (subscript) to a RAT or table:
6260
TI TI LMGEZ UNNONE
6361
//
@@ -129,11 +127,7 @@ AHMODE AHMODE LMNONE UNNONE // air handler mode enum 3-92
129127
TOWLOADCASE TOWLOADCASE LMNONE UNNONE // TOWERPLANT load case enum 9-92
130128
COILUSED COILUSED LMNONE UNNONE // AH coil used 12-92
131129

132-
WFLOC WFLOC LMNONE UNNONE // arrays used in WFILE record 1-94
133-
WFLID WFLID LMNONE UNNONE // ..
134-
135130
WFileFormat WFileFormat LMNONE UNNONE // open weather file type (see wfpak.h)
136-
WFLOC2 WFLOC2 LMNONE UNNONE // "location 2" field in E10v1+ weather files
137131
YACAMP YACAMP LMNONE UNNONE
138132
WDYEARP WDYEARP LMNONE UNNONE
139133

src/CNRECS.DEF

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -796,8 +796,8 @@ RECORD WFILE "weatherFile" *RAT // weather file info, one static instance "Wfile
796796
*declare "int wf_IsPacked() const { return wFileFormat==BSGS || wFileFormat==BSGSdemo || wFileFormat==ET1 || wFileFormat==ET2; }"
797797

798798
// Header info: from file hdr decode or computed from hourly
799-
*r WFLOC loc // char loc[] Location (for ET, is loc 1 only: city etc).
800-
*r WFLID lid // char lid[] Location ID
799+
*r CULSTR loc // Location (for ET, is loc 1 only: city etc).
800+
*r CULSTR lid // Location ID
801801
*r SI yr // Year of weather data (00 - 99, -1 if N/A)
802802
*r SI jd1 // Julian day of first weather record (-1 if not known)
803803
*r SI jdl // Julian day of last weather record (ditto)
@@ -811,7 +811,7 @@ RECORD WFILE "weatherFile" *RAT // weather file info, one static instance "Wfile
811811
*f float tMainsMinYr // annual minimum cold water temp, F
812812
*r SI solartime // TRUE if file is in solar time
813813
//additional header items for ET1 file
814-
*r WFLOC2 loc2 // char[] location 2 (state or country, etc)
814+
*r CULSTR loc2 // location 2 (state or country, etc)
815815
*r SI isLeap // non-0 if weather file is for a leap year (Feb 29 counted in dates) -- possible future use
816816
*r SI firstDdm // month 1-12 of first design day in file
817817
*r SI lastDdm // month 1-12 of last design day in file
@@ -832,8 +832,8 @@ RECORD WFILE "weatherFile" *RAT // weather file info, one static instance "Wfile
832832
// *array 12 *r float atmois // monthly aveage atmospheric moisture, for daylight calcs
833833

834834
// TDV file header info
835-
*f WFLOC wf_TDVFileTimeStamp // timestamp string
836-
*f ANAME wf_TDVFileTitle // title string (identifies file CZ, fuel, vintage, )
835+
*f CULSTR wf_TDVFileTimeStamp // timestamp string
836+
*f CULSTR wf_TDVFileTitle // title string (identifies file CZ, fuel, vintage, )
837837

838838
//internal
839839
*r *hide SI hdrBytes // # header bytes before first record (used in wfread for file positioning)
@@ -1939,10 +1939,9 @@ RECORD AUSZ "autoSizing sub" *SUBSTRUCT // AUTOSIZING VARIABLES substructure for
19391939
// *declare "int az_Active() const { return az_active && az_px; }" idea
19401940

19411941
//---setup time members
1942-
*declare "static ANAME az_context;" // context text for verbose screen msgs
1943-
// (use ANAME has handy known-size char[])
1944-
*r BOO az_active // TRUE iff autoSizing this member
1945-
*declare "char az_what[ sizeof(ANAME) + 24];" // ID of this AUSZ (e.g. "AH[ah1] cc")
1942+
*declare "static char az_context[];" // context text for verbose screen msgs
1943+
*r BOO az_active // TRUE iff autoSizing this member
1944+
*declare "char az_what[ 100];" // ID of this AUSZ (e.g. "AH[ah1] cc")
19461945

19471946
//---runtime
19481947
// set at initialization
@@ -4663,8 +4662,8 @@ RECORD DHWHEATER "DHWHeater" *RAT // input / runtime DHW heater
46634662
*i WHTYPECH wh_type; // heater type
46644663
// C_WHTYPECH_STRGSML, _STRGLRG, _INSTSML, _INSTLRG,
46654664
// _INSTUEF, _BUILTUP
4666-
*i ANAME wh_desc; // probe-able description text
4667-
*declare "virtual const char* GetDescription( int /*options*/=0) { return wh_desc; }"
4665+
*i CULSTR wh_desc; // probe-able description text
4666+
*declare "virtual const char* GetDescription( int /*options*/=0) { return wh_desc.CStr(); }"
46684667
*r INT wh_fcn; // function of this DHWHEATER per whfcnXXX enum
46694668
*declare "enum { whfcnUNKNOWN=0, whfcnPRIMARY, whfcnLOOPHEATER, whfcnSUPPLIESCHDHW=0x10, whfcnSUPPLIESLOOP=0x20, whfcnSUPPLIESLOAD=0x40 };"
46704669
*declare "int wh_SetFunction();"
@@ -7457,16 +7456,6 @@ o *h FLOAT tnatv /* Cur hr nat vent stpt, F; Huge if nat vnt not poss*/
74577456
o *h FLOAT tfanv /* Cur hr fan vent stpt, F; Huge if fn vnt not poss */
74587457
#endif
74597458

7460-
//=============================================================================
7461-
#if 0 //ifdef OLDAT // OLD 3-92
7462-
o RECORD AHUX "ahu" *RAT // Air handler: currently dummy source of infinite amount of air at a given temp. 10-11-91.
7463-
o #ifndef BCPP
7464-
o *hide DBN bn // dummy
7465-
o *z ANAME name // for LIKEing etc
7466-
o #endif
7467-
o *h TEMP ahuxTsu // supply temperature (hourly variability)
7468-
o *END // AHUX
7469-
#endif
74707459
//=============================================================================
74717460
#if 0 //ifdef OLDAT // OLD 3-92
74727461
o RECORD TUX "terminal" *RAT // OLD TERMINAL 3-92
@@ -7482,13 +7471,7 @@ o Local heating Local heating (coil, baseboard)
74827471
o Air heating Air heating (air from air handler)
74837472
o Air cooling Air cooling (air from air handler) */
74847473
o
7485-
o #ifndef BCPP
7486-
o *hide DBN bn // dummy
7487-
o *z ANAME name // for LIKEing etc
7488-
o TI ownTi // was zi // ZNI/R rcd subscript of owner zone
7489-
o #else
7490-
o // ownTi (base class) is ZNI/R rcd subscript of owner zone
7491-
o #endif
7474+
o // ownTi (base class) is ZNI/R rcd subscript of owner zone
74927475
o TI tuxNxTu // chain: 0 or ss of next TU in current zone chain
74937476
o TI tuxZhxx1 // chain head: ss of 1st ZHXX belonging to this TU
74947477
o
@@ -7520,12 +7503,8 @@ o // 2. zone natural vent (if present)
75207503
o // 3. (future others?)
75217504
o // No input-only ZHX rat exists.
75227505
o // mbrs set at "RUN" (out of cncult:topCkf); some can vary during simulation
7523-
o #ifndef BCPP
7524-
o *r TI ownTi // was owni // ss of owner -- ZNR/ZNI ss (ty=ZHX_NATVENT) or TU ss (other tys)
7525-
o #else
7526-
o // name is ... unused?
7527-
o // ownTi is TU ss (other tys) or (future) ZNR/ZNI ss (ty=ZHX_NATVENT) (or use sep mbr???)
7528-
o #endif
7506+
o // name is ... unused?
7507+
o // ownTi is TU ss (other tys) or (future) ZNR/ZNI ss (ty=ZHX_NATVENT) (or use sep mbr???)
75297508
o *r TI nxZhxx // chain: 0 or ss of next ZHX for this TU. 0 if ty=ZHX_NATVENT.
75307509
o *r SI tyZhxx // ZHX type: consts in cndefns.h
75317510
o // ZHX_NATVENT zone natural ventilation

0 commit comments

Comments
 (0)