Search Results

Showing results 1 to 12 of 12
Search took 0.01 seconds.
Search: Posts Made By: Ratte ; Forum: C and child forums
Forum: C Nov 15th, 2007
Replies: 1
Views: 1,202
Posted By Ratte
I need to write a function that will take a char* string and populate a char* array with elements of the original string. The elements of the original string are whitespace-delimited.

I have...
Forum: C Nov 15th, 2007
Replies: 1
Views: 891
Posted By Ratte
Well, I got this figured out.

I will do it this way:

command/argument processor function (extracts/separates a user command and its arguments)

if arg1 is "help" then help function is called...
Forum: C Nov 15th, 2007
Replies: 1
Views: 891
Posted By Ratte
I am designing an ftp client prompt in C (unix environment).

At this point, I have an infinite loop with an fprintf of the prompt on stdout and an fgets for reading user input.

I need help with...
Forum: C Nov 14th, 2007
Replies: 3
Views: 1,250
Posted By Ratte
Thanks again, Duoas. Both the server and the client will be on a Solaris (Unix) machine.

The object of this socket/network programming class is to keep things as barebone/simple as possible, so I...
Forum: C Nov 13th, 2007
Replies: 3
Views: 1,250
Posted By Ratte
I am writing client and server programs for a simple FTP.

I am allowed to use chdir, getcwd and getenv.

What would be a correct procedure to expand a user provided path correctly using these...
Forum: C Nov 2nd, 2007
Replies: 1
Views: 1,624
Posted By Ratte
I have a file of 14 functions. I know I need an extern array of 14 bools. If something goes wrong in one of these functions, the function should modify its respective array member to false. I want...
Forum: C Nov 2nd, 2007
Replies: 6
Views: 1,727
Posted By Ratte
Yes. Here is the signal handler:


void sig_chld(int signo)
{
pid_t pid;
Signal(SIGCHLD, sig_chld);

pid = Wait(0);
printf("child %d terminated\n", (int)pid);
Forum: C Nov 2nd, 2007
Replies: 6
Views: 1,727
Posted By Ratte
Yep, this will run on a Solaris machine.

Basically, I need the wrapper functions to do the regular job of the functions, EXCEPT for when an error occurs. In that case I need to print an error...
Forum: C Nov 2nd, 2007
Replies: 6
Views: 1,727
Posted By Ratte
I need to write wrapper functions for fork and signal functions. These functions will handle errors by fork() and signal() and exit, if an error occurs.

The problem is I am not sure exactly what...
Forum: C Nov 2nd, 2007
Replies: 8
Views: 2,428
Posted By Ratte
fgets reads until x (size of buffer) amount of characters are read OR a newline character is encountered. In my case, the buffer was quite large, so the client's fgets was waiting till either the...
Forum: C Nov 2nd, 2007
Replies: 8
Views: 2,428
Posted By Ratte
Actually, you can do strlen(UNKNOWN). Give it a try and see that it works.


#define UNKNOWN "Unknown"
#include <stdio.h>


int main ()
{
Forum: C Nov 2nd, 2007
Replies: 8
Views: 2,428
Posted By Ratte
I am writing a server function and an error message is defined as:


#define UNKNOWN "Unknown"


I have a function:


void search(int sockfd) {
Showing results 1 to 12 of 12

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC