Web Hosting Provider

Crafty Syntax Hosting

ProPS Host

Dorcman Hosting

Ezupdate Hosting

Manhattan Host

Blosxom Host

Tomcat Hosting

Order Now

 


Eyeos New to hosting?
Check out the step-by-step guides to help you get started.
Setting up your 1st website
Transferring your website

 

Advertiser's links

 

 

wiki Secure your email
Accessing email from public places and wireless networks can pose a huge security risk! Anyone can get your password..
Learn how you can secure your email

 

 

 

Domain Search: www.

SERVERS & NETWORK  |  SUPPORT  |  WHY OXXUS  |  TESTIMONIALS  |  ABOUT US  |  CONTACT |  ORDER NOW

 

 

 

somebody knows how to filter a certain color out of an image? For red, green, and blue it is easy. just get the 0, 1st or 2nd channel, but what about orange?

orange is a mix of channels

sure hehe
but how to get it
I mean if it is not perfect orange

so you would need to filter out a range of green and blue channels

Walter_gstyle, if you take the integer representation of a colour, orange probably falls within a range (not a very well defined range - there can be a fine line between orangey-red and redy-orange for example)

hm

It might be an idea to convert to a HSV colorspace first
Then orange is a single hue, and the other two values don't matter
(Or, okay, a range of hues)

Baughn, oh yea maybe
i check that

Mornin'

Miko-chin! *poke poke*

Hi

lo

is there documentation to read RS232 serial port using C under linux?

serial faq

??

@google serial faq

http://www.calgreg.com/circuit-assembly/atas-mobile-faq.html
SERIAL FAQ Consumer - Mobile and PC's - Circuit Assembly - stocked by Calgreg El ...

..maybe not.
Did you look in the kernel's Documentation directory?

hummmm
no

a random integer between [x,y] = (rand() % x) + y - is this correct and a good method?

what is path?

linus__^: No, it is not

why not?

linus__^: Firstly, rand() often produces very poor quality randomness, and should not be used

well, what you suggest?

linus__^: Secondly, your formula only produces a uniform distribution if RAND_MAX % x is 0

http://zsoluciones.com/datos/?page_id=11

@google mersenne twister

i found

http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
Mersenne Twister: A random number generator (since 1997/10)

thanks

linus__^: Use that, and one of the genrand_real functions

well...i just can use rand(), i don't need a high quality randomness

linus__^: So you're okay with only getting odd numbers?
rand() is *VERY* poor

yes, it's ok too
i need a very low quality

linus__^: Oh, just use MT already. It'll take you all of two minutes.

ok

is there a standard function to convert a wchar_t* from one encoding to another?

where i can get serial.h for linux hosting ?

That is the wrong question
A header just describes a library, or a part of a library. It is useless on its own
Also, you should already have it

there is an example
http://zsoluciones.com/datos/?page_id=11#ID_REFERENCIAS
but the first line is

#include "com/serial.h"

but i seek in my linux box, is no there

make sure the kernel development libraries are installed

That page is *extremely* outdated.
Incidentally, did you try searching for just "serial.h"?

yeah

no. however some posix implementations of iconv_open support a wchar_t name you can use.

how can install kernel development libraries ?

as in, cv = iconv_open("wchar_t", "utf-8"); /* convert from utf-8 to wchar_t */

Ask your linux distributor

hehehehe
thousand, Debian

how can avoid rounds errors with float type?

ok, thank you

don't use it.

@google what every computer scientist should know about floating point

