Displaying 13 results from an estimated 13 matches for "was_space".
2015 Jul 01
5
boot... round 2
...dconfig.c
+++ b/com32/elflink/ldlinux/readconfig.c
@@ -330,7 +330,7 @@ static char *copy_sysappend_string(char *dst, const char *src)
char c;
while ((c = *src++)) {
- if (c <= ' ' || c == '\x7f') {
+ if (c <= ' ' && c == '\x7f') {
if (!was_space)
*dst++ = '_';
was_space = true;
diff --git a/com32/menu/readconfig.c b/com32/menu/readconfig.c
index 257b042..b7814be 100644
--- a/com32/menu/readconfig.c
+++ b/com32/menu/readconfig.c
@@ -299,7 +299,7 @@ static char *copy_sysappend_string(char *dst, const char *src)
char c;...
2014 Nov 05
0
SYSAPPEND not replacing spaces
...adconfig.c 2014-11-05 10:02
:10.000000000 -0500
@@ -330,7 +330,7 @@ static char *copy_sysappend_string(char
char c;
while ((c = *src++)) {
- if (c <= ' ' && c == '\x7f') {
+ if (c <= ' ' || c == '\x7f') {
if (!was_space)
*dst++ = '_';
was_space = true;
diff -pruN syslinux-6.03.orig/com32/menu/readconfig.c syslinux-6.03.dmi/com32/me
nu/readconfig.c
--- syslinux-6.03.orig/com32/menu/readconfig.c 2014-10-06 12:27:44.000000000 -0
400
+++ syslinux-6.03.dmi/com32/menu/readconfig.c...
2015 Jun 30
4
boot... round 2
On Tue, Jun 30, 2015 at 4:29 PM, poma <pomidorabelisima at gmail.com> wrote:
> "A real serial port that can reliably operate at 115200 8n1 may be
> necessary."
>
> Gene, is there something special in "A real serial port" usage, compared to emulated?
I should restate: A serial port that responds on BIOS IO port 3F8h
that can reliably operate at 115200 8n1 may
2015 Jul 02
4
boot... round 2
On 02.07.2015 01:28, Gene Cumm wrote:
> On Wed, Jul 1, 2015 at 10:14 AM, poma <pomidorabelisima at gmail.com> wrote:
>> On 01.07.2015 12:10, Gene Cumm wrote:
>>> On Wed, Jul 1, 2015 at 4:35 AM, poma <pomidorabelisima at gmail.com> wrote:
>>>>
>>>> To remind you once again.
>>>> ISOLINUX >= 6.00 built with GCC >= 5.0.0 causes a
2015 Jul 02
0
boot... round 2
...;) {
As Geert Stappers pointed out (and can be verified by a
simple test program), the reinstated term
(c <= ' ' && c == '\x7f')
evaluates always as false, because ('\x7f' <= ' ') is false.
So it is equivalent to removing the code branch
if (!was_space)
*dst++ = '_';
was_space = true;
I understand the function shall convert whitespace to '_',
condense groups of neighboring whitespaces to a single '_',
discard leading and trailing whitespace.
In its current git state it converts
"abc" -> &qu...
2015 Jul 02
0
boot... round 2
...ux/readconfig.c
> @@ -330,7 +330,7 @@ static char *copy_sysappend_string(char *dst, const char *src)
> char c;
>
> while ((c = *src++)) {
> - if (c <= ' ' || c == '\x7f') {
> + if (c <= ' ' && c == '\x7f') {
> if (!was_space)
> *dst++ = '_';
> was_space = true;
I think I see the problem. "char" should be "unsigned char"...
-hpa
2015 Jul 03
0
boot... round 2
...dex b7814be..a433fad 100644
--- a/com32/menu/readconfig.c
+++ b/com32/menu/readconfig.c
@@ -299,7 +299,7 @@ static char *copy_sysappend_string(char *dst, const char *src)
char c;
while ((c = *src++)) {
- if (c <= ' ' || c == '\x7f') {
+ if (my_isspace(c)) {
if (!was_space)
*dst++ = '_';
was_space = true;
2015 Jul 02
1
boot... round 2
...(and can be verified by a
> simple test program), the reinstated term
> (c <= ' ' && c == '\x7f')
> evaluates always as false, because ('\x7f' <= ' ') is false.
>
> So it is equivalent to removing the code branch
>
> if (!was_space)
> *dst++ = '_';
> was_space = true;
>
>
> I understand the function shall convert whitespace to '_',
> condense groups of neighboring whitespaces to a single '_',
> discard leading and trailing whitespace.
>
> In its current git state it...
2006 May 10
1
[patch] kinit cmdline handling change
...:06:53.000000000 -0500
@@ -76,6 +76,12 @@
if ( cmdv )
cmdv[0] = argv[0];
+ for (a = 1; a < argc && v < vmax; a++) {
+ if ( cmdv )
+ cmdv[v] = argv[a];
+ v++;
+ }
+
while (i && *i && v < vmax) {
if ((*i == ' ' || *i == '\t') && !was_space) {
if ( cmdv )
@@ -90,12 +96,6 @@
i++;
}
- for (a = 1; a < argc && v < vmax; a++) {
- if ( cmdv )
- cmdv[v] = argv[a];
- v++;
- }
-
if ( cmdv )
cmdv[v] = NULL;
@@ -252,11 +252,6 @@
gettimeofday(&now, NULL);
srand48(now.tv_usec ^ (now.tv_sec << 24));...
2015 Jul 03
7
boot... round 2
...042..a433fad 100644
--- a/com32/menu/readconfig.c
+++ b/com32/menu/readconfig.c
@@ -299,7 +299,7 @@ static char *copy_sysappend_string(char *dst,
const char *src)
char c;
while ((c = *src++)) {
- if (c <= ' ' || c == '\x7f') {
+ if (my_isspace(c)) {
if (!was_space)
*dst++ = '_';
was_space = true;
2010 Apr 23
1
Path simple menu integrated progress indicator
...ine argument
+ * (which should include the final =; do not use for boolean arguments)
+ * Note: the resulting string is typically not null-terminated.
+ */
+const char *find_argument(const char *cmdline, const char *argument)
+{
+ const char *found = NULL;
+ const char *p = cmdline;
+ bool was_space = true;
+ size_t la = strlen(argument);
+
+ while (*p) {
+ if (my_isspace(*p)) {
+ was_space = true;
+ } else if (was_space) {
+ if (!memcmp(p, argument, la))
+ found = p + la;
+ was_space = false;
+ }
+ p++;
+ }
+
+ re...
2015 Jul 02
6
boot... round 2
Hi,
hpa wrote:
> On PowerPC (I think) "unsigned char" is the default.
In any case it seems a good idea to interpret the character
more explicitely. To my experience, one signdness change causes
a little tree of consequential signedness changes or questionable
cast operations.
How about the following instead ?
if ((c >= 0 && c <= ' ') || c == '\x7f')
2006 May 05
3
kinit cmdline handling change
...:00:58.000000000 -0500
@@ -76,6 +76,12 @@
if ( cmdv )
cmdv[0] = argv[0];
+ for (a = 1; a < argc && v < vmax; a++) {
+ if ( cmdv )
+ cmdv[v] = argv[a];
+ v++;
+ }
+
while (i && *i && v < vmax) {
if ((*i == ' ' || *i == '\t') && !was_space) {
if ( cmdv )
@@ -90,11 +96,6 @@
i++;
}
- for (a = 1; a < argc && v < vmax; a++) {
- if ( cmdv )
- cmdv[v] = argv[a];
- v++;
- }
if ( cmdv )
cmdv[v] = NULL;