Skip to content

Commit 604fc19

Browse files
committed
Added a bit of debug.
Corrected another date formatter problem.
1 parent 903d0f8 commit 604fc19

File tree

5 files changed

+12
-2
lines changed

5 files changed

+12
-2
lines changed

bin/aix/mqsmfcsv

-74 Bytes
Binary file not shown.

bin/linux/mqsmfcsv

8 Bytes
Binary file not shown.

bin/win/mqsmfcsv.exe

0 Bytes
Binary file not shown.

src/mqsmf.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ int main( int argc, char *argv[] )
188188
printf("Need: short=%d int=%d long=%d long long=%d bytes\n",2,4,4,8);
189189
exit(1);
190190
}
191+
192+
/*printf("Sizeof qwhs = %d\n",sizeof(qwhs));*/
191193

192194
/******************************************************************/
193195
/* Parse command-line parameters */
@@ -463,7 +465,7 @@ int main( int argc, char *argv[] )
463465
strcpy(commonF.stckFormat,convDate(pqwhs->qwhsstck));
464466
if (recordType == 115)
465467
{
466-
if (strncmp(commonF.mqVer,"701",3) > 0)
468+
if (conv16(pqwhs->qwhslen) >= 52)
467469
{
468470
/* This structure changes size on different platforms because */
469471
/* of how the compiler deals with bitfields. So have to do it */
@@ -483,7 +485,13 @@ int main( int argc, char *argv[] )
483485
}
484486
}
485487
else
488+
{
486489
sectionCount = 0;
490+
pqwhs = NULL;
491+
}
492+
493+
if (debugLevel >=3 && pqwhs != NULL)
494+
printf("Section count %d for %4.4s, qwhslen=%d\n",sectionCount,commonF.qMgr,conv16(pqwhs->qwhslen));
487495

488496
/*********************************************************************/
489497
/* One we know how many sections there are, copy the triplet values */

src/smfDate.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ void calcYMD(int year,int dayOfYear,int *mon,int *day)
144144
isLeapYear = TRUE;
145145

146146
if (isLeapYear)
147-
days[1]++; /* Update Feb*/
147+
days[1] = 29; /* Update Feb*/
148+
else
149+
days[1] = 28;
148150

149151
for (i=0;i<12;i++)
150152
{

0 commit comments

Comments
 (0)