> + Tcl_WideInt
> + Ns_StrToWideInt(CONST char *string, Tcl_WideInt *intPtr)
> + {
> +     Tcl_WideInt  lval;
> +     char *ep;
> +
> +     errno = 0;
> +     lval = strtoll(string, &ep, string[0] == '0' && string[1] == 'x' ? 16 : 
> 10);
> +     if (string[0] == '\0' || *ep != '\0') {
> +         return NS_ERROR;
> +     }
> +     if ((errno == ERANGE && (lval == LLONG_MAX || lval == LLONG_MIN))) {
> +         return NS_ERROR;
> +     }
> +     *intPtr = (int) lval;
> +
> +     return NS_OK;
> + }


   *intPtr = (int) lval;


Is this right?

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to