Plugin `search' failed with: IRCRaised Lib.URL.isTextHTML: getHeader failed

hahah!
bots suck.

I need it

Google for that, then

otherwise you should be prepared for imprecise values.
http://docs.sun.com/source/806-3568/ncg_goldberg.html

do you have another way to save Fractional numbers?

define a new type, which can hold something like 1/3 as 2 numbers

this is slow

eg struct frac { int demon, int nom}

given your nickname and the way it is spelled, i take it you won't be reading the goldberg paper.
lots of other ways. but, perhaps you want a bignum library.
and debian has no searching facility so you can locate that file yourself?

but what i can search?

for the path com/serial.h, i presume.

humm
i did, is no there
the command is locate serial.h
or find -name serial.h

wrong command.

grep -r 'serial.h' /usr/include/*

bah. even stupider.

sayz you!
it does da job

so, you don't really know how to drive your system, right?

http://tldp.org/HOWTO/Serial-HOWTO.html and this: http://tldp.org/HOWTO/Serial-Programming-HOWTO/

work for linux?

eh?

that URLs
hum
yes, there is talking about tty
thanks

don't look at me, Beket provided them. i'm trying to help you learn how to find a file, presumably one that isn't already installed.

sorry
thanks Beket

reiser2, just a friendly advice, you will accomplish to interface with the serial port, much easier+faster if you become a bit more familiar with basic unix commands + c
your welcome

ok
i need to take the data from RS232 and put in a DB
actually i did in Java

use c-kermit

ra [B[B[B[B

OK, so ai have a struct containing a * char and a pointer to a function
when I want to test something matches the * char (easy enough)
and then call the function pointed to
so I have something like :
handlerList[0].handler = &fooHandler;

& is redundant there.

twkm, sure?
wouldn't handlerList[0].handler = fooHandler; actually call fooHandler right there and then?

No.

oh.
OK,
anyway ...

It's a wart in the C specs that foo and &foo are the same if foo is a function.

how can I call it later ... I tried handlerList[0].handler();

the () postfix operator is what calls a function.

You need to dereference it.

don't bitch - see what happens if you try sizeof(fptr)

just like that -- provide arguments if that is appropriate.

heh

fptr being what?

twkm, hmm threw a sytnax error, I suspect this embedded thing is no ANSI compliant

funcptr

that won't help.

Try (*(handlerList[0].handler))();

sheesh

You're going to need to be a lot more specific than that. Do you mean void (*fptr)(); and then sizeof(fptr)? You're just going to get the size of a pointer.
0

sigh ... seems this embeded compile is brain dead

and printf.

its the Rabbit/Zworld thing

if it doesn't, then you don't have c, merely something that looks a bit like it.

I suspect you might be right. Great isnt't it .. someone makes a nice standard language, and then someoen else decides to invent somehting 'nearly' the same

embedded folks often have to, because their chip can't support the requirements of the language well enough, e.g., less than 4k of memory.

hi
where can i find the code for free in glibc? someone knows?

sk7, what?

like i said the code for the free call in glibx

oh
no ideia :P

hi

grep is your friend though

Why do you want it?

did this already
cause i want to see the code

Prepare to be underwhelmed.

hehe

it's probably some ugly asm code

that would explain why my grep gets no results

is there a way to tell how many bits equal to one byte on a given system? on most systems 1byte=8 bits. but i want to be able to accommodate other system as well

yellow_chicken, wow

sizeof operator only returns the # of bytes, is there another way to return the number of bits?

what system is that?
i don't know of any system where 1byte != 8bits

yellow_chicken, afaik a byte is always 8 bit long... i'm not aware of systems where a byte is NOT 8 bit long

yellow_chicken, CHAR_BIT in limits.h

i don't know? 64-bit windows xp maybe?

yellow_chicken, are you joking?

I was asked the same question in real life ;(

cmon, 1byte=8 bit this is a standard

wtf?
that would be hardware dependant
not software

sk7, standard says it is _at least_ 8bits

I've got an FPGA here where 1 byte = 14 bits

a formal definition always says, "on most system blah blah blah 1b=8bits"' what other system will not be true?

Baughn, o rly? and what does have got to do with Windows XP ?

(Actually it's seven bits, but the C standard requires it to be 8 or more, so..)

*have

Who's talking about windows?

Baughn, yellow_chicken

i don't know? 64-bit windows xp maybe?

True. That's a bit odd.

yeah, i like i said, i don't know

anyway
don't bother with that

bit-ten by bytes.. Nibbled to death.

PoppaVic, heheh

i found an example to convert integer to binary, using shift operators with a mask, but not so safe, looking for alternative. i might have to do it the old fanshion way

yellow_chicken, you can safely assume a byte is 8bit

(If you're using a pc)
Well, anyhow - POSIX defines them to be 8 bits

Baughn, nearly all archs have 8bit bytes

the example will print out extra bits, 00000000.00000000.00000000.00000000 , i think i will only use two octets

oh and if posix says it...
posix is all that matters really

Most processors don't

Baughn, sorry? Oo

(Most processors are DSPs of some description)

ok, thanks guys

There are the teeny 8-bit PICs. Okay, those have 8-bit bytes.. but for other embedded devices, words == bytes more often than not, and words are often 16 bits or more.

that sounds sideways shrug

Baughn, but they still support bytes, right?
they just leave wasted space

Sure, it's just that the bytes are more than 8 bits
What do you mean, wasted space?

if you have 16bit but only use 8

A byte is the smallest addressable unit. Those PICs /can't/ address smaller units than, say, 16 bits, and so bytes are 16 bits wide.

oh

C can't cheat, since pointer arithmetic on char* has to work

yeah
that doesn't really matter to the C programmer anyway

To the contrary, it matters a lot

why?

If you can't be sure that a byte is 8 bits, you can't take advantage of overflow on unsigned chars

you can use sizeof anyway
if you really need to know

And of course, you may not want to waste half a byte by only using 8 bits
sizeof reports sizes /in bytes/, you know.

oh well
was hoping it would report it "normal bytes" :P

It does

aka 8bit bytes

If you mean octets, say octets

Baughn, but could you give me an example of a mainstream arch that hasn't got 8bit bytes?

Actually, I've seen the term 'byte' and 'octet' and such often used interchangably in most docs.

The microchip.com 16-bit DSP family?

does any OS really support that?

You probably own a couple dozen processors of that description, or similar; chances are they outnumber 8-bit byte processors even inside your PC
Yes, of course. Several.

Baughn, i mean the general purpose ones
not some uber specific thing

Vxworks?

ok
didn't know
i haven't really though about that
always assumed that everyone was using 8bit bytes
*thought

There's no reason to, really..

i think it is an extremelly important thing to standardize

Even on modern PCs. Think about it - how often do you need octet-fine addressing?

it's not about need here
it's about standards

Not for strings, certainly; unicode is at least 24 bits
No, this isn't really the sort of thing you need to standardize. It can be entirely hidden by higher-level languages.
bNo, this isn't really the sort of thing you need to standardize. It can be entirely hidden by higher-level languages./b

uhm

Baughn, when you start shifting and rotating bits and crap
you will notice it

Well, yeah, byte isn't specifically 8 bits, but octet==8 bits is one of those historic things, and is assumed as an equivalence in Internet RFCs, iiirc.

You can do that if bytes are 32 bits too. :P

Baughn, sure

You still have to do subunit slicing

i'm not saying 8bit bytes rocks

Or do you want 1-bit bytes? There was an architecture that had that, once

*rock

hence why 'bit' is defined

good morning

i'm just saying it's the de facto standard

anyway, back to writing shitty perl, eww.

you'd be underwhelmed to see how many docs interchange octet and byte
lo, erider

I know

hi Poppa
whats the word?

ahh, well - the example I'm doodling is looking cleaner

thats cool right?

yeah.. It's actually looking readable, so far

congrads

I was getting a little peeved with it, and suddenly realized that some judicious use of the stack and parsing would yield some rpn AND look akin to some c-ish

what datatype should I use to store the contents of a .torrent file (which afaik, has binary data) ?

Is it possible to have a function return a struct like this? : mystruct getdata()

yes

static Options ParseArguments(TCHAR *argv[])
{
struct Options opts;
opts.restart = TRUE;
return opts;

for future reference, http://rafb.net/paste

sorry

you're returning Options and not struct Options. are they the same thing?

as I see transmission uses uint8_t to store a torrent

I have created a struct called Options which have two fields.

my guess is that you've created a struct called struct Options and Options does not exist.

I hate it when folks typedef like that, too

static struct Options ParseArguments(TCHAR *argv[])

Thanks, that worked

sanmarcos torrent files aren't binary

italys, what are they, how should I store them?

sanmarcos actually they are binary

I've seen transmission store them in uint8_t (I dont even know what that is)

uint8_t = typedef for an 8-bit unsigned integer, probably typedef unsigned char uint8_t

wouldnt that be typedef unsigned int uint8_t; ?

hi

Oo

how can i start with C and can i use QT for it?

no, an int is *generally* 32 bit
uint32_t = unsigned int
uint16_t = unsigned short int

I dont understand, so I can store binary data in a char?

uint8_t = unsigned char

buy a book, I suggest K&R

well, whenever you need to count from 1 to 20, why use a whole 32-bit integer?

I just need to store the data from a torrent file

a char is an integer, it's just that function that takes chars treat them as characters
ASCII is the most common way of defining what numbe is what character

only because it's usually faster than screwing with the smallest packages.
Guys..? Umm.. It's all numbers. Just different ranges/sizes.
brb - recycle

wb

tanks ;-)

what is wrong with char *buf=getenv(ENV_PAR); Should it sigsegviolate as it does?
rawmemchr from libc, =_IO_str_overflow = vsscanf ==sscanf =main

well, did you allocate enough memory for the char? :P
char[] *

don't dereference buf
bug = getenv(ENV_PAR)
buf*

heh

I think a manpage is order ;-)

char* buf; buf = getenv(ENV_PAR);

or oh, that was in the declaration

was not sure what it returned :P
yeah, it returns a pointer

no, no.. but what is it wih char *buf= ...

but I have no idea what he's passing

like, say, char *buf=malloc(100);

leakage
rtfm

lol

revil char *buf = ... declares a char pointer and initializes it to ...

char *buf=getenv(ENV_PAR); exactly..
what is wrong with it?

what is ENV_PAR ?

why does it throw a sigsegv whereas a char *buf=malloc(1024)

#1, answer above; #2) did you include the proper headers?

~_~

it is some const string. consider it to be "char *param=getenv("MENV");"

char* buf = ... initialized the stuff pointer TO ..., not to the stuff POINTED TO BY ...

oh, btw, char *param; param=getenv(ENV_PAR); works fine

calm, so far so good

works find here in netbsd
fine*

ohhhhhhhhhh

sorry

this is "global", not "local"??

local

ok, if it's in a func, it shouldn't be an issue.

so try "char* buf; buf = getenv(ENV_PAR);"

(if i understand correctly you are refering to the scope of my var)

right

adrahil, yesh, fine, but I want to know why does it not work otherwise

Show the full testcase (compilable code).

ok..

This has nothing to do with scope, as you've described it.

because char*buf = foo() will assign the buf pointer to the result of foo, and since the result of foo is a pointer already, your pointer will be a pointer to a pointer
bbecause char*buf = foo() will assign the buf pointer to the result of foo, and since the result of foo is a pointer already, your pointer will be a pointer to a pointer/b

if I have an array of uint8, what is the right way to convert that into a hex string? snprintf seems kludgy.

yeah, I was afraid it was declared somewhere out in the process/global space

char *blah=func(); would not compile outside of function context.

I don't think so

well, it should...

nossir

hum

heh

It just assigned the returned value, which happens to be a pointer.

righto

adrahil, you are wrong about pointer to pointer thing

yeah, possibly

I don't get completely Xgc, and my testcase works fine so far..

very short night, and one other coming

:p

and..? did you rafb the example?

(Lake Parade down here in geneva ~_~)

!rafb

Read A !@#&ing Book - Your primary guide for learning C should be a good book (see http://www.iso-9899.info/wiki/Books). You must not expect to become a proficient C programmer just from reading crappy online `tuts', staring at other people's code, and/or boring us to death by asking dozens of exceedingly trivial questions.

