Skip to content

Commit d6d7c48

Browse files
committed
remove SCLP23 macros, sclprefixes.h, and HAVE_CONFIG_H
* remove all uses of SCLP23 and SCLP23_NAME macros, and don't include sclprefixes.h anywhere: for i in `grep -rl SCLP23 *`; do echo $i; sed -i 's/SCLP23_NAME( *\([A-Za-z][a-zA-Z0-9_]*\) *)/SDAI_\1/g;' $i; done for i in `grep -rl SCLP23 *`; do echo $i; sed -i 's/SCLP23( *\([A-Za-z][a-zA-Z0-9_]*\) *)/SDAI_\1/g;' $i; done for i in `grep -nr sclprefixes.h *`; do sed -i 's/#include <sclprefixes.h>//g;' $i; done * delete sclprefixes.h * remove HAVE_CONFIG_H in all *.c, *.cc, *.h, and */CMakeLists.txt - with cmake, we'll always have scl_cf.h
1 parent 995c19d commit d6d7c48

Some content is hidden

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

70 files changed

+1065
-1344
lines changed

CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,7 @@ endif()
231231
# Now that all the tests are done, configure the scl_cf.h file:
232232
configure_file(${SCL_BINARY_DIR}/include/scl_cf.h.in ${SCL_BINARY_DIR}/include/scl_cf.h)
233233

234-
add_definitions(
235-
-DHAVE_CONFIG_H -Wall
236-
)
234+
add_definitions( -Wall )
237235

