public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 'windres' bug
@ 1999-02-18 10:00 Krzysztof Nikiel
       [not found] ` < 000101be5b68$9c3b2200$5e1ea0d4@amd-based-pc >
  1999-02-28 23:02 ` Krzysztof Nikiel
  0 siblings, 2 replies; 6+ messages in thread
From: Krzysztof Nikiel @ 1999-02-18 10:00 UTC (permalink / raw)
  To: cygwin mailing list

VS_VERSIONINFO structure created by 'windres' (B20.1)
cannot be read by win9x (I don't know about nt).
Stringtable sould have a 'total length' (first word),
'length of value' (second word) - missing (always set to 0),
and 'type' (third word).







--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 'windres' bug
       [not found] ` < 000101be5b68$9c3b2200$5e1ea0d4@amd-based-pc >
@ 1999-02-18 10:07   ` DJ Delorie
  1999-02-28 23:02     ` DJ Delorie
  0 siblings, 1 reply; 6+ messages in thread
From: DJ Delorie @ 1999-02-18 10:07 UTC (permalink / raw)
  To: krzych00; +Cc: cygwin

> VS_VERSIONINFO structure created by 'windres' (B20.1)
> cannot be read by win9x (I don't know about nt).
> Stringtable sould have a 'total length' (first word),
> 'length of value' (second word) - missing (always set to 0),
> and 'type' (third word).

I applied a patch for this from a net user just yesterday!  What a
coincidence.  I've attached a diff if you need it.

--- resbin.c    1998/10/07 01:21:02
+++ resbin.c    1999/02/18 02:52:53
@@ -2258,5 +2258,4 @@
                vsslen = 6;
 
-               put_16 (big_endian, 0, vssd->data + 2);
                put_16 (big_endian, 1, vssd->data + 4);
 
@@ -2278,4 +2277,5 @@
 
                *pp = unicode_to_bin (vs->value, big_endian);
+               put_16 (big_endian, (*pp)->length / 2, vssd->data + 2);
                length += (*pp)->length;
                vilen += (*pp)->length;


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 'windres' bug
  1999-02-18 10:07   ` DJ Delorie
@ 1999-02-28 23:02     ` DJ Delorie
  0 siblings, 0 replies; 6+ messages in thread
From: DJ Delorie @ 1999-02-28 23:02 UTC (permalink / raw)
  To: krzych00; +Cc: cygwin

> VS_VERSIONINFO structure created by 'windres' (B20.1)
> cannot be read by win9x (I don't know about nt).
> Stringtable sould have a 'total length' (first word),
> 'length of value' (second word) - missing (always set to 0),
> and 'type' (third word).

I applied a patch for this from a net user just yesterday!  What a
coincidence.  I've attached a diff if you need it.

--- resbin.c    1998/10/07 01:21:02
+++ resbin.c    1999/02/18 02:52:53
@@ -2258,5 +2258,4 @@
                vsslen = 6;
 
-               put_16 (big_endian, 0, vssd->data + 2);
                put_16 (big_endian, 1, vssd->data + 4);
 
@@ -2278,4 +2277,5 @@
 
                *pp = unicode_to_bin (vs->value, big_endian);
+               put_16 (big_endian, (*pp)->length / 2, vssd->data + 2);
                length += (*pp)->length;
                vilen += (*pp)->length;


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* 'windres' bug
  1999-02-18 10:00 'windres' bug Krzysztof Nikiel
       [not found] ` < 000101be5b68$9c3b2200$5e1ea0d4@amd-based-pc >
@ 1999-02-28 23:02 ` Krzysztof Nikiel
  1 sibling, 0 replies; 6+ messages in thread
From: Krzysztof Nikiel @ 1999-02-28 23:02 UTC (permalink / raw)
  To: cygwin mailing list

VS_VERSIONINFO structure created by 'windres' (B20.1)
cannot be read by win9x (I don't know about nt).
Stringtable sould have a 'total length' (first word),
'length of value' (second word) - missing (always set to 0),
and 'type' (third word).







--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 'windres' bug
  1999-02-23  7:59 Dirk Meyer
@ 1999-02-28 23:02 ` Dirk Meyer
  0 siblings, 0 replies; 6+ messages in thread
From: Dirk Meyer @ 1999-02-28 23:02 UTC (permalink / raw)
  To: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2326 bytes --]

