afternoon all ive got a function whose prototype is GetStringsomestructtypedef *n const char *key const char **val

fax, they have a similar enough syntax more than anything, you still gotta figure out your types, I don’t know action script but I saw someones code and figured I’d throw it in C and add what looked ‘missing’ and it worked.

also, remember: C can generate something else that is built there or sent further along..

This is major problem in programmer
programming

Folks blithely believe “C generates opcodes” – and it’s not true most places anyway
even “opcodes” is silly.

fax, copying someones elses code in someone elses language?

would it matter?

not having a clue what you’re doing
test driven development

yer speaking of bytecode/pcode and systems.
now.. oddly, javascript and it’s use in browsers is “event-driven” ;-)

hehe
thats just fine

fax, I consider copying code similar to using APIs or libraries.

Right

fax, so you’re saying everyone should reinvent the wheel?

I’m cogititating “event-driven” every day.. Still trying to reconcile it.

It’s possible to do a wide range of programming tasks Almost sufficiently without having a clue whats going on

except APIs or libraries (should) be separate and only provide interfaces, directly incorporating someone’s code into your own doesn’t have that advantage

Cin, sure it does!

You might notice how many people don’t know C .. yet try to fix biological imaging software in hospitals (:/ we’ve seen everything)

more accurately, any CLI can do it’s job w/o understanding lowly API if you have a lib/API at a higher level.

con kolivas admitted that he didn’t know shit when he released his first patchsets

Hello.

hello

And he should be stoned to death, don’t you think?

hi Draichis

hello, arke.
Been a while, how’s it going?

Yeah, thats cool as long as -it- works

s’ok, Draichis – it looks like I need a char-by-char gather, instead of fgets – alas.

that doesn’t matter anymore as he stopped working on the kernel anyway

which you can assume

any recommendations for a memory pool? i’m looking for something like pjlib’s memory pool but with a free that wraps free(3)
memory pool library, that is

an api hosting works or does not. If it doesn’t, don’t use it.
This is akin to folks deciding a TOOL works, or it does-not

I wrote one for my own use, dont know if it fits your expectations
and I’d have to find it again too.

How we can know a tool works?

huh?

if it hammers a nail, and that’s what you wanted: it works.

what sort of API are you looking for? I’m not familiar with pjlib

if a better tool does it faster or w/o as many thumb-mashes – use it.

Some how, my gcc libraries got deleted. :[

it's not weird to consider, unless the person considering has no other skills

So, sometime in the week I'll get the 4.2 build

OUCH!

Yeah, I've take a big diversion before trying to deal with thei
this*

some tool you used mashed yer thumb ;-)

I'm not sure, shutdown/reboot/log out in the apple menu doesn't work anymore either.
I think whatever burnt that, burnt the /usr/include/gcc
I'll work on it a little later; I'm going to reinstall soon, so it's not really worth the effort of getting gcc only to rm it

yeah, turns out I wrote a similar pool system, but I can't find it
pjlib seems quite useful though

look at it this way... C lets me think of funcs, pointers, structures and types.. I don't give a shit where and how they get stored or run, if I can run them and access them. If gcc used Haskell or GL to compile the same stuff, I still wouldn't care... I just want a comline program or a
lib/plugin/API and C-conventions or my GUI.

sounds like you fried the osx baseline.

pjlib is nice, but there's no free

Meh.
I'm looking foreward to 10.5 though; it'll make things a lot easier.

now, I agree - some folks (at the next lower level) care where and such about who does what to whom. I just don't get overly irate, knowing that C is slightly above asm.
if they were not thinking they could soak me 130$, I'd be more interested. As it is, I still can't tell if/how to save a backup to dvd/cd - so they can blow me.

PoppaVic, my handwriting kicks ass

I need to backup 15gb pretty soon..
y0h

Draconx, yo

man, I wish they taught the Palmer-Method in my years, that they did in my folks age.

Which is the best C IDE in Linux that helps in console app development?

Emacs

I've never gotten into an ide in linux for c..

vim

I want to be able to burn a set-of-CD or a DVD - and reusable if possible - to backup and restore an entire machine. Period. I see something called "deja vu" is installed, and I can't take the time to puzzle out if it can - or how - it might work

Thank you friends, any other suggestions?

PoppaVic, kids in my school(s) weren't really forced any style or means to get words to paper, as long as it was legible kids were allowed to use whatever goofy hand position or written style as they pleased

I think there's a kde ide for c programming.
I pretty much just use vim on linux
I like xcode on os x though.

Also, where can I find an advanced C tutorial?

me too. I find my folks cursive illegible, but my printing is suitable for blueprints.

advanced?
lol

hahahaha

If you really want a GUI IDE, KDevelop seemed nice enough.

"advanced"
try the basics first

well, w/o installing Xcode - you can't code on a mac

I believe Eclipse with the correct plugins can handle C projects as well.

I never deliberately use Xcode, though

I don't think the design implementation of the backup utility on leopard is anything really complex.
But, you're right, I'd rather have a removable medium for backup storage

Teckla, I install eclipse with CDT, but I am not able to compile it.

Hrm? I suppose without the xcode utils, you can't, yeah..

PoppaVic, indeed. my cursive is pretty good now, and I'm glad I can understand it. but I've seen a fair few articles about kids these days being unable to read it, and literally practise "printing" non-joined up letters

Compiling from source is for the birds.

well, if they are still playing that "backup online" crap - they can suck my nutsack

Teckla, not that. Compiling the C program I made.

oh, hell - no one can read my own cursive.. But, I can print well and fairly fast.

PoppaVic, how do you hold your pen? do you "draw" the letters, or do you use your wrist?

it's all becoming a "dead technology" - like "reading"

Oh, heh.

wrist, always did.

It's actually not a bad idea to get used to compiling from the command line, when you're starting out.

Teckla, oh yes.

You don't 'have' to use xcode per-se though.
The xcode utils contains the bsd sdk's, gcc 3.3 and 4.0, along with a lot of other stuff.
Nah, I don't think it's 'backup online'.
I began writing with my left, mother changed it to right later on.. I still don't understand why. She felt it was weird :P

our desks were usually small, and I always wrote small (nearsighted anyway). I'd land, and scrawl awhile, move the wrist, scrawl... repeated

PoppaVic, heh, amen to reading becoming "dead". thanks, TV

well, if you figure out how to use Deja-Vu well, to cd and dvd - let me know, please?

Draichis, lefters have the issue of getting ink on their hands

as a fountain pen geek who writes mostly an italic-derived style, do you use fountain pens?

if it ain't a graphic/active/glyph - folks can't seem to "read"

hey man
Heh

oh, I've had many over the years.

Hi.

peapicker, yeah, it looks better with fountain pen. but ballpoint for jotting notes down, cheaper

