#ifndef __MISC_H__
#define __MISC_H__ 1
/*
elmo - ELectronic Mail Operator
Copyright (C) 2003, 2004 rzyjontko
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/****************************************************************************
* INTERFACE REQUIRED HEADERS
****************************************************************************/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <time.h>
#include <sys/types.h>
#include <regex.h>
#include <dirent.h>
/****************************************************************************
* INTERFACE DEFINITIONS / ENUMERATIONS / SIMPLE TYPEDEFS
****************************************************************************/
/****************************************************************************
* INTERFACE CLASS PROTOTYPES / EXTERNAL CLASS REFERENCES
****************************************************************************/
/****************************************************************************
* INTERFACE STRUCTURES / UTILITY CLASSES
****************************************************************************/
/****************************************************************************
* INTERFACE DATA DECLARATIONS
****************************************************************************/
/****************************************************************************
* INTERFACE FUNCTION PROTOTYPES
****************************************************************************/
#ifndef stpcpy
extern char *stpcpy (char *dest, const char *src);
#endif
extern char *human_size (int size);
extern char *date_string (const char *format, time_t tm);
extern int misc_logarithm (int n);
extern int misc_regex (const char *re, const char *text, regmatch_t *m);
extern char *key2string (int key, int meta);
extern char *misc_re_from_str (const char *str);
#ifndef HAVE_SCANDIR
extern int alphasort(const void*, const void*);
extern int scandir(const char*, struct dirent***,
int (*select)(const struct dirent*),
int (*compar)(const void*, const void*));
#endif
/****************************************************************************
* INTERFACE OBJECT CLASS DEFINITIONS
****************************************************************************/
/****************************************************************************
* INTERFACE TRAILING HEADERS
****************************************************************************/
/****************************************************************************
*
* END HEADER misc.h
*
****************************************************************************/
#endif
syntax highlighted by Code2HTML, v. 0.9.1