Skip to content

Commit ea6c6c4

Browse files
committed
Support for new 903 fields
1 parent 694805c commit ea6c6c4

File tree

13 files changed

+29
-12
lines changed

13 files changed

+29
-12
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ February 2017
6262
* STCK durations printed as just microseconds value when in SQL mode. Still
6363
split as seconds/microseconds otherwise.
6464

65+
May 2017
66+
* Added support for the 903 SMF extensions
67+
* Using a VERS flag during the build to select correct base header file
68+
and features
69+
6570

6671
Pull requests
6772
=============

bin/aix/convH

0 Bytes
Binary file not shown.

bin/aix/mqsmfcsv

1.6 KB
Binary file not shown.

bin/linux/convH

2.83 KB
Binary file not shown.

bin/linux/mqsmfcsv

0 Bytes
Binary file not shown.

bin/win/mqsmfcsv.exe

75.8 KB
Binary file not shown.

mqsmfcsv.doc

0 Bytes
Binary file not shown.

src/M

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ else
1313
targdir="../bin/linux"
1414
fi
1515

16-
export PLATFLAGS=$flags CC=$cc
16+
export PLATFLAGS=$flags CC=$cc VERS=903
1717
make -e -f Makefile.unix $*
1818

1919
rm -f $targdir/convH $targdir/mqsmfcsv

src/Makefile.gcc.win

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
CC=i686-w64-mingw32-gcc
33
CFLAGS= -I. -m32
44
PLATFLAGS=
5+
VERS=903
56
SRC = mqsmf.c \
67
smfDDL.c \
78
smfDate.c \
@@ -36,15 +37,15 @@ HDR = mqsmfstruc.h \
3637
mqsmf.h
3738

3839
mqsmfcsv.exe: $(SRC) $(HDR) Makefile.gcc.win dummy
39-
$(CC) $(PLATFLAGS) -o $@ $(SRC) $(CFLAGS)
40+
$(CC) $(PLATFLAGS) -o $@ $(SRC) $(CFLAGS) -DCSQDSMF_VERSION=$(VERS)
4041
-rm -f out/*
4142
-rm -f SMF-*
4243
-mkdir out >/dev/null 2>&1 || true
4344
cp $@ ../bin/win
4445
# dbx ./$@
4546

46-
mqsmfstruc.h: csqdsmfc.h convH.exe
47-
./convH.exe < csqdsmfc.h > $@
47+
mqsmfstruc.h: csqdsmfc-$(VERS).h convH.exe dummy
48+
./convH.exe < csqdsmfc-$(VERS).h > $@
4849

4950
convH.exe: convH.c
5051
$(CC) -o $@ convH.c

src/Makefile.unix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ HDR = mqsmfstruc.h \
3636
mqsmf.h
3737

3838
mqsmfcsv: $(SRC) $(HDR) Makefile.unix dummy
39-
$(CC) $(PLATFLAGS) -o $@ $(SRC) $(CFLAGS)
39+
$(CC) $(PLATFLAGS) -o $@ $(SRC) $(CFLAGS) -DCSQDSMF_VERSION=$(VERS)
4040

41-
mqsmfstruc.h: csqdsmfc.h convH
42-
convH < csqdsmfc.h > $@
41+
mqsmfstruc.h: csqdsmfc-$(VERS).h convH dummy
42+
convH < csqdsmfc-$(VERS).h > $@
4343

44-
convH: convH.c
44+
convH: convH.c dummy
4545
$(CC) -o $@ convH.c
4646

4747

src/Makefile.win

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
CFLAGS=-nologo /D_CRT_SECURE_NO_WARNINGS /Zp1 /J
2+
VERS=903
23
SRC = mqsmf.c \
34
smfDDL.c \
45
smfDate.c \
@@ -34,12 +35,12 @@ HDR = mqsmfstruc.h \
3435

3536
mqsmfcsv.exe: $(SRC) $(HDR) Makefile.win
3637
rm -f $@
37-
$(CC) $(SRC) -I. /Fe$@ $(CFLAGS)
38+
$(CC) $(SRC) -I. /Fe$@ $(CFLAGS) -DCSQDSMF_VERSION=$(VERS)
3839
del /q *.obj
3940
copy $@ ..\bin\win
4041

41-
mqsmfstruc.h: csqdsmfc.h convH
42-
convH < csqdsmfc.h > $@
42+
mqsmfstruc.h: csqdsmfc-$(VERS).h convH dummy
43+
convH < csqdsmfc-$(VERS).h > $@
4344

4445
convH: convH.c
4546
$(CC) /Fe$@ convH.c

src/printQMST.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ void printQMST(qmst *p)
3838
ADDS32("Status",p->qmststus);
3939
ADDS32("Pubs" ,p->qmstpubs);
4040
}
41+
#if CSQDSMF_VERSION >= 903
42+
if (conv16(p->qmstll) > offsetof(qmst, qmstspp))/* Fields added for V7.0.3 */
43+
{
44+
ADDS64("PersPuts", p->qmstspp); /* Number of success pers puts */
45+
ADDS64("NonPersPuts", p->qmstsnp); /* Number of success pers puts */
46+
ADDS64("PersPutBytes", p->qmstpbp); /* Number of success pers puts */
47+
ADDS64("NonPersPutBytes", p->qmstnbp); /* Number of success pers puts */
48+
}
49+
#endif
50+
4151
SMFPRINTSTOP;
4252

4353
return;

src/smfDDL.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <stdio.h>
1414
#include <string.h>
1515
#include <ctype.h>
16-
#include <mqsmf.h>
16+
#include "mqsmf.h"
1717

1818
static FILE *fp = NULL;
1919
char *comma = "";

0 commit comments

Comments
 (0)