diff options
author | whitequark <whitequark@whitequark.org> | 2020-04-30 17:12:36 +0000 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2020-05-01 08:25:53 -0700 |
commit | 9366e4fa68fe73ba0f514e20f589dab0f5489e56 (patch) | |
tree | 20b8a0dc0efa11938c69bc601aa53ffc6facb211 | |
parent | 70ed4da2acbb3ae61d5fbfbd6e02da94cc38da05 (diff) | |
download | abc-9366e4fa68fe73ba0f514e20f589dab0f5489e56.tar.gz abc-9366e4fa68fe73ba0f514e20f589dab0f5489e56.tar.bz2 abc-9366e4fa68fe73ba0f514e20f589dab0f5489e56.zip |
Add support for WASI platform in Abc_ShowFile.
-rw-r--r-- | src/base/abc/abcShow.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/base/abc/abcShow.c b/src/base/abc/abcShow.c index f91397df..7df1e323 100644 --- a/src/base/abc/abcShow.c +++ b/src/base/abc/abcShow.c @@ -363,7 +363,11 @@ void Abc_ShowFile( char * FileNameDot ) // generate the PostScript file using DOT sprintf( CommandDot, "%s -Tps -o %s %s", pDotName, FileNamePs, FileNameDot ); +#if defined(__wasm) + RetValue = -1; +#else RetValue = system( CommandDot ); +#endif if ( RetValue == -1 ) { fprintf( stdout, "Command \"%s\" did not succeed.\n", CommandDot ); @@ -401,7 +405,11 @@ void Abc_ShowFile( char * FileNameDot ) char CommandPs[1000]; unlink( FileNameDot ); sprintf( CommandPs, "%s %s &", pGsNameUnix, FileNamePs ); +#if defined(__wasm) + if ( 1 ) +#else if ( system( CommandPs ) == -1 ) +#endif { fprintf( stdout, "Cannot execute \"%s\".\n", CommandPs ); return; |