And, I enjoyed learning "caligraphy" - but I used it for special documents

I currently have ~15 fpens....

I really need to buy more

You can find some fairly nice fp writers from the asian market... check out a Hero 100, for instance.
I do prefer my Waterman pens tho.

well, we are back to skills and learning and tools ;-)

Calligraphy is fun...

I had a waterman ballpoint in school, some asshole took it apart and broke it
peapicker, aye, written form can be very aesthetically pleasing

Learning to draw a map, graph a picture, calligraphy, cooking, and programming - building, plumbing, etc: it's all "need" vs "fun" and means "learning"

that does the abbreviation "GCR" in context of thread-states (pthreads) stand for?

I don't know if they ship to the part of the world you are in Cin, but http://isellpens.com/ has a nice selection of cheap (sub $10US) fountain pens.

There are many fountain-pens under $10us. They tend to use cartridges, and you might do better with a calligraphy-felttip

These actually use convertors requiring a real bottle of ink.
However, my most used pens are all at $40 and up.

peapicker, wow, that _is_ oldschool

I like using bottle ink.

I have the refillable reservoir if I want to use bottle in

yep, i have 2-3 of those, too.
anyway, for those so inclined, way too much info on fountain pens can be found at http://www.fountainpennetwork.com/forum/

I had a friend who had a pen collection
I don't think I've 'written' anything in a few months.
I usually type 90% of the time :P

bertrand russell use to write some 3,000 words a day and most often his first draft was his final draft

oh, you mean a handle and a nib and a bottle of ink?
well, typing is a skill like printing and writing.

while I do have some dip pens, what I meant above were the type that have a non-removable ink-sac as an integral part of the pen, which is refillable via a mechanism on the pen.

My "writing" is more for me. When I print or type, I expect to share info

ugh

yeah - I used to have a few. Costly and fairly rare

I'm a faster typer..

dude, yer so fucked with yer isp ;-)

WHat I like about the fountain pen is than I can easily write 10-20 pages without hand fatigue. With even the best hosting of gel ink ball points, due to higher friction, pressure, etc requiremetns, i can only write 2-3.

It is the nicest pen I have ever had.

peapicker, true

Yeah.. well, I'll get it sorted this week/next week

WHat can I say, tho. I'm an Analog/old school kinda guy when it comes to watches, pens, etc.

peapicker, if you try to apply less pressure with ballpoint your writing looks too sketchy

yup.

well, I am glad.. I always clench the instrument harder than I would an xacto or carving-knife (on leather)
I STILL wish writing-cursive and printing was taught properly in the elementary-years

You must unlearn! (easy said than done, i nkow, I often find myself with a death-grip on the pen and I've been trying to unlearn that for several yrs.
What kind of pen is it?

It still is in private schools
Public schools tend to lack in refining techniques.

nah.. Too late for this old man. It should matter to those of you that have kids and care about education: they made the mistake in my generation

I was lucky... when I was quite young, my father started teaching me calligraphy before the schools had runied me.
s/runied/ruined

as I said when you died: I can do caligraphy, when I think about it. I can print as for blueprints mindlessly.

Its a Sheaffer pen. Not sure of any of the other details as I inherited it about 15 years ago from an elderly relation.

afrosatan, good nickname

easy to remember

often, those old inheritances are worth saving.

what could be more badass than satan with an afro

Classic Sheaffers are sweet.

robberbaron/robbi

I will be. It is a wonderful pen.

I reach for my electric clippers.

i've come here for a question not to talk about my nickname
:P

yeah, I've many tools like that.

tell me about it. I used it in school for a while until I decided not to risk the school thieves.

i've a problem with the function getopt_long

so what? the docs cover it

RobbieAB, indeed, your pen is either stolen or taken apart and left in bits all about the classroom

fuckers.. I hate people for reasons related to that.

probably wise. I do bring some of mine to work, but they are recent vintage and usually only in the $40-$60 range. I leave the pricey ones at home.

I had my pencil case stolen one time with a set of (cheap) Parker jotter pen and mech.pencil in it.
After that, I only ever used cheap rubbish in school.

I think telecommuting is a boon - I can barely tolerate too many peoples.

i've read the documentation, and i'm confused because it doesn't behave as it's supposed it'll have to

Last time I was in Bangalore, i picked up a few $6 Parker Vector fountain pens for 'don't care where I take em' use.

I'd recommend - and I've used - popt. Or glib's extension.

RobbieAB, me too, I just used that generic see through ballpoint pen

They don't sell the host your website with us - cheap prices vector in the US for awhile now.

actually in primary school we used pencil

my pool system (I still havent found it, arggg) has a pool_clear() function which clears the memory in the pool

That was a ballpoint, and mech pencil (Best mechanical pencil I ever had)

certainly, they are cheap. Pens are late elementary

In India, there are lots of pretty decent school fountain pens, in the 1 to 2 dollar range... because all students there are required to use fp's to learn writing.

i don't wanna change the function :'(

yeah, I prefer mech-pencils and fine-point pens.
sucks to be you

Umm .. are you sure ? _all_ the students?

you 're very polite

certainly.

Maybe not all. but all the guys I've worked with ( 23 yrs old and up, uni grads) have said they were required to do so.

or do you mean being able to explicitly free() one chunk of pool-alloicated memory?
I don't think it'd be too hard to write..

i'll be wrong, i thought it was a programming chat about C

I can't see a downside to learning to read, print, and write - let alone think.

i'll had misunderstood the topic

I see you're from that part of the world....

afrosatan, interesting use/abuse of the english language

I am ~20 year old, and well, thankfully they have nearly done away with that ... thought there are other advantages of using fp's, good handwriting and all, and well, yes, I am

What are you expecting of us? If you want help, you need to frame your question so that it is easy for those who may know the answer to give it.

afro-boy: look, you got issues with a func, of a lib, and refuse to change PLUS think "this is C" - yer wrong repeatedly.

welcome!

I am sooo old and tired.

ohh, i'm famous, i've taken four atencion from a joke instead of a formal question
quite sad for real geeks :P

PoppaVic, jaded?

shutupo

I keep trying to help, but if they can't read the docs or test it or do better than "this is bwoke" - who the hell would care?

afrosatan, you are unworthy of that afro
PoppaVic, heh, bwoke

This is C. Not some weird non-standard extension of C.

you could post an example of your problem and what is/isn't working to your expectations to the paste site, ask a relevant quesstion, and likely get some realy assistance.

bring on tomorrow, maybe things'll change .. I've had about enough

yeah

ok this is C

time I wake up and get some sleep

I've never had hair longer than 2 or 3" except winter.. It bugs me.

Wrong, its ##c

what do you use to parse the arguments given to a program runned from the console?

PoppaVic, my hair goes past my boobs

well, ok - maybe you'll have some ideas about the source, too

getopt

argc ?

ok
getopt

do you have some goals you were heading for I missed btw?

dude, that image scared me.. I can't do that anyway - if it's in my ears, it makes me reach for the trimmer.

getopt is not part of the standard libs, according to my reference...

an in the
int getopt(int argc, char * const argv[], const char *optstring);

PoppaVic, mine’s past my ears now :]

I think we’re going to need to rewrite for char-by-char.

Read The Fucking Manual

how do you say the argument has an optional parameter?
with two semicolon?

I used to – in the 70’s try longer. Now, I just want it gone – except for winter-warming.

Well, one possibility [and you might have been gravitiating anyway] is sticking the prefix char + a func ptr int table for “dispatch”

i’ve read the f***ing man, that’s the reason why i’m here,because it doesn’t work, not because i’m in love with you

One irritating thing is you can’t force the compiler to unroll it though
so not sure how relevant that is

yeah, tis why I mentioned it and sent you code.. I think we need a better solution to allow for keyboards and files, etc

You’ll have to buy me somthing

try #glibc (I assumeee getopt is a glibc addition to the library)

maybe some paper or some ink?

PoppaVic, indeed. long hair also serves a similar purpose as sunglasses; people don’t precisely know where you are looking; you don’t have to feign interest and can ignore people easier

see libpopt and even glib – afrosatan no one is going to save you from yourself. No one will care.
true, and I hate to sweat in my eyes and keep slapping my ears or neck ;-)
actually, glib enhanced popt internally.

