From 9366e4fa68fe73ba0f514e20f589dab0f5489e56 Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 30 Apr 2020 17:12:36 +0000 Subject: Add support for WASI platform in Abc_ShowFile. --- src/base/abc/abcShow.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') 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; -- cgit v1.2.3