lsflib/include/lsf/lsf.h
author Markus Brökers <mbroeker@largo.homelinux.org>
Tue, 17 Aug 2010 18:57:57 +0200
changeset 139 cb1d3f4cf18e
parent 121 fef2ccfa7b12
child 150 75133486ba7e
permissions -rw-r--r--
execve returns a value on error and this catches it

/**
 * 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>
#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 *);

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

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

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

void md5recursive (char *, int);

#endif