Skip to content

Commit 80e57f2

Browse files
committed
Apply brlcad patches through r54980
1 parent 4a13f33 commit 80e57f2

9 files changed

Lines changed: 29 additions & 92 deletions

File tree

cmake/Generated_Source_Utils.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
macro(MD5 filename md5sum)
44
file(READ "${filename}" RAW_MD5_FILE)
5-
string(REGEX REPLACE "\r?\n" "" STRIPPED_MD5_FILE "${RAW_MD5_FILE}")
5+
string(REGEX REPLACE "\\\\r" "" STRIPPED_MD5_FILE "${RAW_MD5_FILE}")
66
file(WRITE ${CMAKE_BINARY_DIR}/CMakeTmp/md5_file "${STRIPPED_MD5_FILE}")
77
execute_process(COMMAND ${CMAKE_COMMAND} -E md5sum ${CMAKE_BINARY_DIR}/CMakeTmp/md5_file OUTPUT_VARIABLE md5string)
88
file(REMOVE ${CMAKE_BINARY_DIR}/CMakeTmp/md5_file)

src/clstepcore/STEPaggregate.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ class SingleLinkNode;
3232

3333
typedef STEPaggregate * STEPaggregateH;
3434
typedef STEPaggregate * STEPaggregate_ptr;
35-
typedef const STEPaggregate * const_STEPaggregateH;
36-
typedef const STEPaggregate * const_STEPaggregate_ptr;
3735
typedef STEPaggregate_ptr STEPaggregate_var;
3836

