Main Page | Modules | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages | Examples

htdigest.c File Reference

#include "apr.h"
#include "apr_file_io.h"
#include "apr_md5.h"
#include "apr_lib.h"
#include "apr_general.h"
#include "apr_signal.h"
#include "apr_strings.h"
#include "apr_want.h"

Include dependency graph for htdigest.c:

Go to the source code of this file.

Defines

#define APR_WANT_STDIO
#define APR_WANT_STRFUNC
#define LF   10
#define CR   13
#define MAX_STRING_LEN   256

Functions

static void cleanup_tempfile_and_exit (int rc)
static void getword (char *word, char *line, char stop)
static int get_line (char *s, int n, apr_file_t *f)
static void putline (apr_file_t *f, char *l)
static void add_password (const char *user, const char *realm, apr_file_t *f)
static void usage (void)
static void interrupted (void)
static void terminate (void)
int main (int argc, const char *const argv[])

Variables

apr_file_ttfp = NULL
apr_file_terrfile
apr_pool_tcntxt


Define Documentation

#define APR_WANT_STDIO
 

Definition at line 37 of file htdigest.c.

#define APR_WANT_STRFUNC
 

Definition at line 38 of file htdigest.c.

#define CR   13
 

Definition at line 58 of file htdigest.c.

#define LF   10
 

Definition at line 57 of file htdigest.c.

#define MAX_STRING_LEN   256
 

Definition at line 61 of file htdigest.c.


Function Documentation

static void add_password const char *  user,
const char *  realm,
apr_file_t f
[static]
 

Definition at line 122 of file htdigest.c.

References APR_SUCCESS, cleanup_tempfile_and_exit(), context, len, MAX_STRING_LEN, pw, string, and to_ascii.

Referenced by main().

Here is the call graph for this function:

static void cleanup_tempfile_and_exit int  rc  )  [static]
 

Definition at line 70 of file htdigest.c.

References exit.

Referenced by add_password(), interrupted(), and main().

static int get_line char *  s,
int  n,
apr_file_t f
[static]
 

Definition at line 93 of file htdigest.c.

References APR_EINVAL, and APR_SUCCESS.

Referenced by main().

static void getword char *  word,
char *  line,
char  stop
[static]
 

Definition at line 78 of file htdigest.c.

References x, and y.

Referenced by main().

static void interrupted void   )  [static]
 

Definition at line 169 of file htdigest.c.

References cleanup_tempfile_and_exit().

Referenced by main().

Here is the call graph for this function:

int main int  argc,
const char *const   argv[]
 

Definition at line 183 of file htdigest.c.

References add_password(), APR_CREATE, APR_DEFAULT_CHARSET, APR_FILE_SOURCE_PERMS, APR_OS_DEFAULT, apr_pool_create, APR_READ, apr_signal, APR_SUCCESS, APR_WRITE, cleanup_tempfile_and_exit(), dirname, errmsg(), exit, f, get_line(), getword(), interrupted(), line, MAX_STRING_LEN, NULL, putline(), terminate(), to_ascii, usage, and x.

Here is the call graph for this function:

static void putline apr_file_t f,
char *  l
[static]
 

Definition at line 113 of file htdigest.c.

References x.

Referenced by main().

static void terminate void   )  [static]
 

Definition at line 175 of file htdigest.c.

static void usage void   )  [static]
 

Definition at line 162 of file htdigest.c.

References exit.


Variable Documentation

apr_pool_t* cntxt
 

Definition at line 65 of file htdigest.c.

apr_file_t* errfile
 

Definition at line 64 of file htdigest.c.

Referenced by ap_open_logs(), test_dup2(), and test_dup2_readwrite().

apr_file_t* tfp = NULL
 

Definition at line 63 of file htdigest.c.