238236
include_directories(
239237
${SCL_SOURCE_DIR}/include

include/sclprefixes.h

Lines changed: 0 additions & 245 deletions
This file was deleted.

src/cldai/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,4 @@ include_directories(
2828
${SCL_SOURCE_DIR}/src/clutils
2929
)
3030

31-
add_definitions(
32-
-DHAVE_CONFIG_H
33-
)
34-
3531
SCL_ADDLIB(stepdai "${LIBSTEPDAI_SRCS}" "steputils stepcore")

src/cldai/sdaiApplication_instance_set.cc

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,36 +40,36 @@ extern "C"
4040

4141
/*****************************************************************************/
4242

43-
SCLP23( Application_instance__set )::SCLP23_NAME( Application_instance__set )( int defaultSize ) {
43+
SDAI_Application_instance__set::SDAI_Application_instance__set( int defaultSize ) {
4444
_bufsize = defaultSize;
45-
_buf = new SCLP23( Application_instance_ptr )[_bufsize];
45+
_buf = new SDAI_Application_instance_ptr[_bufsize];
4646
_count = 0;
4747
}
4848

49-
SCLP23( Application_instance__set )::~SCLP23_NAME( Application_instance__set )() {
49+
SDAI_Application_instance__set::~SDAI_Application_instance__set() {
5050
delete _buf;
5151
}
5252

53-
void SCLP23( Application_instance__set )::Check( int index ) {
54-
SCLP23( Application_instance_ptr )* newbuf;
53+
void SDAI_Application_instance__set::Check( int index ) {
54+
SDAI_Application_instance_ptr* newbuf;
5555

5656
if( index >= _bufsize ) {
5757
_bufsize = ( index + 1 ) * 2;
58-
newbuf = new SCLP23( Application_instance_ptr )[_bufsize];
59-
memmove( newbuf, _buf, _count * sizeof( SCLP23( Application_instance_ptr ) ) );
58+
newbuf = new SDAI_Application_instance_ptr[_bufsize];
59+
memmove( newbuf, _buf, _count * sizeof( SDAI_Application_instance_ptr ) );
6060
delete _buf;
6161
_buf = newbuf;
6262
}
6363
}
6464

65-
void SCLP23( Application_instance__set )::Insert( SCLP23( Application_instance_ptr ) v, int index ) {
66-
SCLP23( Application_instance_ptr )* spot;
65+
void SDAI_Application_instance__set::Insert( SDAI_Application_instance_ptr v, int index ) {
66+
SDAI_Application_instance_ptr* spot;
6767
index = ( index < 0 ) ? _count : index;
6868

6969
if( index < _count ) {
7070
Check( _count + 1 );
7171
spot = &_buf[index];
72-
memmove( spot + 1, spot, ( _count - index )*sizeof( SCLP23( Application_instance_ptr ) ) );
72+
memmove( spot + 1, spot, ( _count - index )*sizeof( SDAI_Application_instance_ptr ) );
7373

7474
} else {
7575
Check( index );
@@ -79,14 +79,14 @@ void SCLP23( Application_instance__set )::Insert( SCLP23( Application_instance_p
7979
++_count;
8080
}
8181

82-
void SCLP23( Application_instance__set )::Append( SCLP23( Application_instance_ptr ) v ) {
82+
void SDAI_Application_instance__set::Append( SDAI_Application_instance_ptr v ) {
8383
int index = _count;
84-
SCLP23( Application_instance_ptr )* spot;
84+
SDAI_Application_instance_ptr* spot;
8585

8686
if( index < _count ) {
8787
Check( _count + 1 );
8888
spot = &_buf[index];
89-
memmove( spot + 1, spot, ( _count - index )*sizeof( SCLP23( Application_instance_ptr ) ) );
89+
memmove( spot + 1, spot, ( _count - index )*sizeof( SDAI_Application_instance_ptr ) );
9090

9191
} else {
9292
Check( index );
@@ -96,22 +96,22 @@ void SCLP23( Application_instance__set )::Append( SCLP23( Application_instance_p
9696
++_count;
9797
}
9898

99-
void SCLP23( Application_instance__set )::Remove( int index ) {
99+
void SDAI_Application_instance__set::Remove( int index ) {
100100
if( 0 <= index && index < _count ) {
101101
--_count;
102-
SCLP23( Application_instance_ptr )* spot = &_buf[index];
103-
memmove( spot, spot + 1, ( _count - index )*sizeof( SCLP23( Application_instance_ptr ) ) );
102+
SDAI_Application_instance_ptr* spot = &_buf[index];
103+
memmove( spot, spot + 1, ( _count - index )*sizeof( SDAI_Application_instance_ptr ) );
104104
}
105105
}
106106

107-
void SCLP23( Application_instance__set )::Remove( SCLP23( Application_instance_ptr ) a ) {
107+
void SDAI_Application_instance__set::Remove( SDAI_Application_instance_ptr a ) {
108108
int index = Index( a );
109109
if( !( index < 0 ) ) {
110110
Remove( index );
111111
}
112112
}
113113

114-
int SCLP23( Application_instance__set )::Index( SCLP23( Application_instance_ptr ) v ) {
114+
int SDAI_Application_instance__set::Index( SDAI_Application_instance_ptr v ) {
115115
for( int i = 0; i < _count; ++i ) {
116116
if( _buf[i] == v ) {
117117
return i;
@@ -120,19 +120,19 @@ int SCLP23( Application_instance__set )::Index( SCLP23( Application_instance_ptr
120120
return -1;
121121
}
122122

123-
SCLP23( Application_instance_ptr ) & SCLP23( Application_instance__set )::operator[]( int index ) {
123+
SDAI_Application_instance_ptr & SDAI_Application_instance__set::operator[]( int index ) {
124124
Check( index );
125125
// _count = max(_count, index+1);
126126
_count = ( ( _count > index + 1 ) ? _count : ( index + 1 ) );
127127
return _buf[index];
128128
}
129129

130130
int
131-
SCLP23( Application_instance__set )::Count() {
131+
SDAI_Application_instance__set::Count() {
132132
return _count;
133133
}
134134

135135
void
136-
SCLP23( Application_instance__set )::Clear() {
136+
SDAI_Application_instance__set::Clear() {
137137
_count = 0;
138138
}

0 commit comments

Comments
 (0)