Legofit
infers population history from nucleotide site patterns.
Loading...
Searching...
No Matches
mkfitted.c File Reference
#include "strdblqueue.h"
#include "strdblmap.h"
#include "misc.h"
#include <strings.h>
#include <time.h>
#include <ctype.h>

Data Structures

struct  LineReader

Macros

#define BUFSIZE   4096
#define VARNAMESIZE   512

Enumerations

enum  linetype { assign , noassign , eof }

Functions

LineReaderLineReader_new (void)
enum linetype LineReader_next (LineReader *self, FILE *fp)
 Read next line.
void LineReader_free (LineReader *self)
int LineReader_pr_orig (LineReader *self)
 Print input line unchanged.
int LineReader_pr_newval (LineReader *self, double val)
 Print assignment statement with new value.
void usage (void)
int main (int argc, char **argv)

Function Documentation

◆ LineReader_next()

enum linetype LineReader_next ( LineReader * self,
FILE * fp )

Read next line.

Return 0 if input is not an assignment statement, 1 if it is an assignment, or EOF on end of file.

References legalName().

◆ LineReader_pr_newval()

int LineReader_pr_newval ( LineReader * self,
double val )

Print assignment statement with new value.

Return non-negative integer on success, EOF on failure.

◆ LineReader_pr_orig()

int LineReader_pr_orig ( LineReader * self)

Print input line unchanged.

Return non-negative integer on success, EOF on failure.