>>> VS_VERSIONINFO structure created by 'windres' (B20.1)
>>> cannot be read by win9x (I don't know about nt).
>>> Stringtable sould have a 'total length' (first word),
>>> 'length of value' (second word) - missing (always set to 0),
>>> and 'type' (third word).
>>
>> I applied a patch for this from a net user just yesterday!  What a
>> coincidence.  I've attached a diff if you need it.

> Yes, indeed. It's big confusing coincidence.
> I have sent similar uuencoded patch to cygwin just before
> getting your message!

> Patches are similar but they are different!
> [ (*pp)->length vs (*pp)->length / 2]

> The question is: which one is the right one?

> In first version of my patch was this
> '(*pp)->length / 2'(number of UNICODE chars in string - should be
> right
> because based on Microsoft/Borland compilers output)
> But in second version is '(*pp)->length'
> (number of bytes used should be even more right considering a bug
> in microsoft based compilers - isn't very probabe?)

> And here comes more of confusing questions...

> In binary table (which is the same structure as stringtabe)
> second word seems to mean 'bytes used' not 'data items used',
> the same should be in string version.
> On the other hand, Microsoft (THE VERY GREAT AUTHOR)
> should exactly know what it stands for, so 'chars used'
> may be considered a perfect right one.
> Finaly, it doesn't matter since any non-zero value seems to work
> fine!

> Now You decide which version is the right version.

Well, you guessed right -- the '(*pp)->length / 2' version, which is
my "solution" to the windres bug, is based on the Borland compiler's
output... and it works on WINNT (I haven't tested it on WIN9x).

As long as you don't trust the Borland/Microsoft compiler's output,
just use your '(*pp)->length' version and save the few nanoseconds my
version would need for the devision by 2 ;-).

Regards,
Dirk
***********************************
* Dipl.-Ing. Dirk Meyer           *
* Lehrstuhl für Prozeßleittechnik *
* RWTH-Aachen                     *
* D-52056 Aachen                  *
* Tel.:   ++49 (241) 80-7709      *
* Fax:    ++49 (241) 8888-238     *
* E-Mail: dirk@plt.rwth-aachen.de *
***********************************

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 'windres' bug
@ 1999-02-23  7:59 Dirk Meyer
  1999-02-28 23:02 ` Dirk Meyer
  0 siblings, 1 reply; 6+ messages in thread
From: Dirk Meyer @ 1999-02-23  7:59 UTC (permalink / raw)
  To: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2325 bytes --]

>>> VS_VERSIONINFO structure created by 'windres' (B20.1)
>>> cannot be read by win9x (I don't know about nt).
>>> Stringtable sould have a 'total length' (first word),
>>> 'length of value' (second word) - missing (always set to 0),
>>> and 'type' (third word).
>>
>> I applied a patch for this from a net user just yesterday!  What a
>> coincidence.  I've attached a diff if you need it.

> Yes, indeed. It's big confusing coincidence.
> I have sent similar uuencoded patch to cygwin just before
> getting your message!

> Patches are similar but they are different!
> [ (*pp)->length vs (*pp)->length / 2]

> The question is: which one is the right one?

> In first version of my patch was this
> '(*pp)->length / 2'(number of UNICODE chars in string - should be
> right
> because based on Microsoft/Borland compilers output)
> But in second version is '(*pp)->length'
> (number of bytes used should be even more right considering a bug
> in microsoft based compilers - isn't very probabe?)

> And here comes more of confusing questions...

> In binary table (which is the same structure as stringtabe)
> second word seems to mean 'bytes used' not 'data items used',
> the same should be in string version.
> On the other hand, Microsoft (THE VERY GREAT AUTHOR)
> should exactly know what it stands for, so 'chars used'
> may be considered a perfect right one.
> Finaly, it doesn't matter since any non-zero value seems to work
> fine!

> Now You decide which version is the right version.

Well, you guessed right -- the '(*pp)->length / 2' version, which is
my "solution" to the windres bug, is based on the Borland compiler's
output... and it works on WINNT (I haven't tested it on WIN9x).

As long as you don't trust the Borland/Microsoft compiler's output,
just use your '(*pp)->length' version and save the few nanoseconds my
version would need for the devision by 2 ;-).

Regards,
Dirk
***********************************
* Dipl.-Ing. Dirk Meyer           *
* Lehrstuhl für Prozeßleittechnik *
* RWTH-Aachen                     *
* D-52056 Aachen                  *
* Tel.:   ++49 (241) 80-7709      *
* Fax:    ++49 (241) 8888-238     *
* E-Mail: dirk@plt.rwth-aachen.de *
***********************************

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1999-02-28 23:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-18 10:00 'windres' bug Krzysztof Nikiel
     [not found] ` < 000101be5b68$9c3b2200$5e1ea0d4@amd-based-pc >
1999-02-18 10:07   ` DJ Delorie
1999-02-28 23:02     ` DJ Delorie
1999-02-28 23:02 ` Krzysztof Nikiel
1999-02-23  7:59 Dirk Meyer
1999-02-28 23:02 ` Dirk Meyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).