lsflib/include/lsf/lsf.h
author Markus Bröker<broeker.markus@googlemail.com>
Sun, 10 Feb 2019 13:17:01 +0100
changeset 173 374a86886bc5
parent 158 2cddd4d26139
permissions -rw-r--r--
LAST-DIGIT-BUG: INCREMENT before LF

/**
 * test/demos/lsflib/include/lsf.h
 * Copyright (C) 2008 Markus Broeker
 */

#ifndef __LSF_H__
#define __LSF_H__

#ifndef LINE_LENGTH
#define LINE_LENGTH 100
#endif

#include <stdio.h>
#include <stdlib.h>
#ifndef __LIST__H
#include <lsf/list.h>
#endif

/* tokenizer splits a file into tokens */
Node *tokenizer (FILE *, const char *);

/* tokenchar splits a file into chars */
int tokenchar (FILE *);

/* get_line returns a multiline string str="...\n..." */
char *get_line (const char *, const char *, size_t);

/* isDir returns true, if a fd points to a dir */
int isDir (char *);

/* isFile returns true, if a fd points to a file */
int isFile (char *);

/* isLink returns true, if a fd points to a link */
int isLink (char *);

/* getdir prints a dir hierarchy */
void getdir (char *, int);

/* returns a pointer int*  */
unsigned char *md5sum (char *);

void md5recursive (char *, int);

#endif