xorriso  1.5.4.pl02
About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.
  Fossies Dox: xorriso-1.5.4.pl02.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

sfile.c File Reference
#include <ctype.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <time.h>
#include <pwd.h>
#include <grp.h>
#include "sfile.h"
Include dependency graph for sfile.c:

Go to the source code of this file.

Functions

char * Sfile_fgets_n (char *line, int maxl, FILE *fp, int flag)
 
int Sfile_count_char (char *text, char to_count)
 
int Sfile_count_components (char *path, int flag)
 
int Sfile_component_pointer (char *path, char **sourcept, int idx, int flag)
 
int Sfile_leafname (char *path, char leafname[4096], int flag)
 
int Sfile_add_to_path (char path[4096], char *addon, int flag)
 
int Sfile_prepend_path (char *prefix, char path[4096], int flag)
 
int Sfile_get_dev_fd_no (char *filename, int flag)
 
int Sfile_type (char *filename, int flag)
 
char * Sfile_datestr (time_t tim, short int flag)
 
int Sfile_scale (double value, char *result, int siz, double thresh, int flag)
 
int Sfile_off_t_text (char text[80], off_t num, int flag)
 
int Sfile_text_to_off_t (char *text, off_t *num, int flag)
 
int Sfile_bsl_interpreter (char *text, int upto, int *eaten, int flag)
 
int Sfile_bsl_encoder (char **result, char *text, size_t text_len, int flag)
 
int Sfile_destroy_argv (int *argc, char ***argv, int flag)
 
int Sfile_sep_make_argv (char *progname, char *line, char *separators, int max_words, int *argc, char ***argv, int flag)
 
int Sfile_make_argv (char *progname, char *line, int *argc, char ***argv, int flag)
 
int Sfile_str (char target[4096], char *source, int flag)
 
int Sfile_home_adr_s (char *filename, char *fileadr, int fa_size, int flag)
 
double Sfile_microtime (int flag)
 
int Sfile_decode_datestr (struct tm *reply, char *text, int flag)
 
static int find_utf8_start (char *name, int idx, int flag)
 
int Sfile_flatten_utf8_heads (char *name, int idx, int flag)
 

Function Documentation

◆ find_utf8_start()

static int find_utf8_start ( char *  name,
int  idx,
int  flag 
)
static

Definition at line 949 of file sfile.c.

Referenced by Sfile_flatten_utf8_heads().

◆ Sfile_add_to_path()

◆ Sfile_bsl_encoder()

int Sfile_bsl_encoder ( char **  result,
char *  text,
size_t  text_len,
int  flag 
)

◆ Sfile_bsl_interpreter()

int Sfile_bsl_interpreter ( char *  text,
int  upto,
int *  eaten,
int  flag 
)

Definition at line 470 of file sfile.c.

Referenced by Sfile_sep_make_argv().

◆ Sfile_component_pointer()

int Sfile_component_pointer ( char *  path,
char **  sourcept,
int  idx,
int  flag 
)

Definition at line 87 of file sfile.c.

Referenced by Sfile_leafname().

◆ Sfile_count_char()

int Sfile_count_char ( char *  text,
char  to_count 
)

Definition at line 49 of file sfile.c.

Referenced by Xorriso_msg_op_parse(), and Xorriso_option_msg_op().

◆ Sfile_count_components()

int Sfile_count_components ( char *  path,
int  flag 
)

◆ Sfile_datestr()

char* Sfile_datestr ( time_t  tim,
short int  flag 
)

Definition at line 294 of file sfile.c.

Referenced by Xorriso_write_to_channel().

◆ Sfile_decode_datestr()

int Sfile_decode_datestr ( struct tm *  reply,
char *  text,
int  flag 
)

Definition at line 892 of file sfile.c.

Referenced by Decode_timestring().

◆ Sfile_destroy_argv()

int Sfile_destroy_argv ( int *  argc,
char ***  argv,
int  flag 
)

Definition at line 641 of file sfile.c.

References Smem_freE.

Referenced by Sfile_sep_make_argv().

◆ Sfile_fgets_n()

char* Sfile_fgets_n ( char *  line,
int  maxl,
FILE *  fp,
int  flag 
)

◆ Sfile_flatten_utf8_heads()

int Sfile_flatten_utf8_heads ( char *  name,
int  idx,
int  flag 
)

Definition at line 971 of file sfile.c.

References find_utf8_start().

Referenced by Xorriso_truncate_uniquely().

◆ Sfile_get_dev_fd_no()

int Sfile_get_dev_fd_no ( char *  filename,
int  flag 
)

Definition at line 208 of file sfile.c.

Referenced by Sfile_type(), and Xorriso_is_concat_target().

◆ Sfile_home_adr_s()

int Sfile_home_adr_s ( char *  filename,
char *  fileadr,
int  fa_size,
int  flag 
)

Combine environment variable HOME with given filename

Parameters
filenameAddress relative to $HOME
fileadrResulting combined address
fa_sizeSize of array fileadr
flagUnused yet
Returns
1=ok , 0=no HOME variable , -1=result address too long

Definition at line 863 of file sfile.c.

Referenced by Xorriso_read_rc().

◆ Sfile_leafname()

int Sfile_leafname ( char *  path,
char  leafname[4096],
int  flag 
)

◆ Sfile_make_argv()

int Sfile_make_argv ( char *  progname,
char *  line,
int *  argc,
char ***  argv,
int  flag 
)

◆ Sfile_microtime()

double Sfile_microtime ( int  flag)

Return a double representing seconds and microseconds since 1 Jan 1970

Definition at line 883 of file sfile.c.

Referenced by Xorriso_check_interval(), Xorriso_check_md5(), Xorriso_option_sleep(), Xorriso_option_update(), Xorriso_pacifier_callback(), Xorriso_pacifier_loop(), and Xorriso_pacifier_reset().

◆ Sfile_off_t_text()

int Sfile_off_t_text ( char  text[80],
off_t  num,
int  flag 
)

Definition at line 389 of file sfile.c.

Referenced by Splitpart__compose(), Xorriso_add_offset_size(), and Xorriso_status().

◆ Sfile_prepend_path()

int Sfile_prepend_path ( char *  prefix,
char  path[4096],
int  flag 
)

Definition at line 161 of file sfile.c.

References SfileadrL, and Xorriso_msgs_submit().

Referenced by Xorriso_genisofs(), Xorriso_option_add(), and Xorriso_option_rmi().

◆ Sfile_scale()

◆ Sfile_sep_make_argv()

int Sfile_sep_make_argv ( char *  progname,
char *  line,
char *  separators,
int  max_words,
int *  argc,
char ***  argv,
int  flag 
)

Definition at line 658 of file sfile.c.

References Sfile_bsl_interpreter(), Sfile_destroy_argv(), SfileadrL, and Smem_malloC.

Referenced by Sfile_make_argv().

◆ Sfile_str()

◆ Sfile_text_to_off_t()

int Sfile_text_to_off_t ( char *  text,
off_t *  num,
int  flag 
)

Definition at line 435 of file sfile.c.

Referenced by Xorriso_extract_boot_images().

◆ Sfile_type()