Logo 
Search:

Networking Articles

Submit Article
Home » Articles » Networking » TCP/IPRSS Feeds

TCP/IP program of putc and fputs with optional file scripting

Posted By: Milind Mishra     Category: Networking     Views: 2426

TCP/IP program of putc and fputs with optional file scripting.

Code for TCP/IP program of putc and fputs with optional file scripting in Networking

#include <stdio.h>

extern FILE    *scrfp;

/*------------------------------------------------------------------------ * xputc - putc with optional file scripting *------------------------------------------------------------------------ */int
xputc(char ch, FILE *fp)
{
    if (scrfp)
        (void) putc(ch, scrfp);
    return putc(ch, fp);
}

/*------------------------------------------------------------------------ * xfputs - fputs with optional file scripting *------------------------------------------------------------------------ */int
xfputs(char *str, FILE *fp)
{
    if (scrfp)
        fputs(str, scrfp);
    fputs(str, fp);
}
  
Share: 



Milind Mishra
Milind Mishra author of TCP/IP program of putc and fputs with optional file scripting is from India.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!