wow. thanks. that's looking really nice. i'll change my sources tomorrow after
a good dose of sleep. ;)
alex
Alfred Perlstein schrieb am 2009-07-01:
> Hey Alex,
> People frown on macros, but this could be a good one:
> #define SPRINT(f, fmt) \
> do {\
> for (_i = 0; _i <
Hey Alex,
People frown on macros, but this could be a good one:
#define SPRINT(f, fmt) \
do {\
for (_i = 0; _i < sizeof(f)/sizeof(f[0]); i++) \
printf(fmt, f[i]); \
}while(0)
:D
This should allow you to point to any _array_ and print each
On Tuesday 30 June 2009 00:24:00 Alan Cox wrote:
> Mel Flynn wrote:
> > On Sunday 28 June 2009 15:41:49 Alan Cox wrote:
> >> Wojciech Puchar wrote:
> >>> how can i check how much (or maybe - what processes) 2MB pages are
> >>> actually allocated?
> >>
> >> I'm afraid that you can't with great preci
thanks for all the help. i decided to take the pill and coded all the fprintfs
by hand. here's the result. usually i'd stick to a higher level languag, but i
need C's inline assembly support:
struct Header
{
u_int8_t rom_entry[4];
u_int8_t nintendo_logo[156];
u_char
On Tue, Jun 30, 2009 at 08:21:03PM +0200, Alexander Best wrote:
> thanks. now the output gets redirected using >. i'm quite new to programming
> under unix. sorry for the inconvenience.
No problem; we all had to learn sometime. But what I suggested should
work for every platform that adheres to P
Alexander Best wrote:
thanks. now the output gets redirected using >. i'm quite new to programming
under unix. sorry for the inconvenience.
so i guess there is no really easy way to output an inhomogeneous struct to
stdout without using a loop to output each array contained in the struct.
cheer
thanks. now the output gets redirected using >. i'm quite new to programming
under unix. sorry for the inconvenience.
so i guess there is no really easy way to output an inhomogeneous struct to
stdout without using a loop to output each array contained in the struct.
cheers.
Rick C. Petty schrie
2009/6/30 Alexander Best :
> should be stdout.
>
>
> struct Header *hdr = rom;
>
> int new_fd = open("/dev/stdout", O_RDWR);
>
> printf("SIZE: %d\n",sizeof(*hdr));
>
> write(new_fd, hdr, sizeof(*hdr));
>
> close(new_fd);
You should really be checking what open returns, opening /dev/stdout
for read
On Tue, Jun 30, 2009 at 08:03:21PM +0200, Alexander Best wrote:
> should be stdout.
>
>
> struct Header *hdr = rom;
>
> int new_fd = open("/dev/stdout", O_RDWR);
> printf("SIZE: %d\n",sizeof(*hdr));
> write(new_fd, hdr, sizeof(*hdr));
> close(new_fd);
Why are you reopening stdout? It should al
should be stdout.
struct Header *hdr = rom;
int new_fd = open("/dev/stdout", O_RDWR);
printf("SIZE: %d\n",sizeof(*hdr));
write(new_fd, hdr, sizeof(*hdr));
close(new_fd);
Igor Mozolevsky schrieb am 2009-06-30:
> 2009/6/30 Alexander Best :
> > that works, but i really want to have a pretty out
2009/6/30 Alexander Best :
> that works, but i really want to have a pretty output to stdout. i guess i
> have to stick with printf and use `for (i=0; i < sizeof(XXX); i++)` for each
> array in the struct. just thought i could avoid it.
>
> btw. `./my-program | hexdump` works, but if i do `./my-pro
2009/6/30 Alexander Best :
> thanks. but that simply dumps the contents of the struct to stdout. but since
> most of the struct's contents aren't ascii the output isn't really of much
> use.
How about ./your-program | hexdump ?
--
Igor
___
freebsd-hacke
that works, but i really want to have a pretty output to stdout. i guess i
have to stick with printf and use `for (i=0; i < sizeof(XXX); i++)` for each
array in the struct. just thought i could avoid it.
btw. `./my-program | hexdump` works, but if i do `./my-program > output`
output is being creat
thanks. but that simply dumps the contents of the struct to stdout. but since
most of the struct's contents aren't ascii the output isn't really of much
use.
cheers.
Tom Evans schrieb am 2009-06-30:
> On Tue, 2009-06-30 at 18:12 +0200, Alexander Best wrote:
> > hi there,
> > i need to output the
On Tue, 2009-06-30 at 18:12 +0200, Alexander Best wrote:
> hi there,
>
> i need to output the header of a file to stdout. the header looks like this:
>
> struct Header
> {
> u_int8_t rom_entry[4];
> u_int8_t nintendo_logo[156];
> u_char game_title[12];
> u_
hi there,
i need to output the header of a file to stdout. the header looks like this:
struct Header
{
u_int8_t rom_entry[4];
u_int8_t nintendo_logo[156];
u_char game_title[12];
u_char game_code[4];
u_char maker_code[2];
u_int8_t fixed_val;
i am not able to made rcpbind,
i get an error while making the rcpbind
like this
RPC: Unknown host
showmount: can't do exports rpc
Thanks in advance
--
S.MALATHI
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/fre
Mel Flynn wrote:
On Sunday 28 June 2009 15:41:49 Alan Cox wrote:
Wojciech Puchar wrote:
how can i check how much (or maybe - what processes) 2MB pages are
actually allocated?
I'm afraid that you can't with great precision. For a given program
execution, on an otherwise idl
18 matches
Mail list logo