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)  

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

Go to the source code of this file.

Data Structures

struct  cd_mid_record
 
struct  dvd_mid_record
 

Typedefs

typedef struct cd_mid_record cd_mid_record_t
 
typedef struct dvd_mid_record dvd_mid_record_t
 

Functions

void burn_version (int *major, int *minor, int *micro)
 
char * burn_guess_cd_manufacturer (int m_li, int s_li, int f_li, int m_lo, int s_lo, int f_lo, int flag)
 
char * burn_guess_manufacturer (int prf, char *media_code1, char *media_code2, int flag)
 
int burn_util_make_printable_word (char **text, int flag)
 
char * burn_sfile_fgets (char *line, int maxl, FILE *fp)
 
char * burn_printify (char *msg)
 
void burn_int_to_lsb (int val, char *target)
 
double burn_get_time (int flag)
 
off_t burn_sparse_file_addsize (off_t write_start, struct stat *stbuf)
 

Typedef Documentation

◆ cd_mid_record_t

Definition at line 33 of file util.c.

◆ dvd_mid_record_t

Definition at line 57 of file util.c.

Function Documentation

◆ burn_get_time()

double burn_get_time ( int  flag)

◆ burn_guess_cd_manufacturer()

char* burn_guess_cd_manufacturer ( int  m_li,
int  s_li,
int  f_li,
int  m_lo,
int  s_lo,
int  f_lo,
int  flag 
)

API

Parameters
flagBitfield for control purposes, bit0= append "(aka %s)",other_brands to reply

Definition at line 57 of file util.c.

References cd_mid_record::f_li, cd_mid_record::m_li, cd_mid_record::manufacturer, cd_mid_record::other_brands, and cd_mid_record::s_li.

Referenced by burn_guess_manufacturer().

◆ burn_guess_manufacturer()

char* burn_guess_manufacturer ( int  profile_no,
char *  manuf_code,
char *  media_code,
int  flag 
)

Guess the name of a manufacturer by profile number, manufacturer code and media code. The profile number can be obtained by burn_disc_get_profile(), the other two parameters can be obtained as media_code1 and media_code2 by burn_disc_get_media_id().

Parameters
profile_noProfile number (submit -1 if not known)
manuf_codeManufacturer code from media (e.g. "RICOHJPN")
media_codeMedia ID code from media (e.g. "W11")
flagBitfield for control purposes, submit 0
Returns
Printable text or NULL on memory shortage. If the text begins with "Unknown " then no item of the manufacturer list matched the codes. Dispose by free() when no longer needed.
Since
0.7.2

Definition at line 149 of file util.c.

References burn_guess_cd_manufacturer(), dvd_mid_record::manufacturer, dvd_mid_record::mc1, and dvd_mid_record::mc1_sig_len.

Referenced by Xorriso_atip(), and Xorriso_media_product().

◆ burn_int_to_lsb()

void burn_int_to_lsb ( int  val,
char *  target 
)

Definition at line 341 of file util.c.

Referenced by burn_drive_extract_audio().

◆ burn_printify()

◆ burn_sfile_fgets()

char* burn_sfile_fgets ( char *  line,
int  maxl,
FILE *  fp 
)

Read a line from fp and strip LF or CRLF

Definition at line 307 of file util.c.

Referenced by burn_session_by_cue_file(), and burn_session_input_sheet_v07t().

◆ burn_sparse_file_addsize()

off_t burn_sparse_file_addsize ( off_t  write_start,
struct stat *  stbuf 
)

Definition at line 385 of file util.c.

Referenced by burn_os_stdio_capacity().

◆ burn_util_make_printable_word()

int burn_util_make_printable_word ( char **  text,
int  flag 
)

Definition at line 258 of file util.c.

Referenced by mmc_get_media_product_id(), and mmc_set_product_id().

◆ burn_version()

void burn_version ( int *  major,
int *  minor,
int *  micro 
)

Returns the library's version in its parts. This is the runtime counterpart of the three build time macros burn_header_version_* below.

Parameters
majorThe major version number
minorThe minor version number
microThe micro version number

Definition at line 33 of file util.c.

References burn_header_version_major, burn_header_version_micro, and burn_header_version_minor.

Referenced by isoburn_initialize(), Xorriso_preparer_string(), and Xorriso_report_lib_versions().