To dwro moy gia to 2001

Άγγελος Οικονομόπουλος lydwigvernon at yahoo.co.uk
Mon Dec 17 17:01:01 EET 2001


Christos Ricudis wrote:
> Kai 8a breite thn teleytaia, emploutismenh ekdosh me NEA geysh kai akoma
> megalytera kymata sto
> http://baza.source.gr/article.php3?sid=20011217034518
Kai gia osous exoun xompi na diabazoun cookies alla oxi mesa apo editor:

#include <disclaimer.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
        int i;
        char ch;
        FILE *fd;
        if (argc!=2){
                printf("Usage: fortunes [FILE]\n");
                exit(0);
        }
        if ((fd = fopen(argv[1],"r")) == NULL){
        printf("Error opening file %s \n", argv[1]);
        exit(1);
        }
        while (1){
                ch=fgetc(fd);
                if (ch != '\n'){
                        putchar(ch);
                } else {
                        char ch2, ch3;
                        ch2=fgetc(fd);
                        ch3=fgetc(fd);
                        if ( (ch2=='%') && (ch3=='\n') ){
                                char pr = getchar();
                                printf("\n\n\n\n\n");
                                printf("\n\n\n\n\n");
                                printf("\n\n\n\n\n");
                                printf("\n\n\n\n\n");
                                printf("\n\n\n\n\n");
                                printf("\n\n\n\n\n");
                                printf("\n\n\n\n\n");
                                if (pr != '\n'){
                                        exit(0);
                                }
                        } else {
                                printf("\n");
                                fseek(fd, -2, SEEK_CUR);
                        }
                }
        }
}


-- 
"If geiger counter does not click,
the coffee, she is just not thick"
              --Pitr Dubovich(Illiad)



More information about the Linux-greek-users mailing list