3937
class SCL_CORE_EXPORT STEPaggregate : public SingleLinkList {
@@ -101,8 +99,6 @@ class SCL_CORE_EXPORT GenericAggregate : public STEPaggregate {
10199
};
102100
typedef GenericAggregate * GenericAggregateH;
103101
typedef GenericAggregate * GenericAggregate_ptr;
104-
typedef const GenericAggregate * const_GenericAggregateH;
105-
typedef const GenericAggregate * const_GenericAggregate_ptr;
106102
typedef GenericAggregate_ptr GenericAggregate_var;
107103

108104
/******************************************************************************
@@ -125,8 +121,6 @@ class SCL_CORE_EXPORT EntityAggregate : public STEPaggregate {
125121
};
126122
typedef EntityAggregate * EntityAggregateH;
127123
typedef EntityAggregate * EntityAggregate_ptr;
128-
typedef const EntityAggregate * const_EntityAggregateH;
129-
typedef const EntityAggregate * const_EntityAggregate_ptr;
130124
typedef EntityAggregate_ptr EntityAggregate_var;
131125

132126
/****************************************************************//**
@@ -149,8 +143,6 @@ class SCL_CORE_EXPORT SelectAggregate : public STEPaggregate {
149143
};
150144
typedef SelectAggregate * SelectAggregateH;
151145
typedef SelectAggregate * SelectAggregate_ptr;
152-
typedef const SelectAggregate * const_SelectAggregateH;
153-
typedef const SelectAggregate * const_SelectAggregate_ptr;
154146
typedef SelectAggregate_ptr SelectAggregate_var;
155147

156148
/****************************************************************//**
@@ -167,8 +159,6 @@ class SCL_CORE_EXPORT StringAggregate : public STEPaggregate {
167159
};
168160
typedef StringAggregate * StringAggregateH;
169161
typedef StringAggregate * StringAggregate_ptr;
170-
typedef const StringAggregate * const_StringAggregateH;
171-
typedef const StringAggregate * const_StringAggregate_ptr;
172162
typedef StringAggregate_ptr StringAggregate_var;
173163

174164

@@ -186,8 +176,6 @@ class SCL_CORE_EXPORT BinaryAggregate : public STEPaggregate {
186176
};
187177
typedef BinaryAggregate * BinaryAggregateH;
188178
typedef BinaryAggregate * BinaryAggregate_ptr;
189-
typedef const BinaryAggregate * const_BinaryAggregateH;
190-
typedef const BinaryAggregate * const_BinaryAggregate_ptr;
191179
typedef BinaryAggregate_ptr BinaryAggregate_var;
192180

193181
/**************************************************************//**
@@ -204,8 +192,6 @@ class SCL_CORE_EXPORT EnumAggregate : public STEPaggregate {
204192
};
205193
typedef EnumAggregate * EnumAggregateH;
206194
typedef EnumAggregate * EnumAggregate_ptr;
207-
typedef const EnumAggregate * const_EnumAggregateH;
208-
typedef const EnumAggregate * const_EnumAggregate_ptr;
209195
typedef EnumAggregate_ptr EnumAggregate_var;
210196

211197
class SCL_CORE_EXPORT LOGICALS : public EnumAggregate {
@@ -217,8 +203,6 @@ class SCL_CORE_EXPORT LOGICALS : public EnumAggregate {
217203
};
218204
typedef LOGICALS * LogicalsH;
219205
typedef LOGICALS * LOGICALS_ptr;
220-
typedef const LOGICALS * const_LogicalsH;
221-
typedef const LOGICALS * const_LOGICALS_ptr;
222206
typedef LOGICALS_ptr LOGICALS_var;
223207
SCL_CORE_EXPORT LOGICALS * create_LOGICALS();
224208

@@ -232,7 +216,6 @@ class SCL_CORE_EXPORT BOOLEANS : public EnumAggregate {
232216
};
233217

234218
typedef BOOLEANS * BOOLEANS_ptr;
235-
typedef const BOOLEANS * const_BOOLEANS_ptr;
236219
typedef BOOLEANS_ptr BOOLEANS_var;
237220

238221
SCL_CORE_EXPORT BOOLEANS * create_BOOLEANS();
@@ -248,8 +231,6 @@ class SCL_CORE_EXPORT RealAggregate : public STEPaggregate {
248231
};
249232
typedef RealAggregate * RealAggregateH;
250233
typedef RealAggregate * RealAggregate_ptr;
251-
typedef const RealAggregate * const_RealAggregateH;
252-
typedef const RealAggregate * const_RealAggregate_ptr;
253234
typedef RealAggregate_ptr RealAggregate_var;
254235

255236
class SCL_CORE_EXPORT IntAggregate : public STEPaggregate {
@@ -263,8 +244,6 @@ class SCL_CORE_EXPORT IntAggregate : public STEPaggregate {
263244
};
264245
typedef IntAggregate * IntAggregateH;
265246
typedef IntAggregate * IntAggregate_ptr;
266-
typedef const IntAggregate * const_IntAggregateH;
267-
typedef const IntAggregate * const_IntAggregate_ptr;
268247
typedef IntAggregate_ptr IntAggregate_var;
269248

270249
///////////////////////////////////////////////////////////////////////////////
@@ -299,7 +278,6 @@ class SCL_CORE_EXPORT STEPnode : public SingleLinkNode {
299278
** This class is for the Nodes of GenericAggregates
300279
******************************************************************/
301280
typedef STEPnode * STEPnodeH;
302-
typedef const STEPnode * const_STEPnodeH;
303281
class SCL_CORE_EXPORT GenericAggrNode : public STEPnode {
304282
public:
305283
SCLundefined value;

src/express/expparse.y

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2466,7 +2466,7 @@ while_control(A) ::= TOK_WHILE expression(B).
24662466
fprintf(stderr, "Last token (type %d) had value %x\n", yymajor, yyminor.yy0.val);
24672467
}
24682468

2469-
%stack_size 200
2469+
%stack_size 0
24702470

24712471
%stack_overflow {
24722472
fprintf(stderr, "Express parser experienced stack overflow.\n");

src/express/generated/expparse.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ typedef union {
291291
Statement yy522;
292292
} YYMINORTYPE;
293293
#ifndef YYSTACKDEPTH
294-
#define YYSTACKDEPTH 200
294+
#define YYSTACKDEPTH 0
295295
#endif
296296
#define ParseARG_SDECL parse_data_t parseData ;
297297
#define ParseARG_PDECL , parse_data_t parseData
@@ -1582,7 +1582,7 @@ static void yyGrowStack(yyParser *p){
15821582
int newSize;
15831583
yyStackEntry *pNew;
15841584

1585-
newSize = p->yystksz*2 + 100;
1585+
newSize = p->yystksz*2 + 256;
15861586
pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
15871587
if( pNew ){
15881588
p->yystack = pNew;

src/express/generated/verification_info.cmake

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
set(baseline_lemon_version "1.0")
33
set(baseline_re2c_version "001305")
44
set(baseline_perplex_version "1.0.0")
5-
set(baseline_lempar_c_md5 be967611b8e05f74bddd7f2214e2bbb0)
6-
set(baseline_perplex_template_c_md5 a01d5673b979cc6b5740812e1a65df86)
7-
set(baseline_expscan_l_md5 1dd32f5ae123f358c9a27759f25d519b)
8-
set(baseline_expparse_y_md5 bcabaab46e304f762c8a94e02150a29c)
9-
set(baseline_expscan_c_md5 dbe513399f365f4323acb03fd476ddf4)
10-
set(baseline_expscan_h_md5 57d55bbf95d84846e735e307f7032bcd)
11-
set(baseline_expparse_c_md5 d226e4990b59879bb5c32f39a2e9751f)
12-
set(baseline_expparse_h_md5 3760ebbc81cef310ca47796d55edc3d5)
5+
set(baseline_lempar_c_md5 60741b9dd886b77a5732a2e85d6d56b0)
6+
set(baseline_perplex_template_c_md5 7db377251a8c99c835f06df129d95bed)
7+
set(baseline_expscan_l_md5 617531ffdf3ee747cd5980f3c3a9a4bd)
8+
set(baseline_expparse_y_md5 fff6d997e22e1783e08b6ac5468014e9)
9+
set(baseline_expscan_c_md5 980080ce3ee1366a28f2ecfabbe65a3f)
10+
set(baseline_expscan_h_md5 3052c058a37045b43f96e4c04039bce3)
11+
set(baseline_expparse_c_md5 a0491600e9c6edb331fa2e45f3e516ff)
12+
set(baseline_expparse_h_md5 e4a5599839b2a9f7a6915a0dcc7747b0)

src/fedex_plus/classes.c

Lines changed: 10 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -602,19 +602,6 @@ char * TYPEget_express_type( const Type t ) {
602602

603603
}
604604

605-
int isReferenceType( Class_Of_Type class ) {
606-
if( ( class == string_ ) ||
607-
( class == logical_ ) ||
608-
( class == boolean_ ) ||
609-
( class == real_ ) ||
610-
( class == integer_ ) ||
611-
( class == enumeration_ ) ) {
612-
return 0;
613-
}
614-
615-
return 1;
616-
}
617-
618605
/**************************************************************//**
619606
** Procedure: ATTRsign_access_method
620607
** Parameters: const Variable a -- attribute to print
@@ -631,23 +618,14 @@ int isReferenceType( Class_Of_Type class ) {
631618
void ATTRsign_access_methods( Variable a, FILE * file ) {
632619

633620
Type t = VARget_type( a );
634-
Class_Of_Type class;
635621
char ctype [BUFSIZ];
636622
char attrnm [BUFSIZ];
637623

638624
generate_attribute_func_name( a, attrnm );
639625

640-
class = TYPEget_type( t );
641-
642626
strncpy( ctype, AccessType( t ), BUFSIZ );
643-
644-
if( isReferenceType( class ) ) {
645-
fprintf( file, " const_%s %s() const;\n", ctype, attrnm );
646-
} else {
647-
fprintf( file, " %s %s() const;\n", ctype, attrnm );
648-
}
627+
fprintf( file, " %s %s() const;\n", ctype, attrnm );
649628
fprintf( file, " void %s (const %s x);\n\n", attrnm, ctype );
650-
651629
return;
652630
}
653631

@@ -670,20 +648,15 @@ void ATTRsign_access_methods( Variable a, FILE * file ) {
670648
void ATTRprint_access_methods_get_head( const char * classnm, Variable a,
671649
FILE * file ) {
672650
Type t = VARget_type( a );
673-
Class_Of_Type class = TYPEget_type( t );
674651
char ctype [BUFSIZ]; /* return type of the get function */
675652
char funcnm [BUFSIZ]; /* name of member function */
676653

677654
generate_attribute_func_name( a, funcnm );
678655

679-
strncpy( ctype, AccessType( t ), BUFSIZ );
680-
681-
if( isReferenceType( class ) ) {
682-
fprintf( file, "\nconst_%s %s::%s() const ", ctype, classnm, funcnm );
683-
} else {
684-
fprintf( file, "\n%s %s::%s() const ", ctype, classnm, funcnm );
685-
}
656+
/* ///////////////////////////////////////////////// */
686657

658+
strncpy( ctype, AccessType( t ), BUFSIZ );
659+
fprintf( file, "\n%s %s::%s( ) const ", ctype, classnm, funcnm );
687660
return;
688661
}
689662

@@ -1553,7 +1526,9 @@ void LIBstructor_print( Entity entity, FILE * file, Schema schema ) {
15531526
list = ENTITYget_supertypes( entity );
15541527
if( ! LISTempty( list ) ) {
15551528
if( LISTget_length( list ) > 1) {
1529+
fprintf( file, "#if 1\n" );
15561530
fprintf( file, " int attrFlags[3];\n" );
1531+
fprintf( file, "#endif\n" );
15571532
}
15581533

15591534
LISTdo( list, e, Entity )
@@ -1772,7 +1747,9 @@ void LIBstructor_print_w_args( Entity entity, FILE * file, Schema schema ) {
17721747
list = ENTITYget_supertypes( entity );
17731748
if( ! LISTempty( list ) ) {
17741749
if( LISTget_length( list ) > 1) {
1750+
fprintf( file, "#if 0\n" );
17751751
fprintf( file, " int attrFlags[3];\n" );
1752+
fprintf( file, "#endif\n" );
17761753
}
17771754

17781755
LISTdo( list, e, Entity )
@@ -2622,8 +2599,6 @@ void ENTITYprint_new( Entity entity, FILES * files, Schema schema, int externMap
26222599
fprintf( files->classes, "typedef %s * %sH;\n", n, n );
26232600
fprintf( files->classes, "typedef %s * %s_ptr;\n", n, n );
26242601
fprintf( files->classes, "typedef %s_ptr %s_var;\n", n, n );
2625-
fprintf( files->classes, "typedef const %s * const_%sH;\n", n, n );
2626-
fprintf( files->classes, "typedef const %s * const_%s_ptr;\n", n, n );
26272602
fprintf( files->classes, "#define %s__set SDAI_DAObject__set\n", n );
26282603
fprintf( files->classes, "#define %s__set_var SDAI_DAObject__set_var\n", n );
26292604
}
@@ -2751,7 +2726,6 @@ void TYPEenum_inc_print( const Type type, FILE * inc ) {
27512726
fprintf( inc, "};\n" );
27522727

27532728
fprintf( inc, "\ntypedef %s * %s_ptr;\n", n, n );
2754-
fprintf( inc, "\ntypedef const %s * const_%s_ptr;\n", n, n );
27552729

27562730

27572731
/* Print ObjectStore Access Hook function */
@@ -2775,7 +2749,6 @@ void TYPEenum_inc_print( const Type type, FILE * inc ) {
27752749
fprintf( inc, "};\n" );
27762750

27772751
fprintf( inc, "\ntypedef %s_agg * %s_agg_ptr;\n", n, n );
2778-
fprintf( inc, "\ntypedef const %s_agg * const_%s_agg_ptr;\n", n, n );
27792752

27802753
/* DAS brandnew below */
27812754

@@ -3064,12 +3037,8 @@ void TYPEprint_typedefs( Type t, FILE * classes ) {
30643037
strncpy( nm, SelectName( TYPEget_name( t ) ), BUFSIZ );
30653038
fprintf( classes, "class %s;\n", nm );
30663039
fprintf( classes, "typedef %s * %s_ptr;\n", nm, nm );
3067-
fprintf( classes, "typedef const %s * const_%s_ptr;\n", nm, nm );
30683040
fprintf( classes, "class %s_agg;\n", nm );
30693041
fprintf( classes, "typedef %s_agg * %s_agg_ptr;\n", nm, nm );
3070-
fprintf( classes, "typedef const %s_agg * const_%s_agg_ptr;\n", nm, nm );
3071-
fprintf( classes, "typedef class %s_agg * class_%s_agg_ptr;\n", nm, nm );
3072-
fprintf( classes, "typedef const class %s_agg * const_class_%s_agg_ptr;\n", nm, nm );
30733042
}
30743043
} else {
30753044
if( TYPEis_aggregate( t ) ) {
@@ -3091,10 +3060,8 @@ void TYPEprint_typedefs( Type t, FILE * classes ) {
30913060
strncpy( nm, ClassName( TYPEget_name( t ) ), BUFSIZ );
30923061
fprintf( classes, "typedef %s %s;\n", TYPEget_ctype( t ), nm );
30933062
if( TYPEis_aggregate( t ) ) {
3094-
fprintf( classes, "typedef %s * %sH;\n", nm, nm );
3095-
fprintf( classes, "typedef const %s * const_%sH;\n", nm, nm );
3096-
fprintf( classes, "typedef %s * %s_ptr;\n", nm, nm );
3097-
fprintf( classes, "typedef const %s * const_%s_ptr;\n", nm, nm );
3063+
fprintf( classes, "typedef %s * %sH;\n", nm, nm );
3064+
fprintf( classes, "typedef %s * %s_ptr;\n", nm, nm );
30983065
fprintf( classes, "typedef %s_ptr %s_var;\n", nm, nm );
30993066
}
31003067
}
@@ -3279,7 +3246,6 @@ void TYPEprint_descriptions( const Type type, FILES * files, Schema schema ) {
32793246
printEnumCreateHdr( files->inc, type );
32803247
printEnumCreateBody( files->lib, type );
32813248
fprintf( files->inc, "typedef %s_agg * %s_agg_ptr;\n", nm, nm );
3282-
fprintf( files->inc, "typedef const %s_agg * const_%s_agg_ptr;\n", nm, nm );
32833249
printEnumAggrCrHdr( files->inc, type );
32843250
printEnumAggrCrBody( files->lib, type );
32853251
return;

src/fedex_plus/classes_wrapper.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,7 @@ void SCOPEPrint( Scope scope, FILES * files, Schema schema, Express model,
302302

303303
fprintf( files->inc, "\n};\n" );
304304

305-
fprintf( files->inc, "\n\ntypedef SdaiModel_contents_%s * SdaiModel_contents_%s_ptr;\n", SCHEMAget_name( schema ), SCHEMAget_name( schema ) );
306-
fprintf( files->inc, "\n\ntypedef const SdaiModel_contents_%s * const_SdaiModel_contents_%s_ptr;\n", SCHEMAget_name( schema ), SCHEMAget_name( schema ) );
305+
fprintf( files->inc, "\n\ntypedef SdaiModel_contents_%s * SdaiModel_contents_%s_ptr;\n", SCHEMAget_name( schema ), SCHEMAget_name( schema ) );
307306
fprintf( files->inc, "typedef SdaiModel_contents_%s_ptr SdaiModel_contents_%s_var;\n", SCHEMAget_name( schema ), SCHEMAget_name( schema ) );
308307

309308
fprintf( files -> inc,

src/fedex_plus/multpass.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -632,11 +632,9 @@ static void addRenameTypedefs( Schema schema, FILE * classes )
632632
strncpy( nm, SelectName( TYPEget_name( t ) ), BUFSIZ - 1 );
633633
strncpy( basenm, SelectName( TYPEget_name( i ) ), BUFSIZ - 1 );
634634
fprintf( classes, "typedef %s %s;\n", basenm, nm );
635-
fprintf( classes, "typedef %s * %s_ptr;\n", nm, nm );
636-
fprintf( classes, "typedef const %s * const_%s_ptr;\n", nm, nm );
635+
fprintf( classes, "typedef %s * %s_ptr;\n", nm, nm );
637636
fprintf( classes, "typedef %s_agg %s_agg;\n", basenm, nm );
638-
fprintf( classes, "typedef %s_agg * %s_agg_ptr;\n", nm, nm );
639-
fprintf( classes, "typedef const %s_agg * const_%s_agg_ptr;\n", nm, nm );
637+
fprintf( classes, "typedef %s_agg * %s_agg_ptr;\n", nm, nm );
640638
}
641639
}
642640
SCOPEod
@@ -672,10 +670,8 @@ static void addAggrTypedefs( Schema schema, FILE * classes )
672670
strncpy( nm, ClassName( TYPEget_name( t ) ), BUFSIZ );
673671
fprintf( classes, "typedef %s %s;\n",
674672
TYPEget_ctype( t ), nm );
675-
fprintf( classes, "typedef %s * %sH;\n", nm, nm );
676-
fprintf( classes, "typedef const %s * const_%sH;\n", nm, nm );
677-
fprintf( classes, "typedef %s * %s_ptr;\n", nm, nm );
678-
fprintf( classes, "typedef const %s * const_%s_ptr;\n", nm, nm );
673+
fprintf( classes, "typedef %s * %sH;\n", nm, nm );
674+
fprintf( classes, "typedef %s * %s_ptr;\n", nm, nm );
679675
}
680676
}
681677
SCOPEod

src/fedex_plus/selects.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -761,8 +761,7 @@ TYPEselect_inc_print( const Type type, FILE * f ) {
761761
fprintf( f, "\ninline SDAI_Select * create_%s () { return new %s; }\n", n, n );
762762

763763
/* DAR - moved from SCOPEPrint() */
764-
fprintf( f, "typedef %s * %sH;\n", n, n );
765-
fprintf( f, "typedef const %s * const_%sH;\n", n, n );
764+
fprintf( f, "typedef %s * %sH;\n", n, n );
766765
fprintf( f, "typedef %s_ptr %s_var;\n\n", n, n );
767766

768767
/* print things for aggregate class */
@@ -1999,8 +1998,7 @@ TYPEselect_print( Type t, FILES * files, Schema schema ) {
19991998
}
20001999
strncpy( nm, SelectName( TYPEget_name( t ) ), BUFSIZ );
20012000
strncpy( tdnm, TYPEtd_name( t ), BUFSIZ );
2002-
fprintf( inc, "typedef %s * %sH;\n", nm, nm );
2003-
fprintf( inc, "typedef const %s * const_%sH;\n", nm, nm );
2001+
fprintf( inc, "typedef %s * %sH;\n", nm, nm );
20042002
fprintf( inc, "typedef %s_ptr * %s_var;\n", nm, nm );
20052003
/* Below are specialized create functions for the renamed sel type (both
20062004
// single and aggregate). The functions call the original sel's con-

0 commit comments

Comments
 (0)