Facebook
From Tinct Crocodile, 5 Years ago, written in Plain Text.
This paste is a reply to Re: Untitled from Sweet Motmot - go back
Embed
Viewing differences between Re: Untitled and Re: Re: Untitled


#include 
#include h>

h>
#include 
#include          

int main() {
                FILE *stream;
        
*stream;
        
char buffer[LINE_MAX];
        
buffer[LINE_MAX];
        
int run;

        
run;

        int empty(char*);
        
if ((stream = fopen("channel", "r+"))) run=1;
        else {
                
run = 0;
                
1;
        else
        {
                run = 0;
                
perror("!.!..blad otwarcia lacza..!.!");
        }

        
        }

        
while (run) {
                
{
                bzero((void*)buffer,LINE_MAX);
                fgets(buffer,LINE_MAX,stdin);
                
if (fgets(buffer,256,stream))
                {
                        
(!empty(buffer))
                {
                        
fprintf(stream, "%s\n", buffer);fflush(stream);
                }
        }
        
buffer);
                        fflush(stream);
                }
                else {
                        fclose(stream);
                        break;
                }
                fgets(buffer,LINE_MAX,stream);
                if (!empty(buffer))
                {
                       fprintf(stdout, "%s\n",buffer );
                       fflush(stream);
                }

        }
        
return 0;
}

int empty(char * string) {
        while (*string) {
                if (isalnum(*string++))
                {
                        return 0;
                }
        }
        return 1;
}