now try /topic

That's the point. You report sigsegv and then can't show an example. The problem is elsewhere.

I say.. that new bookcase was DOA

bad news, eh?

nah the "D" stands for damaged in this case

is there some reason we are still awaiting you to paste the errant function to rafb?

but I couldn't care less.. it can carry the load...

I hate when that happens - but, that's pressboard, right?

yup

ugh.. I hate that stuff

I'm a poor student
http://i17.tinypic.com/6627y9h.jpg

Personally, I'm partial to the rails on wall-studs and pine planks.

I know I know

what does rafb mean?

when I'm old and saturated I'll get some fancy case

revil, rafb.net/paste

me error.

although (hehe!) Down here in the basement we recycled a ton of sawmill oak-planks into shelves years ago.. There is something about climbing walls on seasoned oak ;-)

i can't get the same code to generate the same error. I was messing with gdb's set env command at the time
still trying, sorry

I want one of those huge bookcases that actually require a ladder to access it

heh - I recognize some of those books, you poor bugger ;-)

I bet you do :P
some of 'm are good

Couple of semesters course-costs in there

some of 'm deserve the fireplace

Do you have the original program that was producing the behavior? It's very likely you misdiagnosed the issue.

yeah

Professional linux hosting Programming is the worst thing
C++ the complete reference... burn it
Unix network programming has got to be my fav...
design and performance

Yeah, I've UNP - I use APUE more often

Xgc, I am quite confident, yes. Now, How could I misdiagnose a sigsegv that kdevelop claims (as well as the gdb) occured at the very same line?)

well I program a lot of network stuff
so it makes sense

Without seeing the program, I don't know. It could actually be a stack corruption that just appears at this point.

it seems after a random occurences of recompilations/gdb reloads I can't retrace the problem.. sorry..

I tend to avoid sockets in general.. When I need 'em, I have to wander around reading for a day

lol
well there's no other way to get across the net now is there..

There's very little way, other than stack (or other) corruption to cause a sigsegv with that line you posted.

really? Email? Html? ftp? ;-)

and don't mention walking around with some compact storage
you will always need them sockets
indirectly perhaps..
but you need 'm

I know I need 'em, but I don't much like diddling them myself - the interfaces make me want to puke.

well, you haven't seen the PSP sockets yet :P

So misdiagnosis is the likely answer. Show the code if you can produce the behavior in a full program.

makes you want to kill yourself

I had really messed up with the program in gdb by the time. I guess.. (many jumps, set envs, arbitrary calls from within gdb). You seem to be roght to me. I can't reproduce it though, sorry..

roght?

*nod* Maybe you corrupted the program with your gdb operations.

hays, look for adjacent letter to 'o' on the keyboard

yeah, sockets already make me sorta' sick - but I don't want to suffer Yet Another Wrose Interface
worse

Could be.. I have no idea anymore :p

hmm

hello
i don't understand why when i declare a static variable in a function if i use it in a for in this fonction this is not the same value
like here http://paste.ubuntu-nl.org/28987
chmot is an other function which return 0 or 1

The last value is maintained through to the next call.

That's the whole point of static.

static holds the last value of k.

yes that what i want it keep position in the chain

you've created a name only seen in the func, but the instance of it is outside the stack.

Don't use static if you don't want that behavior or assign it each time.

but here it pass from 3 to 113 in the for

Well, what do you want done?

Then why did you ask about the behavior (as if it was a mistake) if you wanted it?

Xgc, because the k in the for is not the same
i paste you the jump

Of course it is the same.

no :/
that's my problem

Post the full testcase, so that I can see the behavior you dno't like.

it jump in the for from 3 to 113

Prove it. Post the full testcase.

And what would you expect it to jump to?

then you screwed the stack or some other big bone. Only that silly func can see 'k'

just want to do from 1 to 1 in the for

you get that /msg?

A simple buffer overrun could cause all sorts of bad behavior.

"from 1 TO 1"??

yes

So show the full testcase.

that's... silly

http://paste.ubuntu-nl.org/28991

We can't see mots from here.

i enter "bon bon" as word

Post the full compilable program.

extern char [][2]

Post the program/ source. Are you having trouble with this form of english?

char mots[][2]= {{'\n','\0'}};
ok
that not good that's why i past you all

for starters, arrays like that are verboten

You probably made a bad mistake in the calling code. Post it.

the main http://paste.ubuntu-nl.org/28992

