"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "xorriso/sfile.c" between
xorriso-1.5.2.tar.gz and xorriso-1.5.4.tar.gz

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.

sfile.c  (xorriso-1.5.2):sfile.c  (xorriso-1.5.4)
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2014 Thomas Schmitt, <scdbackup@gmx.net> Copyright 2007-2020 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later. Provided under GPL version 2 or later.
This file contains the implementation of functions around files and strings. This file contains the implementation of functions around files and strings.
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "../config.h" #include "../config.h"
#endif #endif
skipping to change at line 321 skipping to change at line 321
if(flag&2){ if(flag&2){
sprintf(puff,"%2.2d",azt->tm_sec); sprintf(puff,"%2.2d",azt->tm_sec);
strcat(zeitcode,puff); strcat(zeitcode,puff);
} }
return(zeitcode); return(zeitcode);
} }
int Sfile_scale(double value, char *result, int siz, double thresh, int flag) int Sfile_scale(double value, char *result, int siz, double thresh, int flag)
/* /*
bit0= eventually ommit 'b' bit0= omit 'b' if it would elsewise be appended
bit1= make text as short as possible bit1= make text as short as possible
bit2= no fraction (if it would fit at all) bit2= no fraction (if it would fit at all)
*/ */
{ {
char scale_c,scales[7],form[80], *negpt= NULL, *cpt; char scale_c,scales[7],form[80], *negpt= NULL, *cpt;
int i,dec_siz= 0,avail_siz= 1; int i,dec_siz= 0,avail_siz= 1;
if(value<0) { if(value<0) {
value= -value; value= -value;
siz--; siz--;
skipping to change at line 419 skipping to change at line 419
for(; i>0; i--) { for(; i>0; i--) {
d= hnum/scale; d= hnum/scale;
tpt[digits-i]= '0'+d; tpt[digits-i]= '0'+d;
hnum= hnum%scale; hnum= hnum%scale;
scale/= 10; scale/= 10;
} }
tpt[digits]= 0; tpt[digits]= 0;
return(1); return(1);
} }
/* @return index number of first not interpreted text byte
*/
int Sfile_text_to_off_t(char *text, off_t *num, int flag)
{
int sig= 1, ridx;
*num= 0;
ridx= 0;
if(text[ridx] == '-') {
sig= -1;
ridx++;
} else if(text[ridx] == '+') {
ridx++;
}
for(; text[ridx] != 0; ridx++) {
if(text[ridx] < '0' || text[ridx] > '9')
break;
if(*num > (((off_t) 1) << 59))
return(-1);
*num= *num * 10 + text[ridx] - '0';
}
*num= *num * sig;
return(ridx);
}
/* Converts backslash codes into single characters: /* Converts backslash codes into single characters:
\a BEL 7 , \b BS 8 , \e ESC 27 , \f FF 12 , \n LF 10 , \r CR 13 , \a BEL 7 , \b BS 8 , \e ESC 27 , \f FF 12 , \n LF 10 , \r CR 13 ,
\t HT 9 , \v VT 11 , \\ \ 92 \t HT 9 , \v VT 11 , \\ \ 92
\[0-9][0-9][0-9] octal code , \x[0-9a-f][0-9a-f] hex code , \[0-9][0-9][0-9] octal code , \x[0-9a-f][0-9a-f] hex code ,
\cX control-x (ascii(X)-64) \cX control-x (ascii(X)-64)
@param upto maximum number of characters to examine for backslash. @param upto maximum number of characters to examine for backslash.
The scope of a backslash (0 to 3 characters) is not affected. The scope of a backslash (0 to 3 characters) is not affected.
@param eaten returns the difference in length between input and output @param eaten returns the difference in length between input and output
@param flag bit0= only determine *eaten, do not convert @param flag bit0= only determine *eaten, do not convert
bit1= convert \000 to binary 0 bit1= convert \000 to binary 0
 End of changes. 3 change blocks. 
2 lines changed or deleted 27 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)