Skip to content

Commit 1ff8caf

Browse files
committed
refactor exppp - split into many small files
1 parent 4601594 commit 1ff8caf

37 files changed

+2448
-1948
lines changed

include/exppp/exppp.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
#ifndef EXPPP_H
22
#define EXPPP_H
3+
4+
#include <stdbool.h>
5+
36
#include <sc_export.h>
47

8+
#include "../express/expbasic.h"
9+
#include "../express/express.h"
10+
511
extern SC_EXPPP_EXPORT const int exppp_nesting_indent; /**< default nesting indent */
612
extern SC_EXPPP_EXPORT const int exppp_continuation_indent; /**< default nesting indent for continuation lines */
713
extern SC_EXPPP_EXPORT int exppp_linelength; /**< leave some slop for closing parens.

src/exppp/CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
set(LIBEXPPP_SOURCES
22
exppp.c
3+
pretty_alg.c
4+
pretty_case.c
5+
pretty_entity.c
6+
pretty_expr.c
7+
pretty_express.c
8+
pretty_func.c
9+
pretty_loop.c
10+
pretty_proc.c
11+
pretty_ref.c
12+
pretty_rule.c
13+
pretty_schema.c
14+
pretty_scope.c
15+
pretty_stmt.c
16+
pretty_subtype.c
17+
pretty_type.c
18+
pretty_where.c
319
)
420

521
SET(EXPPP_SOURCES
@@ -11,6 +27,7 @@ include_directories(
1127
${SC_SOURCE_DIR}/include
1228
${SC_SOURCE_DIR}/include/exppp
1329
${SC_SOURCE_DIR}/src/base
30+
${SC_SOURCE_DIR}/src/express
1431
)
1532

1633
if(BORLAND)

src/exppp/exppp-main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ int Handle_Exppp_Args( int i, char * arg ) {
3535
if( tolower( ( char )i ) == 'a' ) {
3636
exppp_alphabetize = true;
3737
return 0;
38-
} else if( tolower( (char)i ) == 'o' ) {
38+
} else if( tolower( ( char )i ) == 'o' ) {
3939
if( !strcmp( "--", arg ) ) {
4040
exppp_print_to_stdout = true;
4141
return 0;
4242
}
4343
exppp_output_filename_reset = false;
4444
exppp_output_filename = arg;
4545
return 0;
46-
} else if( tolower( (char)i ) == 'l' ) {
46+
} else if( tolower( ( char )i ) == 'l' ) {
4747
if( ( strlen( arg ) > 5 ) || ( strlen( arg ) < 2 ) ) {
4848
fprintf( stderr, "Unreasonable number of chars in arg for -l: %s\nTry 2-5 digits.", arg );
4949
return 1;

0 commit comments

Comments
 (0)