00001 /* 00002 * This file is part of liberipc. 00003 * 00004 * liberipc is free software: you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation, either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * liberipc is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00023 #include "eripcparser.h" 00024 00025 void erIpcGetArgs(char *pChar, erIpcCmd_t * pCmd, int nReqArgs) 00026 { 00027 int nArg; 00028 int i; 00029 char szToken[TB_MAXCHARONLINE]; 00030 00031 for (nArg = 0; nArg < nReqArgs; nArg++) 00032 { 00033 i = 0; 00034 while (*pChar != '\0') 00035 { 00036 szToken[i] = '\0'; 00037 if (*pChar == ',') 00038 { 00039 pChar++; 00040 break; 00041 } 00042 szToken[i] = *pChar++; 00043 i++; 00044 szToken[i] = '\0'; 00045 } 00046 strcpy(pCmd->arg[nArg], szToken); 00047 } 00048 }