CoCo,
Use strcmp() for that.
if(!strcmp(name, "bob")) printf(...);
Type: Posts; User: Andaluz
CoCo,
Use strcmp() for that.
if(!strcmp(name, "bob")) printf(...);
Thank you Thank you Thank you Thank you very much for your help guys!
Salem was right, adding some pauses between the '+' did indeed help to solve the problem!
Tabstop, you are right also, cause...
Thanks for your reply, but even slow sending didn't work.
This is rediculous, that's so wrong, what's the difference between a '+' character and alphabetical character? It's all data...I'm about...
OS: Linux Debian Lenny
IDE: Code::Blocks
Hello guys,
I really have an issue with sending '+++' to a GSM module through serial port. All the other AT commands are sent successfully, except that...
I could also ommit messages in the queue and just get a buffer of size 1024 bytes for example and append the messages in the buffer. I think this is a bit easier and simpler than adding each message...
You are right, there is no FD_WRITE macro, but I mean the writeset in the select() argument. I use Linux.
A simple solution would be:
char buff[1024];
int len = 0;
//Open the filename passed as argument int the main (argv[])
FILE *file = fopen(filename.txt, "r"); //open file...
Thank you for your vaulable posts,
Ok, so if I understand it well, it's for making it non-blocking.
This means that after select() returns for a write, you have to check which fd can send and...
Hi guys,
I've played with select() and FD_READ/FD_ACCEPT and since I got it working right, it's more than 6 months I haven't looked at it.
Now I'm wondering why one would use FD_WRITE? I just...
hmmmm,
ok thanks my friend :)
Imagine the following, so you get a clear picture of my situation.
My application is as follows:
MyDaemon
|
| - - - - - - - sig_daemon_hlr()
v
fork()
|---->...
Hey guys thanks!
make CFLAGS='-g -O0'
worked for me.
Bithub, I'll keep your advise in my mind.
Thanks!
Hello I'm playing with an opensource project openbsc.
Now I want build the project with debug info. When I add -g3 and O0, somehow during build (by typing "make") it overruled by -g -O2.
So I...
Oh my god,
this is ridiculous man! Hahahaha, it shows full pathname in debug-mode and just the filename in release mode, can you believe that? The following question rises to me, how can I turn...
Hello guys,
For some debugging info I need __FILE__, but the problem is, it shows also the full pathname. I rather don't want to do some stringmanipulation to cut off only the source name. So is...
Brewbuck,
I agree with you about that :)
Hello guys,
Thanks for your replies.
Kennedy, it shouldn't make any difference.
Yes, thanks for the tip. I just took it from the examples. Anyway, the main thing is, I think, is to make sure...
Ok guys,
I finally got it, though it was very very frustrating man.
To execute a program with crazy options, try this out:
char* program = "/home/userme/Development/Projects/somecmd";
char*...
Thanks for your answer CornedBeef,
You are right , it has to do with that tilde '~'.
So I modified it to: /home/userme/Development/Projects/somecmd
char* avlong = {
...
Hello guys,
I almost shame to ask, but can you help me with this.
When doing this:
char* av[] = {
"/bin/ls", "-al"
}
Thnx for your response,
I agree with you, but as you might know, I don't want to stick to small projects. There will be a time you want to build a bigger project, than there must be a way to...
I know this subject doesn't really fit here but I'll try it anyway.
I'm trying to start a C project with KDevelop using by opening a new project, select a C "hello world program". After selecting...
Thank you for your replies,
But can someone give me a link so I can study it carefully?
Cause I'm a bit nervous when learning things only from examples. If someone put an article with some...
Hello guys,
Can someone explain me what's going on in
static const struct tlv_definition xyz_att_tlvdef?
//-------- .h file
enum tlv_type {
Hi guys,
Thanks for your replies.
Brewbuck, I don't think ./configure would affect the compiler options. Cause, AFAIK, ./configure is just to check which compilers, libraries etc... are available...