DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T r

⟦243dfb819⟧ TextFile

    Length: 886 (0x376)
    Types: TextFile
    Names: »response.c«

Derivation

└─⟦87ddcff64⟧ Bits:30001253 CPHDIST85 Tape, 1985 Autumn Conference Copenhagen
    └─ ⟦this⟧ »cph85dist/rman/client/response.c« 

TextFile

#ifndef lint
static char RCSid[] = "$Header: response.c,v 1.2 85/07/06 16:55:32 broome Exp $";
#endif

/*
 * $Log:    response.c,v $
 * Revision 1.2  85/07/06  16:55:32  broome
 * 
 * 
 */

#include <stdio.h>

response ()
{
    extern FILE *sock_rp;
    char   line[128];

    for ( ;; ) {
        fgets (line, 128, sock_rp);

        if (strncmp (line, "141", 3) == 0)  /* don't want to print the \r\n */
            fprintf (stderr, "Reformatting page. Wait ... ");
        else if (line[0] != '2')            /* not a positive response */
            fprintf (stderr, line+4);

        (void) fflush (stderr);    /* we're line buffered, so have to flush */

        if (line[3] == ' ')        /* end of text */
            if (line[0] == '2')    /* good response */
                return (0);
            else                   /* not so good */
                return (1);
    }
}