1999-09-27 18:44:28 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
/* This file is part of
|
|
|
|
|
* ======================================================
|
|
|
|
|
*
|
|
|
|
|
* LyX, The Document Processor
|
|
|
|
|
* Copyright (C) 1995 Matthias Ettrich
|
|
|
|
|
*
|
|
|
|
|
* This file is Copyright (C) 1996-1998
|
|
|
|
|
* Lars Gullik Bj<EFBFBD>nnes
|
|
|
|
|
*
|
|
|
|
|
* ======================================================
|
|
|
|
|
*/
|
|
|
|
|
|
1999-10-02 16:21:10 +00:00
|
|
|
|
#ifndef DEP_TABLE_H
|
|
|
|
|
#define DEP_TABLE_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
|
#include "LString.h"
|
1999-10-02 16:21:10 +00:00
|
|
|
|
#include <cstdio>
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
class DepTable {
|
|
|
|
|
public:
|
|
|
|
|
///
|
|
|
|
|
DepTable();
|
|
|
|
|
///
|
|
|
|
|
/** This one is a little bit harder since we need the absolute
|
|
|
|
|
filename. Should we insert files with .sty .cls etc as
|
|
|
|
|
extension? */
|
1999-10-02 16:21:10 +00:00
|
|
|
|
void insert(string const &f,
|
1999-09-27 18:44:28 +00:00
|
|
|
|
bool upd = false,
|
|
|
|
|
unsigned long one = 0,
|
|
|
|
|
unsigned long two = 0);
|
|
|
|
|
///
|
|
|
|
|
void update();
|
|
|
|
|
|
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
|
void write(string const &f);
|
1999-09-27 18:44:28 +00:00
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
|
void read(string const &f);
|
1999-09-27 18:44:28 +00:00
|
|
|
|
/// returns true if any of the files has changed
|
|
|
|
|
bool sumchange();
|
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
|
bool haschanged(string const &fil);
|
1999-09-27 18:44:28 +00:00
|
|
|
|
private:
|
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
|
DepTable(string const &f,
|
1999-09-27 18:44:28 +00:00
|
|
|
|
bool upd,
|
|
|
|
|
unsigned long one,
|
|
|
|
|
unsigned long two);
|
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
|
string file;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
/// The files new checksum
|
|
|
|
|
unsigned long new_sum;
|
|
|
|
|
/// The files old checksum
|
|
|
|
|
unsigned long old_sum;
|
|
|
|
|
///
|
|
|
|
|
DepTable *next;
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
void write(FILE *f);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|