hi

call ask.c
the message http://paste.ubuntu-nl.org/28993

That's not helpful, because it's not complete.

the parser http://paste.ubuntu-nl.org/28994

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

last is where the function is used

the first one succeed then i got Illegal seek for all others..

Where's count.c ?

are you actually using any warnings and such? Or just praying that works?

and you really shouldn't be including file.c files.

and where analyse the parser is calling
PoppaVic, no warning

#include "count.c" --- Post that one.

Xgc, i ast it
http://paste.ubuntu-nl.org/28996
no sorry
http://paste.ubuntu-nl.org/28997

dear bog

just last is use
other was from previous with table
i would talk about function inthe last file . only analyse is used

Now how do you run this, exactly?

gcc -Wall ask.c
./a.out

and?

anyone for my ptr to ptr shit?

ask from word

Input?

and by enter . enter
yes

I dno't understand that.

Entree la phrase a analyser :

What does "by enter . enter" mean?

then you must enter a sentence and by enter . enter after
you and the input
you end

Sorry. Post just the input you type to the pastebin.

you put what you want
bon bon
as exemple

yes. It continues to wait for more input.

type enter
and point '.'
and enter
like smtp

Maybe it's in an infinite loop?

no

Ok. Got it. Now what output don't you like?

the jump in the second for
see k value
de l ajout de la lettre k =

I don't see it. 0, 1, 2 then 3, 4, 5, etc.

like in this paste http://paste.ubuntu-nl.org/28991
line 64
from 4 to 112
:/
and its in the for

That's a buffer overrun. I don't see it.
Clearly, that's an overrun.
Undefined behavior is very often not duplicatable exactly from one platform to another.

but how it's in a for

As you store into mots, you could overwrite your static hosting storage.

the for from joute_mot

what does being in a 'for' have to do with it?

ok Xgc

I'm also pretty sure that "foo snarf[][2]=..." is bad

i can't find a good overview of ndbm in apue, does anyone know if there is a good tutorial or document online?

yes must a fixe the size ?
but i don't know the size before i write to it must use the malloc ?

benje, are you from quebec or france or ... ?

france acidfu

benje, if you want, there is the channel "programmeur" ...

For starters, you are never really passing an array - let alone an array-of-array.

thanks Xgc i will go to see that
ok PoppaVic but it's to undersatnding

So, Bog knows what you think you are doing.

sorry PoppaVic ?

You need to pass what you KNOW the compiler will pass around. And, work with what is passed around and known - stop guessing.

Heh, i've just made project 50% smaller by making all functions 'static inline'.

vorago, that's bad
really

oki i will PoppaVic thanks too

your compiler will know better than you how to do it

Well. He does not. (-;
It's small project intended for 1k flash microcontroller.
block. And no 'calling' is done.

I'd just use assembly for that case, myself.

I know it's queer. But the size here counts.
I usually do. But C seems to do it right. With this 'static inline' hack even better.

that's probably because you're not using the functions more than once in most cases

That's true.
However 50% quite lot. I wouldn't suppose.

vorago, do you know about the "register" keyword
?

sounds like you have a relatively lousy compiler.

Yes, but I don't use it very often.

morning all.

Zhivago-, avr-gcc; With -Os.
I though i would inline functions by itself more often...

1K?

well, then you'd better figure out why the call overhead is so high.

good luck
why not use assembler?

did you recommend Auster to me?

who the hell is Auster :P
no

C is more 'handy'. I know avr assembler, but not as fluent as 8051 asm. So I prefer C.

vorago what kind of device is this?

It's about 315 lines of C code (with plenty of comments) resulting in 422 bytes of binary output.

what compile hosting options do you use? I assume you're on gcc?

italys, attiny13

A port of, it seems.

centosian, -Os -mmcu do you know some other options I can use?
italys, small uC; Good enough for me. I can switch to attiny26 later (2kB flash)
italys, it's simple PID controller.

PID?
i don't know anything about embedded systems

http://en.wikipedia.org/wiki/PID_controller

Zhivago http://youtube.com/watch?v=pGzrL8J0t-c certainly you'll enjoy this

not offhand that I'm sure would make your binary smaller. -finline-limit=n might have a positive effect, or not. You have to try them and see

hardware is above my head :P

if by 'enjoy' you mean 'will wish you had hammered nails into your ears', then certainly.

Zhivago heh

have you searched the avrfreaks.net forum?

audioman, there's no need. (;

Windows Vista is pretty dumb.
wrong channel

seems I didn't read far enough.. 1k space, 422bytes used

Zhivago merzbow is an interesting artist.

that sometimes happens ;-)

hey,.. I need to printf a user supplied string parsed (i.e. all the escape sequences treated correctly) , but in case someone nasty inserted some % operatives inside they should not seek for more arguments. Can I do that?

what os are you using?

printf("%s", "foobars\n"); ?

you deny idiots access to the fmt-string
Cool, vorago - stay well

italys, no. printf ( "%s", "foo\\nbar\\n") should yield foo\nbar\n

audioman, linux; Gentoo
(bb in 2 hours!)

hi

lo, fax

I managed to foobar the only chip I had here, will get more on tuesday, have you used any of the avr simulators that are available for linux?

PoppaVic, If i remember correctly there was some fmt-string I could use to do that exactly. Eg printf ("%X" , maliciousstring)
is there such a thing in c?

no
if YOU control the fmt string, all they can do is screw up substrings - and you can control those lengths anyway.
the [vf]printf family puts you in control - not idiot-users.

ok PoppaVic, what do you propose, make the parsing myself, or disallow those fmt-strings containig '%' chars??

..it drains out to places that either accept data or - they are dead and YOU have to deal with it
once again: if YOU already manage fmt - they are simply sending text.

PoppaVic, they have to be able to provide non printable vhars somehow, but not mess the rest of the fmt-string
from the commandline that is

if they are "non-printable", where is the issue?? Yer puzzling me

its called preprocessing

If they think they can use ANSI drivers/escapes - so what? It can't hurt the program.. Just bugs the dits

'prog -s "Hello\nWorld\nit is 100%cool here"' but not 'prog -s "Hello%d\nWorld"'
from the command line.

so what?
the CLI sees that all as string(s)

PoppaVic, exactly. I want it to be processed. Can I use printf for that?

in fact, I'd wager it cries about \n and such

revil do you have to use C for this?

italys, absolutely
why?

Why do you need to "printf" a user-supplied string?

Hi

you can do whatever you want: all the idjits get is an _opportunity_ to feed the program

And what does "\n" have to do with printf?

Further, remember all that crap needs to get thru the shell to an exec*() somewhere.. They can shoot themselves all day there - you are responsible for what you trust

