| |
| |
| |
|
Page: 1 2
Comments:
<0> 'goto' from within switch case works ok? <0> (to label which is not a case) <0> err <0> yes <1> heya <0> hello <2> yes it does. <0> ok <0> bye <1> night <3> how can I create array of arguments for execv? can I allocate it dynamically? who we clean this afterwards? it should even be cleaned? <4> if exec succeeds it won't return, and all the memory will be free'd. <5> hi <5> i'm leaving bye everybody <6> .o(you're doing that on all ircnet channels?) <5> me?
<6> are you reading my thoughts? <7> lol <0> now see what you did - he quit <6> I'm such a meanie. <0> yeah <8> s/mea/wee/ <0> that too <0> hmm that wasn't necessary <9> hi <9> maybe anybod can help me with an example for piping in c ? :) <10> GO_AWAY <10> Channel is closed on sunday <9> hm why? <10> get a life <9> oh sorry <10> tru C l33t coder, have hangover at sundays <10> and gr*** in pipe <9> ROFL <7> ... <10> :) <11> *yawn* <11> c has no pipes ... that's os dependent <11> and i made a lib for that :) <12> vandaal: but what are you doing here then? ;-) <11> mergest: http://www.pipapo.org/iowiki/PasteBin/CallsystemExamples <10> domen: mhm, annoying others becouse my hangover <11> http://www.pipapo.org/cgi-bin/archzoom.cgi/chth@gmx.net--2004/callsystem--cehteh--0.1--patch-16 there is the code <9> :) <11> and it is GPL/BSD dual licensed i just didnt mention that in the files <11> and not yet completely finished .. win32 stuff lacks few things if you enhance it send me patches <9> no I'm on a linux distr. <10> oh linux sux.. <10> :) <9> :P <11> well that small lib does quite more than just piping <0> mergest, do you understand pipe manpage? <11> you can use that either as example, or maybe it is actually what you need <9> it's a good begin, but my english is so bad an i only need a small example how it work when i take a string into a programm ^^ <0> did you read man popen <11> you need to be soemwhat careful against buffer overund <9> for example: ./programm "MYSTRING IS HERE" <0> heh <11> where does that need a pipe? <0> that has nothing to do... <0> right <9> yes my really problem is that i got a prgramm that piping a multiline string in programm2 /.prgroamm1 | ./programm2 <11> int main(int argc, char**argv){printf("you gave me the string %s.\n",argv[1]);} <11> that pipes are handled by the shell <9> and i don't know what to do with the string to work with it <11> you can just read from stdin <9> ahh thanks :) <9> thats nice! :) <9> :)) <11> still be careful about buffer overuns <9> jap but the output of the programm is restricted <11> yes .. but can you really enforce that? <11> at least for production-quality apps you should never ever make such ***umptions for data which is read from some fd <11> execept maybe the data is produced by the same program after a fork <12> i wonder... there are programs (ie. patch) that error out if nothing is piped to them. how's that implemented? select/poll? is data available right away or there needs to be some delay? <11> EOF <9> yes i know but at the beginning i hope it would run! :)
<2> there is no hope for programmers. <11> and we have sunday :) <9> hehe <13> domen: my 'patch' (gnu patch 2.5.9) doesn't seem to error out if nothing is piped to it... just waits for console input then <12> zap-zero: gah. damn, mine too. bad example <12> "less" is a good one <2> less tests stdin with isatty(). <13> how do you tell less that it should display standard input in first place? <2> I guess you can't. <14> less - <14> ? <2> ah. yes. <13> ok... but then it works with ttys too :-P <2> hrr, when I tried "less -" I could not quit it :-P <14> ^c then q works here <13> but right... 'less' w/o arguments checks if there's anything piped to it of course, and errors out if it isn't the case <2> tried that. <0> cat|whatever_program_here <14> ^c should make the : prompt appear <14> that too <2> well, I actually typed some stuff in before quiting. <14> yeah me too <2> oh, now it works. <14> it was fantastic. :) <12> Auris: nice. thanks <0> brainphart: I can do this: BOOL b; ... if (( b = ( foo == bar )) || ( foo == baz )) { ... ; if ( b ) { ... } } <0> ? <0> bool is typdef'd <13> is there a simple tool that lists all function definitions (but not declarations and calls) of a certain function in given *.c files? <0> I mean, evaluation order is such that ***ignment to 'b' is done first ? <13> s/of a certain function// <13> all functions would be enough, combined with grep :) <0> listobj -h -S, or nm foo.o <0> err objlist <12> objdump? <0> see? brainphart grows <13> i need it for plain source files <0> zap-zero, I guess ctags can do something useful <12> zap-zero: i'm guessing ctags or cscope could handle that <0> hah! <12> hehe <0> hmm evaluation order for '||' is from left to right, right? <13> k, thanks <2> michai, yes. <0> right <13> 'ctags -x' is just what i needed, thanks <0> right <6> left <11> up <15> down <11> charm <6> freaks. <11> wrong <6> freaks <11> Up, Down, Charm, Strange, Top and Bottom! <0> I guess those were the magic words :) <11> http://en.wikipedia.org/wiki/Quark <6> see me impressed <16> hello <0> can I do this: char c = { ....; 42 }; <11> no <6> why not? he just did it <11> well, sure you can do it <11> yes <16> but not in c <16> :D <11> char c = ({ ....; 42 }); should work in gcc <0> nm <0> ah <11> considering you meant .... as some some sequence of statements <14> wtf if I may ask <0> yeah
Return to
#c or Go to some related
logs:
#worldchat #html topazina in Iceland #worldchat #worldchat #sicilia #html #worldchat #sicilia #sicilia
|
|