Linux删除空行-基于sed

Linux删除空行-基于sed

老韩LinuxSRE

使用gcc指令对C语言源文件做做预处理

[root@hanyw-k8HelloWorldTest]#gcc-EHelloWorld.c-oHelloWorld.i

使用nl指令查看有很多空行,看起来十分不方便。

nl指令查看有很多空行

去空行方式1(删除纯空行),指令及输出结果如下。

[root@hanyw-k8HelloWorldTest]#sed‘/^\s$/d’HelloWorld.i#1“HelloWorld.c”#1“<built-in>”#1“<command-line>”#1“/usr/include/stdc-predef.h”134#1“<command-line>”2#1“HelloWorld.c”#1“/usr/include/stdio.h”134#27“/usr/include/stdio.h”34#1“/usr/include/features.h”134#375“/usr/include/features.h”34#1“/usr/include/sys/cdefs.h”134#392“/usr/include/sys/cdefs.h”34#1“/usr/include/bits/wordsize.h”134#393“/usr/include/sys/cdefs.h”234#376“/usr/include/features.h”234#399“/usr/include/features.h”34#1“/usr/include/gnu/stubs.h”134#10“/usr/include/gnu/stubs.h”34#1“/usr/include/gnu/stubs-64.h”134#11“/usr/include/gnu/stubs.h”234#400“/usr/include/features.h”234#28“/usr/include/stdio.h”234#1“/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h”134#212“/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h”34typedeflongunsignedintsize_t;#34“/usr/include/stdio.h”234#1“/usr/include/bits/types.h”134#27“/usr/include/bits/types.h”34#1“/usr/include/bits/wordsize.h”134#28“/usr/include/bits/types.h”234typedefunsignedcharu_char;typedefunsignedshortintu_short;typedefunsignedintu_int;typedefunsignedlongintu_long;typedefsignedcharint8_t;typedefunsignedcharuint8_t;typedefsignedshortintint16_t;typedefunsignedshortintuint16_t;typedefsignedintint32_t;typedefunsignedintuint32_t;typedefsignedlongintint64_t;typedefunsignedlongintuint64_t;typedeflongintquad_t;typedefunsignedlongintu_quad_t;#130“/usr/include/bits/types.h”34#1“/usr/include/bits/typesizes.h”134#131“/usr/include/bits/types.h”234typedefunsignedlongintdev_t;typedefunsignedintuid_t;typedefunsignedintgid_t;typedefunsignedlongintino_t;typedefunsignedlongintino64_t;typedefunsignedintmode_t;typedefunsignedlongintnlink_t;typedeflongintoff_t;typedeflongintoff64_t;typedefintpid_t;typedefstruct{intval[2];}fsid_t;typedeflongintclock_t;typedefunsignedlongintrlim_t;typedefunsignedlongintrlim64_t;typedefunsignedintid_t;typedeflonginttime_t;typedefunsignedintuseconds_t;typedeflongintsuseconds_t;typedefintdaddr_t;typedefintkey_t;typedefintclockid_t;typedefvoidtimer_t;typedeflongintblksize_t;typedeflongintblkcnt_t;typedeflongintblkcnt64_t;typedefunsignedlongintfsblkcnt_t;typedefunsignedlongintfsblkcnt64_t;typedefunsignedlongintfsfilcnt_t;typedefunsignedlongintfsfilcnt64_t;typedeflongintfsword_t;typedeflongintssize_t;typedeflongintsyscall_slong_t;typedefunsignedlongintsyscall_ulong_t;typedefoff64_tloff_t;typedefquad_t*qaddr_t;typedefcharcaddr_t;typedeflongintintptr_t;typedefunsignedintsocklen_t;#36“/usr/include/stdio.h”234#44“/usr/include/stdio.h”34struct_IO_FILE;typedefstruct_IO_FILEFILE;#64“/usr/include/stdio.h”34typedefstruct_IO_FILEFILE;#74“/usr/include/stdio.h”34#1“/usr/include/libio.h”134#32“/usr/include/libio.h”34#1“/usr/include/_G_config.h”134#15“/usr/include/_G_config.h”34#1“/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h”134#16“/usr/include/_G_config.h”234#1“/usr/include/wchar.h”134#82“/usr/include/wchar.h”34typedefstruct{intcount;union{unsignedintwch;charwchb[4];}value;}mbstate_t;#21“/usr/include/_G_config.h”234typedefstruct{off_tpos;mbstate_tstate;}_G_fpos_t;typedefstruct{off64_tpos;mbstate_tstate;}_G_fpos64_t;#33“/usr/include/libio.h”234#50“/usr/include/libio.h”34#1“/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stdarg.h”134#40“/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stdarg.h”34typedefbuiltin_va_list__gnuc_va_list;#51“/usr/include/libio.h”234#145“/usr/include/libio.h”34struct_IO_jump_t;struct_IO_FILE;#155“/usr/include/libio.h”34typedefvoid_IO_lock_t;struct_IO_marker{struct_IO_marker_next;struct_IO_FILE_sbuf;int_pos;#178“/usr/include/libio.h”34};enumcodecvt_result{codecvt_ok,codecvt_partial,codecvt_error,__codecvt_noconv};#246“/usr/include/libio.h”34struct_IO_FILE{int_flags;char_IO_read_ptr;char_IO_read_end;char_IO_read_base;char_IO_write_base;char_IO_write_ptr;char_IO_write_end;char_IO_buf_base;char_IO_buf_end;char_IO_save_base;char_IO_backup_base;char_IO_save_end;struct_IO_marker_markers;struct_IO_FILE_chain;int_fileno;int_flags2;off_t_old_offset;unsignedshort_cur_column;signedchar_vtable_offset;char_shortbuf[1];_IO_lock_t*_lock;#294“/usr/include/libio.h”34off64_t_offset;#303“/usr/include/libio.h”34void__pad1;voidpad2;void*pad3;void*pad4;size_tpad5;int_mode;char_unused2[15*sizeof(int)-4sizeof(void)-sizeof(size_t)];};typedefstruct_IO_FILE_IO_FILE;struct_IO_FILE_plus;externstruct_IO_FILE_plus_IO_2_1stdin;externstruct_IO_FILE_plus_IO_2_1stdout;externstruct_IO_FILE_plus_IO_2_1stderr;#339“/usr/include/libio.h”34typedefssize_tio_read_fn(void__cookie,charbuf,size_tnbytes);typedefssize_tio_write_fn(void__cookie,constcharbuf,size_tn);typedefintio_seek_fn(void*cookie,off64_t*pos,intw);typedefintio_close_fn(voidcookie);#391“/usr/include/libio.h”34externintunderflow(_IO_FILE);externintuflow(_IO_FILE*);externintoverflow(_IO_FILE,int);#435“/usr/include/libio.h”34externint_IO_getc(_IO_FILEfp);externint_IO_putc(intc,_IO_FILE__fp);externint_IO_feof(_IO_FILEfp)attribute((nothrow,leaf));externint_IO_ferror(_IO_FILE*fp)attribute((nothrow,leaf));externint_IO_peekc_locked(_IO_FILE__fp);externvoid_IO_flockfile(_IO_FILE)attribute((nothrow,leaf));externvoid_IO_funlockfile(_IO_FILE)attribute((nothrow,leaf));externint_IO_ftrylockfile(_IO_FILE)attribute((nothrow,leaf));#465“/usr/include/libio.h”34externint_IO_vfscanf(_IO_FILE__restrict,constcharrestrict,gnuc_va_list,int__restrict);externint_IO_vfprintf(_IO_FILErestrict,constchar*restrict,gnuc_va_list);externssize_t_IO_padn(_IO_FILE,int,__ssize_t);externsize_t_IO_sgetn(_IO_FILE,void,size_t);extern__off64_t_IO_seekoff(_IO_FILE,off64_t,int,int);externoff64_t_IO_seekpos(_IO_FILE,__off64_t,int);externvoid_IO_free_backup_area(_IO_FILE)attribute((nothrow,leaf));#75“/usr/include/stdio.h”234typedefgnuc_va_listva_list;#90“/usr/include/stdio.h”34typedefoff_toff_t;#102“/usr/include/stdio.h”34typedefssize_tssize_t;typedef_G_fpos_tfpos_t;#164“/usr/include/stdio.h”34#1“/usr/include/bits/stdio_lim.h”134#165“/usr/include/stdio.h”234externstruct_IO_FILE*stdin;externstruct_IO_FILE*stdout;externstruct_IO_FILEstderr;externintremove(constcharfilename)attribute((nothrow,leaf));externintrename(constchar__old,constcharnew)attribute((nothrow,leaf));externintrenameat(intoldfd,constcharold,intnewfd,constcharnew)attribute((nothrow,leaf));externFILE*tmpfile(void);#209“/usr/include/stdio.h”34externchartmpnam(chars)attribute((nothrow,leaf));externchartmpnam_r(chars)attribute((nothrow,leaf));#227“/usr/include/stdio.h”34externchartempnam(constchardir,constcharpfx)attribute((nothrow,leaf))attribute((malloc__));externintfclose(FILEstream);externintfflush(FILE*stream);#252“/usr/include/stdio.h”34externintfflush_unlocked(FILE*stream);#266“/usr/include/stdio.h”34externFILEfopen(constcharrestrictfilename,constchar*restrictmodes);externFILEfreopen(constcharrestrictfilename,constchar*restrictmodes,FILE*restrictstream);#295“/usr/include/stdio.h”34#306“/usr/include/stdio.h”34externFILE*fdopen(intfd,constchar*modes)attribute((nothrow,leaf));#319“/usr/include/stdio.h”34externFILEfmemopen(voids,size_tlen,constchar*modes)attribute((nothrow,leaf));externFILEopen_memstream(char**__bufloc,size_tsizeloc)attribute((nothrow,leaf));externvoidsetbuf(FILE*restrictstream,char*restrictbuf)attribute((nothrow,leaf));externintsetvbuf(FILE*restrictstream,char*restrictbuf,intmodes,size_tn)attribute((nothrow,leaf));externvoidsetbuffer(FILE*restrictstream,char*restrictbuf,size_tsize)attribute((nothrow,leaf));externvoidsetlinebuf(FILEstream)attribute((nothrow,leaf__));externintfprintf(FILErestrictstream,constcharrestrictformat,…);externintprintf(constcharrestrictformat,…);externintsprintf(charrestricts,constcharrestrictformat,…)attribute((nothrow));externintvfprintf(FILErestricts,constcharrestrictformat,gnuc_va_listarg);externintvprintf(constcharrestrictformat,gnuc_va_listarg);externintvsprintf(charrestricts,constcharrestrictformat,gnuc_va_listarg)attribute((nothrow));externintsnprintf(charrestricts,size_tmaxlen,constchar*restrictformat,…)attribute((nothrow))attribute((format(printf,3,4)));externintvsnprintf(char*restricts,size_tmaxlen,constcharrestrictformat,gnuc_va_listarg)attribute((nothrow))attribute((format(printf,3,0)));#412“/usr/include/stdio.h”34externintvdprintf(int__fd,constcharrestrictfmt,gnuc_va_listarg)attribute((format(printf,2,0)));externintdprintf(intfd,constchar*restrictfmt,…)attribute((format(printf,2,3)));externintfscanf(FILE*restrictstream,constchar*restrictformat,…);externintscanf(constchar*restrictformat,…);externintsscanf(constchar*restricts,constchar*restrictformat,…)attribute((nothrow,leaf));#443“/usr/include/stdio.h”34externintfscanf(FILE*restrictstream,constchar*restrictformat,…)asm(“”“isoc99_fscanf”);externintscanf(constcharrestrictformat,…)asm(“”“__isoc99_scanf”);externintsscanf(constcharrestricts,constcharrestrictformat,…)asm(“”“isoc99_sscanf”)attribute((nothrow,leaf__));#463“/usr/include/stdio.h”34externintvfscanf(FILErestricts,constcharrestrictformat,gnuc_va_listarg)attribute((format(scanf,2,0)));externintvscanf(constcharrestrictformat,gnuc_va_listarg)attribute((format(scanf,1,0)));externintvsscanf(constcharrestricts,constcharrestrictformat,gnuc_va_listarg)attribute((nothrow,leaf))attribute((format(scanf,2,0)));#494“/usr/include/stdio.h”34externintvfscanf(FILErestricts,constcharrestrictformat,gnuc_va_listarg)asm(“”“isoc99_vfscanf”)attribute((format(scanf,2,0)));externintvscanf(constchar*restrictformat,gnuc_va_listarg)asm(“”“isoc99_vscanf”)attribute((format(scanf,1,0)));externintvsscanf(constcharrestricts,constcharrestrictformat,gnuc_va_listarg)asm(“”“isoc99_vsscanf”)attribute((nothrow,leaf))attribute((format(scanf,2,0)));#522“/usr/include/stdio.h”34externintfgetc(FILE*stream);externintgetc(FILE__stream);externintgetchar(void);#550“/usr/include/stdio.h”34externintgetc_unlocked(FILEstream);externintgetchar_unlocked(void);#561“/usr/include/stdio.h”34externintfgetc_unlocked(FILE*stream);externintfputc(intc,FILE*stream);externintputc(intc,FILE*stream);externintputchar(intc);#594“/usr/include/stdio.h”34externintfputc_unlocked(intc,FILEstream);externintputc_unlocked(intc,FILEstream);externintputchar_unlocked(intc);externintgetw(FILEstream);externintputw(intw,FILEstream);externcharfgets(charrestricts,intn,FILE*restrictstream);#638“/usr/include/stdio.h”34externchargets(chars)attribute((deprecated));#665“/usr/include/stdio.h”34externssize_tgetdelim(char**restrictlineptr,size_t*restrictn,intdelimiter,FILErestrictstream);externssize_tgetdelim(char**restrict__lineptr,size_trestrictn,intdelimiter,FILE*restrictstream);externssize_tgetline(charrestrictlineptr,size_trestrictn,FILErestrictstream);externintfputs(constcharrestricts,FILErestrictstream);externintputs(constchars);externintungetc(intc,FILEstream);externsize_tfread(void*restrictptr,size_tsize,size_tn,FILE*restrictstream);externsize_tfwrite(constvoid*restrictptr,size_tsize,size_tn,FILE*restricts);#737“/usr/include/stdio.h”34externsize_tfread_unlocked(void*restrictptr,size_tsize,size_tn,FILE*restrictstream);externsize_tfwrite_unlocked(constvoid*restrictptr,size_tsize,size_tn,FILE*restrictstream);externintfseek(FILE*stream,longintoff,intwhence);externlongintftell(FILE__stream);externvoidrewind(FILEstream);#773“/usr/include/stdio.h”34externintfseeko(FILE*stream,off_toff,intwhence);externoff_tftello(FILE__stream);#792“/usr/include/stdio.h”34externintfgetpos(FILErestrictstream,fpos_trestrictpos);externintfsetpos(FILEstream,constfpos_t*pos);#815“/usr/include/stdio.h”34#824“/usr/include/stdio.h”34externvoidclearerr(FILEstream)attribute((nothrow,leaf__));externintfeof(FILEstream)attribute((nothrow,leaf));externintferror(FILE*stream)attribute((nothrow,leaf));externvoidclearerr_unlocked(FILEstream)attribute((nothrow,leaf__));externintfeof_unlocked(FILEstream)attribute((nothrow,leaf));externintferror_unlocked(FILE*stream)attribute((nothrow,leaf));externvoidperror(constchar*s);#1“/usr/include/bits/sys_errlist.h”134#26“/usr/include/bits/sys_errlist.h”34externintsys_nerr;externconstcharconstsys_errlist[];#854“/usr/include/stdio.h”234externintfileno(FILEstream)attribute((nothrow,leaf));externintfileno_unlocked(FILE*stream)attribute((nothrow,leaf));#873“/usr/include/stdio.h”34externFILEpopen(constcharcommand,constchar__modes);externintpclose(FILEstream);externcharctermid(chars)attribute((nothrow,leaf));#913“/usr/include/stdio.h”34externvoidflockfile(FILEstream)attribute((nothrow,leaf__));externintftrylockfile(FILEstream)attribute((nothrow,leaf));externvoidfunlockfile(FILE*stream)attribute((nothrow,leaf));#943“/usr/include/stdio.h”34#2“HelloWorld.c”2intmain(void){printf(“HelloWorld\n”);return0;}