ok, I want to insert to my program some hex digits from the command line. e.g. some assembly payload. The user can only use printable characters. How can I give the user the ability to provide the full range of ASCII chars, when the shell does not allow him to type other that [a-z\/....]

a string ( char[] or char* ) must be ended whit '\n' ?
in C language

no.

no

The shell doesn't allow it? Hmm.

you don't want full range to begin with.

The answer is: any way you like.

you only want 0-9, [aA]-[fF], yes?

He wants someone else to be responsible

echo -e "\x7" # may provide inspiration

Not standards compliant.
Ironically, you'll find "printf" to be more portable.

it is so simple.. what am i saying wrong! exactly. How can I implement (easilly, hopefully with printf itself) the same functionality

printf "\x07" ;]

Parse the input.

prec, how!!!

Write a parser.

geezus

ah.. that way...

Are you an idiot?

french, apparently - does that count?
oh.. my bad.

can't I use printf for that? Isn't there some %whatever flag?

I know several French software engineers that quite easily put you to shame PoppaVic.

oh, gee - I'm sure.

Good.

What does this have to do with printf?

do they understand the idea of "parser"?

Again, you're extremely...incorrect.

prec, because printf does exactly the same!!

How many characters are in this C string? "abc\n"

5? (\0) inclusive

No.

Don't patronize me, you obnoxious troll.

Oh, including the \0? OK.

poor samy

So, does printf see "backslash n" or does printf see "newline" ?

You cannot use format characters to exclude ranges within a predefined format type. Take a look at strtol and that family of functions, for example.

whatever. I want to skip the "build your own parser" thing. And obviously I can't use the ready printf 's fmt-string because it is dangerous

sometimes better to run from the input-side.

Please elaborate. It is not "dangerous" if the user-handled string is treated as "%s"...for example. The point is you don't want user format characters to have direct access to stack themselves.

If I understand you correctly, you want the user to be able to type "backslash n" and have your program interpret that as a newline character, correct?

prec, correct

What does that have to do with printf?

...nothing.

yeah.. ok..

revil is a lazy bum.

printf takes a format string which contains format specifiers which begin with %

yes, of course i don't want to fill my programm with switches and strchr's or whatever!
especially ewhen I;m bored to death to do such trivial things
:p

you can easily have a jump table then...

prec, plx..

You can be a lazy bum and a good designer...

hm!!! does that imply assembly or goto?

Have a jump table define input states with appropriate functions to define that parsing state.

When I see "jump tables" I am reminded of Duff's device...

Lazy is a good thing for programmers to be. The less (crappy) code which is written, the better.

No no. Just an array of symbols defining start of a state, end of a state and functions to handle input from that state.
No no. Just an array of symbols defining start of a state, end of a state and functions to handle input from that state.
So if "\" is entered for example, you have a function handling this state. All your "parser" does is search across this table and call appropriate state handlers.

so a char ** ptr where for each *p a specific function is known?

A string defines state entry, at the least, yes.

corollary - "Reuse is contagious"? ;-)

i'll try it first with structured programming..

Boring and time consuming, but ok.

ok, you did intrigue me..

One should always see if it wouldn't be better to take the best web hosting code you can find and fit it to one's purposes, hopefully making it better in the process.
s/you/one/

preferably without copying it into your program

ok, I will use printf. I'll just make sure that every "%" symbol is converted to "%%". that should be enough, right?

how about using %s?

SamB, %s does not parse the input

Neither does printf!

I'd tend to agree.. But, if you can reuse code/data w/o writing more new "support", it's win-win

You still have a gross misunderstand of the difference between strings represented in C program source and how they are actually stored.
s/and/anding/

prec, ok, i'll show you a test case when I'm done, to see what I'm dealing with here

or passed

prec, not at all mate, not at all.
I am just not english/wake enough to succeed in explaining it
:p

Show your test case then.

./program "this\nis a\ntest." - what does the program see? Think about it.

PoppaVic won't the cl parse the input

cl?

that WAS the input

oh

man, folks are weird

but about sockets PoppaVic

arrrgh

PoppaVic the program will see a sequence of characters

?

I don't program in C that often anymore...

and I still avoid sockets when I get the choice ;-)

mostly c++ or python.. so it's either boost asio or twisted
:P

{ 't', 'h', 'i', 's', '\\', 'n', 'i', 's', ' ', 'a', '\\', 'n', 't', 'e', 's', 't', '.', '\0' }

interesting suggestion, prec
I'll look into that

I wasn't making a suggestion for you ...

can I embed a linux command into a c program?

Write shell scripts in shell.
If you were asking a question, I missed it.

prec, but I have to use C, is it possible?

sebas_, man system

What is it you want to do?

If you mean issue a shell command, use system()?

I wasn't mocking you in any way, prec

ok, let me see..

Zhivago do you eat meat?

I didn't think you were.

:P

I'm using std::system()
thank you

##c++

brb - recycle

ok using a fixed size resolv it
no more jump PoppaVic
don't chuckles i'm learning

Well, I can understand being a newbie.. But I also warned you multiple-times. Also, I'd write the code and comments in english - even BAD english - and leave other languages for prompts and whatnot.

than "good C"

PoppaVic, yes about using multi table, this code is not to be read by other normaly
i will do it's to write statement in english

it's nice you believe that ;-) Also, I rarely use multidim arrays.

PoppaVic, what do you prefer to use to store ? i haven't see struct for now

Most folks can puzzle out strange printfs and such.. But, it's tough to puzzle out what a guy _thinks_ he wants when they don't use english nouns, verbs, adjectives, etc
sorry? "store"? Where? what..?
Oh.. instead of [][]* ?

yes
for now it's just word and the sum of word

I'd use structs, and mallocs, and macros, and fields, and try to never EVER see **+ - and I'm serious about it. Typedefs (alias) also helps.
If I pass someone just a ptr, he really doesn't know enough - unless I add more arguments/param

i am not here from now and i try to get it work even it give me this kind of problem

this can be so confusing

yeah

well ##c in general

it's worse as I try to guess what he's saying ;-)

yeah don't do that
you're just making it worse

KISS Principle
you have to realize, programmers are like pilots.

well obviously the lot the ppl coming here with questions often don't follow that principle, PoppaVic

I know, and it bites them in the nuts and the rest of us go blind.

aye
I feel old again

hehehe
welcome to the club.. Maybe it's time to join the retired-persons associations? Wear pants around yer chest? ;-)
"young whipper-snappers!" (wait, I forgot to insert my teeth! ;-)

hmmmmz sounds interesting
yet I'm only 5
errr 25

riiight

stupid sticky key

programming and food-service make you old fast

food-service...

what do you wanbt to said by like pilots PoppaVic

I don't know about any food-service

international pilots need english.. Or they don't fly international

i prefer programmer which knowing there machine