probably. I just meant that it isn’t exactly strict standard C, so why shoould we care if it misbehaves, or the documenntation is lacking.

PoppaVic, the trouble with being a teen is acne pervading regardless of your cleanliness

ok thanks for your time an humor, it’s nice to see i’m not the only who hates the world XD

Oh, I don’t hate the world. Just most people on it.

sorry, my sarcasm is not as good in english as in my motherlanguage

hi

clearly.

¬¬

Please ignore the troll “afrosatan”
We can resume normality asap

i’ve to work, i promise i’m a human, not a troll

certainly: a lib and it’s api are not “C”, and the fact he refuses to read and understand the docs/api, and expect everyone to save him from alternatives – well, these are not our prob.
so, you think we need a dispatch?

I think the standard libs could be considered a part of C…

just an idea it might help.. but it could be a dead end, I don’t want to say unless I’m sure

it would mean also a set of flags, an “accumulator” and such

yep, that could fit in the template to
But then you’ve got single state for the entire shebang

is standard to me

which again, may not may not matter

actually, they really are not. C is still C – yer talking about std, and this means shit works, docs make sense, and folks test/read/write
well, my conclusion was that – regardless internals – we get a char, a word, a line – and act when/where is required/contextual. And I begin to cogitate “event” as well.
afro was the one looking for a solution-handout ;-) Most folks can read and test

I know. Thats why I’m not arguing about whether or not the standard libs are a part of C.

yeah.. Well, the assorted std-docs seem to treat them as part and parcel – but only SOME.. I think it’s a mess, myself.

I thought all compliant hosted implementations were supposed to provide a set of libs with certain functions. Most (glibc for one) add a lot of extra functions to the set.

If you read around enough, you start to wonder if “asm” should be allowed, and that “ioctl” and “syscall” may be the clue.. I am not sure at all
well, yer back to the docs. “C” itself is pretty simple-minded.
in fact, I’ve never seen a lex/yacc imp of “C” plus even the “cpp” preprocessor that works.
..and I know for a FACT that gcc has builtin cpp and is reluctant to allow external preprocessing
all of this sorta’ makes you leery of trust.

strictly speaking, gcc alone is not a standard compliant C compiler, as it lacks the standard libs. gcc + glibc is. (I recall seeing this point made on the gcc pages some where as well.)

plus, the success of lisps and forths make me wonder WHEN as well as what/which/to-whom.
well, I am not a std-commie.. And, I did not write gcc or the std (let alone contrib). I think there are issues allllll over and some folks need a flogging.

http://darcs.haskell.org/c2hs/c2hs/c/

why?

it works

well, my shit works now. So what?

it uses alex/happy but isn’t that close enough?

I agree. The main advantage of a std is it provides guarantees about what you can expect…

sure, that’s the entire point.. We’ve got issues a whole lot worse and lower than C itself.

libc is missing some fundamental stuff, imho

yep
posix helps

which is fine – I’ve got a small library of stuff that acts as my own stdc
(turns out most of it is C++ these days, since I’ve been doing mostly C++ through work, heh)

C is not libc – everything in libc is merely an extension: functions or data.
And, C is not cpp – it’s weird to cogitate and offers a headache, but it is true.

C++ is nice but there’s a certain elegance to doing things the “C” way

I guess that’s why they called it cpp

asm is NOT m$ or osx or *linux, either.
C++ is a bandaid with contamination.

what about MASM

so what?

MASM has a really wierd EULA
I wonder if it’s valid?

there is no “asm”

yes but its what I have to use for work.

