11 Oct
By: Greg
they can be, btdthts - but I can’t recommend it sans “MAJOR ERROR”
PoppaVic, best profs I’ve ever never call me stupid for not having 5 years experience
Anyways, we clearly need to agree to disagree.
prof. that smash the head to they pupils with some brick aren’t really educative
I didn’t ask about profs, “professor” is a title suggesting their value
whereas prof is a term for any educator.
sheesh.
oops
sir, you are very young, and borderline stupid.
it just show your limits cause you can educate without being violent
well, don’t look at me - I been nice for at least 20 min
just so everyone knows, PoppaVic is the superior being, everyone else is stupid
PoppaVic, the abuse you were submitted to as a young child has shown indelible marks in your adult behaviour.
ok, bye-bye, hiffy
Damn.
idjit
let’s not feed the troll
I was never “abused”. I’ve met “abused”. My Dad was a teacher, all the places I went, and oh… lord.. Do not cross the ol’ man
I was being crass.
Ma’ had the low-justice; Dad had “high-justice”.
hi everyon
Now, get past it kiddies No, hiffy, you were playing a card - I trumped it. Die.
if i’ve a pointer to a leaf in a binary tree, is there a method by which i can traverse back to the root??
given just the pointer? find it and keep track of where you’ve been.
bhara1, iirc, only if you have a pointer to the leaf’s parents. *parent
some folks believe that it’s all just nodes.
w/e.
see i don’t have the pointer to its parent.
a node is not a container. At best it is a subcontainer
PoppaVic, you’re the one bringing up beating with belt buckle imagery here. It’s easy to extrapolate
bhara1, tough luck. Start from the root and count backwards.
ok bhara, what you need to do is iterate through ram looking for pointer references through your node
he got there - he wants to get back
yup .
This is wy I always think of containers-and-objects-of wy/why
i think you didn’t get the problem.
or you didn’t get the solution
treat the found reference as either a left or right child pointer of another node, and try searching again
i only have pointer to the leaf and root pointer now i wan’t to go back to the root using leaf pointer.
well, it’s not my prob - I solved many of those long ago: this is /your/ “problem”
until you find no references, then go down one level & you have the root
you cannot.
there is code that lets you “backtrace”, but it’s just as troublesome as “whre the fuck was I?”
bhara1, i mean, it just doesn’t make sense. Without a parent pointer you can find where you came from, and it’s easier to just keep the root pointer in a variable somewhere. *you can’t find
behave..
stop expecting a node to have a clue about more than it’s content. And, do /not/ tell *me* to “behave” - you ain’t earned the goddamned right
…
ooooooo Pooppavic is angry..
yer a dolt, and I found yer admonation offsense offensive
i’ve given him a solution, it’s up to him to implement it
there are several, we can’t save idiots don’t forget “iterators”. They are freakish and non C
s/iterators/Iterators/
iterators as in Ruby?
i like to think any search problem can be solved with a brute force walk through ram
yer call, not mine - I is a rude fucker
exploding toenails aside?
a bonus, maybe
no… always via a “record” and an “interface” Often it’s simply recursion or iteration
recursive iteration?
either/or/both
How is the project coming Poppa?
Folks, ( as a rule ), have no right to fuck the data itself getting structures and concepts. you must remember: no one gives a shit except me. Thus, I tweak and squeeze as I like - I no longer have anything like a schedule. otoh, I do ask around. Folks that can’t write C and use posix are gonna’ be well-and-truly-fucked. u otoh, I do ask around. Folks that can’t write C and use posix are gonna’ be well-and-truly-fucked./u I’ve no patience/tolerance for “but, I is special” there are at least 2, I think 3+
www.unix.org
I don’t mind “I is special” but “I is special so . . . ” is a bitch
I’m looking for something that is a mere simple paragraph, not a large theoretical work.
it says there.
No, “I is special” is the issue. They need to deal with it in a /non-special/ func never happen, trust me
anyway, it is a standard for portability amongst systems. mostly only unix-ish systems consider it.
Can I have the URL for the “posix standard draft” perhaps?
to me, POSIX implies “OK, fuck it - let’s all treat files the same”
For example, Win98SE is NOT posix, yet XP/Vista claim to be (to some extent)
I /know/ it’s more than files, but…
that does not begin to explain what it really means, or is about
www.unix.org/version3/
Ok. Thanks.
Yeah, doze screws up six ways from sunday
Anyone reccomend a good C graphics room ?
“C graphics” in what sense?
I really want to do some demo scening but don’t know how to get all the kewl toolz going
there are issues between Solaris and AIX and whatnot. Now, tell us where.
C code saved as JPG?
Like demo scene / making tile editors, making videogames
check out ##opengl maybe
I know c … but only as far as console stuff
There are no goddamned “C graphics room”
I have a graphics room so there is atleast one
well, yer fucked
and never say “I know C”
hahaha sorry The only stuff I can compile is console window garbage and I want to start doing full screened demos
Hey people, are we allowed to ask questions about specific code in this channel? I’m stuck, but I know lots of channels have guidelines about that
I have been searching the net for weeks and am having a hard time finding a way in
in short, yes
Folks can believe what they want.
C doesn’t care
well, learn to use the openGL by reading a book I can recommend “The Redbook”
thats a good start cool
hope you got some math skills
C still won’t care
basically, don’t paste stuff in here (use a paste site such as the one in the topic) and ask reasonable questions (such as “how does this work,” rather than “does anyone use such-and-such?”)
hi, if for example a 32 bit wide number is stored in two 16 bit units how can I get that 32 bit number ? is a function for that ?
still, you can use this powerful but dangerous language to accomplice it
I have a function declared in the .h file like this: FARPROC AEBAPI AEB_HostGetFunc( HOSTFUNC hostfunc ) ;
geezus
Now this function is not implemented anywhere in the .c file
C? Do we care?
How is that possible?
kantor, you have to do it yourself.
not really
maybe a library implements it
perhaps it is in a library.
I am sooo tired
csaba,
how familiar are you with bitwise arithmetic?
PoppaVic, you’re repeating yourself
it probably is in a library!
xsdg, very
use arithmetic to produce a long from those 16 bit things.
http://rafb.net/p/C43AId28.html I have an array and I’m trying to make a sorted array of pointers without altering the original values
ok, so basically, you want to stick the first number in the top 16 bits, and the second one in the bottom 16 bits
So this is how I can import functions from a library?
I just don’t know the formula, how to do it . . . xsdg
no, the linker does that.
I don’t want to C you and twkm and Cin and such this tired. It’s… depressing and end-game
this entire channel is repeating itself every damned day since nobody ever trust their book
the header file provides the compiler with information about the function that will later be linked.
xsdg, I gonna tell you exactly what I want, ok ?
The sorting algorithm is right, displays the right moves, but only some of the variables actually get swapped; like with 4 3 2 1, it will move the pointer to ‘1′ to the right spot but the rest is just garbage
base 65536 arithmetic.
lol
@twkm: ok but there’s nothing here that says to the linker which library it should use… it doesn’t #import anything
Unknown command, try @list
ok
I really care that you help here, and care. I don’t care for yer anti-american and anti-poppa crap.
right, that’s for you to supply elsewhere. not that c has #import anyway.
yeah, #include
how’s spivak going?
America aint so hot (all the time).
twkm, thanks
but I’ve compiled this code as it is and it worked without me supplying anything…
ie. USofA does have its problems.
luck?
hehe
PoppaVic, i’m not anti-american; i don’t particularly care about america
only standard functions?
maybe
azi`, it isn’t at the moment. is yours?
yes, like I said, it doesn’t #include anything…
everyone has issues, but nations are not people. We discuss people.
FARPROC is defined in windows.h which I guess is loaded automatically
amen, nor I - and I am here.
sounds unlikely, but i suppose it is possible.
but I don’t think that AEB_HostGetFunc( HOSTFUNC hostfunc ) ; is a standard function… I know the host application which probably implements it, but I never provided it for the compiler
windows.h does all sorts of things, nobody likes it
ok anyway thanks
Anyone have any suggestions? I’m willing to pay if someone will 1 on 1 tutor me until I get it to work
and, no, AEB_HostGetFunc is not a C standard function - never will be
ahh, but he didn’t #include it, so it would be way annoying for it to #include itself.
some days, I simply filter more and more. I have nothing to dabate - and certainly nothing from putzii that ain’t.
did you ask a question?
yeah
oh; missed it, sorry
thanks
dabate/debate
dabate is more RadSurfer spelling
sorry, my eyes are going and I am as well I /believe/ there are folks in ##C worth speaking with, that at least have a clue to begin with, and maybe a leg to stand-on. bI /believe/ there are folks in ##C worth speaking with, that at least have a clue to begin with, and maybe a leg to stand-on./b otoh, I won’t tolerate lil’ snots
!dontcastmalloc Puddle
There is no need to cast the result of library functions that return void *; it makes your code hard to read, adds no value, and can hide a bug if you don’t have a valid prototype in scope.; see http://www.cpax.org.uk/prg/writings/casting.php
so, the problem is that your pointers are getting munged, which probably means that you’re not doing things with the right bitwidth somewhere
On an unrelated note, I do wish I could find my ipod.
haven’t started looking through the code yet, though
I avoid telling kids to get off my lawn with the 10′ chain link + 2′ barbed wire.
LordOllie, much better to give them a rant on our favourite malloc implementation algorithms.
Haha
if you provide the right argument types and they aren’t promoted. and if the return type is int or the platform doesn’t care about that then it will “work”.
yeah, it’s about 1730 here, I am tired, and hungry. I can’t save kiddies that believe they can visit arcades or play videos and “Code C”, and everyone I give a shit about knows this. The kids don’t understand
puddle, also, on line 23 you seems to allocating pointers to int, but aren’t you aiming for a array of int? s/seems to/seem to be/
yeah, line 23 looks wrong :o)
ahh, i’m not as fast as you guys, thanks, I’m looking over it!
Auris-: I presume this is a case where casting malloc caused harm?
@twkm: I think this is most likely a function imported from the host application… the host application is an exe file, which probably supplies the function for the dll once it’s loaded… if that’s possible at all
Unknown command, try @list
@list
http://www.cse.unsw.edu.au/~dons/lambdabot/COMMANDS
no need to use “@” before nicks
but he has a @ before his nick
no he’s opped
When I was 20, I knew everything. When I was 25, I realized I was a dumb kid at 20, but NOW I knew everything. At 30, I realized I was a fool at 25, but now I really did know everything. At 35, I realized . . .
csaba, no he doesn’t. it’s not part of the nick.
ok
(Repeat ad nauseum)
Teckla, so you never learned?
Auris-: hehe, yep
even if it were possible it doesn’t really matter to the c compiler. if the linker will search heaven and earth then it will probably find things without help, but usually you have to help if they aren’t provided by the system’s standard libraries (which might be way more than just one library of c standard functions).
how can i make a program re-execute itself infinitely by using execve?
do you have any specific purpose in mind?
It was amazing how smart my folks got - as I got older
maybe man fork
puddle, stylewise, you have an ugly misindentation on line 58. the closing brace is part of the if, not the for. I’d suggest you use {} with the second for too.
Hello.
make use of argv, perhaps.
can’t it be done with execve?
ok I guess the compiler just ignored it then… in any case, it works, and that’s the problem because I’m trying to translate this into delphi code… and the resulting dll works for one function, then it crashes for no reason and I can’t figure out where…
lol, I hear ya
yes but i’m doing a mistake in the 2nd argument
what I fear is that many folks here ain’t seen the other side of the coin. And, it bleeds
i’m using it as execve(”argv[0]”,”argv[0″,0);
increase the compiler’s warning level, perhaps it will puke-up something you can use.
ok
ahh, you don’t know any c. or at least not much.
efnet has a #Delphi channel, you might want to try there.
Youthful arrogance is a constant of the universe
assuredly, and then folks want to pretend they never objected to their parent, and that then they can “Get er done”
Should I care about releasing resources (file descriptors, memory) on an error path if I known that the path leads to the termination of the program?
Auris-: man… optional braces are so painful
Thats okay, I don’t know any C, I just pretend to like a lot of programmers XD
pretend and die ;-
depends on the o/s.
If I ever invented C2, I think I’d make braces non-optional
just don’t “advise”
yeah
POSIX-like. FreeBSD/Linux.
i need help with E/A multiplexing. i m trying to test the select function on my gentoo-2.6.21 it doesnt return that the socket where i want to read from is ready so i would like to ask if someone could take a look at my code (about 50 lines) http://nopaste.php-quake.net/5353. thanks
I was making a statement about how so many people “know” C
There was this one program I was working on where I commented the contents of an if/then that had no braces. of course, then the next line just became part of the conditional
It is more of a style question.
well, it’s iffy - if you ever find a consistent clusterfuck of .l/.y that works, let us know
I know, I know
because of those platforms, yes, and a debugging question. on other platforms it isn’t quite.
Sounds familiar!
Puddle, seems to me that the probable cause of your problems is how you try to print the sorted array.
OK, I shall go up to dinner - and return if TV is what I expect.
stay well
ugh, don’t cast so much.
I don’t understand anything but the “yes” part.
I will research it later. Thanks.
where do you mean?
both of them.
Auris, thanks a lot for your help. hmm, I changed what you were speaking of before and I’m getting the same problems, I’m looking at how I’m printing it now.
also, since select changes the fd_set shouldn’t you put the fd back in it after each iteration?
i think i didnt get “dont cast so much”. do you mean typecasting?
don’t forget sizeof(int) when doing arithmetic
uh, yes.
how can I check if a file is existing? I know about dirent.h and stat() but the file shall be in fact anything, I dont want to check for file, directory, symlink by any line
you should really be using a[i] rather than doing arithmetic
Puddle, you have an array of int*. if you dereference the pointer, it does not turn the array into an array of int.
I just want to check if an entry is existing
and that i may be misleading? err and that i may be misleading? then use stat. i prefer just using the file and handling the error.
so i should cancel the (void*) on every read/write?
I can only guess that you thought I was talking to pleed when I was actually talking to Puddle other than that, I’m totally confused
Im using stat but I dont know if its enough to do if(struct)
so I’m using things too interchangably? like I should be using like *array[] rather than **array ?
xsdg, C will do pointer arithmentic just fine as long as the types are correct. it knows how much to skip to get to the next element.
sizeof (int) doesn’t tell you how many value bits exist.
using like open?
if that’s what you’d do if the file is found to exist, yes. what would you do if it doesn’t exist?
Puddle, no. int** ar is the same thing as int* ar[].
yes. there is no point to it.
then I’d do something else of course, its just about determining if the entry in the FS is existing or not - no matter what kind of
whatever.
I’m really confused now.
when I use the free() function, does it also clear the memory allocated to the struct/variable I’m freeing?
sizeof (int) * CHAR_BIT might not define the number of value bits in an int.
ok so it s just a reading problem or does it use cpu time?
not usually. removing a useless cast won’t consume any cpu time. if one is willing to ignore some platforms you can assume that it would.
Auris, so you’re saying that I need a separate print for function rather than trying to use the same one by just dereferencing, correct?
i mean keeping a useless cast instead of removing it
what’s CHAR_BIT? I think I’m having trouble here because I don’t know how we got to talking about whatever it is we’re discussing
Puddle, that would be they way of being able to print it. I don’t know if that will still help you understand why that is. s/they/the/
CHAR_BIT is the number of bits in a char on your particular platform/OS/CPU/compiler. It is, most likely, 8 on your system.
for some reason when i free a struct holding data, and call the data after free(), it returns the data
ok, that makes more sense now
But one some systems, like embedded systems, CHAR_BIT is often 16 or 32 (or perhaps even some other value). s/But one/But on/
that reason would be what we affectionately call “undefined behavior” around here
free() doesn’t necessarily do anything to the memory other than allowing it to be reused
how can you think it is sensible to call data after you free the thing holding it?
Puddle, the hard part is that you are not dealing with real C arrays here. you are using blocks of memory that contain sequential ints (and ascend has sequential pointers to int). if ascend was a pointer to an array of int (int (*)[N]), you could just dereference it and print with the same function.
well its not supposed to
that it happens to seem to do something doesn’t mean it is sensible, nor should you expect an explosion.
Puddle, but then you couldn’t sort it like you do.
basically my test failed
i changed it to set fd_set after each select but that doesnt help. i ve also set waittime to NULL for waiting until read is ready and now select doesnt return. http://nopaste.php-quake.net/5355
yeah, you can do i.e. for(list = head; list; list = list-next) free(list); but it’s not a good defined way
thats basically what i am doing
Auris-: I think I understand, I’m playing with it now. I appreciate it.
well, it’s a common mistake
“not good” is a bit of an understatement, I’d say either use two variables or iterate backward
your select’s maxfd is probably wrong. with a single fd in the set maxfd should be fd[0]+1
well, iterate backward won’t work unless it’s doubly-linked, in which case you could just iterate forward, but still
Puddle, alright.
basically, after you free() something, don’t touch it regardless of whether it seems to be the same or not
though if you do touch it don’t expect that something else will tell you that you made a mistake.
it is doubly linked: tempHold = newMember-next; free(newMember); newMember = tempHold; ok
then just iterate through and free member-prev
thanks you re right! strange. the problem is that in the example in my book they took 0,1,2,3,4 for the fds so i thought it would be a count of fds. thanks
curious, why prev instead of next?
because you’re not going to touch prev again but you need next to be able to keep iterating through the list again, don’t touch anything _at all_ after you’ve freed it conversely, don’t free something that you still need
ok i think i know what you mean, it just doesnt feel intuitive that it has memory after free, even though its open being overwritten
ok, think of it this way the has a list of blocks of memory that are available for use
Auris-: You are my hero, it works.
free() adds a block of memory to that list
your afro hero
winux when you free() something, you’re simply telling the OS that that part of the memory is no longer being used by your program, so it is free for the OS to reuse that space. That does not mean that the OS will immediately write something in that space of memory, unless you have a very small amount of available memory.
i c
man… got me :o) yeah, what mactimes said
free() may even set it all to 9, just to be a bastard
Puddle, there’s stil one thing. where you print pointers with %p, the pointer should be a void*.
so does a ‘garbage collector’ remove the data in the memory?
winux Best option in my opition, if you want to clean garbage? Write NULL to all space before freeing it.
so is there a different %p, or I need to change my int* to void* throughout the program?
mactimes, what’s the point of that? Auris-, doesn’t say that on my manual. why does it have to be void*?
Cin None, as I can see. But if he is so worried about leaving garbage in memory….
maw, it’s actually a good debugging technique to set (to be) freed memory to something specific.
im just curious
except when it isn’t actually returned to the o/s.
Cin, because that’s what printf expects it to be.
twkm Welll, that’s a bit deeper and I won’t dare digging into it, as my knowledge regarding that is very superficial.
Auris-, i’ll do you the favour of inserting basic logic: why does it expect void*?
the standard says it does.
twkm Please, feel free to explain if you with so.
i’ll check the standard then
twkm wish*
mostly just remove the assumption that the o/s is involved. “when you free the pointer you declare that that block of memory is available for reuse”.
twkm I see.
the main point in the cast is to convert the value’s type, but it may also change the mechanism used to pass the value.
twkm, ah
e.g., if a pointer to int is done in units of “words” while a pointer to char is in bytes, such that to covert between them you need a little arithmetic.
ah, true
that’s a very good why.
passing might bite one too, even if today you know that only integers vs pointers vs floating point might have different mechanisms, the future might find a platform that finds it useful to be more granular (pointer to [char,short,int,long] in address registers 0 to 100, pointer to [void,char] in address registers 101 to 1000 — or whatever). (that if today scenario isn’t excactly certain either, but does decribe a fair majority)
has anyone worked with functions such as WFIFOB, WFIFOP, etc?
what functions might those be?
they have to do with sending packets & such.
where?
eathena, etc.
they sound horrific.
hahahaha, your telling me.
eeek, the things google finds. (/me laments not having stronger shades on)
eathena is that unofficial RO server application?
can I dlopen a library twice and get two copies of all globals?
sean_^, don’t know. find out and tell us how it worked.
well I want to have n copies of gnu readline
what on Earth does that mean?
it’s defined in common/socket.h
is struct node* blah{}; the same as struct node *blah{}; the asterisk
struct node* blah; is the same as struct node * blah;
but not *blah? Im asking because it seems to vary across authors
also the same
the whitespace you put before or after the * doesn’t matter there
thanks
how does one make graphical windows without the use of libraries?
one doesn’t.
one does not _
lol but it is possible right?
then prove it.
was a question
you have 24 hours.
only your imagination can stop you
ok by the tone of your voice it sounds hard written voice
be the 1st, and win a big $$ prize.
look at the libraries code
^^
1. there is no portable way to do it. 2. there is no reason to do it.
beats playing games?
you might consider using the X11 lib or whatever lib win32 uses to do the same
mind some video cards have gui api’s designed into them; still takes a library to call/categorize the functions
What do you mean by “without libraries” ?
ming you…
hi ppl
without including anything
What’s your real goal here? What are you trying to accomplish by avoiding “libraries” ? Why are you trying to avoid include files?
… You’d always have to use API calls to create graphics in Windows. It’s a windowed environment. I don’t think I understand how, although I’ve never programmed on Windows.
just to learn how low level graphic making works
ultimately, all GTK calls do *something* using X11 libs, and X talks to your hardware.
I believe you’ll have to write your very own video driver to accomplice it
Who’s low-level graphics? You want to program your video card directly?
you can to some degree, create your own “primitive” functions.
s/Who’s/Whose/
Let’s say I have a pointer to something. I fork. Parrent and child continue from that point and each has a duplicate of all data. Does the child have the same pointer as parrent, or the data is copied to a new location and pointer updated? (I think it is the first option… but have to check)
Since C has no graphic support, you must be more specific about which platform(s) you wish to target.
how bad is it to put a jump label at the end of a loop with only a “continue;” followind?
i see, specifically windows
It’s the same. So, you are targetting the Windows API? You must use api calls. By definition. That depends on how good it is …
It is not; Because they live now in paralel, and if they point to same location in memory - than what parent changes will affect what child has and vice versa.
you may consider writing an entire new OS, just to be sure you don’t use any libs not written by you
I didn’t say they point to the same location in memory.
I need to “continue” out of a nested loop.
Pointer values are not memory addreses. Windows does not like to share the video hardware with program which refuse to use its provided APIs. Most OSes are like this — OSes are created, among other reasons, to share the hardware amongst multiple processes. for (; { if (foo) goto x; bar(); x: continue; } for (; { if (!foo) bar(); }
The clock() function of time.h always returns 0. Google wasn’t helpful giving a solution for this. Anyone know what could cause this?
What does clock() do?
It should return the number of clock ticks since the program began execution
Hmm, nearly correct: What is a clock tick? And how many clock ticks have passed when your program calls clock()?
A cycle on the processor? Probably an extraordinarily large number
for(;{ for(; { if(foo) goto cont2; } cont2: continue; }
Well, you’ve not got it right. clock() returns the (approximate) number of clock cycles which your program has _used_ so far. Why not use break?
I was under the impression you meant since the computer had started.
hie
me being stupid once more. thanks.
What I meant?
sleep
prec, http://pastebin.com/d3a0bdeaa
wz, continue at the end of the loop is quite useless anyway.
I never attempted to explain what clock() does; instead I made you do it. In this way, I can simply never be found to utter a lie.
That sample program returns 0 for each call to clock().
I can’t see your sample program: http://@www.rafb.net.:80/paste/
Auris-: That was a hack to prevent compiler issues.
label:;
That’s looking even worse!
http://rafb.net/p/tcyAAr33.html
anyone here worked with functions like RFIFOB before?
while (!isspace(*++p)) continue;
and RFIFOP ?
j ##posix
0 ?
re
Pencil, do you think changing nick and repeating a question helps?
prec, If it returns the number of clock ticks since the process start, then whether it were returning the number of ticks since the program started or the number of cycles used, it would return something 0
let’s face it, he’s trying to “milk” it, lol
Pencil, eathena does have its own irc channel (on some random ircnet). google will tell you.
It does not return the number of clock ticks since the program start.
prec, Alright, then it returns the number of cycles used?
An approximate number, yes.
why don’t you read the manpage, it says exactly what the return value means
RFIFOP? Hmm.
prec, then in a loop, wouldn’t clock() eventually return a number greater than 0? It isn’t sitting there not using cycles.
no auris i got disconnected.
instead of this “well, it says clock, it must therefore mean what my interpretation of a clock is”
and this is my alternative nickname.
wcstok, I have, and the wikipedia entry…
* AyeJay (n=milk@pool-71-105-243-178.lsanca.dsl-w.verizon.net) Quit (Read error: 110 (Connection timed out)) as you can see.
Pencil, I am quite aware of that.
wcstok, Aye. Your word against mine.
your idiocy against my manpage granted, nature does produce some resilient idiots
it’s defined in common/socket.h
yeah i checked maw
it’s just a macro
so maw, i’m guessing your familiar with it?
I havn’t looked at athena for years
i was wondering if you knew how to make it read the packet between the offset of 10-16, etc.
WFIFOL(fd,10) ?
i’m working on some emulator files, and i just got the login server working, it’s just i can’t actually use the username&password.
dunno, I’m off for bed now anyways and you have to use WFIFOW to get those last 2 bytes
aw dang lol. and WFIFOW isn’t that for WRITING bites *bytes
hehe, yeah use RFIFO*
haha thanks man. i just need to know the meaning of each function
L reads long words (4 bytes in this case), W reads words (2 bytes in this case), B is 1
oh sick thanks let me write that down dont go to sleep yet! haha
hehe
and what is P then?
points to it
so if i were to do RFIFOP(fd,10) it’d point 0 - 10 ?
question
so you could do, char *p = RFIFOP(fd, 10), then memcpy(somewhere, p, 6) i believe
I’m making a program to reverse a string but I’ve run into a error I can’t seem to figure out
hmmm.
no, it points to 10 - n
Just don’t bother reversing a string, that’s a silly thing to do
N is..? the END of the packet?
http://pastebin.com/m104125d8 well there’s the code
nah, N is the end of your page, but I believe there is a way to figure out how far the data goes
really strange.
WOW NM lol
because i have this packet the password starts at offset 10
not really. Get a book and you’ll see
and ends with 00 0E so i dont know how long the password length is, it’s so hard
well, that what gravity decided
nah this is a different emulator shining lore.
the password ends at 00 most likely
yeah it does 10 - the packet 00. the username & password are in the same packet. packet 0×1D.
get the pointer to 10 and read from there
0000 1D 00 04 00 03 00 00 00 00 0F 44 61 70 70 6C 65 ……….Dapple 0010 00 0E 41 70 70 6C 65 00 03 02 70 00 00 ..Apple…p.. there goes the packet password is dapple, username is apple.
char password[128]; char *p=RFIFOP(fd, 10); strcpy(password, p); should work of course, password might get overflowed
can you explain how that would work? im actually trying to LEARN it rather then copy & paste and expect things to work you know
sounds like you need a book then and read about pointers
oh i nkow about pointers.
a very common subject when it comes to C
i watched the video haha have you seen it?
hey guys, I’m trying to assign an int to this formula x += (2 * 15 + 20) % 6 * 4
yah, I’ve seen it
but it’s not working when I type myint = x += (2 * 15 + 20) % 6 * 4
the guy who made the clay figures, etc? but yeah, you see that packet?
In what way is it not working?
“assign the result of this expression _to_ an int variable”
yeah, but you should read about em in a book rather than watching stupid videos
yes :F
Assignments are always copy operations.
i have a book but it’s for C++
What is the value of the RHS?
but i know how pointers work
they are all the same
14?
Try this: x += (2.0 * 15.0 + 20.0) % 6.0 * 4.0
What is the value of the expression (x += 14) ?
Error 1 Only assignment, call, increment, decrement, and new object expressions can be used as a statement FDocuments and Settings\will\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\Program.cs 13 13 ConsoleApplication1
practically, you should know how the code I wrote works then
in your snippet, char password[128]; char *p=RFIFOP(fd, 10); strcpy(password, p); is p the value it’s setting?
Let’s see the entire function.
char *p=RFIFOP(fd, 10); i understand it points p to 10.
http://@www.rafb.net.:80/paste/
but look at the packet
p is just a pointer to the packet which you use as a string
C is stupid
how will it know when to stop maw?
compare x = y++; and x = y += 1;
null-termination _
hmm how would i pull out “Apple” out of the packet then?
you don’t need a packet to get the string “Apple”
Apple is the login name fax. this has to do with username & password entry.
Can you explain from the beginning what you’re trying to do?
i’m trying to use RFIFOB, etc. (im making a emulator)
RFIFOP is defined as #define RFIFOP(fd,pos) (session[fd]-rdata+session[fd]-rdata_pos+(pos)). Tell him how he can suddenly read a string (yes, it’s nullterminated) which starts at offset 10 out of this if you care. I need to get some sleem *sleep
alright maw, thanks i appreciate your help.
seeeeeeyou
well basically, i’m trying to figure out how i can get RFIFOP to read the offset 10-16 from a packet. or something.
hm, in the past two hours, 41 unique users have spoken in ##c hm, in the past two hours, 41 unique users have spoken in ##c
“You’re all individuals! You’re all different!”
yes, we’re all individuals!
whats the difference between / and % ?
Look it upp
none. use them interchangeably
I did I still dont understand
lol
Var1 is assigned the value that is the result of dividing var2 by var3.
one is divide the other is mod
% is like an optimized /… its much faster… but sometimes it gives a too small result
Var1 is assigned the value that is the remainder when var2 is divided by var3.
Consider the equation quotient * dividend + remainder = divisor
int a = 3; while (a 20) { if ((a % 3) == 0) continue; a++ ; Console.Write (a);
Console.Write ??? looooool what the fuck
#c-sharp
haha
I guess that’s the channel he needs.
quick, what’s everyone’s favorite unit testing framework for c
we write tests manually
…thanks
C
you must be so much better than me
Most probably
testing?
assert() is nice
better than testing http://jaguar.it.miami.edu/~chris/proofs_of_computer_programs/index.html
Of course, adding tests can’t hurt that methodology. Uh …
huh?
Dare I ask? Why Anna Kournikova? “why not?” I should expect this answer.
hehe
Why not Mr. Rogers? Or Augustine Humphreys?
i just clicked on that link and i’m not sure what i read
can c interface database? and how?
Yes, and it depends on the database.
it s mysql or access
http://dev.mysql.com/doc/refman/5.0/en/c.html
One would think you could use the MySQL client API.
You can probably search MSDN ( http://msdn.microsoft.com/ ) for the C-based Access APIs.
You probably should simply avoid Access.
The MySQL API and Access API are almost certainly different.
Almost? I would take a step further and say that they are definitely different. Unless you’re wearing really wierd glasses.
He might be able to use some generic API like ODBC (?) maybe… He might be able to use some generic API like ODBC (?) maybe…
well everyone in this channel will be pleased to hera, I finally bought K&R today ueveryone in this channel will be pleased to hera, I finally bought K&R today /u
God dammnit another copy sold
“I know it them ’cause they don’t got good grammar”.
Do you have to fclose() a FILE* even if the opening failed?
no
fclose() wants a non-NULL FILE pointer value.
if the opening failed, what are you going to pass, NULL?
Do you have one of those?
That might explain why that program segfaults ^^
hopefully
That was more of a rhetorical question
That’s typical of me heere. s/e// s/e//2 Rather.
wassup guys, anyone here experienced with RFIFOB & RFIFOW etc? maw went to sleep, and he seemed to be the only one familiar with it.
Hello, is there a program that implements genetic programming in C?
At least one, yes.
Where can I find that at?
maybe the AI source code repository
Using your favorite web search engine?
OK What search terms find it?
….
“a program that implements genetic programming in C” Or maybe even just “genetic programming in C”
OK Is it possible to evolve programs using genetic programming?
May the force be with you, bioeng
someone should just write a compiler that takes plain english as input… like I can write an essay to the computer decribing what I want to happen, and it’ll parse it
OK, so the answer is no, then
one of my friends was evolving lisp programs to graph data sets you could that quite easily
Someone already implemented that.
what when how
There once was an int named foo, His value was 6.
I turn human-readable descriptions of programs into computer *and* human readable descriptions. You can learn this skill too.
yeah, I’m trying, but it’s hard!
finally i got this crap working haha. but i really dont understand how i got it working! =/
like if I have a pointer to a data buffer, and I ostensibly know the length of the data; how do I print it in raw hex? (recieving radio packets, dont know what structure is being sent!)
How can you not? What is the “raw hex” of a buffer?
like, the kind of output I’d get if I could trap the system and go in with a debugger and look at the memory with ahex editor
I saw that there were genetic programming libraries already implemented and are open source OK
like if I do temp = (u8_t *)dataptr; printf(”0x%x”, temp); dataptr += 8; and loop until I get to my final length? does that “work” ?
+= 8 ?
soun ds like you don’t know what you’re doing
er plus 1
%s\n”, account.passwd); that will output EVERYTHING right? or will that output just like the text in the variable?
….
bought K&R a bit ago
TaSo, any good?
account.passwd = RFIFOP(fd,16); and i was wondering if it’s hiding a bit more.
actually, hrm, I wonder if this radio chipset can send things in sub-byte quantities
void prec_is_too_lazy_to_name_this_well(const unsigned char buffer[], size_t len) { size_t i; for (i = 0; i len; i++) printf(”0x%x”, buffer[i]); }
I’m sure it will be, I just got home with it and my mind is very shot from today so I’ll probably start it tomorrow.
lol cool
I see
could you format this output a little better?
I knew someone IRL named kesselhaus. Which output?
from your prec_is_too_lazy_to_name_it_well() function
Format the output better? Better in what way?
hmm, my RL name is a bit different but it started all at university, where i had to find a name for my computer in the campus net in about 5min
when doing pointer arithmetric, do you have to take account of the size of the variable type or does c do that for you?
well something like 0xAB 0xCD 0xEF 0×12 \n not just 0xAB0xCD0xEF0×12……
anyone here have the syntax to fgets() ?
I have the syntax!
sick can i see it?
char * fgets(char * restrict str, int size, FILE * restrict stream);
no, we just have man-pages to tell us
Heyyyy!!
haha awesome i just saw it on devc++
don’t give away these secrets
.oO(aren’t we the secret service…)
“0x%x “ The syntax? It is basically as your C book explains.
That’s also behavior you can test yourself, without a book.
0; p++) printf(”%f\n”, *p);
anyone have the syntax to sscan? *sscanf
Avoid sscanf. Where is your C reference? ##c is a poor reference; use it for asking questions instead. man sscanf
oooo
did you know that the letters in your name are an anagram for pcre?
im not using linux apparently.
pcre is an anagram of Pencil? I think not. It matters not. Get a C reference; check the wiki.
i think he was refering to you prec =P
Har har har.
well im not sure, but this is a old source code my friend was writing, and im going around rewriting most of the things tryng to clean it up. i=sscanf(line,”%[^:]:%s”,w1,w2);
you can access man pages online.
what should i use in substitute of sscanf?
“online” can mean “on the system” as well as “on the web” Hence the “online manual”. If your system has man pages available, install them. If your system does not have a manual available, it will not help you to use the manual written for a different system. Don’t program AS/400 using a Commodore manual.
mmhm
what if you are writing a commodore emulator for an AS/400?
See the ConsoleInput wiki article, if you’re reading user input from a console device.
sscanf looks for the string in the document right?
Oh, you are already using fgets(), and you want to parse the line?
hold on let me show you the pastebin
You’d need both manuals, plus extra Commodore documentation. But why wouldn’t you use the existing emulator?
http://rafb.net/p/Cqqpq040.html – it’s a bit sloppy. (my first time im still learning)
You could use strtok() instead. Or strcspn or strchr or … etc.
yeah its temporary, my plans are to actually uh, start using MySQL, but for the meantime i have to settle down with text documents i just want to get it WORKING, then ill work on getting it working smoothly
You could mock out the DB api. Or use an existing configuration language such as Lua or yaml or XML or …
prec, what i’m doing is trying to compare x to username, and y to password to make sure they are correct. if they arent correct then it’ll return something like printf(”Invalid username/password”);
Or use an existing authentication API.
hm, i wanted to make one myself so i can understand if i went wrong somewhere, etc. i think it’s gonna eat a lot of memory up. because i put a printf in between the if(strcmpi(w1,”username”)==0){ … } and it spammed the living crap out of me.
strcmpi is non-standard
strcmpi?
strcmpi.
do you mind defining it?
What? I mean, strcmpi is not a standard C library function.
oohhh! so what do you think i should substitute it with?
You may or may not need to substitute anything. It depends on which platform(s) you intend to target.
i may intend to target windows/linux that’s about it. windows for now, then later on linux. my priority is getting this emualator up & running.
posix provides strcasecmp, don’t know if windows does.
hmmm so you wouldn’t recommend vsscanf?
depends. if you have to ask about a scanf family function it is likely you don’t quite know enough to use it well. perhaps this is a chance to learn it.
Windows doesn’t provide any C functions (!) MSVCRT does not provide strcasecmp(), IIRC. MSVCRT does provide strcmpi()
though sfu should provide strcasecmp.
Yes; as does Cygwin. But targetting either SFU or Cygwin is not quite the same thing as targetting Windows. targeting?
the arguments and results are the same, so one might be temped to use a macro somewhere.
im having a little problem. i have something like this unsigned int max = 4000000000, userinput; if(userinput max) return EXIT_FAILURE; if i input 4000000001 it doesnt quit anyone know why?
no one could know
an unsigned int should be good up to 4294967295 why is that?
the standard says it can store values from 0 to 65535, though your implementation may allow larger values. how are you reading user input into userinput?
scanf(”%d”, &userinput);
you should probably use unsigned long if you want 0 to 4294967296 and what does %d mean? s/6$/5/
a decimal value
more specifically?
What type argument does %d expect?
int i suppose not unsigned int?
why do you suppose this instead of looking it up? also, it’s a bad idea to use scanf(), especially for input from a user.
1) you want unsigned long since unsigned int does not have the range you require. 2) %d expects a pointer to int, not a pointer to unsigned int.
its %u
3) avoid scanf; use fgets() and strtoul() instead.
http://rafb.net/p/M06tXN30.html
don’t tell everyone or we’ll all want one.
for some reason recursive macro expansion doesn’t work if I use concatonation in the macro
Don’t use macros for this
it’s a simplified example, the real code is more useful
*Don’t use macros for this*
an unsigned int works fine i dont think i need an unsigned long
I don’t see why the second way works, but the third doesn’t
Do you need integers larger than 65535? If so, then you need unsigned long.
unsiged int goes up to 4294967295
Odds are that unsigned int is the same size as unsigned long on your system. So use the correct one.
I already told you this
techincally, the C standard has 16 bit ints
no
even more technically, it doesn’t specify bits
technically? you mean “in my magical world”?
unsigned int _may_ have a range that large. But it is only guaranteed to have at least [0,65535]
lol
prec k
isn’t the actual definition that unsigned int must support of range at least 0 to 65535
the C standard says int must be capable of storing integers from -32767 to 32767. and unsigned int 0 to 65535.
UINT_MAX must be at least 65535
yes
yes.. which is pretty much the same thing as saying “ints are at least 16 bits”
Hello all I need some logic help
yes.. which is pretty much entirely different to “the C standard has 16 bit ints”
Unasked questions go unanswered …
okay I’m reversing a string *Buf1 into *Buf2 here’s my for loop
what types are Buf1 and Buf2?
for(iLoop =0, iLoopR=strlen(buf1)-1 ; iLoop iLoopR ; iLoop++, iLoopR–){ } both char pointers I want to read Buf1 forward and reverse it into Buf2 but I can’t think of how to do it I’m pulling a blank
iLoop iLoopR?
but platforms for the last 20 years or so have been using 32 bit ints
if you are copying it reversed into a 2nd buffer
so what?
you should iterate through buf1 completely, from 0 to strlen(), just like normal
ya which is what I want to do
your loop currently isn’t going to do it
so assuming an int is at least 32 bits isn’t going to be a big portability issue
so the index of Buf2 is the lenght of of Buf 1 - the null right ILoopR=strlen(buf1) -1
try using a single index through buf1 and calculating the correct index into buf2 to place the character in the middle of the loop
1) “long” isn’t much harder to type than “int”. 2) there are plenty of 16 bit int platforms around today, particulary in embedded land.
well the for Loop is based off the one in K&R
it’s homework, hm?
so wouldn’t Buf2[iLoopR] be the strlen of Buf1
that makes no sense
??why not I assinged iLoopR to the strlen of Buf1
try designing your process on paper, so that you are able to perform the calculations a step at a time yourself. then attempt translating into c it’s clear you haven’t thought this problem entirely through
I have thought this though I’m just not why Buf2[iLoopR] wouldn’t be the strlen of Buf1
there a lot of I32 L64 platforms around today too. So using long when you want more than 16 bits but don’t need 64 bits is inefficient
then use uint_least32_t also, which platform has a 64 bit long where 64 bits is not the native machine register size?
is there an essential function for a linkedlist not listed here? http://rafb.net/p/Mk2YWh37.html feel like im missing something
even on 64 bit platforms, 32 bit data is usually faster except for maybe the first alpha chips, which was something that dec found out was a mistake and fixed
tail?
Hello
then providing a 64 bit long seems a bit silly for that implementation. since that’s what long long would be
what is tail()?
hello
all the normal 64 bit platforms are that way, I32 LP64, even though 32 bits are more efficient than 64
what is “LP”?
long and pointer
ah a linked list consists of a head and a tail
it’s the common way to describe the sizes used. C minimum is I16 L32, old DOS was IP16 L32, normal unix is ILP32, etc.
ah I use first and last as head and tail doubly linked
tail is not the last node
The first alpha was ILP64, but that ended up being a bad idea and was changed to I32 LP64 which is what pretty much all 64-bit system use now
IL32 P64 seems more sane
a lot of code assumes that sizeof(void*) = sizeof(long)
what does it refer to?
[a, b, c] - a is the head, [b, a] is the tail.
ah
I think someone did use IL32 P64, but code that casts pointers to longs and vice versa was a porting nightmare
Thanks!
er, [b, c] is the tail.
hi there.. is this a help chan for programming?
so, using head() and tail() how would you get the second element of the list [a, b, c]?
a google for “I32 LP64″ gives 16 results.. it doesn’t seem that common. for programming in C, yes, generally.
ok thanks….
I mean the terminology doesn’t seem that common, not what you’re describing it to mean.
I get 408 results
that’s if you don’t include the quotes and still, 408 is still somewhat uncommon
I would get tails first element
what is head?
How do i redefine a global variable, if it is called in the script?
[a]
What
no, head([a, b, c]) is not [a]
tail([a, b, c]) is [b, c] and head([a, b, c]) is a
well.. i am confused.. i have global variable.. and can test it and stuff with ifs loosp and whatever.. but i can not seam to change it…. eg if ,y global varable is equal to this change it ot this? my*
ohh so then
why do you believe that you cannot change it?
it syas i am tryign to declare it twice (yes i am a ultra beginner)
head(head(tail([a, b, c])))
that has nothing to do with changing it.
sorry head(tail([a, b, c]))
what is tail([a, b, c])?
How woudl i change it?
ok. with the amazing power of = where is your C book?
i am lookign at it now
Chris, you must be desperate to use CAR and CDR
I think someone did use IL32 P64 — you are referring to LLP64, which is what Windows uses.
“no, that’s the cdr– i mean, the tail.” you want me on that code; you _need_ me on that code
I think i found it… when you change the global value you do not put global at the start.. so it is just variablename = new not global variablename = new
Yeah, 64 bit windows is apparently 32 bit long
ok that worked thanks guys
does fgets when used on a file get a whole line of a file and then stop?
check the man page
it gets either the amount of bytes you specified, or reads in a full line also, rtfmp
or on eof or error
Chris:that too
ah, documentation
do you know ehre can find documentation to build a video player?
lol
hahaha
buildavideoplay.org
try videoplayer.h, i hear it’s in C99
Why do you wanna make a video playe aren’t the existing ones ok?
i wanna read how to make and after try to make it in ruby
vb.net might have a video player component
Don’t be silly
Jesus.. I like Ruby, but that is NOT something you should be doing in Ruby.
Sure it is
i wanna embed that video player on web
It would be fine to do it all in ruby except the video codecs You’re just being stupid now
could sound strange but i wanna learn the process
I was under the impression he was going to do it all in Ruby But yes, definitely should be decoding audio/video in Ruby. s/should/shouldn’t/
that link doesnt work
sorry i typod www.buildavideoplayer.org
My experience with building a source file editing text widget in Ruby-GTK was horrible.
hey but is possible in ruby!!
Just because it’s possible doesn’t mean it’s meant to be.
that link doent work too
why don’t you just write your video player for a turing machine instead
Even so, doesn’t mean you should do it. For one, xnull, you’ve got too much free time on your hands. Find something better to do.
hehehe and what do you seggest? suggest?
hope you dont mind if i ask, but how old are you xnull
i wanna have a video player embeded on web free and working but with oput flash 13
goto youtube.com
Um.. Totem and MPlayer can both be embedded.
work it out stop askign ##c
you should probably learn how to program instead
no
How’s your weekend so far?
Don’t learn to program
http://www.htdp.org/2003-09-26/Book/
This is trivial to do without any programming
fax bad mood
No, I’m serious
me too
No, you’re just being stupid
am not playing just explore
I told you everything you need to do
Seriously, you’ve got too much free time, xnull.
xnull that last link is for you
yeah is great am reading thanks
do all the exercises it should take you a month at least
fax you say go to youtube.com that is not a serius response
yeah it is actually Now do it
am gonna do it!
well enough, about to go out riding.
thanks
Hah! Have fun It’s such a boring Chuseok. I *want* to go back to work, dammit. But NO! Everyone gets a five-day weekend!
have you been to cheonggyecheon?
Yep, I have. I went there last year as well for the 2006 world cup.. lots of people gathered there to watch the matches on the big-screen.
rent a bicycle and ride 10-20 km
In fact, I live very near the Cheong Gye Cheon .. I live near Dong Dae Mun
well, go and use it :p
Well, I was thinking on my next paycheck hehe
why?
I’m not really financially capable yet
it shouldn’t cost more than 5,000 won :p
What do you mean? Ah, renting a bicycle!
to rent a bike for a couple of hours I’m not sure where they rent them there, but on the other rivers it’s common.
haha
It would be boring.. by myself babo~~
nah, there are always people there. hello libra
hu~ yesh..
thanks
in Young-Ju.
Let’s go to the office… T_T I am bored
ah, it’s a long way.
Looks like I’m the only one who isn’t visiting family in Korea.
kuja, office?
go to the mountains.
Geez, you’re a real outdoors kind of person aren’t you
even namsan is ok, if you’re a baby
Yes.. ¬4ä.. I’m just very bored T_T I should… I never get outside much these days. I guess that would explain why I’m easily out of breath
hum..
it will be cold soon — be quick.
I heard this winter won’t be that cold I heard that from now on, every winter is going to get warmer and warmer in Korea :O
no-one knows what weather to expect now. and warmer and warmer in seoul just means ‘less frozen’
I experience the most HOT day just last week.. it was crazy to be that hot in the middle of September. sajang.. notebook.. setting.. finished!
kuja, good job.. man..
in england we hat our hotest weeks in march, the rest has been naff
bye
Zhivago, have a good day..
Have fun, Zhivago
kuja, I have problem..
What problem?
msn.. okay?
Okay.
if (0 myNumber || myNumber theNumber) can that work ?
tell me about pointers
!tell chetan about pointers
chetan, a pointer describes a value which provides a reference to an entity of the referenced type
tisk tisk tisk
hm, ok
go read your book about it
fax, ok thank u
no problem
!pointer
i believe !pointers is the correct entry !pointers chetan
pointers is http://pw2.netcom.com/~tjensen/ptr/cpoint.htm
which is the one with the video with Pointy or whatever its name is/
!binky
binky is the Binky Pointer Fun Video at http://cslibrary.stanford.edu/104/
ah, that’s the one where is the SUBPROCESS function documented? wrong channel, sorry
can someoen tell me what this is doing? typedef zend_op_array *(zend_compile_file_t)(zend_file_handle *h, int type ); it seems to define a function pointer to be of type zend_op_array, but i’m not sure
majikman-home: Are you sure it’s not (*zend_compile_file_t) ?
yea, the * is outside of the parenthesis
majikman-home: typedef zend_op_array *zend_compile_file_t(zend_file_handle *h, int type); It’s equivalent to the above then So, simply look at it without the typedef.
so its a function that returns a pointer of type zend_op_array
Without the typedef, yes. With the typedef, it is an alias for the type of a function which returns a zend_op_array pointer
so…. he’s just defining the type for the function?
I guess. I don’t know what the author thinks the extra parentheses are for.
hmm… i think i need to go read about function pointers then. that should clear up this whole thing right?
Maybe. zend_compile_file_t *ptr; ptr can now store function pointers of type zend_op_array *()(zend_file_handle *, int) zend_compile_file_t what; /* illegal */ s/function pointers of type/function pointers whose referent type is/
ok…. yea, that makes sense. he’s using that zend_compile_file_t to change what function is used to convert php to bytecode, i think thanks… i’ll go do some reading on function pointers now
after properly defining _XOPEN_SOURCE ?
should it? it seems to be behind _GNU_SOURCE.
http://www.opengroup.org/onlinepubs/009695399/functions/environ.html
linux manpage doesn’t mention any feature macros.
I ran into an error I can’t make heads or tails of while I was compiling my assignment for class. “expected declaration or statement at end of input” specifically.
so from what i’m reading on function pointers, * normally goes inside the parenthesis. what happens when its on the outside like the example i pasted earlier?
hmm, then again, I was looking at the posix manpage.
This is at the end of a function, if that’s any help.
kasdaye, forgot ; ?
http://@www.rafb.net.:80/paste/
majikman-home, then it’s not a function pointer.
Auris-, oh, do you know what it is?
prec already told you what it is.
majikman-home: A function.
http://rafb.net/p/gGzuGt13.html
s/\t/ /g
Doing so…
hmm…. i’m lost. zend_compile_file_t *ptr; ptr can now store function pointers of type zend_op_array *()(zend_file_handle *, int) doesn’t that make ptr a function pointer?
http://rafb.net/p/1QXxCd83.html
majikman-home, yes it does.
line 49: no matching closing brace majikman-home: Yes.
Doh.
majikman-home: ptr is a function pointer object which of course stores function pointer values.
oh…. ok. he’s not defining a function pointer. he’s defining a type that can store a function pointer?
Affordable Mysql5 Web Hosting Provider?
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Feb | ||||||
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 | ||||
Leave a reply
You must be logged in to post a comment.