detox  1.4.5
About: Detox is a utility designed to clean up filenames, especially those created on other operating systems.
  Fossies Dox: detox-1.4.5.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

clean_string.c File Reference
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include "clean_string.h"
#include "iso8859_1.h"
#include "unicode.h"
#include "parse_table.h"
#include "table.h"
Include dependency graph for clean_string.c:

Go to the source code of this file.

Macros

#define UTF_8_ENCODED   0x80
 
#define UTF_8_ENCODED_4_CHARS   0xf0
 
#define UTF_8_ENCODED_3_CHARS   0xe0
 
#define UTF_8_ENCODED_2_CHARS   0xc0
 

Functions

unsigned char * clean_iso8859_1_basic (unsigned char *s, void *opts)
 
unsigned char * clean_iso8859_1 (unsigned char *s, void *opts)
 
unsigned char * clean_safe_basic (unsigned char *s, void *opts)
 
unsigned char * clean_safe (unsigned char *s, void *opts)
 
unsigned char * clean_uncgi (unsigned char *s, void *opts)
 
unsigned char * clean_wipeup (unsigned char *s, void *opts)
 
unsigned char * clean_utf_8_basic (unsigned char *s, void *opts)
 
unsigned char * clean_utf_8 (unsigned char *s, void *opts)
 
unsigned char * clean_max_length (unsigned char *s, void *opts)
 
unsigned char * clean_lower (unsigned char *s, void *opts)
 

Macro Definition Documentation

◆ UTF_8_ENCODED

#define UTF_8_ENCODED   0x80

Definition at line 430 of file clean_string.c.

◆ UTF_8_ENCODED_2_CHARS

#define UTF_8_ENCODED_2_CHARS   0xc0

Definition at line 433 of file clean_string.c.

◆ UTF_8_ENCODED_3_CHARS

#define UTF_8_ENCODED_3_CHARS   0xe0

Definition at line 432 of file clean_string.c.

◆ UTF_8_ENCODED_4_CHARS

#define UTF_8_ENCODED_4_CHARS   0xf0

Definition at line 431 of file clean_string.c.

Function Documentation

◆ clean_iso8859_1()

unsigned char* clean_iso8859_1 ( unsigned char *  s,
void *  opts 
)

◆ clean_iso8859_1_basic()

unsigned char* clean_iso8859_1_basic ( unsigned char *  s,
void *  opts 
)

This file is part of the Detox package.

Copyright (c) Doug Harple detox.nosp@m..dha.nosp@m.rple@.nosp@m.gmai.nosp@m.l.com

For the full copyright and license information, please view the LICENSE file that was distributed with this source code.

Definition at line 33 of file clean_string.c.

References ISO8859_1_MAXLEN, ISO8859_1_OFFSET, iso8859_1_trans, and malloc().

Referenced by main().

◆ clean_lower()

unsigned char* clean_lower ( unsigned char *  s,
void *  opts 
)

Definition at line 744 of file clean_string.c.

References malloc().

Referenced by dump_config_file(), and yyparse().

◆ clean_max_length()

unsigned char* clean_max_length ( unsigned char *  s,
void *  opts 
)

Definition at line 690 of file clean_string.c.

References malloc(), and clean_string_options::max_length.

Referenced by dump_config_file(), and yyparse().

◆ clean_safe()

unsigned char* clean_safe ( unsigned char *  s,
void *  opts 
)

◆ clean_safe_basic()

unsigned char* clean_safe_basic ( unsigned char *  s,
void *  opts 
)

Definition at line 152 of file clean_string.c.

References malloc().

Referenced by main().

◆ clean_uncgi()

unsigned char* clean_uncgi ( unsigned char *  s,
void *  opts 
)

Definition at line 303 of file clean_string.c.

References malloc().

Referenced by dump_config_file(), and yyparse().

◆ clean_utf_8()

◆ clean_utf_8_basic()

unsigned char* clean_utf_8_basic ( unsigned char *  s,
void *  opts 
)

◆ clean_wipeup()

unsigned char* clean_wipeup ( unsigned char *  s,
void *  opts 
)

Definition at line 351 of file clean_string.c.

References malloc(), and clean_string_options::remove_trailing.

Referenced by dump_config_file(), spoof_config_file(), and yyparse().