[Libclc-developers] Re: Some more comments to the current CVS tree
Status: Planning
Brought to you by:
augestad
|
From: Jan E. <je...@li...> - 2003-04-03 13:53:52
|
>> src/clc_stralloc.c:
>> va_start() is used two times. IIRC, such use is not recommended,
>> for whatever reason. IIRC.
>> They propose va_copy() instead.
>
>Can't. va_copy() is a C99 macro. It's not defined in C89.
Still, side effects may occur. (Still suggesting ap2=ap1 before doing
any va_start, need we?)
>> src/clc_stpcpy.c:
>> It is using its own copy mechanism. Since strcpy() is defined in ISO
>> 9899 (is that C 89 or C 99 ?), oh well. If strcpy() is C89, wouldn't
>> it be wiser to stick to that?
>
>I'm not quite sure what you mean - is that a vote against the function,
>or the implementation? The function exists because its result can be
I mean, if strcpy() is in the C89 standard, why doesnot stpcpy use
strcpy?
>> src/clc_strdup.c:
>> I am a great destroyer of readability >:-)
>So you are:-)
As I said!?
>> so I propose
>> if((size = strlen(s) + 1) == 0) { p = NULL; }
>> instead of the two lines
>> size = strlen(s) + 1
>> if(size == 0) { p = NULL; }
>Why?
"To destroy readability"
>> src/clc_strltrim.c:
>> (...)
>> while(... && isspace((unsigned char)*cptr))
>> What if you would make cptr unsigned at the beginning?
>
>Well, it's one cast in either case. I have no preference.
>However, there is a difference between the two in case char is signed
>and either sign/magnitude or one's complement. I have no idea which is
>right in that case. Looks like c.l.c material.
I think it is just another stylie thing
>> doc/string/*
>> General indent question. Some files have 4 some have 2 leading.
(Meant some files have 8 for paragraphs (4 for subheadings), whereas
others had 4 for paragraphs and 2 for subheadings)
- Jan Engelhardt
|