Mail Archives: djgpp/2000/05/25/08:45:00
On Thu, 25 May 2000, pad2369 wrote:
> I wrote source (.c) and doc (.txh).
Thanks!
> I'm sending you: a diff file for string.h and one
> for makefile in src/libc/compat/string; the .c file
> and the .txh file. I hope it is all OK.
A few comments about your patches:
> int stricmp(const char *_s1, const char *_s2);
> int strncasecmp(const char *_s1, const char *_s2,
> size_t _n);
When you send diffs, make sure your mailer does not wrap lines too early,
like in the last line above, as that causes the Patch utility to fail to
apply the diffs.
> ---------- src/libc/compat/string/strrev.c ----
> #include <string.h>
A new file should be sent as diffs as well; to this end, compare it with
the null device, /dev/null, like this:
diff -c /dev/null src/libc/compat/string/strrev.c > strrev.dif
> ---------- src/libc/compat/string/strrev.txh --
> @node strrev, string
Same here.
> @example
>
> #include <stdio.h>
> #include <string.h>
>
> char buf[] = { "Hello, world!" };
The characters { and } are special in Texinfo sources, so they must be
escaped by a @, like this:
char buf[] = @{ "Hello, world!" @};
(I suggest to consult the docs of the Texinfo package when writing
documentation; type "info texinfo" from the command line.)
> int main(void)
> {
> printf( "%s\n", buf );
> printf( "%s\n", strrev( buf ) );
> printf( "%s\n", strrev( buf ) );
> return 0;
> }
>
> produces the following output:
This last line should not be part of the @example, so you should say this
instead:
@subheading Example
@example
#include <stdio.h>
#include <string.h>
char buf[] = { "Hello, world!" };
int main(void)
{
printf( "%s\n", buf );
printf( "%s\n", strrev( buf ) );
printf( "%s\n", strrev( buf ) );
return 0;
}
@end example
@noindent
produces the following output:
@example
Hello, world!
!dlrow ,olleH
Hello, world!
@end example
- Raw text -