On 29/03/2011 09:59, Eitan Adler wrote:
Hi David,
It seems printf() always alloc something and does not free it:
What compiler and what optimizations? Most compilers will optimize a
printf without any special formatting into a puts call instead of a
printf call.
I was using clang / gcc with
Hi David,
> It seems printf() always alloc something and does not free it:
What compiler and what optimizations? Most compilers will optimize a
printf without any special formatting into a puts call instead of a
printf call.
For example clang -O3 -fomit-frame-pointer (which I use for clarity
here
On Tue, Jan 27, 2009 at 12:05:28AM +0100, Svein Halvor Halvorsen wrote:
>
> Chuck Swiger wrote:
> >On Jan 26, 2009, at 1:58 PM, Svein Halvor Halvorsen wrote:
> >>As far as I can see, printf is not calculating strings lengths
> >>correctly when using utf-8 encoding. Either that, or I'm using byte
On Monday 26 January 2009 12:58:06 Svein Halvor Halvorsen wrote:
> As far as I can see, printf is not calculating strings lengths correctly
> when using utf-8 encoding. Either that, or I'm using byte count, and
> can't find the character count :-/
>
> Eg:
>
> $ printf "|%-10s|" "æøå"
>
> |æøå|
On Mon, Jan 26, 2009 at 03:03:44PM -0800, Chuck Swiger wrote:
> On Jan 26, 2009, at 3:05 PM, Svein Halvor Halvorsen wrote:
> >Do you have a suggestion to solve the following problem without
> >using printf(1):
> >
> >I have a text file that I want to print in a "box" on a terminal
> >from a she
Chuck Swiger wrote:
On Jan 26, 2009, at 3:05 PM, Svein Halvor Halvorsen wrote:
Do you have a suggestion to solve the following problem without using
printf(1):
I have a text file that I want to print in a "box" on a terminal from
a shell script. Now I've padded the lines with spaces to a cert
On Jan 26, 2009, at 3:05 PM, Svein Halvor Halvorsen wrote:
Do you have a suggestion to solve the following problem without
using printf(1):
I have a text file that I want to print in a "box" on a terminal
from a shell script. Now I've padded the lines with spaces to a
certain length using
Chuck Swiger wrote:
On Jan 26, 2009, at 1:58 PM, Svein Halvor Halvorsen wrote:
As far as I can see, printf is not calculating strings lengths
correctly when using utf-8 encoding. Either that, or I'm using byte
count, and can't find the character count :-/
printf(1) explicitly states that it w
On Jan 26, 2009, at 1:58 PM, Svein Halvor Halvorsen wrote:
As far as I can see, printf is not calculating strings lengths
correctly when using utf-8 encoding. Either that, or I'm using byte
count, and can't find the character count :-/
printf(1) explicitly states that it works with ASCII and
On Tue, Jul 27, 2004 at 08:38:00AM +, M.M. Yang wrote:
> Hi all,
> I'm reading the function ia64_init(), and try
> to use "printf" to output some information. But if I put "printf" before
> "msgbufinit()", I won't see any word I expect by using dmesg.
That's correct.
> In the same funct
In <[EMAIL PROTECTED]>, Auge Mike <[EMAIL PROTECTED]>
typed:
>
> Now what resources you can recommend for me! I prefer Internet resources.
You can find at http://www.freebsd.org/docs.html >. Of course,
you could have found that yourself by looking at the Freebsd.org front
page.
Just try reading the FreeBSD kernel source. All the answers are
right there. Why read a book or an article about how it works
when you can see how it works for yourself =)
Don
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message
This is the definition of the write(2) system call. You should also
check the implementation of printf(3) at the libc sources. Look at
/usr/src/lib/libc/stdio/printf.c for more details about the way
printf() works in userlevel programs.
Right on. I think, however, that Auge is looking for a t
On 2003-02-08 01:48, Auge Mike <[EMAIL PROTECTED]> wrote:
> I was trying to know how "printf" works in FreeBSD... I hvae reached
> to this point :
>
> #define _write(fd, s, n) \
> __syscall(SYS_write, (int)(fd), (const void *)(s), (size_t)(n))
This is the definition of the write(2) system ca
Ugen <[EMAIL PROTECTED]> writes:
> double pi = 3.14159265358979323846 ;
> printf("%20.19f\n", pi);
> and here is what you get:
> host: [16:45] [127] /tmp>./test
> 3.1415926535897931160
Function "printf" is only working with the 64 bits of info in variable
"pi" not the more-than-64 bits o
On Thursday 16 January 2003 01:47 pm, Ugen wrote:
> Try this:
>
> #include
> int main()
> {
> double pi = 3.14159265358979323846 ;
>
> printf("%20.19f\n", pi);
> }
>
> and here is what you get:
> host: [16:45] [127] /tmp>./test
> 3.1415926535897931160
>
> The error in last 4 or digits i
16 matches
Mail list logo