diff options
author | Andreas Jaeger <aj@suse.de> | 2001-05-13 01:10:47 +0000 |
---|---|---|
committer | Bruce Korb <bkorb@gnu.org> | 2001-05-13 01:10:47 +0000 |
commit | 2730bf3726fa7455dd91043b956bda5b7873c702 (patch) | |
tree | 2113409d01ef91bcb3a230acfbc26f6147e7ae99 | |
parent | b7c69b456e4e89c41b28d52cc9d62b0de7475e11 (diff) | |
download | libtool-2730bf3726fa7455dd91043b956bda5b7873c702.tar.gz |
use the emitProc dispatch table
-rw-r--r-- | exe/ltmain.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/exe/ltmain.c b/exe/ltmain.c index 239d1b60..1abdc6a9 100644 --- a/exe/ltmain.c +++ b/exe/ltmain.c @@ -28,6 +28,7 @@ #include <string.h> #include <unistd.h> #include <errno.h> +#include <assert.h> #include <sys/wait.h> #include <signal.h> @@ -456,7 +457,16 @@ main( argc, argv ) signal( SIGBUS, handleSignal ); signal( SIGSEGV, handleSignal ); - emitScript( argc, argv ); + assert( OPT_VALUE_MODE < MODE_CT ); + { + emitScriptProc* pEP = ap_emitProc[ OPT_VALUE_MODE ]; + if (pEP == NULL) { + fprintf( stderr, "We're in the wrong mode: %d\n", + OPT_VALUE_MODE ); + USAGE( EXIT_FAILURE ); + } + (*pEP)( argc, argv ); + } return scriptStatus; } |