mirror of
https://github.com/reactos/RosBE.git
synced 2025-02-17 09:48:05 +00:00
- 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:
parent
aaa2b0c29b
commit
e8318ba5d5
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
40
RosBE-Windows/Tools/rquote.c
Normal file
40
RosBE-Windows/Tools/rquote.c
Normal 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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user