delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
X-Recipient: | djgpp AT delorie DOT com |
X-Original-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; |
d=gmail.com; s=20210112; | |
h=to:subject:message-id:date:from:references:in-reply-to:mime-version | |
:from:to:cc:subject:date:message-id:reply-to; | |
bh=Cy+2UShq3YpWU5ZSmom3hlJOyb/JruAjXXptdZMXcT0=; | |
b=UdpbowyHiuIcLr4muK8jQRU7HOao4XLL60rTr6EoIBpHhI7IJB93Rgavc+WTOogfKe | |
CSzq8Vw+oAWP6LGVzSyrEEgCRcPyQ4nCxA8UMsxQgj6poZrWPrYI6RkXUX6AUSxxvcrp | |
aqKu0HAzafd7zyE3fv7j3hGSwEAHW+HlO/Cwd1rYcZ93cx3o/hXcD5roJITXgAaxHb4T | |
ijU+DOy34gVr7nuv1ZZudDYc8FUNY4I6ianXwL8hbfndzFynn9PPptXTN1gGlJfXHOJj | |
6UO09BkqGk7cSlKm5yt9sJA2ZG9YFtszMt1JlCD2Lw6/Ps6+2t0XRXM1p8VZ8iKP0dY7 | |
vDpA== | |
X-Google-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; |
d=1e100.net; s=20210112; | |
h=to:subject:message-id:date:from:references:in-reply-to:mime-version | |
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; | |
bh=Cy+2UShq3YpWU5ZSmom3hlJOyb/JruAjXXptdZMXcT0=; | |
b=bNatG7rl7hUHkmQZnh9kUQHg3r4uw7VPvAGCZoJLE9HoTh+odkbFQgNIxvSWq22rIx | |
FRKB3Y3SL8sag84TXEJ5Su24FLFLzMT+LuaNZcHtw3e+hG4KqL6IaN/IQGH+5SMQVZCu | |
bqDFt8NS0BTrW+j9CMuOfhKj0BgD1DtN/Xy11W04GsczGmuULOC10wge+e1Ph47SwzNL | |
4DXAQCFdI/iGYq75AvQCYrgsjB4m7SVGL+Mw1rctqPFVOSwXahXwDUWGl2YZxqsixi8h | |
XZOnoUC5Qn/+4K1tUTK5mLeu3plOyUvb9GCZ/SKG0hZiDnnaCB2MIXu8T0OBjOashLiS | |
PvfA== | |
X-Gm-Message-State: | AO0yUKULm7tlAo7vA3P6Ggnc0M/vst//7quVhxHn+5M91ZWv1Roqi5VE |
mvnrT/qf6KQBELFh6f+DmvahO0IViaRi5cQs43mYA68z | |
X-Google-Smtp-Source: | AK7set8zd+lfNkzcG3/qaMUw7PpDjT//TUTP3jfSmuWHPILy9UuSzmEoGsb6ivgfAdZt2QPC+6RVDT5KKM3m3Z9m3P8= |
X-Received: | by 2002:a5d:5b0b:0:b0:2bf:bc64:bb40 with SMTP id |
bx11-20020a5d5b0b000000b002bfbc64bb40mr499828wrb.34.1675154582068; Tue, 31 | |
Jan 2023 00:43:02 -0800 (PST) | |
MIME-Version: | 1.0 |
In-Reply-To: | <CAA2C=vD8V=rpNwvuC+1Mj6GjNjyfByWVND8eiuOkF6R7ECYVvQ@mail.gmail.com> |
References: | <CAA2C=vCcrB4r7Z_1zOC+dvQnLiQjhp_zbhhuqJ7RQpQnrLuwMQ AT mail DOT gmail DOT com> |
<835ycn529o DOT fsf AT gnu DOT org> <CAA2C=vCP=M-r5Fb6YU5gpOqxHmk-rRXJLMSG8vieB84fE8ZAPA AT mail DOT gmail DOT com> | |
<CAA2C=vD8V=rpNwvuC+1Mj6GjNjyfByWVND8eiuOkF6R7ECYVvQ AT mail DOT gmail DOT com> | |
From: | "Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com> |
Date: | Tue, 31 Jan 2023 11:43:00 +0300 |
Message-ID: | <CAA2C=vCMFJmBv6P_dAiDCRzCCn=gNZpjdPcfWH=e3QtR6NTi+w@mail.gmail.com> |
Subject: | Re: [PATCH] dxe3gen: add support for using an exports file. |
To: | djgpp AT delorie DOT com |
Reply-To: | djgpp AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
--000000000000cefd5105f38b5192 Content-Type: text/plain; charset="UTF-8" >>> LGTM, >> >> OK, can apply tomorrow unless I get further reviews/objections. >> >>> but why did you use binary mode for reading the exports file? >> >> Easier forme that way -- uniform parsing across platforms. > > Version 2 of patch attached. Changes: > > - Fixes segfault if the exports file has no newline at end > - Reports missing exports in verbose mode. > > For convenience, an interdiff to first version is inlined below > (cosmetic changes excluded.) > > --- dxe3gen.c~ > +++ dxe3gen.c > @@ -519,7 +520,7 @@ > opt.export_names[opt.num_names++] = ptr++; > > loc1: > - while (*ptr != '\r' && *ptr != '\n') > + while (*ptr && *ptr != '\r' && *ptr != '\n') > ++ptr; > } > } > @@ -1277,9 +1278,12 @@ > BOOL ok = FALSE; > for (j = 0; j < opt.num_names; j++) > { > + if (!opt.export_names[j]) > + continue; > if (strcmp(opt.export_names[j], name) == 0) > { > ok = TRUE; > + opt.export_names[j] = NULL; > break; > } > } > @@ -1310,6 +1314,15 @@ > } > DEBUG_PRINT_SYMBOL_TABLE_EPILOG(); > > + if (opt.verbose && opt.num_names && opt.num_names != dh.n_exp_syms) > + { > + for (j = 0; j < opt.num_names; j++) > + { > + if (opt.export_names[j]) > + printf("missing export: `%s'\n", opt.export_names[j]); > + } > + } > + > if (errcount) > { > fclose(outf); Version 3 of the patch attached. Changes: - Leading or trailing whitespace in symbol name line are now tolerated. For convenience, an interdiff to version-2 is inlined below. --- dxe3gen.c~ +++ dxe3gen.c @@ -503,25 +503,28 @@ static void process_exp_file(const char ptr = expfile; for (;;) { - while (*ptr == '\r' || *ptr == '\n') + while (*ptr == '\r' || *ptr == '\n' || *ptr == ' ' || *ptr == '\t') *ptr++ = '\0'; if (!*ptr) break; if (*ptr == '#') /* comment */ - goto loc1; + { + while (*ptr && *ptr != '\r' && *ptr != '\n') + ++ptr; + continue; + } if (opt.num_names >= opt.max_names) { opt.max_names += 16; opt.export_names = (char **)realloc(opt.export_names, opt.max_names * sizeof(char *)); } opt.export_names[opt.num_names++] = ptr++; - loc1: - while (*ptr && *ptr != '\r' && *ptr != '\n') + while (*ptr && *ptr != '\r' && *ptr != '\n' && *ptr != ' ' && *ptr != '\t') ++ptr; } } If you guys don't catch any gotchas, I plan to apply this 3r version to cvs. --000000000000cefd5105f38b5192 Content-Type: text/x-patch; charset="US-ASCII"; name="exports3.patch" Content-Disposition: attachment; filename="exports3.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: file0 ZHhlM2dlbjogYWRkIHN1cHBvcnQgZm9yIHVzaW5nIGFuIGV4cG9ydHMgZmlsZS4KCk5ldyBjb21t YW5kIGxpbmUgb3B0aW9uOiAtLWV4cG9ydHMgZmlsZQoKVGhlIGV4aXN0aW5nIG1lY2hhbmlzbSBm b3IgZXhwb3J0ZWQgc3ltYm9scyB3YXMgdGhyb3VnaCBzeW1ib2wgcHJlZml4ZXMsCmkuZS4gdGhl IC1FIGFuZCAtWCBzd2l0Y2hlcywgYnV0IGNhbiBiZSByZWFsbHkgaGFyZCB0byB1c2UgZXNwZWNp YWxseSBpZgp0aGVyZSBhcmUgbWFueSBzeW1ib2xzIHdoaWNoIGRvbid0IG5lY2Vzc2FyaWx5IHNo YXJlIGEgY29tbW9uIHByZWZpeCwgb3IKaWYgc29tZSBvZiB0aGUgc3ltYm9scyB0byBleGNsdWRl IHNoYXJlIHRoZSBjb21tb24gcHJlZml4IHdpdGggc3ltYm9scwp0byBleHBvcnQuICBBZnRlciB0 aGlzLCB0aGUgLUUgYW5kIC1YIHN3aXRjaGVzIGFyZSBzdGlsbCBzdXBwb3J0ZWQsIGJ1dAp0aG9z ZSB0d28gYXJlIG11dHVhbGx5IGV4Y2x1c2l2ZSB3aXRoIC0tZXhwb3J0cy4KClRoZSBleHBvcnRz IGZpbGUgaXMgYSBwbGFpbiB0ZXh0IGZpbGUgd2l0aCBvbmUgc3ltYm9sIG5hbWUgYXQgZWFjaCBs aW5lLApsaWtlIGFuIGV4cG9ydHMgZml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AgfQorCisgIGZzZWVrKGYsIDAsIFNFRUtfRU5EKTsK KyAgbGVuID0gZnRlbGwoZik7CisgIGZzZWVrKGYsIDAsIFNFRUtfU0VUKTsKKyAgZXhwZmlsZSA9 IG1hbGxvYyhsZW4gKyAxKTsKKyAgZnJlYWQoZXhwZmlsZSwgMSwgbGVuLCBmKTsKKyAgZmNsb3Nl KGYpOworICBleHBmaWxlW2xlbl0gPSAnXDAnOworCisgIHB0ciA9IGV4cGZpbGU7CisgIGZvciAo OzspCisgIHsKKyAgICB3aGlsZSAoKnB0ciA9PSAnXHInIHx8ICpwdHIgPT0gJ1xuJyB8fCAqcHRy ID09ICcgJyB8fCAqcHRyID09ICdcdCcpCisgICAgICAqcHRyKysgPSAnXDAnOworCisgICAgaWYg KCEqcHRyKSBicmVhazsKKworICAgIGlmICgqcHRyID09ICcjJykgLyogY29tbWVudCAqLworICAg IHsKKyAgICAgIHdoaWxlICgqcHRyICYmICpwdHIgIT0gJ1xyJyAmJiAqcHRyICE9ICdcbicpCisg ICAgICAgICsrcHRyOworICAgICAgY29udGludWU7CisgICAgfQorCisgICAgaWYgKG9wdC5udW1f bmFtZXMgPj0gb3B0Lm1heF9uYW1lcykKKyAgICB7CisgICAgICBvcHQubWF4X25hbWVzICs9IDE2 OworICAgICAgb3B0LmV4cG9ydF9uYW1lcyA9IChjaGFyICoqKXJlYWxsb2Mob3B0LmV4cG9ydF9u YW1lcywgb3B0Lm1heF9uYW1lcyAqIHNpemVvZihjaGFyICopKTsKKyAgICB9CisgICAgb3B0LmV4 cG9ydF9uYW1lc1tvcHQubnVtX25hbWVzKytdID0gcHRyKys7CisKKyAgICB3aGlsZSAoKnB0ciAm JiAqcHRyICE9ICdccicgJiYgKnB0ciAhPSAnXG4nICYmICpwdHIgIT0gJyAnICYmICpwdHIgIT0g J1x0JykKKyAgICAgICsrcHRyOworICB9Cit9CisKKwogLyogRGVzYzogcHJvY2VzcyBjb21tYW5k IGxpbmUgYXJncwogICoKICAqIEluICA6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4aXQoLTEpOwog ICAgIH0KKyAgICBpZiAodXNlX2V4cG9ydHMpCisgICAgeworICAgICAgZnByaW50ZihzdGRlcnIs ICJFcnJvcjogLS1leHBvcnRzIG5vdCBhbGxvd2VkIGluIGxlZ2FjeSBtb2RlLlxuIik7CisgICAg ICBleGl0KDEpOworICAgIH0KIAogICAgIG9wdC5tYXhfcHJlZml4ID0gMTY7CiAgICAgb3B0LmV4 cG9ydF9wcmVmaXggPSAoY2hhciAqKiltYWxsb2Mob3B0Lm1heF9wcmVmaXggKiBzaXplb2YoY2hh ciAqKSk7CkBAIC01NTIsOCArNjMzLDEzIEBAIHN0YXRpYyB2b2lkIHByb2Nlc3NfYXJncyhpbnQg YXJnYywgY2hhciAKICAgICAgICAgb3B0LmltcGxpYiA9IGFyZ3ZbKytpXTsKICAgICAgICAgb3B0 LmF1dG9yZXNvbHZlID0gVFJVRTsKICAgICAgIH0KKyAgICAgIGVsc2UgaWYgKCFzdHJjbXAoYXJn dltpXSwgIi0tZXhwb3J0cyIpKQorICAgICAgeworICAgICAgICBwcm9jZXNzX2V4cF9maWxlKGFy Z3ZbKytpXSk7CisgICAgICB9CiAgICAgICBlbHNlIGlmICghc3RyY21wKGFyZ3ZbaV0sICItRSIp KQogICAgICAgeworICAgICAgICBpZiAodXNlX2V4cG9ydHMpIGdvdG8gYmFkX29wdDE7CiAgICAg ICAgIGlmIChvcHQubnVtX3ByZWZpeCA+PSBvcHQubWF4X3ByZWZpeCkKICAgICAgICAgewogICAg ICAgICAgIG9wdC5tYXhfcHJlZml4ICs9IDE2OwpAQCAtNTYzLDYgKzY0OSwxMSBAQCBzdGF0aWMg dm9pZCBwcm9jZXNzX2FyZ3MoaW50IGFyZ2MsIGNoYXIgCiAgICAgICB9CiAgICAgICBlbHNlIGlm ICghc3RyY21wKGFyZ3ZbaV0sICItWCIpKQogICAgICAgeworICAgICAgICBpZiAodXNlX2V4cG9y dHMpCisgICAgICAgIHsgYmFkX29wdDE6CisgICAgICAgICAgZnByaW50ZihzdGRlcnIsICJFcnJv cjogLS1leHBvcnRzIGFuZCAtRSAvIC1YIG9wdGlvbnMgYXJlIG11dHVhbGx5IGV4Y2x1c2l2ZS5c biIpOworICAgICAgICAgIGV4aXQoMSk7CisgICAgICAgIH0KICAgICAgICAgaWYgKG9wdC5udW1f ZXhjbCA+PSBvcHQubWF4X2V4Y2wpCiAgICAgICAgIHsKICAgICAgICAgICAgb3B0Lm1heF9leGNs ICs9IDE2OwpAQCAtMTE4NSw2ICsxMjc2LDI0IEBAIHN0YXRpYyBpbnQgd3JpdGVfZHhlKEZJTEUg KmluZiwgRklMRSAqb3UKICAgICAgICAgICBjb250aW51ZTsKICAgICAgIH0KIAorICAgICAgaWYg KG9wdC5udW1fbmFtZXMpCisgICAgICB7CisgICAgICAgIEJPT0wgb2sgPSBGQUxTRTsKKyAgICAg ICAgZm9yIChqID0gMDsgaiA8IG9wdC5udW1fbmFtZXM7IGorKykKKyAgICAgICAgeworICAgICAg ICAgIGlmICghb3B0LmV4cG9ydF9uYW1lc1tqXSkKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAg ICAgICAgIGlmIChzdHJjbXAob3B0LmV4cG9ydF9uYW1lc1tqXSwgbmFtZSkgPT0gMCkKKyAgICAg ICAgICB7CisgICAgICAgICAgICBvayA9IFRSVUU7CisgICAgICAgICAgICBvcHQuZXhwb3J0X25h bWVzW2pdID0gTlVMTDsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgIH0KKyAgICAgICAg fQorICAgICAgICBpZiAoIW9rKQorICAgICAgICAgIGNvbnRpbnVlOworICAgICAgfQorCiAgICAg ICAvKiBleHBvcnRlZCBzeW1ib2wgKi8KICAgICAgIGRoLm5fZXhwX3N5bXMrKzsKIApAQCAtMTIw OCw2ICsxMzE3LDE1IEBAIHN0YXRpYyBpbnQgd3JpdGVfZHhlKEZJTEUgKmluZiwgRklMRSAqb3UK ICAgfQogICBERUJVR19QUklOVF9TWU1CT0xfVEFCTEVfRVBJTE9HKCk7CiAKKyAgaWYgKG9wdC52 ZXJib3NlICYmIG9wdC5udW1fbmFtZXMgJiYgb3B0Lm51bV9uYW1lcyAhPSBkaC5uX2V4cF9zeW1z KQorICB7CisgICAgZm9yIChqID0gMDsgaiA8IG9wdC5udW1fbmFtZXM7IGorKykKKyAgICB7Cisg ICAgICBpZiAob3B0LmV4cG9ydF9uYW1lc1tqXSkKKyAgICAgICAgcHJpbnRmKCJtaXNzaW5nIGV4 cG9ydDogYCVzJ1xuIiwgb3B0LmV4cG9ydF9uYW1lc1tqXSk7CisgICAgfQorICB9CisKICAgaWYg KGVycmNvdW50KQogICB7CiAgICAgZmNsb3NlKG91dGYpOwo= --000000000000cefd5105f38b5192--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |