GTA04 U-Boot

GTA04 U-Boot Commit Details

Date:2003-01-03 00:57:29 (10 years 4 months ago)
Author:wdenk
Branch:gta04
Commit:a25f862ba8b9d8440973d0204c19fec859f953f3
Parents: 13122b4f1d6d00d6d4993ef56d9b5c5bd24f431e
Message:Patch by Detlev Zundel, 30 Dec 2002: Add single quote support for (old) command line parser

Changes:
MCHANGELOG (1 diff)
Mcommon/main.c (6 diffs)

File differences

CHANGELOG
22
33
44
5
6
57
68
79
Changes since U-Boot 0.2.0:
======================================================================
* Add single quote support for (old) command line parser
* Switch LWMON board default config from FRAM to EEPROM;
in POST, EEPROM shows up on 8 addresses
common/main.c
613613
614614
615615
616
616
617617
618618
619619
......
626626
627627
628628
629
629630
630631
631632
......
633634
634635
635636
637
636638
637639
638640
641
642
643
644
645
646
639647
640648
641649
......
683691
684692
685693
694
695
696
697
698
699
700
701
702
703
686704
687
688705
689706
690707
......
725742
726743
727744
745
728746
729747
730748
......
758776
759777
760778
761
762
779
780
781
782
783
784
785
763786
764787
765788
int state = 0;/* 0 = waiting for '$'*/
/* 1 = waiting for '('*/
/* 2 = waiting for ')'*/
/* 3 = waiting for ''' */
#ifdef DEBUG_PARSER
char *output_start = output;
c = *input++;
inputcnt--;
if (state!=3) {
/* remove one level of escape characters */
if ((c == '\\') && (prev != '\\')) {
if (inputcnt-- == 0)
prev = c;
c = *input++;
}
}
switch (state) {
case 0:/* Waiting for (unescaped) $*/
if ((c == '\'') && (prev != '\\')) {
state = 3;
if (inputcnt)
inputcnt--;
break;
}
if ((c == '$') && (prev != '\\')) {
state++;
} else {
state = 0;
}
break;
case 3:/* Waiting for '*/
if ((c == '\'') && (prev != '\\')) {
state = 0;
if (inputcnt)
inputcnt--;
} else {
*(output++) = c;
outputcnt--;
}
break;
}
prev = c;
}
char *argv[CFG_MAXARGS + 1];/* NULL terminated*/
int argc;
int repeatable = 1;
int inquotes;
#ifdef DEBUG_PARSER
printf ("[RUN_COMMAND] cmd[%p]=\"", cmd);
* Find separator, or string end
* Allow simple escape of ';' by writing "\;"
*/
for (sep = str; *sep; sep++) {
if ((*sep == ';') &&/* separator*/
for (inquotes = 0, sep = str; *sep; sep++) {
if ((*sep=='\'') &&
(*(sep-1) != '\\'))
inquotes=!inquotes;
if (!inquotes &&
(*sep == ';') &&/* separator*/
( sep != str) &&/* past string start*/
(*(sep-1) != '\\'))/* and NOT escaped*/
break;

Archive Download the corresponding diff file

Branches

Tags