Logo Search packages:      
Sourcecode: latrine version File versions  Download package


/* vim: set noet ts=4:
 * Copyright (c) 2002-2007 Martin A. Godisch <martin@godisch.de>.
 * 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; either version 2 of the License, or (at your option) any later
 * version.
 * 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., 51 Franklin
 * St, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef _DATA_H
#define _DATA_H

#include <stdlib.h>
#include <time.h>
#include <md5.h>

#define WORDLIST_VERSION     3
#define HISTSIZE            32
#define DIGEST_ALIGN         4
#define HEADER            "# LaTrine wordlist file, version = %d.\n"

struct Tlang {
      char *c;
      struct Tlang *next;

struct word {
      struct Tlang *lang[2];
      char   history[HISTSIZE + 1];
      time_t timestamp;
      short  rate;
      size_t pos;

extern char   *dictfile;
extern char   *wordfile;
extern size_t randcount;
extern size_t wordlimit;

void   free_langlist(struct word*);
int    load_wordlist(void);
int    save_wordlist(void);
size_t get_dictcount(void);
size_t get_wordcount(void);
struct word *select_word(void);
void   update_word(struct word*, int);


Generated by  Doxygen 1.6.0   Back to index