Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/local/programs/bdfload put back quotation mark removal in ...



details:   https://anonhg.NetBSD.org/xsrc/rev/0ca219feba23
branches:  trunk
changeset: 7206:0ca219feba23
user:      macallan <macallan%NetBSD.org@localhost>
date:      Tue Oct 25 13:36:35 2022 +0000

description:
put back quotation mark removal in FAMILI_NAME statement which got broken
in a previous commit

diffstat:

 local/programs/bdfload/bdfload.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r e97eca2f01db -r 0ca219feba23 local/programs/bdfload/bdfload.c
--- a/local/programs/bdfload/bdfload.c  Tue Oct 25 13:31:58 2022 +0000
+++ b/local/programs/bdfload/bdfload.c  Tue Oct 25 13:36:35 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bdfload.c,v 1.18 2022/10/25 13:31:58 macallan Exp $    */
+/*     $NetBSD: bdfload.c,v 1.19 2022/10/25 13:36:35 macallan Exp $    */
 
 /*
  * Copyright (c) 2018 Michael Lorenz
@@ -267,8 +267,12 @@
                }
                arg[i] = 0;
                if (strcmp(line, "FAMILY_NAME") == 0) {
+                       char *q;
                        /* cut off quotation marks */
                        strlcpy(name, arg + 1, 64);
+                       /* remove trailing " */
+                       if ((q = strnstr(name, "\"", 64)) != NULL)
+                               *q = 0;
                        if (verbose) printf("name: %s\n", name);
                } else if (strcmp(line, "COMMENT") == 0) {
                        commentptr += snprintf(&commentbuf[commentptr],



Home | Main Index | Thread Index | Old Index