##- # Author: Brian Tiffin # Dedicated to the public domain # # Date: December, 2016 # Modified: 2016-12-09/03:46-0500 ##+ # # unicox.icn, Embed libcox system utilities by Symisc Systems # # tectonics: # gcc -o unicox.so -shared -fpic unicox.c libcox.c # link io procedure main() lib := "unicox.so" unicox := pathload(lib, "unicox") unicoxClose := pathload(lib, "unicoxClose") # Fetch the libcox supported commands result := unicox("CMD_LIST") write("\nCMD_LIST\n",result) # list the .rst file names from the given directory result := unicox("glob *.txt '%s'", "..") write("\nglob *.txt from ..\n",result) # shut down the command engine unicoxClose() | stop("Error shutting down libcox") end