X-Git-Url: http://gitweb.hachti.de/?a=blobdiff_plain;f=pc-tools%2Fldc2%2Fsrc%2Ftool.cpp;h=0d5a98e8b290768b42e3b53d71b74384ed1ad329;hb=7ced2dbeb1a104912fbdd041ce18b0e29a72d893;hp=cc04868ac8e7b663ac9f6308e0c7f54a143c5ae5;hpb=874a2bd89fd65e5a1763d88c218f066a424e0d04;p=h316.git diff --git a/pc-tools/ldc2/src/tool.cpp b/pc-tools/ldc2/src/tool.cpp index cc04868..0d5a98e 100644 --- a/pc-tools/ldc2/src/tool.cpp +++ b/pc-tools/ldc2/src/tool.cpp @@ -1,3 +1,17 @@ +/****************************************************************************** + * + * LDC2 source code + * + * $Date: 2007/03/26 01:00:40 $ + * $Author: hachti $ + * + * $Log: tool.cpp,v $ + * Revision 2.0 2007/03/26 01:00:40 hachti + * *** empty log message *** + * + * + ******************************************************************************/ + #include #include @@ -7,22 +21,6 @@ using namespace std; -/*! - *\brief Output a vector of strings to out_fd. - *\arg strings A vector containing text. - *\retval 0 The vector was empty. - *\retval 1 The vector contained text. - */ -int dump_vector(vector strings){ - int res=0; - for (vector::iterator iter=strings.begin();iter strings){ int dump_vector_fp(vector strings, FILE * fp){ int res=0; for (vector::iterator iter=strings.begin();itersubstr(0,iter->find_last_not_of(" ")+1).c_str()); res=1; } return res; } /*! - *\brief add contents of one vector to another vector uniquely. - *\param target Reference to the target vector. - *\param source Reference to the vector whose contents are to be added - * to target. + *\brief Output a vector of strings to out_fd. + *\arg strings A vector containing text. + *\retval 0 The vector was empty. + *\retval 1 The vector contained text. */ -template -void merge_vector_unique(vector &target, const vector & source){ - for (unsigned int isource=0; isource strings){ + FILE * fp=fdopen(out_fd,"w"); + return dump_vector_fp(strings,fp); }