- Added a small utility 'rquote.exe' to fix the previous damn fix for spaces with chdefgcc.

svn path=/trunk/tools/RosBE/; revision=605
This commit is contained in:
Peter Ward 2007-12-05 21:16:03 +00:00
parent aaa2b0c29b
commit e8318ba5d5
3 changed files with 48 additions and 3 deletions

View File

@ -115,6 +115,7 @@ Section -BaseFiles SEC01
File /r Root\LICENSE.txt
File /r Root\MinGW.cmd
File /r Root\Build.cmd
File /r Root\chdefgcc.cmd
File /r Root\Clean.cmd
File /r Root\Help.cmd
File /r Root\RosBE.cmd
@ -127,6 +128,7 @@ Section -BaseFiles SEC01
File /r Components\Tools\cpucount.exe
File /r Components\Tools\flash.exe
File /r Components\Tools\getdate.exe
File /r Components\Tools\rquote.exe
File /r Components\Tools\tee.exe
SectionEnd
@ -210,12 +212,11 @@ Section "relAddr2Line Tool" SEC08
File /r Components\Tools\chkslash.exe
SectionEnd
Section "Other Tools (chdefdir, chdefgcc and config)" SEC09
Section "Other Tools (chdefdir and config)" SEC09
SetShellVarContext current
SetOutPath "$INSTDIR"
SetOverwrite try
File /r Root\chdefdir.cmd
File /r Root\chdefgcc.cmd
File /r Root\Config.cmd
SectionEnd

View File

@ -8,7 +8,7 @@ STRIP := strip
SUFFIX := .exe
WINVER := 0x500
all: buildtime chknewer chkslash echoh flash getdate scut tee
all: buildtime chknewer chkslash echoh flash getdate rquote scut tee
buildtime: buildtime.c
${CC} ${CFLAGS} buildtime$(SUFFIX) buildtime.c
@ -34,6 +34,10 @@ getdate: getdate.c
${CC} ${CFLAGS} getdate getdate.c
$(STRIP) getdate$(SUFFIX)
rquote: rquote.c
${CC} ${CFLAGS} rquote rquote.c
$(STRIP) rquote$(SUFFIX)
scut: scut.c
${CC} ${CFLAGS} scut scut.c
$(STRIP) scut$(SUFFIX)

View File

@ -0,0 +1,40 @@
/*
* PROJECT: RosBE - ReactOS Build Environment for Windows.
* LICENSE: GPL - See LICENSE.txt in the top level directory.
* FILE: Tools/rquote.c
* PURPOSE: Removes all quotes from a string.
* COPYRIGHT: Copyright 2007 Peter Ward <dralnix@gmail.com>
*
*/
#include <stdio.h>
#include <string.h>
int main(int argc, char* argv[])
{
int i = 0;
if (argc > 2)
{
fprintf(stderr, "%s: Error too many parameters specified.\n", argv[0]);
return -1;
}
if ((argc == 1) ||
(!strncmp(argv[1], "/?", 2)) ||
(!_strnicmp(argv[1], "-h", 2)) ||
(!_strnicmp(argv[1], "--help", 6)))
{
printf("Usage: %s STRING\n", argv[0]);
printf("Removes all quotes from STRING.\n\n");
return 0;
}
for (i = 0; i < strlen(argv[1]); i++)
{
if ((argv[1][i] == '\"') || (argv[1][i] == '\''))
continue;
else
fputc(argv[1][i], stdout);
}
return 0;
}