⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qccfilereadchar.3

📁 spiht for linux this is used to decod and encode vedio i wich all enjoy
💻 3
字号:
.TH QCCFILE 3 "QCCPACK" "".SH NAMEQccFileReadChar,QccFileWriteChar,QccFileReadInt,QccFileWriteInt,QccFileReadDouble,QccFileWriteDouble,QccFileReadString,QccFileWriteString,QccFileSkipWhiteSpace\- reading and writing of files.SH SYNOPSIS.B #include "libQccPack.h".sp.BI "int QccFileReadChar(FILE *" infile ", char *" val );.br.BI "int QccFileWriteChar(FILE *" outfile ", char " val );.br.BI "int QccFileReadInt(FILE *" infile ", int *" val );.br.BI "int QccFileWriteInt(FILE *" outfile ", int " val );.br.BI "int QccFileReadDouble(FILE *" infile ", double *" val );.br.BI "int QccFileWriteDouble(FILE *" outfile ", double " val );.br.BI "int QccFileReadString(FILE *" infile ", QccString " s );.br.BI "int QccFileWriteString(FILE *" outfile ", const QccString " s );.br.BI "int QccFileSkipWhiteSpace(FILE *" infile ", int " skip_comments_flag );.SH DESCRIPTIONThe following routines read and write binary data to files:.TP.B QccFileReadChar()reads a.B charinto the location pointed to by.IR val ..TP.B QccFileWriteChar()writes the .B charin.IR val ..TP.B QccFileReadInt()reads an.B intinto the location pointed to by.IR val ..TP.B QccFileWriteInt()writes the .B intin.IR val ..TP.B QccFileReadDouble()reads a.B doubleinto the location pointed to by.IR val ..TP.B QccFileWriteDouble()writes the .B doublein.IR val ..LPIn reading and writing.B intand .B doublevalues,the routines.BR QccBinaryCharToInt (3),.BR QccBinaryIntToChar (3),.BR QccBinaryCharToFloat (3),and.BR QccBinaryFloatToChar (3)are used to ensure that the binary values are read/written from files in MSB-first order despite thebyte ordering native to the machine.Thus, files produced by QccPack should be portable acrossdifferent architectures.QccPack stores floating-point numbers in its files using 4 bytes (32-bit precision); hence.B QccFileWriteDouble()actually casts the.B doublevalue to a .B floatbefore writing and can therefore incur some precision loss.In each of the read routines, storage space pointed to by.I valmust be allocated in the appropriate amount prior to callingthe routine..LP.B QccFileReadString()reads a.B QccString into.IR s ,which must be allocated prior to calling.BR QccFileReadString() .The string is truncated to.B QCCSTRINGLENcharacters to avoid overrunning.IR s ..LP.BR QccFileWriteString()writes a.BR QccString ..LP.B QccFileSkipWhiteSpace()skips over white space and, if .I skip\_comments\_flagis nonzero, comment lines, in the input file.White space includes space, `\\n' (newline), `\\t' (tab), and `\\r' (return) characters.A comment line is any line that starts with a`#', `*', or `/'.When.B QccFileSkipWhiteSpace()returns, the file is positioned to the next non-white-space character noton a comment line..SH "RETURN VALUE"Each of these routines return 0 upon successful completion.  If an erroroccurs while accessing the file, 1 is returned..SH "SEE ALSO".BR QccFileOpen (3),.BR QccBinaryCharToInt (3),.BR QccBinaryIntToChar (3),.BR QccBinaryCharToFloat (3),.BR QccBinaryFloatToChar (3),.BR QccPack (3).SH AUTHORCopyright (C) 1997-2009  James E. Fowler.\"  The programs herein are free software; you can redistribute them an.or.\"  modify them under the terms of the GNU General Public License.\"  as published by the Free Software Foundation; either version 2.\"  of the License, or (at your option) any later version..\"  .\"  These programs are distributed in the hope that they will be useful,.\"  but WITHOUT ANY WARRANTY; without even the implied warranty of.\"  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the.\"  GNU General Public License for more details..\"  .\"  You should have received a copy of the GNU General Public License.\"  along with these programs; if not, write to the Free Software.\"  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -