mirror of
https://kernel.googlesource.com/pub/scm/network/tftp/tftp-hpa
synced 2025-05-12 01:35:51 +03:00

Don't rely on nonstandard bsd_signal() function, instead require that the platform has sigaction(). This is 2001, after all. This may resolve some potential portability problems. Log a message if memory allocation fails, instead of dying silently. Clean up the main dispatch loop. Use <sysexits.h> for exit codes, if it exists. Reformat tftpd.c to match the other files.
38 lines
877 B
C
38 lines
877 B
C
/* $Id$ */
|
|
/* ----------------------------------------------------------------------- *
|
|
*
|
|
* Copyright 2001 H. Peter Anvin - All Rights Reserved
|
|
*
|
|
* This program is free software available under the same license
|
|
* as the "OpenBSD" operating system, distributed at
|
|
* http://www.openbsd.org/.
|
|
*
|
|
* ----------------------------------------------------------------------- */
|
|
|
|
/*
|
|
* remap.h
|
|
*
|
|
* Prototypes for regular-expression based filename remapping.
|
|
*/
|
|
|
|
#ifndef TFTPD_REMAP_H
|
|
#define TFTPD_REMAP_H
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include "../config.h"
|
|
|
|
/* Opaque type */
|
|
struct rule;
|
|
|
|
#ifdef WITH_REGEX
|
|
|
|
/* Read a rule file */
|
|
struct rule *parserulefile(FILE *);
|
|
|
|
/* Execute a rule set on a string; returns a malloc'd new string. */
|
|
char *rewrite_string(const char *, const struct rule *, int);
|
|
|
|
#endif /* WITH_REGEX */
|
|
#endif /* TFTPD_REMAP_H */
|
|
|