diff options
author | Karl Berry <karl@freefriends.org> | 2009-07-15 00:14:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-07-15 00:14:18 +0000 |
commit | e355922861e2bc91176c058d563d477444c2dfd9 (patch) | |
tree | b8b23e9b69d8a1cbd97d0063bf48d51237e6499a /Build/source/utils/asymptote/util.h | |
parent | c64b34678b096f795ef6e745e23cf50cc4e983ea (diff) |
asymptote 1.81 source/w32 update
git-svn-id: svn://tug.org/texlive/trunk@14262 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/util.h')
-rw-r--r-- | Build/source/utils/asymptote/util.h | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/Build/source/utils/asymptote/util.h b/Build/source/utils/asymptote/util.h index 599d97a61ca..76614aadc6d 100644 --- a/Build/source/utils/asymptote/util.h +++ b/Build/source/utils/asymptote/util.h @@ -27,12 +27,9 @@ string stripDir(string name); // Strip the file from a filename, returning the directory. string stripFile(string name); -// Like stripTeXFile except return "" for context TeX engine. -string stripTeXFile(string name); - // Strip the extension from a filename. string stripExt(string name, const string& suffix=""); - + void writeDisabled(); // Check if global writes are disabled and name contains a directory. @@ -46,19 +43,31 @@ string buildname(string filename, string suffix="", string aux=""); // directory. string auxname(string filename, string suffix=""); +// Cast argument to a string. +template<class T> +string String(T x) +{ + ostringstream buf; + buf << x; + return buf.str(); +} + +// Split string S and push the pieces onto vector a. +void push_split(mem::vector<string>& a, const string& S); + +// Wrapper to append /c start "" to MSDOS cmd. +void push_command(mem::vector<string>& a, const string& s); + // Return an argv array corresponding to the fields in command delimited // by spaces not within matching single quotes. -char **args(const char *command, bool quiet=false); +char **args(const mem::vector<string> &args, bool quiet=false); // Similar to the standard system call except allows interrupts and does // not invoke a shell. -int System(const char *command, int quiet=0, bool wait=true, +int System(const mem::vector<string> &command, int quiet=0, bool wait=true, const char *hint=NULL, const char *application="", int *pid=NULL); -int System(const ostringstream& command, int quiet=0, bool wait=true, - const char *hint=NULL, const char *application="", - int *pid=NULL); - + #if defined(__DECCXX_LIBCXX_RH70) extern "C" int kill(pid_t pid, Int sig) throw(); extern "C" char *strsignal(Int sig); |