@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet


Comments:

<0> so... quiet...
<1> Hey people.
<1> What is the ISO happy way of ***igning a Function to a function pointer?
<1> exceptions_router.c:52: error: ISO C forbids ***ignment between function pointer and `void *'
<1> void(*handler)(registers_t* machine_status);
<1> handler = exception_handlers[status->err_no];
<2> zeii: casting ?
<1> Aye, but how do I cast a Void* to a function pointer?
<1> My random stabs in the dark didnt work
<1> lol
<3> (funcret (*func)(args))
<1> I tried that :(
<3> ie, (int (*func)(int a))ptr;
<3> er wait, try



<3> (int *(*func)(int a))ptr;
<1> Ah, thanks Geist :D
<1> like this?
<1> handler = (void*(*extension)(registers_t* status))exception_handlers[status->err_no];
<3> does it work?
<1> nope
<1> exceptions_router.c:52: error: syntax error before "extension"
<3> oh i always have to make it up every time
<1> ?
<3> ?
<1> Hmm
<1> Well, it doesnt work :/
<3> not sure what your issue is anyway. i just wrote a test app that worked fine
<3> int (*func)(int a);
<3> void *ptr;
<3> func = ptr;
<1> Well, ive got really strict settings on
<3> no casting necessary
<3> oh, well that's your problem then
<1> yeah, but the place im storing functions is vodi*
<1> er, void*
<1> Must be a way to dereference it.
<3> try typdeffing the pointer tpe
<1> I just thought that too, ill give it a shot!
<3> it'd be prettier to use anyway
<0> zeii: how about
<0> zeii: (in (*)(int a, int b))(ptr)
<0> maybe the () will do it
<1> Ill give that a shot too!
<0> when it doubt, use () :-)
<1> :)
<1> no good rutski
<3> typedef it
<3> i can't possibly figure why that wouldn't work
<1> yep
<1> typedef does the trick :)
<1> CHEERS GUYS :D
<1> ^_^ I made it cooler too
<1> :)
<3> yeah, typedef function pointer types if you use it more than once. it'll totally save you the h***le
<3> that's the main reason i dont remember how do cast to a function type off the top of my head
<4> hm.. i use this funky thingie to cast int into function pointer and call it [not sure if that's what you want]:
<4> (*((void (*)(kparm_t))ehdr->e_entry))(kparm);
<5> ..(*) ?
<5> Oh.. huh?
<4> (void (*)(something)) is type: pointer to function taking parameters of type something and returning void
<5> Right.
<4> ehdr->e_entry is cast to it
<4> then it's dereferenced by this * on left
<4> and then it's called with kparm as argument
<5> Aye.
<5> Aah.



<5> Makes sense.
<4> iirc the leftmost * isn't needed due to some peculiarity of C standard, but won't hurt anyway
<1> Hey JimPanic, long tim eman!
<1> hey guys, I have a really, really stupid question to ask
<1> if you want to push byte, 1 then push byte 2
<1> but you want to push it all as one word.
<1> would it be 0x0201 ?
<1> or push word 0x0102 ?
<6> if I remember right... the stack on x86 is fixed
<6> so anything less than a word will be null padded to 32 bits
<1> thanks?
<6> sorry, I just completely misunderstood the question
<1> Well.
<1> okay.
<1> yknow how if you .. look i a hex editor
<1> grou pas bytes.
<1> and say we have...
<6> so if you read from esp
<1> 0x0A 0x12
<6> what do you want to see?
<1> but if you group it as 32bit
<1> its like, 0x120A
<6> right, that's the endian-ness
<1> aye.
<6> so if you just wrote 0x10 and 0x20 to memory sequencially, and the whole thing in, it'd be taken as 2010
<1> Thanks :D
<0> hi all
<7> can i find the page directory entry of an address by address/(4*1024*1024)
<8> eek, I really should learn to disconnect my clients when I'm finished with then
<8> *them
<3> yawn
<3> another day of work
<9> http://dev.laptop.org/git.do?p=security;a=blob;hb=HEAD;f=bitfrost.txt
<3> there were better security models of the time
<3> VMS, for example
<3> but it was pretty complicated. MS tried to replicate that with NT and got it mostly wrong
<9> yah, try not to take the little story in the intro too seriously
<3> heh,. that's all i read :)
<3> and VMS came along somewhat later anyway
<9> vax-11/780 and all that
<9> they have some interesting ideas, but not sure how well they will work in practice
<9> for example programs run in a chroot jail with virtually no access.. they get access to the user's files through a daemon that gives the user a file selection dialog box
<9> so the programs have no access to files without the user's say-so
<9> daemon arranges to copy files into chroot
<9> also programs can only overwrite certain data and you can whipe their state by just removing the files they can create
<10> hello
<11> when I think about name 'vista', I immediately imagine a paper bag with eyeholes poked on it.
<12> halo
<5> quake
<13> ut
<5> starsiege
<12> et
<5> rtcw
<12> !
<5> I win.
<12> et>rtcw!
<5> Pff.
<5> It's just a mod.. *shrugs* :P
<5> Dyno?
<12> yes, the primary explosive used to destroy things in et/rtcw
<5> Oh.
<5> Well...then..
<12> <-- ET addict
<14> hi


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #osdev
or
Go to some related logs:

Debian driver pre lexmark Z600 Series
yum install for dr16
pls i need to do mysql databases cluster
spamass-milter+rh4
#lisp
mldonkey-server 2.7. deb
mdadm no devices found for /dev/md0
xnview +deb
python wrapper for iptables
sockets.use_system_read



Home  |  disclaimer  |  contact  |  submit quotes