On Wed, Jul 14, 2004 at 11:18:09AM +0200, Steffen Goeldner wrote:
> Tim Bunce wrote:
> 
> > A release candidate of DBD::Oracle 1.16 is available for testing at:
> >
> >   http://homepage.eircom.net/~timbunce/DBD-Oracle-1.16-rc1-20040713.tar.gz
> 
> I wonder if only Borland is that nitpicking:
> 
>   Error E2140 dbdimp.c 72: Declaration is not allowed here in function GetEnvOrRegKey
>   Error E2140 dbdimp.c 73: Declaration is not allowed here in function GetEnvOrRegKey
>   Error E2238 dbdimp.c 73: Multiple declaration for 'val' in function GetEnvOrRegKey
>   Error E2344 dbdimp.c 68: Earlier declaration of 'val' in function GetEnvOrRegKey
>   Error E2377 dbdimp.c 525: If statement missing ) in function ora_db_login6
>   Error E2349 dbdimp.c 527: Nonportable pointer conversion in function ora_db_login6
>   Error E2377 dbdimp.c 528: If statement missing ) in function ora_db_login6

No. Most compilers are. It's sloppy code I hacked up to simplify code elsewhere.
Thanks for patch - applied - I'll upload a new RC soon.

Apart from that, is everything working okay?

Tim.

> --- dbdimp.orig       Tue Jul 13 23:51:32 2004
> +++ dbdimp.c  Wed Jul 14 10:02:04 2004
> @@ -65,13 +65,13 @@
>  GetEnvOrRegKey(char *name)
>  {
>      int len;
> -    char *val = getenv(name);
> -    if (val)
> -     return val;
> +    char *e = getenv(name);
>  #define REG_BUFSIZE 80
>      char  key[REG_BUFSIZE+1];
>      char  val[REG_BUFSIZE+1];
>      len = REG_BUFSIZE;
> +    if (e)
> +     return e;
> 
>      if (!GetRegKey("SOFTWARE\ORACLE\ALL_HOMES", "LAST_HOME", val, &len))
>       return Nullch;
> @@ -522,10 +522,10 @@
>      {        /* this is a rought hack as I can't test it myself */
>       STRLEN nlslen;
>       char *nls = GetEnvOrRegKey("NLS_LANG");
> -     if (nls && strlen(nls) >= 4 && !strcasecmp(nls + strlen(nls) - 4, "utf8")
> +     if (nls && strlen(nls) >= 4 && !strcasecmp(nls + strlen(nls) - 4, "utf8"))
>           charsetid = utf8_csid;
> -     *nls = GetEnvOrRegKey("NLS_NCHAR");
> -     if (nls && strlen(nls) >= 4 && !strcasecmp(nls + strlen(nls) - 4, "utf8")
> +     nls = GetEnvOrRegKey("NLS_NCHAR");
> +     if (nls && strlen(nls) >= 4 && !strcasecmp(nls + strlen(nls) - 4, "utf8"))
>           ncharsetid = utf8_csid;
>      }
> 
> 
> 
> Steffen

Reply via email to