<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 19 Jul 2017, at 19:21, Frediano Ziglio <<a href="mailto:fziglio@redhat.com" class="">fziglio@redhat.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br class="">On Wed, Jul 19, 2017 at 08:03:49AM -0400, Frediano Ziglio wrote:<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><br class="">On Wed, Jul 19, 2017 at 12:09:23PM +0200, Christophe de Dinechin wrote:<br class=""><blockquote type="cite" class=""><br class=""><blockquote type="cite" class="">On 19 Jul 2017, at 11:21, Christophe Fergeau <<a href="mailto:cfergeau@redhat.com" class="">cfergeau@redhat.com</a>><br class="">wrote:<br class=""><br class="">On Wed, Jul 19, 2017 at 10:23:30AM +0200, Christophe de Dinechin<br class="">wrote:<br class=""><blockquote type="cite" class=""><br class=""><blockquote type="cite" class="">On 18 Jul 2017, at 17:28, Christophe Fergeau <<a href="mailto:cfergeau@redhat.com" class="">cfergeau@redhat.com</a>><br class="">wrote:<br class=""><br class="">On Mon, Jul 17, 2017 at 11:01:22AM +0100, Frediano Ziglio wrote:<br class=""><blockquote type="cite" class="">Remove CxImage linking.<br class="">Support Windows BMP format.<br class=""></blockquote><br class="">Too bad there is no small/maintained library which would do that<br class="">for us<br class="">:-/ From a quick glance, looks ok.<br class=""><br class=""><br class=""><blockquote type="cite" class=""><br class="">+static inline size_t compute_dib_stride(unsigned width, unsigned<br class="">bit_count)<br class=""></blockquote><br class="">Can you use full type names, unsigned int?<br class=""></blockquote><br class="">No. Really, no ;-) Otherwise, for consistency, you should replace<br class="">‘int’<br class="">with ‘signed int’,<br class=""></blockquote><br class="">The way I see it, 'signed'/'unsigned' are type modifiers, 'int' is an<br class="">actual type name.<br class=""></blockquote><br class="">Yes. But ‘long’ is not. It is also a modifier. So why allow “long” or<br class="">“short" but not “unsigned”?<br class="">Or are you also writing “long int” and “short int”?<br class=""></blockquote><br class="">long/short are enough to make the storage size of the integer obvious,<br class="">even if you don't know that long means long int.<br class="">"unsigned" does not make this obvious unless you know that "unsigned"<br class="">means "unsigned int"<br class=""><br class=""></blockquote><br class="">Section 6.7.2 of C99 standard specified "unsigned" as type.<br class="">The fact you are not familiar with this is an opinion I don't<br class="">personally share. "long" does not specify a type as "unsigned"<br class="">doesn't.<br class=""><br class=""></blockquote><br class="">[...]<br class=""><br class=""><blockquote type="cite" class=""><br class="">So let's write "long int" for anything. "unsigned" is not less typing,<br class="">it's a type specified by the language.<br class=""></blockquote><br class="">I never said "unsigned" is not standard compliant, so I don't know why<br class="">you keep coming back to that.<br class="">I previously said that just because something is standard-compliant does<br class="">not mean it's a good idea to do it, [insert your favourite obfuscated C<br class="">contest example here].<br class=""><br class="">In this particular case, since you feel strongly about it, feel free to<br class="">ignore my comment, but I'll nonetheless keep thinking it makes things<br class="">less readable ;)<br class=""><br class="">Christophe<br class=""><br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">I moved to "unsigned int" 2 versions ago.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></div></blockquote><div><br class=""></div>It was courteous of you.</div><div><br class=""><blockquote type="cite" class=""><div class=""><div style="" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">But still think that is a useful discussion. But honestly I think</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">in this case the readability is quite an opinion and for me</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">unsigned is like long, perfectly readable and I saw lot of code</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">using just unsigned.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></div></blockquote><div><br class=""></div><div>It is useful on two levels:</div><div><br class=""></div><div>a) Because I personally feel ‘unsigned int’ less readable and less</div><div>consistent with the common usage for.’long’ or ‘short’.</div><div><br class=""></div><div>b) To discuss the matter of debating style preferences in code reviews,</div><div>notably for new code and new languages.</div><div><br class=""></div><div>In that case, we have C++ code, where my experience tells me that</div><div>‘unsigned’ is by far more common (as is camel-case, for example).</div><div><br class=""></div><div>If we start considering that some C programmer may not know that</div><div>‘unsigned’ means ‘unsigned int’, what happens the first time someone</div><div>introduces ‘auto’ or ‘for (a : b) in C++ code, or _Generic in C code?</div><br class=""><blockquote type="cite" class=""><div class=""><div style="" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Frediano</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Spice-devel mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:Spice-devel@lists.freedesktop.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">Spice-devel@lists.freedesktop.org</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="https://lists.freedesktop.org/mailman/listinfo/spice-devel" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://lists.freedesktop.org/mailman/listinfo/spice-devel</a></div></div></blockquote></div><br class=""></body></html>