Coda Distributed File System
Macros | Functions
repio.cc File Reference
#include <stdio.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/param.h>
#include <netinet/in.h>
#include "coda_string.h"
#include <sys/stat.h>
#include <sys/file.h>
#include <unistd.h>
#include <stdlib.h>
#include <prs.h>
#include <rpc2/rpc2.h>
#include <vice.h>
#include <urlquote.h>
#include "coda_assert.h"
#include "repio.h"
Include dependency graph for repio.cc:

Macros

#define O_BINARY   0
 
#define DEF_BUF   2048
 
#define ewrite(f, b, l)
 
#define NEXTFIELD()
 
#define ADVANCE()
 

Functions

static char * eatnonwhite (char *)
 
int repair_putdfile (char *fname, int replicaCount, struct listhdr *replicaList)
 
int repair_getdfile (char *fname, int infd, int *replicaCount, struct listhdr **replicaList)
 
int repair_getdfile (char *fname, int *replicaCount, struct listhdr **replicaList)
 
int repair_getdfile (int infd, int *replicaCount, struct listhdr **replicaList)
 
int repair_parseline (char *line, struct repair *rs)
 
int repair_parsefile (char *fname, int *hdcount, struct listhdr **hdarray)
 
void repair_printline (struct repair *rs, FILE *ff)
 
void repair_printfile (char *fname)
 

Macro Definition Documentation

◆ ADVANCE

#define ADVANCE ( )
Value:
/* Advance both c and d beyond the current field */ \
c = ++d; \
if (eos - c <= 0) \
return (-1); /* premature eof */
char d
Definition: tdb.c:54
char c
Definition: tdb.c:54

◆ DEF_BUF

#define DEF_BUF   2048

◆ ewrite

#define ewrite (   f,
  b,
 
)
Value:
do { \
if (write(f, b, l) != l) \
goto err; \
} while (0);
@ f
Definition: rvm_private.h:416

◆ NEXTFIELD

#define NEXTFIELD ( )
Value:
/* Set c to start of next field, d to the null at the end of this field */ \
c = eatwhite(c); /* consume leading whitespace */ \
if (!*c) \
return (-1); /* premature eof */ \
if (*c == '"') { /* handle quoted strings as a field as well */ \
d = ++c; \
while (*d && *d != '"') \
d++; \
} else \
d = eatnonwhite(c); /* otherwise, consume until wsp char */ \
*d = 0; /* insert string terminator */
static char * eatnonwhite(char *)
Definition: repio.cc:605

◆ O_BINARY

#define O_BINARY   0

Function Documentation

◆ eatnonwhite()

static char * eatnonwhite ( char *  s)

◆ repair_getdfile() [1/3]

int repair_getdfile ( char *  fname,
int *  replicaCount,
struct listhdr **  replicaList 
)

◆ repair_getdfile() [2/3]

int repair_getdfile ( char *  fname,
int  infd,
int *  replicaCount,
struct listhdr **  replicaList 
)

◆ repair_getdfile() [3/3]

int repair_getdfile ( int  infd,
int *  replicaCount,
struct listhdr **  replicaList 
)

◆ repair_parsefile()

int repair_parsefile ( char *  fname,
int *  hdcount,
struct listhdr **  hdarray 
)

◆ repair_parseline()

int repair_parseline ( char *  line,
struct repair rs 
)

◆ repair_printfile()

void repair_printfile ( char *  fname)

◆ repair_printline()

void repair_printline ( struct repair rs,
FILE *  ff 
)

◆ repair_putdfile()

int repair_putdfile ( char *  fname,
int  replicaCount,
struct listhdr replicaList 
)