From c7899295229437b4fec523157ea6e8f9c4e8d68b Mon Sep 17 00:00:00 2001 From: Siddhant Ranade Date: Wed, 14 Oct 2015 13:13:46 +0530 Subject: Removed date shell commands. --- lib/misc.cpp | 52 ---------------------------------------------------- lib/misc.h | 4 ---- libParser.cpp | 9 ++------- parser.cpp | 19 +++---------------- 4 files changed, 5 insertions(+), 79 deletions(-) diff --git a/lib/misc.cpp b/lib/misc.cpp index bbe8a18..a5921bf 100644 --- a/lib/misc.cpp +++ b/lib/misc.cpp @@ -24,33 +24,6 @@ string exec(const char* cmd) { //Function to execute a shell command. return result; } -string readDate(string line){ - int n=line.find(';'); - string datetemp=line.substr(n+1, 10); - string cmd; - cmd="date --date=\'@"+datetemp+"\' +\"%A %d %B %Y %I:%M:%S %p %Z\""; - string ret=exec(cmd.c_str()); - ret=ret.substr(0, ret.length()-1); //ignore the last character, which is \n - return ret; -} - -string readDate(){ - string cmd="date +\"%A %d %B %Y %I:%M:%S %p %Z\""; - string ret=exec(cmd.c_str()); - ret=ret.substr(0, ret.length()-1); //ignore the last character, which is \n - return ret; -} - -string readShortDate(string line){ - int n=line.find(';'); - string datetemp=line.substr(n+1, 10); - string cmd; - cmd="date --date=\'@"+datetemp+"\' +\"%d %b %Y\""; - string ret=exec(cmd.c_str()); - ret=ret.substr(0, ret.length()-1); //ignore the last character, which is \n - return ret; -} - string skipTo(istream& input, string s){ /*Find the line containing the first occurence (after the current position) of string s in istream& in and read it and then return it*/ string tmp=""; @@ -66,31 +39,6 @@ first occurence (after the current position) of string s in istream& in and read return tmp; } -string findLibrary(string &s){ //Returns the filename of the Pspice library that contains the description of the component whose name is the string s - string cmd="grep -w ^\"*symbol "+s+"\" lib/Library/*"; - string ret=exec(cmd.c_str()); - ///cout<<"***"<>s; - - for(int i=0; i