delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/25/08:45:00

Date: Thu, 25 May 2000 13:23:51 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: pad2369 <pad2369 AT iperbole DOT bologna DOT it>
cc: djgpp AT delorie DOT com
Subject: Re: Submit: strrev() (Was: Re: WANTED: strrev() where is it???)
In-Reply-To: <200005250946.LAA06599@maggiore.iperbole.bologna.it>
Message-ID: <Pine.SUN.3.91.1000525131346.23676A-100000@is>
MIME-Version: 1.0
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

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019