方式2、删除由纯空格和空行组成的空行

[root@hanyw-k8HelloWorldTest]#sed‘/^[]$/d’HelloWorld.ised:-eexpression#1,char8:unterminatedaddressregex[root@hanyw-k8HelloWorldTest]#[root@hanyw-k8HelloWorldTest]#[root@hanyw-k8HelloWorldTest]#sed‘/^[]$/d’HelloWorld.i#1“HelloWorld.c”#1“<built-in>”#1“<command-line>”#1“/usr/include/stdc-predef.h”134#1“<command-line>”2#1“HelloWorld.c”#1“/usr/include/stdio.h”134#27“/usr/include/stdio.h”34#1“/usr/include/features.h”134#375“/usr/include/features.h”34#1“/usr/include/sys/cdefs.h”134#392“/usr/include/sys/cdefs.h”34#1“/usr/include/bits/wordsize.h”134#393“/usr/include/sys/cdefs.h”234#376“/usr/include/features.h”234#399“/usr/include/features.h”34#1“/usr/include/gnu/stubs.h”134#10“/usr/include/gnu/stubs.h”34#1“/usr/include/gnu/stubs-64.h”134#11“/usr/include/gnu/stubs.h”234#400“/usr/include/features.h”234#28“/usr/include/stdio.h”234#1“/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h”134#212“/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h”34typedeflongunsignedintsize_t;#34“/usr/include/stdio.h”234#1“/usr/include/bits/types.h”134#27“/usr/include/bits/types.h”34#1“/usr/include/bits/wordsize.h”134#28“/usr/include/bits/types.h”234typedefunsignedcharu_char;typedefunsignedshortintu_short;typedefunsignedintu_int;typedefunsignedlongintu_long;typedefsignedcharint8_t;typedefunsignedcharuint8_t;typedefsignedshortintint16_t;typedefunsignedshortintuint16_t;typedefsignedintint32_t;typedefunsignedintuint32_t;typedefsignedlongintint64_t;typedefunsignedlongintuint64_t;typedeflongintquad_t;typedefunsignedlongintu_quad_t;#130“/usr/include/bits/types.h”34#1“/usr/include/bits/typesizes.h”134#131“/usr/include/bits/types.h”234typedefunsignedlongintdev_t;typedefunsignedintuid_t;typedefunsignedintgid_t;typedefunsignedlongintino_t;typedefunsignedlongintino64_t;typedefunsignedintmode_t;typedefunsignedlongintnlink_t;typedeflongintoff_t;typedeflongintoff64_t;typedefintpid_t;typedefstruct{intval[2];}fsid_t;typedeflongintclock_t;typedefunsignedlongintrlim_t;typedefunsignedlongintrlim64_t;typedefunsignedintid_t;typedeflonginttime_t;typedefunsignedintuseconds_t;typedeflongintsuseconds_t;typedefintdaddr_t;typedefintkey_t;typedefintclockid_t;typedefvoidtimer_t;typedeflongintblksize_t;typedeflongintblkcnt_t;typedeflongintblkcnt64_t;typedefunsignedlongintfsblkcnt_t;typedefunsignedlongintfsblkcnt64_t;typedefunsignedlongintfsfilcnt_t;typedefunsignedlongintfsfilcnt64_t;typedeflongintfsword_t;typedeflongintssize_t;typedeflongintsyscall_slong_t;typedefunsignedlongintsyscall_ulong_t;typedefoff64_tloff_t;typedef__quad_tqaddr_t;typedefchar*caddr_t;typedeflongintintptr_t;typedefunsignedintsocklen_t;#36“/usr/include/stdio.h”234#44“/usr/include/stdio.h”34struct_IO_FILE;typedefstruct_IO_FILEFILE;#64“/usr/include/stdio.h”34typedefstruct_IO_FILEFILE;#74“/usr/include/stdio.h”34#1“/usr/include/libio.h”134#32“/usr/include/libio.h”34#1“/usr/include/_G_config.h”134#15“/usr/include/_G_config.h”34#1“/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h”134#16“/usr/include/_G_config.h”234#1“/usr/include/wchar.h”134#82“/usr/include/wchar.h”34typedefstruct{intcount;union{unsignedintwch;charwchb[4];}value;}mbstate_t;#21“/usr/include/_G_config.h”234typedefstruct{off_tpos;mbstate_tstate;}_G_fpos_t;typedefstruct{off64_tpos;mbstate_tstate;}_G_fpos64_t;#33“/usr/include/libio.h”234#50“/usr/include/libio.h”34#1“/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stdarg.h”134#40“/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stdarg.h”34typedefbuiltin_va_listgnuc_va_list;#51“/usr/include/libio.h”234#145“/usr/include/libio.h”34struct_IO_jump_t;struct_IO_FILE;#155“/usr/include/libio.h”34typedefvoid_IO_lock_t;struct_IO_marker{struct_IO_marker_next;struct_IO_FILE_sbuf;int_pos;#178“/usr/include/libio.h”34};enumcodecvt_result{codecvt_ok,codecvt_partial,codecvt_error,codecvt_noconv};#246“/usr/include/libio.h”34struct_IO_FILE{int_flags;char_IO_read_ptr;char_IO_read_end;char_IO_read_base;char_IO_write_base;char_IO_write_ptr;char_IO_write_end;char_IO_buf_base;char_IO_buf_end;char_IO_save_base;char_IO_backup_base;char_IO_save_end;struct_IO_marker_markers;struct_IO_FILE*_chain;int_fileno;int_flags2;off_t_old_offset;unsignedshort_cur_column;signedchar_vtable_offset;char_shortbuf[1];_IO_lock_t_lock;#294“/usr/include/libio.h”34__off64_t_offset;#303“/usr/include/libio.h”34voidpad1;void*pad2;void__pad3;voidpad4;size_tpad5;int_mode;char_unused2[15*sizeof(int)-4sizeof(void)-sizeof(size_t)];};typedefstruct_IO_FILE_IO_FILE;struct_IO_FILE_plus;externstruct_IO_FILE_plus_IO_2_1stdin;externstruct_IO_FILE_plus_IO_2_1stdout;externstruct_IO_FILE_plus_IO_2_1stderr;#339“/usr/include/libio.h”34typedefssize_tio_read_fn(void__cookie,charbuf,size_tnbytes);typedefssize_tio_write_fn(void__cookie,constcharbuf,size_tn);typedefintio_seek_fn(void*cookie,off64_t*pos,intw);typedefintio_close_fn(voidcookie);#391“/usr/include/libio.h”34externintunderflow(_IO_FILE);externintuflow(_IO_FILE*);externintoverflow(_IO_FILE,int);#435“/usr/include/libio.h”34externint_IO_getc(_IO_FILEfp);externint_IO_putc(intc,_IO_FILE__fp);externint_IO_feof(_IO_FILEfp)attribute((nothrow,leaf));externint_IO_ferror(_IO_FILE*fp)attribute((nothrow,leaf));externint_IO_peekc_locked(_IO_FILE__fp);externvoid_IO_flockfile(_IO_FILE)attribute((nothrow,leaf));externvoid_IO_funlockfile(_IO_FILE)attribute((nothrow,leaf));externint_IO_ftrylockfile(_IO_FILE)attribute((nothrow,leaf));#465“/usr/include/libio.h”34externint_IO_vfscanf(_IO_FILE__restrict,constcharrestrict,gnuc_va_list,int__restrict);externint_IO_vfprintf(_IO_FILErestrict,constchar*restrict,gnuc_va_list);externssize_t_IO_padn(_IO_FILE,int,__ssize_t);externsize_t_IO_sgetn(_IO_FILE,void,size_t);extern__off64_t_IO_seekoff(_IO_FILE,off64_t,int,int);externoff64_t_IO_seekpos(_IO_FILE,__off64_t,int);externvoid_IO_free_backup_area(_IO_FILE)attribute((nothrow,leaf));#75“/usr/include/stdio.h”234typedefgnuc_va_listva_list;#90“/usr/include/stdio.h”34typedefoff_toff_t;#102“/usr/include/stdio.h”34typedefssize_tssize_t;typedef_G_fpos_tfpos_t;#164“/usr/include/stdio.h”34#1“/usr/include/bits/stdio_lim.h”134#165“/usr/include/stdio.h”234externstruct_IO_FILE*stdin;externstruct_IO_FILE*stdout;externstruct_IO_FILEstderr;externintremove(constcharfilename)attribute((nothrow,leaf));externintrename(constchar__old,constcharnew)attribute((nothrow,leaf));externintrenameat(intoldfd,constcharold,intnewfd,constcharnew)attribute((nothrow,leaf));externFILE*tmpfile(void);#209“/usr/include/stdio.h”34externchartmpnam(chars)attribute((nothrow,leaf));externchartmpnam_r(chars)attribute((nothrow,leaf));#227“/usr/include/stdio.h”34externchartempnam(constchardir,constcharpfx)attribute((nothrow,leaf))attribute((malloc__));externintfclose(FILEstream);externintfflush(FILE*stream);#252“/usr/include/stdio.h”34externintfflush_unlocked(FILE*stream);#266“/usr/include/stdio.h”34externFILEfopen(constcharrestrictfilename,constchar*restrictmodes);externFILEfreopen(constcharrestrictfilename,constchar*restrictmodes,FILE*restrictstream);#295“/usr/include/stdio.h”34#306“/usr/include/stdio.h”34externFILE*fdopen(intfd,constchar*modes)attribute((nothrow,leaf));#319“/usr/include/stdio.h”34externFILEfmemopen(voids,size_tlen,constchar*modes)attribute((nothrow,leaf));externFILE*open_memstream(charbufloc,size_t*sizeloc)attribute((nothrow,leaf));externvoidsetbuf(FILErestrictstream,charrestrictbuf)attribute((nothrow,leaf));externintsetvbuf(FILErestrictstream,charrestrictbuf,intmodes,size_tn)attribute((nothrow,leaf));externvoidsetbuffer(FILErestrictstream,charrestrictbuf,size_tsize)attribute((nothrow,leaf));externvoidsetlinebuf(FILE*stream)attribute((nothrow,leaf));externintfprintf(FILErestrictstream,constcharrestrictformat,…);externintprintf(constcharrestrictformat,…);externintsprintf(charrestricts,constcharrestrictformat,…)attribute((nothrow));externintvfprintf(FILErestricts,constcharrestrictformat,gnuc_va_listarg);externintvprintf(constcharrestrictformat,gnuc_va_listarg);externintvsprintf(charrestricts,constcharrestrictformat,gnuc_va_listarg)attribute((nothrow));externintsnprintf(charrestricts,size_t__maxlen,constcharrestrictformat,…)attribute((nothrow))attribute((format(printf,3,4)));externintvsnprintf(charrestricts,size_t__maxlen,constcharrestrictformat,gnuc_va_listarg)attribute((nothrow))attribute((format(printf,3,0)));#412“/usr/include/stdio.h”34externintvdprintf(intfd,constchar*restrictfmt,gnuc_va_listarg)attribute((format(printf,2,0)));externintdprintf(intfd,constcharrestrictfmt,…)attribute((format(printf,2,3)));externintfscanf(FILErestrictstream,constcharrestrictformat,…);externintscanf(constcharrestrictformat,…);externintsscanf(constcharrestricts,constcharrestrictformat,…)attribute((nothrow,leaf));#443“/usr/include/stdio.h”34externintfscanf(FILErestrictstream,constcharrestrictformat,…)asm(“”“isoc99_fscanf”);externintscanf(constchar*restrictformat,…)asm(“”“isoc99_scanf”);externintsscanf(constcharrestricts,constcharrestrictformat,…)asm(“”“isoc99_sscanf”)attribute((nothrow,leaf));#463“/usr/include/stdio.h”34externintvfscanf(FILE*restricts,constchar*restrictformat,gnuc_va_listarg)attribute((format(scanf,2,0)));externintvscanf(constchar*restrictformat,gnuc_va_listarg)attribute((format(scanf,1,0)));externintvsscanf(constchar*restricts,constchar*restrictformat,gnuc_va_listarg)attribute((nothrow,leaf))attribute((format(scanf,2,0)));#494“/usr/include/stdio.h”34externintvfscanf(FILE*restricts,constchar*restrictformat,gnuc_va_listarg)asm(“”“isoc99_vfscanf”)attribute((format(scanf,2,0)));externintvscanf(constcharrestrictformat,gnuc_va_listarg)asm(“”“isoc99_vscanf”)attribute((format(scanf__,1,0)));externintvsscanf(constcharrestricts,constcharrestrictformat,gnuc_va_listarg)asm(“”“isoc99_vsscanf”)attribute((nothrow,leaf))attribute((format(scanf__,2,0)));#522“/usr/include/stdio.h”34externintfgetc(FILEstream);externintgetc(FILE*stream);externintgetchar(void);#550“/usr/include/stdio.h”34externintgetc_unlocked(FILE__stream);externintgetchar_unlocked(void);#561“/usr/include/stdio.h”34externintfgetc_unlocked(FILEstream);externintfputc(intc,FILEstream);externintputc(intc,FILEstream);externintputchar(intc);#594“/usr/include/stdio.h”34externintfputc_unlocked(intc,FILE*stream);externintputc_unlocked(intc,FILE*stream);externintputchar_unlocked(intc);externintgetw(FILE*stream);externintputw(intw,FILE*stream);externcharfgets(charrestricts,intn,FILE*restrictstream);#638“/usr/include/stdio.h”34externchargets(chars)attribute((deprecated));#665“/usr/include/stdio.h”34externssize_tgetdelim(charrestrictlineptr,size_trestrictn,int__delimiter,FILErestrictstream);extern__ssize_tgetdelim(charrestrictlineptr,size_trestrictn,int__delimiter,FILErestrictstream);externssize_tgetline(char**restrictlineptr,size_t*restrictn,FILE*restrictstream);externintfputs(constchar*restricts,FILE*restrictstream);externintputs(constchar*s);externintungetc(intc,FILE*stream);externsize_tfread(voidrestrictptr,size_tsize,size_tn,FILErestrictstream);externsize_tfwrite(constvoidrestrictptr,size_tsize,size_tn,FILErestricts);#737“/usr/include/stdio.h”34externsize_tfread_unlocked(voidrestrictptr,size_tsize,size_tn,FILErestrictstream);externsize_tfwrite_unlocked(constvoidrestrictptr,size_tsize,size_tn,FILErestrictstream);externintfseek(FILEstream,longintoff,int__whence);externlongintftell(FILEstream);externvoidrewind(FILE*stream);#773“/usr/include/stdio.h”34externintfseeko(FILEstream,off_toff,intwhence);extern__off_tftello(FILEstream);#792“/usr/include/stdio.h”34externintfgetpos(FILE*restrictstream,fpos_t*restrictpos);externintfsetpos(FILE*stream,constfpos_t__pos);#815“/usr/include/stdio.h”34#824“/usr/include/stdio.h”34externvoidclearerr(FILEstream)attribute((nothrow,leaf));externintfeof(FILE*stream)attribute((nothrow,leaf));externintferror(FILEstream)attribute((nothrow,leaf__));externvoidclearerr_unlocked(FILEstream)attribute((nothrow,leaf));externintfeof_unlocked(FILE*stream)attribute((nothrow,leaf));externintferror_unlocked(FILEstream)attribute((nothrow,leaf__));externvoidperror(constchars);#1“/usr/include/bits/sys_errlist.h”134#26“/usr/include/bits/sys_errlist.h”34externintsys_nerr;externconstcharconstsys_errlist[];#854“/usr/include/stdio.h”234externintfileno(FILEstream)attribute((nothrow,leaf));externintfileno_unlocked(FILE*stream)attribute((nothrow,leaf));#873“/usr/include/stdio.h”34externFILEpopen(constcharcommand,constchar__modes);externintpclose(FILEstream);externcharctermid(chars)attribute((nothrow,leaf));#913“/usr/include/stdio.h”34externvoidflockfile(FILEstream)attribute((nothrow,leaf__));externintftrylockfile(FILEstream)attribute((nothrow,leaf));externvoidfunlockfile(FILE*stream)attribute((nothrow,leaf));#943“/usr/include/stdio.h”34#2“HelloWorld.c”2intmain(void){printf(“HelloWorld\n”);return0;}

本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。