Re: CVS: commit fjfranklin link-grammar/link-grammar utilities.c

From: <msevior_at_physics.unimelb.edu.au>
Date: Sun Aug 07 2005 - 06:40:12 CEST

>
> Update of /cvsroot/link-grammar/link-grammar
> In directory abiword.snt.utwente.nl:/tmp/cvs-serv4336/link-grammar
>

This fix should be fed back to the link-grammar authors.

Cheers

Martin

> Modified Files:
> utilities.c
> Log Message:
> o uncomment (& update slightly) code to use DICTPATH environment variable
>
>
> Index: utilities.c
> ===================================================================
> RCS file: /cvsroot/link-grammar/link-grammar/utilities.c,v
> retrieving revision 1.2
> retrieving revision 1.3
> diff -u -d -r1.2 -r1.3
> --- utilities.c 21 Jun 2005 21:05:01 -0000 1.2
> +++ utilities.c 6 Aug 2005 14:37:51 -0000 1.3
> @@ -481,9 +481,10 @@
> char completename[MAX_PATH_NAME+1];
> char fulldictpath[MAX_PATH_NAME+1];
> char dummy1[MAX_PATH_NAME+1];
> - char *dp1, *dp2;
> + char dummy2[MAX_PATH_NAME+1];
> + char *dp1, *dp2, *dp2_envvar;
> char *pos, *oldpos;
> - int filenamelen, len;
> + int filenamelen, len, dp2_length;
> FILE *fp;
>
> if (filename[0] == '/') {
> @@ -504,12 +505,12 @@
> /* dp1 now points to the part of the dictpath due to dictname */
>
> dp2 = "";
> - /* We're no longer using the dictpath in the environment
> - if (strlen(getenv(DICTPATH)) > 0) {
> - sprintf(dummy2, "%s:", getenv(DICTPATH));
> + dp2_envvar = getenv(DICTPATH);
> + dp2_length = dp2_envvar ? strlen(dp2_envvar) : 0;
> + if ((dp2_length > 0) && (dp2_length < MAX_PATH_NAME)) {
> + sprintf(dummy2, "%s:", dp2_envvar);
> dp2 = dummy2;
> }
> - */
> /* dp2 now points to the part of the dictpath due to the environment
> var */
>
> #ifdef ENABLE_BINRELOC
>
> -----------------------------------------------
> To unsubscribe from this list, send a message to
> abisource-cvs-commit-request@abisource.com with the word
> unsubscribe in the message body.
>
Received on Sun Aug 7 06:39:51 2005

This archive was generated by hypermail 2.1.8 : Sun Aug 07 2005 - 06:39:51 CEST