Sign in to follow this  
silverphyre673

rebuilding netcat + fcked up code = confusion

Recommended Posts

I'm trying to build netcat and include it in a smallish project that just gets the HTML of a webpage. I tried just building netcat to start with, so I included all the sources in a project and hit ctrl+F11. It gave me copious errors, and looking at the source, I can see why (sources are in C, I am using the hobbit's sources, and its the windows version):
void holler (str, p1, p2, p3, p4, p5, p6)
  char * str;
  char * p1, * p2, * p3, * p4, * p5, * p6;
{
  if (o_verbose) {
    fprintf (stderr, str, p1, p2, p3, p4, p5, p6);
#ifdef WIN32
	if (h_errno)
		fprintf (stderr, ": %s\n",winsockstr(h_errno));
#else
    if (errno) {		/* this gives funny-looking messages, but */
      perror (" ");		/* it's more portable than sys_errlist[]... */
    }				/* xxx: do something better.  */
#endif
	else
      fprintf (stderr, "\n");
    fflush (stderr);
  }
} /* holler */

Huh? Whats this:
void holler (str, p1, p2, p3, p4, p5, p6)
  char * str;
  char * p1, * p2, * p3, * p4, * p5, * p6;
{
...

I have never seen this before. It certainly doesn't compile! can anyone help me out? The main file that has this function and others with similar stuff is the only one that generates compiler errors. Thanks.

Share this post


Link to post
Share on other sites
lovely... so like this:


void holler ( char * str, char * p1, char *p2, char *p3, char *p4, char *p5, char *p6)
char * str;
char * p1, * p2, * p3, * p4, * p5, * p6;
{
...



or like this:

void holler ( char * str, char * p1, char *p2, char *p3, char *p4, char *p5, char *p6)
{
...



Thanks. yay standards!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this