well, I worked up from bubble-dancer/dishdog.

heh
I worked up from selling computers.. to err selling a network XD

you can prefer tits and cake, but folks can't help you.

PoppaVic, it's an old time a learn enlgish and i don't practice often
uPoppaVic, it's an old time a learn enlgish and i don't practice often/u

ok well time for dinner
cheers

later Nande

good luanch

ok, well - you can't expect good results until you can manage some level.. I usually point at High School English, but even post-Elementary will work.
otherwise, why ask around? You are "flying" in "international airspace"

we must pratcie to keep level

I just have issues with "oh, shit - we are in a stall/spin"

wait that chinese came

heh
bastard, I was leaning that way - and we don't get delivery

What's the function for taking a gid/uid and getting back the actual string name of aforementioned user or group?

getpwuid() ?

apropos is yer friend
..so is google

when free()ing something, is it ever the case that the process's rsize goes down?

what's an "rsize"?

real size, i think?

yeah, its memory size

http://pastebin.ca/607483

it is possible, yes.

hi, any suggestion which method i should use for creating multithreading socket server?

man, use rafb - it's so much faster

mostly, don't.

forking or threading?

looker, since you are using C++ I'd suggest to use the Standard Template Library (STL) and the String class instead of char *

see ##C++

dont? why?

but, i suggest you read butenhof's book to learn threads, and stevens' book for sockets.

is pthread good ?

but i only need to free memory and everything is okey, and now - everything is based on char* and i would have to rewrite alot of code.

i've reliazed what the real problem is, since unix socket based is syncronous (as server) and winapi socket is asyncronous (as a client)..

hmm.. for 3 iterations, i'm creating 5 million linked-list nodes, then removing them.
the 1st iteration, the memory size goes up like it should, but it stays the same of the 2nd and 3rd iteration.

good geezus keerist

Use the correct channel: ##c++

i'm stupid...

does that mean that malloc is reusing the free'd memory, but not releasing it back to the os?

what do mean that UNIX sockets are synchronous?

malloc and free always work together

its "select" method..

free stores info malloc can use; malloc tries to allocate a block of the proper size or merge blocks to come up with the proper size.

ok, is there a way to force the free() pool (or whatever) back to the os?

they both try to keep the OS out of it, once they've space to work with
most folks would beat you right to death

heh

in unix, it is synchronous. winapi select is asyncronous

why's that? i'm pretty new to c
i mean, suppose you need a big chunk of memory to so this one operation

What do you mean by that?

malloc & friends already play well together and minimize action with the syscalls/kernel. What you MIGHT want is another layer above that deals with blocks and sub-blocks, etc

If it's significantly bigger than a page, you could use mmap (POSIX only) to get it, and munmap to release it to the OS

glib has something like that

No fragmentation issues. Of course, you only get multiples of a page this way.

I see.
I will check that out. Thanks

sure

I think you're mistaken.

prolly needs to learn about "asynchronous"

hm..
err.. i was reading a wrong article?
omg..
http://bit.kuas.edu.tw/~csshieh/teach/np/winsock/index.html -- its written in here

I have no idea what that author means. Do you?
I don't know what either "execute synchrnous I/O" or "execute asynchrnous I/O" means, and it's not because of the mispellings.

well, tossing "execute" in doesn't help either

um..

sycnhronous typically means that when the call, returns, your request is complete. Async means that when the call returns, the request is scheduled to be completed, and may or may not be actually performed.
usycnhronous typically means that when the call, returns, your request is complete. Async means that when the call returns, the request is scheduled to be completed, and may or may not be actually performed./u

see. you should go read those books.

bingo

err, s/performed/performed yet/

I've a soft-spot in my heart for suffering pthreads, that are DETACHED.

So, that page talks about the WSASelect function. Does this function actually exist?

but the whole mess gets pretty nasty.

im so sorry, i was so confused. its been 2 weeks i was trying to solve the send() problem. i got loop from server and data from query result onto client using send(), estimated 80-10 bytes
while im sure it is sent by rows result

Personally, I'd prefer folks learn c, then use Pth, then consider fork/exec*, then dick with pthreads.. Folks expect too much in the wrong places for the wrong reasons.

but in client side, i cant parsing it correctly since for 1st packet recv is the same 1st packet send, but 2nd packet is recieved, and pool-ed by windows onto 2-4Kbytes buffer. which is not enterily in correct data to parsing with

"sent by rows result" means diddle-doo-dah

wrong method?

yer seriously confused, c_newbie

i am

sockets are the _last_ thing you want to learn, as a newbie. Period. Anywhere.

stream sockets do not maintain boundaries.
this is covered in stevens' book. (well, several of them, each for a different aspect of it)

UNP, APUE - but you _can't_ deal with them until you are dead comfortable with basics

The difference between select() and WSAAsyncSelect() (the actual name of the function) is that select() doesn't return until a socket is ready while WSAAsyncSelect() uses an implicit callback.

ahhh
That sorta' sounds useful

When you call GetMessage(), if a socket is ready, you get the message then.

ahh
that lil' bugger is the blocker, then?

Well, DispatchMessage() is.

one or the other.. Neither wants to do a callback-per-signal/char-until "done"
ok, I've seen such before

All Windows (GUI) programs have an event loop at their heart. while (GetMessage(...)) DispatchMessage(...);

And, then folks all want to bitch about "well, this is buffered"
yeah, I'm still trying to "think event-driven" ala' glib

thanks

weird..

why is the ' at the end of your "ala'" ?
:3

hmm?

yeah, I'm still trying to "think event-driven" ala' glib

"ala'" is how it is usually typeset

original is "à la"

as in "ala' carte'"

:P

Anyone know of a good way of mapping a 2d array to a 1d array?

from french
Oo why on earth would "carte" take a '?
if i understand correctly, ' is the accent

I know with a 2d array I can always traverse each element by doing dual loop. .

accent-marks
imagine cheap-assed typewriters and limited fonts, dude

yeah well, fyi there is no accent on "carte"
:P

a la carte

"a' la carte"

I may have misspoke of it, which is cool - I try

right.
I can't type that here.

where do you live? uk or usa?

I've too many books with too many editors and authors.. I try

mapping?

CONUS, USA, MI

yeah, say I want to access elements in a 2d array I can do it by doing variable[x][y]. But trying to find away of doing it in 1 large 1d array.

I treat this poor ol' keyboard as a really limited typewriter

but not sure how to better access individual elements

so, jshriver, you want to access 2d array with 1d?
ASCII rules

say I have 1d array, that acts like a 2d board. I want to move up one or down one. It's easy with a 2d array just x-1 y-1, but since it'll be in a 1d array not sure how to do it
yeah

umm... an "array" is a "vector" is a "block"... how you diddle the guts is up to you.