there are umpty interpreters that call themselves (asm”

Why C++ is a bandaid with contamination?

“*asm”
I understand that

why not?

lack of static typing
and lack of braces

The whitespace-determines-scope thing in Python is blechy.

oh and I’m spoiled by intellisense.

yeah. it doesn’t work right!

there is no ULTIMATE OPCODE/DATA – period. Ever.

Yeah, same here. Python is cool, but the lack of braces stinks.

The thing that you have to indent the text?

you need \ to continue an expression

Everything is interpreted, and I know that peeves many to see again, but it remains true.

unless you put an operator at the end of the line

Yeah.

well, I haven’t tried it yet, so I don’t really know how it feels

What are you talking about?

comma’s can ruin you.

What did you mean by “everything is interpreted”?

if you want a {block;} then use one.

It’s a very neat language, but the lack of braces to determine scope, by itself, is a killer.

folks, (I swear), “optimize” in the wrong places for the wrong reasons.

Hello! Could someone, please, help me with libESMTP? I feel like I’m in the right path, but I can’t find any docs regarding smtp plain authentication in esmtp lib… http://www.pastebin.ca/672643
Hello! Could someone, please, help me with libESMTP? I feel like I’m in the right path, but I can’t find any docs regarding smtp plain authentication in esmtp lib… a href=”http://www.pastebin.ca/672643″http://www.pastebin.ca/672643/a

But wont the code look better if you get it right?
heh, maybe it doesn’t even work if you don’t get it right :p

!c

c is a low level language designed to make assembly “easier”, useful for device drivers or operating systems. Thusly, one has to maintain buffers, memory, and various low level information. C is not meant to be used for everyday applications, a common misconception.

well, I dunno wtf yer prob is – you are supposed to have the experience. I was warning about comma-ops. Maybe you are a Golden-Child.

Just wait until you try to move a chunk of code from A to B and the identation is off. Or someone mixes tabs and spaces and your mind explodes. Or you try to discuss Python on IRC and you can’t paste one liners effectively. Or …
….or you try to jump to the top or bottom of a block by matching braces and there’s no braces to match.

“designed to make assembly `easier` “

The lack of { } to determine scope in Python is HORRIBLE.

hehe ok

Comma-ops? I still have NO idea what you’re talking about.

when I compile, is it translated right to machine language or right to assembly?

if(blah(duh) == lol) ?

then a assembler comes and translates it to machine language?

“yes”

Teckla, HORRIBLE? you mean esteticly ?

I mean it is easy to read
?

yes for which alternative?

There always more than one view and alternative – ALWAYS
particularly with programming

As an aside, why is it that poseurs seem to think they’ll get some kind of ‘cred’ for using satan and 666 and such in their nicks? so childish.

That and makes maintenance programming on Python code difficult.

machine code correct?

See my “tired” comment far above ;-/

Python is still a cool language and all, it’s just the way it determines scope is horribly and fundamentally flawed, bad enough that many people (rightfully) don’t use it for that reason alone.

Is mindshift correct?

machine code

and tabulations are like blocks. And about maintenance, it has a good reputation (I don’t know if it is the right word)

ah

right, this may be off-topic

It has a rather fervently religious core of followers that would be hard pressed to admit any failure in the language.

totally
!book
website of this channel?

!topic albertmk

Could someone, please, tell me what are the steps missing for smtp authentication on libesmtp? I can’t find it in the lib docs. Btw, I can do it by hand using telnet. http://www.pastebin.ca/672643

!topic

Near as I can tell, every “language” has blind believers. This is true of every language even remotely mentioned in ##C

I still need the website

line terminator issues!?

I’m happy to talk cross-language with folks, re: “C”.
…if I can

because I need to check one link from that website

setuid-wrk: Nope, I mean the functions.
setuid-wrk: I can’t find any docs on the smtp authentication part of the lib

!links
!website

what’s the EOF char?

have you tried this: http://www.stafford.uklinux.net/libesmtp/api.html
libesmtp seems usefull

setuid-wrk: Yes, I didn
setuid-wrk: did*

never used it.. Libs are often useful

setuid-wrk: In fact, that’s what I’ve been following so far
setuid-wrk: I already googled for this part of the doc, or some sort of example, but I couldn’t find anything relevant.

well, every day is a filled-chocolate.. We just never know what we’ll get and need to pitch into the trash.
well, every day is a filled-chocolate.. We just never know what we’ll get and need to pitch into the trash.

true

I’ve heard folks are *now* into “chocolate-covered jalepenos”

well

damned if I know why

maybe you could search for projects that depends on libesmtp
and use those as pointers

setuid-wrk: you mean “references”

no, i mean pointers

references and clues

setuid-wrk: How do I look for such projects?

“pointers” have a specific meaning in ##C and “C” – and you need a thesaurus.

setuid-wrk: Any specific web site or just a google search?

it would be fairly easy if you were using freebsd ports collection, but in the linux world I havent got a clue… maybe freshmeat or something else might be of any help…

!compilation
!assembly
!c

c is a low level language designed to make assembly “easier”, useful for device drivers or operating systems. Thusly, one has to maintain buffers, memory, and various low level information. C is not meant to be used for everyday applications, a common misconception.

linux has got a shitload if variants.

setuid-wrk: Alright. I’ll try there! Thanks you very much for your time and support
setuid-wrk: Thank*

watch out, poppavic is around!

which GUI application language does C users program in? Is Gtk+ the best thing out there?

damn right I am around

xchat, pidgin, gnome

setuid-wrk: |(^_^)| Thank God I fixed in time

I suspect suffers this crapdoodle in ##lisp as well. I can feel his pain.
suspect [Z]
And, I already know I’ve seen similar in #asm over the years.

So kde with qt/C++ is automatically a better choice than gnome?

brb – recycle..
blech

/msg nickserv ident rhann@surewest.net

Prolly need to make dinner soon.. *sigh* No idea of numbers, and I heard #2 created a donnybrook the other day – so no estimates possible.

anyone know of any good sites for learning C programming
?

books, then tests and google.
yer fucked.

yeah, don’t ignore info
unless you’re an IDIOT

ifno files blow, but always check info when man fails you and pre google.

well i just bought the Programming C book by dennis richie is that a good start
?

definitely

ok thank you
well im going to sign off and start reading
thanx guys

read the book – avoid the keyboard… Then read the book and do the exercises.
he left ;-/

i always find that learning hands on is alot better way to learn

well, it helps… THERE. Then, the kicker is to try somewhere different with the same source.
I used to use a local bbs that allowed shell-accounts and used solaris to test against my x86 and linux. Oh, man..
and, we’ll not discuss suid ;-)
it’s just another interpreter ;-)

get_file();” that accesses the filebrowser current selection variable. Suppose that i want to save the current selected file in a variable “char* currfile”. If i use a simple assignment the compile hosting will give me an error because i am assigning a
const to a non-const. how do i solve it?

wtf is “-”
you’ve not declared any structs

there are no “methods” in C, you know this, right?

hh
so C != C++ ??

yeah, the const is alarming too

you can have a struct and func-ptr members.
const, in C, is a moot as “static” or “auto” – most places.. Watch yer ass
I can’t say I disagree with their use, but books/classes seem to misunderstand.
I suspect the terms are likely as much at issue as the classes/books
yer welcome to sit there – dumbfounded – or read yer book, docs and interact.

b()”, (note the spaces)

yeah
and const

:|

clues.. It’s like reading a mystery/detective-novel.

can’t do anything about it

that sounds personal

i have this header that defines the method
http://glui.cvs.sourceforge.net/*checkout*/glui/glui/src/include/GL/glui.h?revision=1.7

we don’t mind if you write stupid code that is broken.

and i need to copy the value of a const char* in a char*

so the fuck what?

tallia1, that’s not C.

and i was wondering if you could give me an hint on how to do it

are you playing hacqueer-genius on other folks code?

afternoon all. i’ve got a function whose prototype is GetString(somestructtypedef *n, const char *key, const char **val). i’m trying to call it by defining a char domainname[255]; and calling it GetString(node, “domainname”, &domainname). my compiler is throwing “from incompatible pointer
type” on parameter 3. should this be something like const char * const *val in the prototype or somethign? what have i done wrong?

that’s nice

i went to the C++ channel and they told me that they don’t use char* and to ask here

What filename is your code in?

