Skip to content

Commit

Permalink
introduce typedefs where applicable (MDSplus#1500)
Browse files Browse the repository at this point in the history
* Fix: use TdiREF_CAT for decompile and tighten digits of integers (4,6,11,20,40)

* Fix: fix TreeDoMethod SIGSEGV on tdi devices due to image==NULL

* Fix: clobbered stat1 in TdiIntrinsic

* Fix: code more of _TreeAddConglom in c; no need for DevAddDevice.fun

* Fix: sigsegv in TdiExtPython if no python lib

* Fix: try tdi alternative if loading python version failed

* Fix: DESCRIPTOR_FROM_CSTRING() should be terminated by ;

* Fix: tdi device do method

* Fix: missing free in joerger_cg__add

* Fix: refactor dsdescrip.h without changing too much, yet

* Fix: use bound_t to determine size of one bounds element

* Fix: use DESCRIPTOR_FUNCTION_0 to define value in mitdevices/l821x.c

* Fix: introduced usage_t

* Fix: use typedef in mds_dsc_string.c

* Fix: use lexdef.h and introduce lex_t

* Fix: tdiyytoktype to YYDEBUG
  • Loading branch information
zack-vii authored and tfredian committed Jan 14, 2019
1 parent f446edc commit 0d95b94
Show file tree
Hide file tree
Showing 34 changed files with 1,401 additions and 1,495 deletions.
2 changes: 2 additions & 0 deletions deploy/packaging/debian/devel.noarch
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
./usr/local/mdsplus/include/camdef.h
./usr/local/mdsplus/include/camshr.h
./usr/local/mdsplus/include/camshr_messages.h
./usr/local/mdsplus/include/classdef.h
./usr/local/mdsplus/include/dbidef.h
./usr/local/mdsplus/include/dcl.h
./usr/local/mdsplus/include/dtypedef.h
./usr/local/mdsplus/include/int128.h
./usr/local/mdsplus/include/ipdesc.h
./usr/local/mdsplus/include/libroutines.h
Expand Down
2 changes: 2 additions & 0 deletions deploy/packaging/redhat/devel.noarch
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
./usr/local/mdsplus/include/camdef.h
./usr/local/mdsplus/include/camshr.h
./usr/local/mdsplus/include/camshr_messages.h
./usr/local/mdsplus/include/classdef.h
./usr/local/mdsplus/include/dbidef.h
./usr/local/mdsplus/include/dcl.h
./usr/local/mdsplus/include/dtypedef.h
./usr/local/mdsplus/include/int128.h
./usr/local/mdsplus/include/ipdesc.h
./usr/local/mdsplus/include/libroutines.h
Expand Down
30 changes: 30 additions & 0 deletions include/classdef.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Codes for dsc$b_class:
*
* Reserved descriptor class codes:
* codes 15-191 are reserved to DIGITAL;
* codes 160-191 are reserved to DIGITAL facilities for facility-specific purposes;
* codes 192-255 are reserved for DIGITAL's Computer Special Systems Group
* and for customers for their own use.
*/
DEFINE(S , 1) /* fixed-length descriptor */
DEFINE(D , 2) /* dynamic string descriptor */
DEFINE(V , 3) /* variable buffer descriptor; reserved for use by DIGITAL */
DEFINE(A , 4) /* array descriptor */
DEFINE(P , 5) /* procedure descriptor */
DEFINE(PI , 6) /* procedure incarnation descriptor; obsolete */
DEFINE(J , 7) /* label descriptor; reserved for use by the VMS Debugger */
DEFINE(JI , 8) /* label incarnation descriptor; obsolete */
DEFINE(SD , 9) /* decimal string descriptor */
DEFINE(NCA , 10) /* noncontiguous array descriptor */
DEFINE(VS , 11) /* varying string descriptor */
DEFINE(VSA , 12) /* varying string array descriptor */
DEFINE(UBS , 13) /* unaligned bit string descriptor */
DEFINE(UBA , 14) /* unaligned bit array descriptor */
DEFINE(SB , 15) /* string with bounds descriptor */
DEFINE(UBSB , 16) /* unaligned bit string with bounds descriptor */
DEFINE(XD ,192)
DEFINE(XS ,193)
DEFINE(R ,194)
DEFINE(CA ,195)
DEFINE(APD ,196)
89 changes: 89 additions & 0 deletions include/dtypedef.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/* the dtypes
*
* Reserved data type codes:
* codes 38-191 are reserved to DIGITAL;
* codes 160-191 are reserved to DIGITAL facilities for facility-specific purposes;
* codes 192-255 are reserved for DIGITAL's Computer Special Systems Group
* and for customers for their own use.
*/
DEFINE(MISSING ,0)
DEFINE(BU ,2) /* byte (unsigned); 8-bit unsigned quantity */
DEFINE(WU ,3) /* word (unsigned); 16-bit unsigned quantity */
DEFINE(LU ,4) /* longword (unsigned); 32-bit unsigned quantity */
DEFINE(QU ,5) /* quadword (unsigned); 64-bit unsigned quantity */
DEFINE(OU ,25) /* octaword (unsigned); 128-bit unsigned quantity */
DEFINE(B ,6) /* byte integer (signed); 8-bit signed 2's-complement integer */
DEFINE(W ,7) /* word integer (signed); 16-bit signed 2's-complement integer */
DEFINE(L ,8) /* longword integer (signed); 32-bit signed 2's-complement integer */
DEFINE(Q ,9) /* quadword integer (signed); 64-bit signed 2's-complement integer */
DEFINE(O ,26) /* octaword integer (signed); 128-bit signed 2's-complement integer */
DEFINE(F ,10) /* F_floating; 32-bit single-precision floating point */
DEFINE(D ,11) /* D_floating; 64-bit double-precision floating point */
DEFINE(G ,27) /* G_floating; 64-bit double-precision floating point */
DEFINE(H ,28) /* H_floating; 128-bit quadruple-precision floating point */
DEFINE(FC ,12) /* F_floating complex */
DEFINE(DC ,13) /* D_floating complex */
DEFINE(GC ,29) /* G_floating complex */
DEFINE(HC ,30) /* H_floating complex */
DEFINE(CIT ,31) /* COBOL Intermediate Temporary */
/*
* String data types:
*/
DEFINE(T ,14) /* character string; a single 8-bit character or a sequence of characters */
DEFINE(VT ,37) /* varying character string; 16-bit count) followed by a string */
DEFINE(NU ,15) /* numeric string) unsigned */
DEFINE(NL ,16) /* numeric string) left separate sign */
DEFINE(NLO ,17) /* numeric string) left overpunched sign */
DEFINE(NR ,18) /* numeric string) right separate sign */
DEFINE(NRO ,19) /* numeric string) right overpunched sign */
DEFINE(NZ ,20) /* numeric string) zoned sign */
DEFINE(P ,21) /* packed decimal string */
DEFINE(V ,1) /* aligned bit string */
DEFINE(VU ,34) /* unaligned bit string */
/*
* IEEE data types:
*/
DEFINE(FS ,52) /* IEEE float basic single S */
DEFINE(FT ,53) /* IEEE float basic double T */
DEFINE(FSC ,54) /* IEEE float basic single S complex */
DEFINE(FTC ,55) /* IEEE float basic double T complex */
/*
* Miscellaneous data types:
*/
DEFINE(ZI ,22) /* sequence of instructions */
DEFINE(ZEM ,23) /* procedure entry mask */
DEFINE(DSC ,24) /* descriptor */
DEFINE(BPV ,32) /* bound procedure value */
DEFINE(BLV ,33) /* bound label value */
DEFINE(ADT ,35) /* absolute date and time */
DEFINE(POINTER ,51)
/*
* class R
*/
DEFINE(LIST ,214)
DEFINE(TUPLE ,215)
DEFINE(DICTIONARY ,216)
DEFINE(IDENT ,191)
DEFINE(NID ,192)
DEFINE(PATH ,193)
DEFINE(PARAM ,194)
DEFINE(SIGNAL ,195)
DEFINE(DIMENSION ,196)
DEFINE(WINDOW ,197)
DEFINE(SLOPE ,198) /* Do not use this deprecated type */
DEFINE(FUNCTION ,199)
DEFINE(CONGLOM ,200)
DEFINE(RANGE ,201)
DEFINE(ACTION ,202)
DEFINE(DISPATCH ,203)
DEFINE(PROGRAM ,204)
DEFINE(ROUTINE ,205)
DEFINE(PROCEDURE ,206)
DEFINE(METHOD ,207)
DEFINE(DEPENDENCY ,208)
DEFINE(CONDITION ,209)
DEFINE(EVENT ,210)
DEFINE(WITH_UNITS ,211)
DEFINE(CALL ,212)
DEFINE(WITH_ERROR ,213)
DEFINE(OPAQUE ,217)
3 changes: 0 additions & 3 deletions include/ipdesc.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ typedef int SOCKET;
#define DTYPE_COMPLEX_DOUBLE 13
#define DTYPE_CSTRING 14
#define DTYPE_EVENT_NOTIFY 99
#ifndef DTYPE_EVENT
#define DTYPE_EVENT DTYPE_EVENT_NOTIFY
#endif
#define DTYPE_SERIAL 24

struct descrip {
Expand Down
Loading

0 comments on commit 0d95b94

Please sign in to comment.