jshriver, a 2d array is stored as a 1d-array in memory, just use a pointer to the 1st element + the appropriate offset as a function of i,j

but trying to find an efficient way of moving around a 2d array stored as a 1d array.

won't C enforce using a 1d [] on a 2d array?

well, like MORSE code - it's simple and portable

morse code is a bitch for accented characters

If he mallocs it, he can malloc( sizeof int[z][y][x] ); Otherwise, yes: he needs to manually address what and where.

yeah
i love untyped mallocs

malloc (sizeof int[x*y*z] );
malloc doesn't give a good goddamn

or malloc(sizeof int *x*y*z), no?

I use the parens - I've been burned before

syntax error

yah parens missing

it wants a size... which a type helps, and then the sizeof wants elements-total

PoppaVic, be careful when talking about "vector", it's another thing in C++...

This ##c not ##c++
s/is/is is/

yes, I know - it's a Z term and I don't like it, but this is ##C ;-)

The context is clear.

Until Z, when I said "vector" I meant a funcptr

How long do strings allocated on the stack last after a function returns said stack-allocated string?

What is a stack-allocated string?

..so, I too adapt ;-

prec, PoppaVic, I told it because once I was trying to help a man, and I've thought that 'vector' was an array... but he was talking about the C++'s vector.

Yes, people ask here about C++ all the time, unfortunately.

something like "char stackString[50];" and not "char *heapString = malloc( 50*sizeof(char) );"

yeah, we've seen ##C++ folks before - we CAN'T help them - they forget classes annd overloading, contructors/destructors, etc

precZ!

There are three storage classes: automatic, static, and allocated.
Depending on where stackString is defined, it is either automatic or static.
The object referred to by heapString (assuming the call to malloc returned non-NULL) has allocated storage class.

you forgot extern and dynamic

Those aren't storage classes.

officially, yeah.. but in C it tends to matter.

Not for objects. Symbols? Yes.

volatile?

PoppaVic, I'm not a C++ programmer yet... (nor oop programmer). Yesterday I was seeing about Scheme, it seems to be efficient, easy and quick code (general). What do you think about it?

Scheme is nice

ahh.. symbol-relationships, yes

Scheme/ACL is pretty interesting and quite fast for what it is.

http://www.iso-9899.info/wiki/LinkageAndStorage

I honestly write more for gcc and Make than even for sh or gforth or bc
there are tons of things to do, and tons of ways to do them.. I'm too fuckin' old to keep learning new ways every week. I just want shit to work.

ever tried lolcode?

lolcode?
never hoid of it

Python is a very interesting language if you are looking for something besides C. And what's great is the popular implementation is in C, so you can always go back to C roots, sortof.
that was to hugo_br

http://lolcode.com/

PoppaVic, I'm just 15, but I don't have so much free time (my school is taking almost all my time)

great link. Thanks

if I was 20 again, yeah - I'd suggest learning as much as you can - in as many "languages" as you can - and then make 'em all work together..
if I was 20 again, yeah - I'd suggest learning as much as you can - in as many "languages" as you can - and then make 'em all work together..

it is at school (during lessons) that i did most of my CS-related reading

hays, a long time ago, I was almost getting python to learn... but I didn't see so necessity. (not for me)

there are ten-tons of interesting ideas/concepts out there.. And, they all need to boil down.

that is during german french and english class

That's some kick ass BASIC

interesting choices.. THat explains some issues and interests

i'm not the language sort of guy
spoken language that is

Yeah, but.... DAMN.. there are a lot of shared concepts and bases-of-language

adrahil, man, I'm brazilian, that's driving me crazy, I was reading a tanenbaum's book when I saw that I was needing to read school matter... And I tried to, I had 7.5 in Portuguese (my native language), and I'm worried of my note in Biology

what does delta mean?

yeah, I dropped 2nd year German in HS when I caught myself _thinking_ it.

see that a lot in code

a difference of something

difference

wow

so x = 2 - 1, x is the delta?

right

yah...
delta_x

ok lol

jshriver, it depends in what are you working on

guessing this is where taking more math classes or actually paying attension would have been useful

generally you'd use a delta for repeating and time dependent stuff

int d = delta[k];

watch out, math has a unique language - C is an uber-math language that does poorly

within a for llop

C and math don't seem to be really related :P

what exactly does it mean when a function is not reentrant?

if you ever see a "math dictionary", you will scream

could also be a delta functino

not sure.. trying to read and figure out this site: http://www.gnu.org/software/gnugo/gnugo_15.html#SEC180

Dad had one... I think I've it packed away.. It was generally useless.

or the sensitivity of options price to underlying price
or a big muddy pile of water

footrest is a good usage

it's like pretending you can read raw TEX or PS or PDF
..bad news.

i meant the maths as we know them and C don't seem related
although the C "imlpementation" of arithmetics is more rigourous than our common usage
if you forget about the inaccuracy
anyway :3 this is off topic

yeah, and yer right
"math" is weird.. I can remember taking (and maxing) "Boolean Algebra" - oy.. fun, but it ain't English ;-)
"math" is weird.. I can remember taking (and maxing) "Boolean Algebra" - oy.. fun, but it ain't English ;-)

if I was 20 again, yeah - I'd suggest learning as much as you can - in as many "languages" as you can -
PoppaVic, What do you think is more important to a student?
PoppaVic, study the structure (organization and etc) or just programming (algorithms, data structures, languages - the craft at all) ?

Folks are strange

lol

I was reading some weeks ago "Structured Organization of Computers, 3d edition" (I think the translation is this)

at school i think one needs to be openminded and learn the basics which will allow improving oneself on his own

if you are there to get a sheepskin and a job, then play their game all the way.. You'll get paid someday, but may well go nuts doing it.

I want to improve me and damn the rest :P

Then, I'd read and listen and test and repeat.. Just like washing your hair.

adrahil, I'm not talking about SCHOOL, student = hobbiest

I've never been PAID to program - it was once EXPECTED (for free) - I treat it as an advocation.
..a hobby.

hobbyist *

Just like trying to help folks that care

my bad :P

The more you test and read; the more you test across platforms; the more success you have - the better.

PoppaVic, In the begin of this year I worked, maintenance of computers (just got windows and simple problems) in the begin I learned something with my boss, later this was being tedious

Sure, learn what you can - where you can.. As long as you can.
Get paid when possible.

(everyone needs to pay bills and eat)

This will not save you from new "man-agers" and "en-gi-neers", but it makes what you know interesting, useful, and worthwhile.

lol

if yer worried about "pay the bills", either play the sheepskin games or learn a few skills UNDER those.
Even learning to use a shovel is not useless.

PoppaVic, Have you ever gone to University?

