view src/fetchlist.h @ 279:49b452b667a6 noffle

[svn] * src/util.c: localTimeDiff() cached its value and recalculated it every hour of clock time, regardless of the time the calculated was based on. This is potentially dangerous at daylight saving changes. So instead use the cached last result only when the new request is to be based on a time in the same hour as the cached result. * src/util.c: Replace the alternate Utl_mktimeGMT() implementation used when timegm() is not available. The previous version, as suggested by the glibc timegm() man page, used setenv() and unsetenv() for changing the environment. These aren't POSIX function, and the POSIX putenv() (a) is tricky to manage if the same var is being constantly update and memory isn't to leak, and (b) provides no way to remove an environment entry. So change to an implementation Wget uses. This should compile on not glibc systems - the previous version failed to build on Solaris.
author bears
date Sun, 17 Nov 2002 15:18:19 +0000
parents f8a91e2b4060
children
line wrap: on
line source

/*
  fetchlist.h

  List of groups that are to be fetched presently.

  $Id: fetchlist.h 368 2002-02-14 17:14:34Z bears $
*/

#ifndef FETCHLIST_H
#define FETCHLIST_H

#if HAVE_CONFIG_H
#include <config.h>
#endif

#include "common.h"

typedef enum { FULL, THREAD, OVER } FetchMode;

void
Fetchlist_read( void );

/* Invalidates any indices (list is sorted by name before saving) */
Bool
Fetchlist_write( void );

int
Fetchlist_size( void );

Bool
Fetchlist_contains( const char *name, FetchMode *mode );

/* Get element number index. */
Bool
Fetchlist_element( const char **name, FetchMode *mode, int idx );

/* Add entry. Invalidates any indices. Returns TRUE if new entry, FALSE if
   entry was overwritten. */
Bool
Fetchlist_add( const char *name, FetchMode mode );

/* Remove entry. Invalidates any indices. Returns FALSE if not found. */
Bool
Fetchlist_remove( const char *name );

#endif