if it’s C++ or g++ related, yer fucked: we don’t care

osshit, it’s like if you have a fucking bricked wall in front of you
incredible, once people is in IRC they think they are all so smart and powerful

yep
Welcome to C++

##C++ for C++
##C for C
“duh”

ahhh

yes, and since char*are mostly C i asked here

What the fuck is the file extention

does that sound weird?

It’s ##C’s fault because you are lame and using ##C++?

tallia1, char* ins’t “mostly C”
tallia1, read a book or two, then come back; we’re not going to help you if you don’t know the basics

class

mostly.. C.. Who what where? ;-)

What is the fucking file extention
Tell me that -now-

well, you just die well – elsewhere.

it’s nice how C++ people disown part of their language.

must have been .cpp :p

idiots

fatpelt, so why do you have those consts in there?

Auris-: they do it to ##C all the time.. If I was not against C++ before, the last couple years convince me that it’s a waste of time to help these “dustbunnies”

the function was declared const char **val but actually i’m not sure it is a const problem. in the past the c compiler would throw a ….discards qualifiers… type error message. i just can’t figure out why &domainname is throwing an error

just dustmop and vaccuum and these dustbunnies are gone.

fatpelt, &domainname gives you a pointer to an array, not a pointer to a pointer to a char.

if you ignore the mods on the args, you get warned: it’s that simple.

Auris-: wrt an array, as far as i know, the domain name is a pointer since it is an array

folks are capable of recasting args “because I know better” – but watch yer ass. Yer heading into “ohshit” mode

fatpelt, an array is not a pointer.

Auris-: amen

right, but wouldn’t it throw a “disregards” error message?

there is NO IDEA of “throw” and “catch” in “C”

as opposed to an “incompatible pointer type” error?

there is only types and mods

fatpelt, array will evaluate to a pointer to its first element, which it would do without the &.

my crap. would you prefer i say: the compiler outputs a warning instaead?

no, and I’d run screaming

Auris-: right, but the function needs a pointer to a pointer. so as you say domainname is a pointer and &domainname is as good as a pointer to a pointer since &returns the address

char domainname[255]; char* s = domainname; GetString(node, “domainname”, &s); it would work.

char snd[] = “hey i need a argv[1] here, howto?”; ?

i tryed to read some info with scanf(..) and the flushall() and when trying to compile i got an error saying “implicit declaration of function flushall” , what can it be ?

fatpelt, &domainname gives you char (*)[255], not char**.

Auris-: same error
char domainname[255]; char *d = domainstring; GetSTring(…. &d);

Auris-: yer confusing him, he’s a virgin

fatpelt, are you sure you are compiling C?

Auris-: most definately. /bin/sh ./libtool –tag=CC –mode=link gcc
(along with a ton of other crap after that)

ph, lord
oh. too
yer wrong
this is wht I despise autoshit and libtool
why
yer THINKING it generates “C” and it does not. It’s just as much an interpreter as C, but for different reasons.
C is *NOT* ASM – and ASM is not OPCODES

well, that is the link line
gcc -DLOCALEDIR=\”/bongo-b/share/locale\” -DHAVE_CONF………

*sigh* I wish folks could learn this w/o my sticking my neck on the block all the time

sorry, i think i pasted in the wrong line

:/

i can pastebin the whole output if you’d like it

gcc filename(s).c -o output
its that simple really

please do not

I think tommorows gonna be better than today :/

it’s gotta’ be better or worse
..it can’t keep going on, or I may need to dedicate myself to “harvesting” people.
are you trying to speak english? What client?
Because, ##C can take utf-8, but ##C uses _english_ – regardless who hates us.

yes i’m native english. i take it that the paste i just did didn’t come through ok for you

meh, the one thing I’ve grown to hate with gcc is that it does not tell you what type it has when giving “incompatible type” warnings.
fatpelt, well, my test gives me the same results you get.

Which means, you speak these to your CLIENT – thru a SERVER – thru a NETWORK of servers – to our clients.
it’s LAYERED and it’s even BROADCASTed. We hear you, but you can’t see that relationship, let alone C’s relationship to your own machine.

Baughn, what do you think of git over darcs?

I really try, really.. But folks think their particular “language” is some form of ULTIMATE, ALL-OVER

uh. yeah. ok whatever

My one attempt to use git was aborted because I couldn’t figure out how to use it
The same was not true for darcs

die well, with dignity.

fatpelt, well, it’s the const there, causing problems.

Baughn, I’m not actually sure what’s different. I’ve seen the presentation by linus

I tried.. Really

Baughn, but yeah, I _really_ like the interativeness and simplicity of darcs

Auris-: i wondered if the const should be like char const **val instead since i don’t really want the function to change the pointer, just the underlying data array, but iwasn’t sure if that was right.

Are there any cross-platform GUI library for C besides GTK+?

The other versioning systems try hard to make hard things possible, but they seem to have missed making simple things easy
And you *still* can’t branch as easily as with darcs

Baughn, I know what you mean there

yer absolute BEST choice is a cgi

fatpelt, const char** is the same as char const **.

Auris-: not according to everythign i’ve ever seen
Auris-: one makes the pointer const the other makes the pointed to data const

Auris-: we should revive harvesting “wild game” and turn a lot of folks into Soylent Green.

@explain const char **foo

declare foo as pointer to pointer to const char

PoppaVic, I don’t know if soylent green is any good.

@explain char const **foo

syntax error

..don’t look the same to me. ^^;

I just gave it some thought, and I can’t think of ANY cross platform GUI libraries for C except Gtk+.

Auris-: well, it’d feed folks.. And, (of course), fewer folks that are downright stupid means less resources

Baughn, maybe you ought to fix cheiron. :-)

biznatch ;-) You reactivated baughnie??

Baughn, did you write @explain?

A long time ago
Yes, but it’s just a wrapper

well, often it isn’t running

Baughn, for what?

cdecl

Yeah. Having to distribute GTK+ runtimes on Windows isn’t pretty good. I’d better keep using Windows API on Windows and GTK+ on Linux, and try to make the GUI code as modular as possible, so it doesn’t require a full application rewrite.

Baughn, nice

Auris-: Find me a better cdecl, and I’ll switch it out

char * const p reads p is a const pointer to char.

it’s fairly useful – akin to “read a fucking !book”

PoppaVic, hehe

Baughn, didn’t mauke have one?

It leaks a zombie for each lookup, though. Mostly because I insist on figuring out finalizers instead of doing it the /simple/ way.

I am not nice or kind, but I try.

Auris-: Yes

Oh, lord.. I try.

evening dudes

I suspect there is a seat in “heaven” for me – that bites my ass and irritates
lo, RadSurfer

Another beautiful clear day, cool enough to breath again.