Personally, I - yse I have - never care to play Chef again.. I'd rather be even more lowly than a cook and just wash dishes.. No one cares - why should I?

Any idea why I can't cast like this to get the first entry of struct pwd? (char *)(getpwuid( fileinfo.st_uid ))

Same with playing "manager" - some jackass is always telling you what he EXPECTS, and not what you can/are DOING - why bother?

Why are you casting?

itoa would work best

So I don't have to save struct pwd into a new var since I'm only interested in the first entry in the struct

What is it you really want?

be advised - I've been trying to climb and play for at least 3 decades.. It's just depressed me enough to no longer care

What is the name of the "first" field in struct pwd ?
(I'm not sure that POSIX guarantees field order here)

PoppaVic

It doesn't?

Which field do you want?

PoppaVic, and women? do you have a girlfriend?

char *pw_name;

It doesn't need to. ANSI does.

getpwuid( fileinfo.st_uid )-pw_name /* Warning! */

First field, field that I want
ah, of course!

I am married, would prefer divorced, and will never, ever, EVER suffer it again.

Why didn't I think of that.
What's the warning?

PoppaVic:

What happens if the call returns NULL?

Ah, big segfault.

some folks click, others don't - Seems to be a gender-isue in my family.

do you have kids?

No... She couldn't and I wouldn't - I prefer my nieces and nephews.. Spoil them and send them home.

PoppaVic, I'm needing a girlfriend.

invest in kleenex and babyoil.. Decide what you like and why.. Hormones don't count.

I have the best girlfriend ever

PoppaVic HUH?
the right woman?

I'd also point out, do NOT trust "well, she enjoys my books" - bzzt.. If they can't share several topics/hobbies, 100%, don't bother.
I done spoke.. Listen and learn, or don't ;-) Folks that say "oh, it's no big thing to be married" - kill them now or avoid them.

fsck women
Stick to TCP sockets

I'd love to see "contracts" ala' Heinlein.

PoppaVic, ok.

I never did figure out when I was the sorry SOB that cleaned the house, dishes.. Why she ignored my books for "romances", etc - until it was late enough that "dump her in the swamp" started to sound good.
We need more carnivores around here

im vegetarian

acidfu i'm your opposite

rofl
the floor in my flat is made of somekind of plastic

won't crack

had drop it from a little higher for it to work

remember those "famous last words" of most pilots.

PoppaVic, RIGHT SIR!

"oh, shit,,,"
I'd wager there is a m/f match everywhere.. But I will be goddamned if I see some working-system "for everyone".

PoppaVic, I don't know nothing about women, and I don't know if it's good to base my thoughts in others' facts

yeah, prolly better to just stay paranoid and get laid when you need laid. The entire issue of "marriage" will clusterfuck your universe. Financial, responsibilities, etc.

hhmm

O_O

http://aluigi.altervista.org/papers/gslist.zip with Dev-C++ (the code is C but it should work for it anyway) I get some errors that I don't understand, and I didn't touch the code at all! how do I compile this thing?

what did I miss, going from "I don't know nothing about women," to marriage

I swear to Bog.. "married" is something women thought up.. The only thing I've ever seen similar is "mated" according to the "the bible"

Oo

see topic and rafb

whats rafb?

bitbit, rafb.net/paste

dealing with "women" and "I'm lonely" and "wtf do I do now?"

the thing is I never actually compiled anything other then a simple hello world app, so I thing I need a few pointers

I've got all the "people" I need in ##C

Greetings. Is there a C system call like system() but where we can set the euid of the shell command being executed?

guess what? You need to buy a few clews

think*

I hope not.

poppaVic, what?

BTW, where can I find documentation about available system calls in C?

you don't get to play on our field w/o some clews

well, curing loneliness with women... I would change that to friends

PoppaVic? Why not? I wand a root deamon to execute a script as a normal user,for security reasons.

yeah, or "acquaintance" - which means similar, w/o attachments

root daemon? script? wtf

what clews? stop talking in clews and explain what I need to do to get this thing working, please!

see inetd

PoppaVic, ty, googling this

not going to happen. Learn it or don't.

learn what?

"playground rules", geezus... Did you expect solutions produced for free on demand?
is that in the /topic... Nope.
Yer blood and sweat buys "clews" - flow with it ;-)

;\

PoppaVic, can you be more specific? You suggest that I look at the code of inetd?

no.. You need basic C, the _idea_ of inetd, and then you expand on it.
It's all-over got warts and is ugly, but you CAN play.

PoppaVic, what playground rules? what are you talking about? the link in the topic has nothing about this.

What errors?

It is an idea... but I think it will be faster for me to simply start a thread and then setuid() and call system.

prec! a sane person!

Why not use inetd?

I'd likely beat you senseless

stuff like "in file included from Cgslist\src\gslist.c"

rafb.net/paste

what do you want me to paste there?
all the errors?

as a remote process, talking to ME - you have absolutely zero rights to screw with my *uid and permissions

The errors.

on my system in complins about missing mysql/mysql.h header

install it
Ask your sysadmin to make it possible to develop for MySQL
At least the first one.

(I'm looking at bitbit's code he posted, the gslist.zip)

Oh, OK.
Is there a reason you expect that program to compile on Windows?

prec, what do you mean? the exe that comes with it works on windows!
http://rafb.net/p/MTAVMR42.html
a href="http://rafb.net/p/MTAVMR42.html"http://rafb.net/p/MTAVMR42.html/a
this is what I get when I open gslist.c with Dev-C++ and press compile

Oo

i'm clearly missing something....

it's all voodoo you you, ain't it?

PoppaVic, are you here to feel smarter then ppl asking questions?

http://www.opencfd.co.uk/openfoam/doc/userse5.html
read this
ALL of it

if you are, please shut up

"to you", and - well, it isn't hard.. We are not ##C to be a book or practice replacement for snuffler-newbies

i think he IS smarter, he does not only feel so :P

why would you think that?

because he knows that to compile stuff you need to link libraries
and that pasting any "undefined reference" error on google returns the answer

the guy is laughing at me cuz he has more KNOWLEAGE then me, thats all. doesnt mean he's smarter. actually the fact that he's doing that probably means he's pretty pathtic

I know damned good and well that Z and Xgc and twkm and such are far, far better better than me in many places and for many reasons.. This is why I respect them. You pud-pulling putzii that refuse to test and read and practice are beyond my patience.

 

Related pages:
Of the 400 folks in ##C maybe 100 are real of that 100 maybe 1-3 are AWAKE at any any time - call it 33 Of that

 

 

 

  Technologies 

 

 

Copyright ® 2003-2007 Oxxus.Net * USA * UK * AUP * Best web hosting solutions from internets leading web hosting provider * Tutorials * Resources * Blog * FAQ