ATOL(3) BSD Library Functions Manual ATOL(3)NAME
atol, atoll, atol_l, atoll_l -- convert ASCII string to long or long long integer
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
long
atol(const char *str);
long long
atoll(const char *str);
#include <xlocale.h>
long
atol_l(const char *str, locale_t loc);
long long
atoll_l(const char *str, locale_t loc);
DESCRIPTION
The atol() function converts the initial portion of the string pointed to by str to long integer representation.
It is equivalent to:
strtol(str, (char **)NULL, 10);
The atoll() function converts the initial portion of the string pointed to by str to long long integer representation.
It is equivalent to:
strtoll(str, (char **)NULL, 10);
While the atol() and atoll() functions use the current locale, the atol_l() and atoll_l() functions may be passed locales directly. See
xlocale(3) for more information.
ERRORS
The functions atol() and atoll() need not affect the value of errno on an error.
SEE ALSO atof(3), atoi(3), strtod(3), strtol(3), strtoul(3), xlocale(3)STANDARDS
The atol() function conforms to ISO/IEC 9899:1990 (``ISO C90''). The atoll() function conforms to ISO/IEC 9899:1999 (``ISO C99'').
BSD November 28, 2001 BSD
Check Out this Related Man Page
ATOL(3) BSD Library Functions Manual ATOL(3)NAME
atol, atoll, atol_l, atoll_l -- convert ASCII string to long or long long integer
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
long
atol(const char *str);
long long
atoll(const char *str);
#include <xlocale.h>
long
atol_l(const char *str, locale_t loc);
long long
atoll_l(const char *str, locale_t loc);
DESCRIPTION
The atol() function converts the initial portion of the string pointed to by str to long integer representation.
It is equivalent to:
strtol(str, (char **)NULL, 10);
The atoll() function converts the initial portion of the string pointed to by str to long long integer representation.
It is equivalent to:
strtoll(str, (char **)NULL, 10);
While the atol() and atoll() functions use the current locale, the atol_l() and atoll_l() functions may be passed locales directly. See
xlocale(3) for more information.
IMPLEMENTATION NOTES
The atol(), atoll(), atol_l(), and atoll_l() functions are thread-safe and async-cancel-safe.
The FreeBSD implementations of the atol() and atoll() functions are thin wrappers around strtol() and stroll() respectively, so these func-
tions will affect the value of errno in the same way that the strtol() and stroll() functions are able to. This behavior of atol() and
atoll() is not required by ISO/IEC 9899:1990 (``ISO C90'') or ISO/IEC 9899:1999 (``ISO C99''), but it is allowed by all of ISO/IEC 9899:1990
(``ISO C90''), ISO/IEC 9899:1999 (``ISO C99'') and IEEE Std 1003.1-2001 (``POSIX.1'').
ERRORS
The functions atol() and atoll() may affect the value of errno on an error.
SEE ALSO atof(3), atoi(3), strtod(3), strtol(3), strtoul(3), xlocale(3)STANDARDS
The atol() function conforms to ISO/IEC 9899:1990 (``ISO C90''). The atoll() function conforms to ISO/IEC 9899:1999 (``ISO C99'').
BSD February 1, 2009 BSD
I'm trying to install the unixODBC in HP-UX 11.11 (64 bits), but when executing the ./configure I got the following results:
root@server:/usr/local/unixODBC-2.2.11# ./configure
checking for a BSD-compatible install... /opt/imake/bin/install -c
checking whether build environment is sane... yes... (2 Replies)
We are moving from old solaris to new version of solaris. I have copied the gcc compiler installed on old server to new solaris server. But just copying didn't work. So I am trying to build it on the new server. The server version is
sailfish@st-kvar02 -> uname -a
SunOS st-kvar02 5.10... (7 Replies)
So I have this script titled "testing.sh"
#!/bin/ksh
#PROGRAM INITIALIZATION
HomeDir=/home/sap/gl/ftp
server=testftp01
userid=ftp_uatollmsgbus
password="f&p53715"
MSGLOG=${HomeDir}/msglog.txt
FTPLogTmp=${HomeDir}/testing.tmp
FTPLogFile=${HomeDir}/testing.log... (1 Reply)
Recently I was stuck at 64bit questions in 32pc.......
lots of unknown questions came up ....
as mentioned :
messy questions: how to convert a string into a int64 in linux
i tried
ll = atoll(string)
but faild
btw:
ll is defined as :
long long ll = 0;
I print the return like this:... (2 Replies)
Hello every one, i want to convert my shell script into a binary executable a .exe file , is it possible to do that if so are there any tools . Would the script take off when the arguments are parsed.
Thanks
Venu (13 Replies)
Hi,
I am in the process of configuring a script, and i intend it to retrieve logs for previous four hours, and then scan for predefined errors.
I am kind of stuck on the log retrieval part where the script will run early morning like 1 AM or 2 AM, the command as posted below will give me... (4 Replies)
Hello all,
I'm trying to substract 1 minute from the current date and take the hour and minute (for filename purpose).
1) If I want hour an minute from current time I can use:
timetmp=$(date +"%H:%M")
2) To substract 1 minute from current time I can use:
timetmp=$(date --date "$dte -1... (8 Replies)
I am using the shc shell compiler, it works fine, just that when i execute it, it displays the code at the terminal. Is there any way to hide this as well? otherwise it beats the purpose of hiding the code.
Thanks ! (7 Replies)
Morning All
So, I am starting looking into the world of UNIX for a new job (luckily not my primary function!) and I am looking to get stared. Like anything I seem to learn best by trying things out first in an environment but I have a key question:
Currently I use Oracle VirtualBox, can... (8 Replies)