Do you have the gcc compiler for your platform?
will list any line and flag as a warning if there is a datatype mismatch between
the format string and the arguments to any of the printf() function family.
:D I once again am looking through the man pages and am still working on the find command to fully comprehend all its attributes.. i am a little stuck on a problem with how many options to -print there are and the only two I know how to use are printf and -print..
i can not make heads or tails of... (2 Replies)
Hi,
Can someone help me to figure out whether this code is to write file to /tmp/TIMECLOCK directory or just to asign a variable with "/tmp/TIMECLOCK/name.log_copy.pid" as the string?
I am looking into an old C program and could not figure out where in the code that creates... (1 Reply)
Hi
My requirement is to convert the following to C++
char buffer;
sprintf(buffer,"%s %-50s %6s %-6d %s\n",a.substr(0,5),a.substr(10,20))
Since the buffer is of varying length, i cannot hardcode the value as 90.
i would like to convert the buffer to string object so that it can receive any... (1 Reply)
Could someone explain me the following fprintf format:
fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
Why just not use:
fprintf(stderr, "ry `%s --help' for more information.\n", program_name)
I mean what is _() does? (1 Reply)
Hello,
In perl lang, I have create a string (@str) by sprintf but unfortunately when program printed it out, only I could saw a number like 1. Certainly printf doesn't problem. How I can convert a string that are result of sprintf to a common string format??!
Thanks in advance.
PLEASE HELP ME. (2 Replies)
I would like to assign the output of printf to a variable in perl , it give me back a "1" instead of the time. How can I stuff the variable with what printf returns?
Here is my code:
#!/usr/bin/perl
$time = localtime(time);... (3 Replies)
Hi,
I have the below sample code to hash the input number read from file. File will have 16 to 19 digit number and executable hash the number using some logic and returns the hashed value. Each digit in the 16 digit number is converted to a 4 byte value. That if the input is 16digit integer, the... (6 Replies)
Hi,
I am using fprintf to write few strings toa file which has been opened in write mode.
The syntax is as follows:
printf("Testing 7A.\n");
fprintf(out_screen,"%s|%s|%s|%s|%s|\n",var1,var2,var3,var4,var5);
printf("Testing 8.\n");
When I execute the code It prints "Testing 7A." then... (2 Replies)
i had to send a mail an attachment which i got from find command.
But i did not get mail but could see the following line in the logs "aliased to fprintf.c". Can someone help me to understand what does it mean?..As this issue is not occuring now, i could not replicate the problem now.Thanks. (1 Reply)
Discussion started by: jesu
1 Replies
LEARN ABOUT NETBSD
__builtin_object_size
__BUILTIN_OBJECT_SIZE(3) BSD Library Functions Manual __BUILTIN_OBJECT_SIZE(3)NAME
__builtin_object_size -- return the size of the given object
SYNOPSIS
size_t
__builtin_object_size(void *ptr, int type);
DESCRIPTION
The __builtin_object_size() function is a gcc(1) built-in function that returns the size of the ptr object if known at compile time and the
object does not have any side effects.
RETURN VALUES
If the size of the object is not known or it has side effects the __builtin_object_size() function returns:
(size_t)-1 for type 0 and 1.
(size_t)0 for type 2 and 3.
If the size of the object is known, then the __builtin_object_size() function returns the maximum size of all the objects that the compiler
knows that they can be pointed to by ptr when type & 2 == 0, and the minimum size when type & 2 != 0.
SEE ALSO gcc(1), __builtin_return_address(3), attribute(3), ssp(3)HISTORY
The __builtin_object_size() appeared in GCC 4.1.
CAVEATS
This is a non-standard, compiler-specific extension.
BSD December 19, 2010 BSD