yeah, the weather today was decent – started last night and I left windows open.. Central A/C started and I sealed the house.
Smelled decent
I tweaked the A/C so Ma’ was _always_ comfortable with no more than a sweater.. Regardless of outside.

how good is the register directive implemented ?

Baughn, have you tried merging with other people and such with darcs?

ProN00b, what would a good implementation be?

My experience is that Gtk+ on Windows in general isn’t that wonderful. (I say that as a heavy Pidgin user.)

Yes. It’s not an issue at all.

Teckla, indeed, GTK+ on Windows is sluggish and poor

Agreed.

More importantly (Cheiron! , it’s no problem at all to maintain my own branch of a project without communicating with said project

the advantage of distributed version control.

Auris-, listen and act accordingly, and warn me when it can’t

there is no “register directive”

Baughn, yeah, that’s one the aspects I particularly like. I get the idea one simply creates a new branch, merges, checks it’s fine, and then says to said project guy “you can get from me now safetly”

register uint32 a;
i don’t know how that is called actually

ProN00b, nowadays register is pretty much ignored.

that’s nonsense

Though I prefer darcs send for that last one, but yes.

Auris-, that sucks oO

register means “please work faster, please”

Baughn, hehe

“register” is merely an ADVISORY to the compiler, and nothing else. Ever

ilor_, yes

ProN00b, maybe you should trust the compiler more.

Auris-, no

I think the best solution is still write the C program as console, and wrap it with a Tcl/Tk GUI, so I don’t need to use C++.

at best it means “I can never get the address of this”

PoppaVic, don’t need

Baughn, my mate’s a big Subversion geek (they use it at his work) and I’m trying to encourage him to try out Darcs, but he doesn’t seem to be very good at trying things on their merits instead of just using what the masses use, e.g. he uses C++ and it took forever to get him to _try_ lisp
_

_

I don’t like C++, so I support any solution that involves not using C++.

as long as the regs are not mulched, and you agree on sizes and calling-conventions: otherwise – yer fucked.

cin, maybe you should write a paper about the differences of between darcs and svn and how things can be more easily done with darcs. then let me read it too.

you comply locally.

given that ra.data is a void* (which is really an int*)
int i = (((int*)ra.data)[x]);
and I’m getting “test.c:24: error: invalid type argument of unary *”

I’ve never been partial to “shared source registry” concepts
umm, dude: yer casting (I know better) to a POINTER – to assign a TYPE – not a pointer.

PoppaVic, right, I cast the void* to an int*; and then I use the index operator [] to pull out an int

nope – rad it again
read

yea, I know I’m doing something terribly wrong (obviously); I just can’t see it
ra.data
a void*

you don’t “pull out” dick

((int*)ra.data)
an int*
am I good so far?
ohhhhhh; oops, maybe I need ((int*)(ra.data))

sure, you know ra.data is a void*, fine.
yer losing the “dereference” – and I hate that term

wait.. nope; now I have (((int*)(ra.data))[x])
but still no dice

What type is “ra”?

well, hell – I can find dice all over the house.

PoppaVic, so, when I said “an int*; am I good so far”; was I?
Teckla, a “rich_array”; it’s just a “typedef struct { void* data; size_t size; } rich_array;”

dude, yer on a barbed “learning curve” – you don’t want to ASSIGN A POINTER, right?

Is “ra” a struct or pointer-to-struct?

Teckla, just a struct, of course

he’s thinking “pointer” and not “dereference” ;-)

OK. So ra.data gets your void *. (int *) (ra.data) turns it into an int *. *((int *) (ra.data)) is an int.

I can’t wait until I figure this out
I love that feeling of realizing how stupid you were to make a mistake; and wanting to slap yourself in the face

bingo, Teckla saved you – ad I want to slap him ;-)
you have to think of what you are doing EVERY STEP in C.

((int *) (ra.data))[x] to grab the int at index x.

Teckla, right. but ra.data is memory region holding multiple ints, and I want to be able to get anyone of them

asms are worse

See my last message.

wait…
C doesn’t give a sht if you int foo[1] – it just imles how to access at least ONE of them. This leads to malloc-voodoo.. No one knows (except you) how lone the “array” runs.
implies

PoppaVic, right, that’s why I have the whole “rich_array” idea in the first place

lone/long

but I’m still confused

hey i am getting an error

Did my suggestion work?

*( ((int*)(ra.data)) + index)

yer working too hard for too little

and it’s still not working

Did you try: ((int *) (ra.data))[index] ?

Don’t do this

/usr/bin/ld: cannot find -lpcap
what does this means

I can void* foo; and get more done with less, but I WANT more info

Teckla, I just copied and pasted that “((int *) (ra.data))[index]” idea; same error

qazibasit, that it can’t find libpcap.

What is the exact text of the error?

whar is ra.data? what type?

Teckla, test.c:24: error: invalid type argument of unary *

gcc -s -o snoof snoof.o -lpcap

ra.data is the VALUE of that exact thing.

OK, hold on a sec while I test.

/usr/bin/ld: cannot find -lpcap
ld returned 1 exit status
*** [snoof] Error 1

anyone got a copy of the intel c compiler for me ?

Teckla, sure thing

ProN00b, ask intel.

it’s yer view/parens

Auris-, them kapitalists say it costs money even tho i already payd them for the processor

hey is there a good compiler for ubuntu
coz the one which i have sux

ProN00b, it doesn’t unless you want to sell the products.

you can blame everyone else, yer still gefuckt ;-)

rutski, is your compiler broken? the code works here

qazibasit, sorry, you are at fault.

Auris-, orry ?
Auris-, url
PoppaVic, why ?

poor ol’ umbuntu flubbers ;-)

flaming_homer, is your compiler gcc 3?

no, 4

anyone can tell me what is incorrect in this

ProN00b, http://www.intel.com

total = total + ((buff[(sizeof(buff) / sizeof(char))-x]-48)*(int)pow(x,10));

It works for me.

because yer here blaming everything but yourself, and your system still works well enough to come here and blame others?

