Jump to content
  • Advertisement
Sign in to follow this  
silverphyre673

rebuilding netcat + fcked up code = confusion

This topic is 4798 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!