essai.c.text+0×31f): undefined reference to `pow’ is the error i get
but math.h is included

- perfect, PoppaVic, keke ?!

Here’s what I have: int x[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; rich_array ra; ra.data = x; ra.size = 10; printf(“value is %d\n”, ((int *) (ra.data))[3]);

oh, wow
it was a different line giving the err!
**error

welcome to MANPAGES

I had changed int* i = ( (((int*)(ra.data)) + x) );

wow thanks to you, a bot could have told me the same thing, nice help .

to int i = ( *(((int*)(ra.data)) + x) );
and I forgot to change “*i” to “i” on a different line

neh, hable? wha?

Ha, so once again, you didn’t use my suggestion :P

Teckla, sorry about that
Teckla, huh?

rutski, the typical programming error

heh

just go use perl or php *sigh* I am too tired and old to care

btw, I have no idea what you were talking about earlier when you asked me to wait, so I just ignored it.

/ ProN00b
that’s ok, Everyone ends up wormfood eventually ;-) Sometimes we don’t commo well.. I know that.

oO?

I plan to donate my body to science.

that’s noble, but the silly buggers end up having their own “rules”. It’s just an idea

donating body to science is teh shit
just ends up in the hands of medicine students
oh wait… unless you do it while still alive

I’ll donate my body to got chicks.

What’s wrong with that?

got? hot

I’d rather be “freeze-dried” and added to tons of “instant-coffee”, but I might as well just accept “toast me and forget it”

Auris-, goth ?

goth isn’t so hot. :-/

I’d hate to make family suffer with a lump of meat full of anti-worm crap

Teckla, well, imagine your most whacko pal studying medicine and what he would do to your dead body

It doesn’t bother me…I’ll be dead, after all.

I’ve buried too many by this time.. Sis doesn’t need it.
All that matters is yer family/sibs. once yer croaked, yer dead-meat. shrug
Even ghosts are wishy-washy on the issue.

I plan to haunt ##c.
Maybe stir up some vim vs. emacs debates.

good evening

I don’t plan to “stop”; Death is just another state – or you folks are all pigments-of-my-imagination ;-) I just do the best I can each day for as many as I can.

I’m wondering, who / what defines those integer types, which have bits/signedness in their name (like u32)
I searched around in posix, but did not find it. anyone a hint where to continue?

the platform.. Upon which compilers are built.

u32 is not part of any standard.

the OS.cpu is yer bottom line: everyone needs to interface with them

so, is there any portable way I can define that my program wants to use a 32 bit signed integer?

Auris-: oh, yeah… that’s a header for C
depending on what you want, see stdint.h

telmich, C99 has stdint.h which most likely has uint32_t & friends.

ahh, nice

Typically, pre-C99 at least, you just create your own header and types to handle that.

Last I read, uint8_t was the min, and uint32_t was the max.

perfectly

“typedef short int16;” etc. Pepper with preprocessor macros as necessary to support additional platforms.

Do NOT EXPECT shit across the net or even in the room to use the same structs and sizes and endian

are there any tools to help with identifying dependancies accross a group of files in a project ?

I dunno how many times I scream this at folks, and they all ignore it.

There’s something commercial called “Source Insight” that does that, I think.

have you tried it yourself?

zap0, what kind of dependencies?

stay well, folks.. I must make some dinner for Ma’ and I am pretty well irked.. Tootles

structs and globals defined in other files etc..

No, but I’ve seen co-workers use it, and it seemed decent.

I don’t know if there’s anything free that’s decent.

ouch! $249

consider that cheap.

Auris-: in looking over what the function is trying to do, we think we’re gonna drop the const (which gets rid of the warning)

You should be able to cook up something pretty easily with nm

nm?

man nm.

Just look for (un)defined symbols, and feed the result into dot

Hi!
sorry if I sound stupid but is there no function in libc to copy/move files?

oh, im glad google understands `man`

If an object references something, it’ll have an undefined symbol. If it defines something, it’ll have a defined symbol. That’s plenty of information.

jaj, nope.

rename(2) is not an option because I want to copy to another logical drive

None for copying. There’s rename(), on posix, but that doesn’t work across filesystems.

damn, I’ve setup PIC and it works but hardware interrupts doesn’t seem to work :’(

Well, there’s always system. POSIX also defines cp and mv.

Is there an stdc function to tell me if a string contains any characters OTHER then 0-1,A-Z,a-z or should I write my own?

No. Yes.

Baughn, yeah sure, but that’s the ugliest way

I don’t see how

ok

Baughn, i think nm will do all i need.

Baughn, thanks, I’ll use system(“cp …”)

system(“cp src dest”); -or- system(“mv src dest”);

Well, I suppose. It’s also the most elegant way, though. Being the /only/ way.
You should use exec, really, and preface your names with — just in case the filenames start with -

solemnwarning, isalnum() loop?

solemnwarning, use regex!

isalnum()

s/names/arguments/

solatis, you smell

or isalnum

solatis, strspn might work

Handling names that contain spaces, too… system() is just annoying.

jaj, if the file is not too big, and you have plenty of memory, read it to a buff, write it out again… that’ll give you better control over error conditions like access restrictions.

solemnwarning, i meant

I feel like I’m going nuts, people are talking to “solatis” but I don’t see “solatis” himself talking.

Teckla, just wrong tab completion

How about a 400GB sparse file with 512 bytes of actual data?
Or a device file?

Whew, thanks.

Baughn, yeah, I’ll use exec. for system I would have to build a string with all the arguments

Or even just a standard, tiny file with nonstandard extensions like an ACL list?
cp/mv know how to handle anything your local system might need. Your program won’t.

solatis, use strspn gives you the length of the string containing only your characters, compare that with the real length
solatis, use strspn gives you the length of the string containing only your characters, compare that with the real length

how do you manage issues that arise in cp/mv ?

oh shit
@solemnwarning

Unknown command, try @list

hah

Check the return value

Err, to jaj, not zap0, sorry.

Teckla,

system isn’t very nice, though. Too easy to create bugs.

can anyone tell me some good resources for C sytex and tutorials?

][marko][, a book.

sytax*
lol i mean on the internet
off the top of your head
?

Teckla, it was not ignored but Baughn already mentioned it

Ah, you're right. Sorry, my bad.

1. you have a stupid nick, 2, there is no one in here called lol. 3, your enter key is not puncuation. 4, the correct answer to your misguided question is .. `get a book`.

The big danger with system() is making sure you build command while preventing users from being malicious and naming their destination "; rm / -rf" or something.

damn, shouldn't the damn keyboard interrupt?

Whew, I thought maybe I was just being too picky, but gods, his nick is annoying as hell to me too.

I'll third that.

I hate to say it, but I ignored it after its first line

music to my ears.

Nothing saying "idiot" quite like putting "][" in front of AND behind your nick.
s/saying/says/

aww, he’s probably gonna defect to VB now.

if that is where idiots go….

It would explain quite a bit

MVRFKNXCHATISBEINGAYLULZBRB

theres a swarm of them.
nm’s output decorates names in some very bizarre ..er… prefixes.

I need a word for “instance or class”… which might be a class, or might be an instance of a class… i.e. an object

object.

Mm.. not sure if that’d work in this case

widget, thingy, blob.

It’s for a plugin-based program. Plugin files (foo.so) provide classes.

i tend to just make up a completely new name.. like… `moop`

Some plugin classes are inherantly singletons… some can construct instances

isn’t a singleton an instance?

Not in this case; in this case, I’d just call the “methods” with a NULL instance pointer

Auris-: A singleton is a global variable

it’s an instance… if it’s instantiated

is PATH_MAX (limit.sh/posix) thought to be full path or without the name of the file?

PATH_MAX is supposed to include the filename.

thanks

however, there are differing interpretations of the standard regarding the inclusion or the terminating NULL within PATH_MAX.
s/inclusion of

Baughn, yes, it can be that.

Auris-: I fail to see how it could ever be called anything else

hmhm
meh, I didn’t want to think about globality instead of instanceness.

Don’t use singletons, then.
Also, read http://c2.com/cgi/wiki?SingletonConsideredMisleadinglyNamed

OMG, I had a CLI, STI mismatch :-O

a what?
assembly?

Auris-, having fun in my basement writing a tiny kernel for a friend’s schoolproject

See, this sort of thing is why you want an executeWithInterruptsDisabled function.

IO a, of course)

hehe
I figured it when PIC worked but not IRQ.. but I didn’t find where :P

At the very least, add reference counting to enter_critical_section. -_-

hmm.. can’t wait to write the schedule routine :-)

Urk. Yeah – that thing took me /hours/.

mmh, GlobalObject has a point.

I must have set some sort of record for least effort in that class, though. :P

hehe, did it pay off?

Well, I /did/ get the top grade, with about ten hours of work on a half-semester class…

drunkenface.
nice to se you.

Baughn, hehe, I’ve moved to the countryside now.. Meløy 120 km from Bodø

see*

lo pnk

Meløy? That’s where my grandmother used to live.. I think. Unless it’s a different one. Close to Ålesund?

lemme check it out

Different one. It’s the #1 criminal place in norway when counting people who die because of gunshots.

That sounds like the same one

Still not close to ålesund though

good nigth

About an hour away, iirc

nah, Baughn
http://kart.gulesider.no/kart/map.c?startId=a_10000168804&lnw=&imgt2=MAP&h=&lne=&stopId=a_10000277686&imgt=MAP

do anybody knows about the profiler?

Baughn, 13 hours

Are you really so bad in geography that you had to look it up ? :p

!ask aixo

If you have a question, just ask. If somebody knows, they’ll answer For best results, be specific, informative, complete, concise and on-topic! Don’t ask if you can ask a question. Don’t ask if anyone uses/knows about foo. Please don’t be demanding or insulting. Remember, we’re all volunteers.
Also see: http://www.catb.org/~esr/faqs/smart-questions.html

pnk, not my field

No, that would be me

how can i find where a program segfaults?

I operate on the principle that if I can look it up, I don’t need to remember

use a debugger

sorry, i have never used that tool for c

i’ve got gdb but how?

Has to suck to be you. No offence.

gdb myprogram

adv, GDB is free and rather good :-)

run

adv, remember to compile with -g

and i don’t know if would be usefull for me

gdb, valgrind…

ah thanks

Not at all. After all, I /can/ look it up.

valgrind is not a dbg if i’m not mistaken

And geography isn’t something that’s very useful in everyday life. Or even for travelling, really.

i have a program in c that executes an algorithm increasing the size problem each time

I guess you never attend quizes

Nope
I save my memory for what’s important in life. Anime.

adv, you can also google for gdb tutorial.

I have had a good use for geography many times actually

i’ll do that

If I actually /used/ it more than once every half year, I’d probably start remembering things

and i need for each case to weigh the time

You should travel more

to make a graphic, for example in excel
Baugh, do you follows me?

pnk, he can’t go further than the TP reaches

Ask a real question

Ask a question. *Any* question.
Also, IRC allows longer lines than you’ve been typing. Return is not punctuation.

sorry, i have to translate what i want to type

aixo, don’t we all?

well, i will use pastebin

whats a good windows c++ book
i never programmed in windows before

duncwood, K&R

Um I hate to burst your bubble but this isn’t the right channel for C++.

your right flounders…c sort of sucks
bubble sort c(sucks)

how do i compile a static binary?

-static

Ideally, just add -static to gcc’s command line
It won’t entirely work, though. Some libraries _need_ to be dynamic.

like which?

libc and ld.so
Depends on the system, of course

and why is that?

libc talks directly to the kernel, and kernel APIs change over time
While you /could/ force it to be static, it wouldn’t really be wise

libc also changes

Stick to posix, and that won’t be an issue

ld.so is a library now, is it?

oh

just because it has a name ending in .so?

Not exactly

ld is the syscall interface, isn’t it ?

Not entirely not, either

http://rafb.net/p/SaAgvK40.html

true

Could someone, please, tell me if there is a way to forge user keyboard input? Like, start a telnet of ftp session and perform the commands required for the end user?

Baughn, please read this…

And anyhow, I was actually thinking of ld-linux. _

uh
well yes

Yes. Several.

usually when people say ld.so they mean ld-linux.*.so

Most applications don’t check, and anyhow that’s what pty is /designed/ for. This is a good thing.

long and then double? If i change my var type from int or long to double it doesn’t work… ;(

i’m trying to built a static binary but it fails at libdl functions
and -static -ldl won’t work together

Would you, please, point me the easiest way to do it? I’m giving up libesmtp now. I’ll do it manually, since things would be static anyways…

Try changing the order
popen

anyone ever seen fgets give an illegal seek error when reading from a tcp stream?

will that build a static binary?

If you want both, fork/dup2/exec/fdopen
Nope, but it might let libdl link dynamically. Unless that was the other way around.

warning: Using ‘dlopen’ in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
what does that mean?

Thank you! And how could I read the reply, for example, in a telnet session?

Then you need popen2, which is nonstandard, but can be written using fork/dup2/exec/fdopen.

Once again, thank you very much! I’ll check further documentation on it now

What it sounds like. The dynamic linker won’t work without having the dynamic version of libc /anyway/, as the libraries you open may refer to functions in it
Basically, static linking doesn’t work very well on open-source systems. There’s little call for it.

so it won’t work ?

Depends on how you define “work”

if it calls dl functions?
will it fail?

Not on your system

ah i see
thanks

Why do you want to link statically anyway?
Distribute source instead. It’s the only portable way.

i’m trying some stuff out

i don’t want to bother, but, anybody have an example or a tutorial that explains the operation of the c profiler?
more information in http://rafb.net/p/SaAgvK40.html

er, which C profiler is “the” C profiler?

Draconx, linux gcc

gcc is a compiler, not a profiler.

yes but if you use an option the compiler generates additional information to the profiler

google for gprof tutorial then.

the profiling is done by compiling with special flags, with a bit of help from the libs

aixo, the gprof manual would be a good place to start.

I think

*
To prove that you're not a bot, enter this code
Anti-Spam Image

Comments are closed.