IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

 C Discussion :

préprocesseur pour nettoyer code


Sujet :

C

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre très actif Avatar de J4e8a16n
    Profil pro
    Inscrit en
    Mars 2009
    Messages
    271
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2009
    Messages : 271
    Par défaut préprocesseur pour nettoyer code
    Bonjour à tous,

    J'ai trouvé ceci:
    http://www.cs.tut.fi/~jkorpela/html/cpre.html

    Je l'ai utilisé pour enlever les commentaires d'un code à soumettre mais gcc me met des dizaines de lignes de t plus:
    gcc -E -x c -P -o out.txt ttt.c

    [CODE]typedef unsigned int size_t;
    typedef short unsigned int wchar_t;
    void* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) memchr (const void*, int, size_t) __attribute__ ((__pure__));
    etc.
    CODE]

    Y a-t-il de la documentation simple là-dessus?

  2. #2
    Membre Expert
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Octobre 2008
    Messages
    1 515
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Octobre 2008
    Messages : 1 515
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    man gcc
    [...]
           -E  Stop after the preprocessing stage; do not run the compiler proper.
               The output is in the form of preprocessed source code, which is
               sent to the standard output.
    [...]

  3. #3
    Membre très actif Avatar de J4e8a16n
    Profil pro
    Inscrit en
    Mars 2009
    Messages
    271
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2009
    Messages : 271
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    --target-help            Display target specific command line options
    gcc --E-help
    gcc: no input files

    ne fonctionne pas.

  4. #4
    Membre Expert Avatar de plxpy
    Homme Profil pro
    Ingénieur géographe
    Inscrit en
    Janvier 2009
    Messages
    792
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 60
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Ingénieur géographe
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Janvier 2009
    Messages : 792
    Par défaut
    Comme le dit le message de Matafan, l'option -E de gcc n'effectue que la phase de "preprocessing" (travail du préprocesseur). Sur la sortie standard, tu obtiendras ce qui est réellement en entrée du compilateur. Par contre, l'option -E ne s'utilise pas avec l'option -o qui permet de spécifier le nom de l'exécutable en sortie.

    Après passage dans le préprocesseur, tes commentaires disparaitront mais les "lignes en plus" que tu vois ne sont que l'exploitation (l' "expansion") de tous les #include qui se trouvent dans ton source, des macros, etc...

    Fais l'expérience sur le fichier "rien.c" suivant :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
    #include <stdio.h>
    int main(int argc,char *argv[])
    {
       exit(0);
    }
    en tapant "gcc -E rien.c"

    et tu obtiendras, sur la sortie standard, un tas de lignes, essentiellement le contenu de stdio.h (résultat sous Ubuntu):

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    665
    666
    667
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    679
    680
    681
    682
    683
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    695
    696
    697
    698
    699
    700
    701
    702
    703
    704
    705
    706
    707
    708
    709
    710
    711
    712
    713
    714
    715
    716
    717
    718
    719
    720
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    732
    733
    734
    735
    736
    737
    738
    739
    740
    741
    742
    743
    744
    745
    746
    747
    748
    749
    750
    751
    752
    753
     
    # 1 "rien.c"
    # 1 "<interne>"
    # 1 "<command-line>"
    # 1 "rien.c"
    # 1 "/usr/include/stdio.h" 1 3 4
    # 28 "/usr/include/stdio.h" 3 4
    # 1 "/usr/include/features.h" 1 3 4
    # 330 "/usr/include/features.h" 3 4
    # 1 "/usr/include/sys/cdefs.h" 1 3 4
    # 348 "/usr/include/sys/cdefs.h" 3 4
    # 1 "/usr/include/bits/wordsize.h" 1 3 4
    # 349 "/usr/include/sys/cdefs.h" 2 3 4
    # 331 "/usr/include/features.h" 2 3 4
    # 354 "/usr/include/features.h" 3 4
    # 1 "/usr/include/gnu/stubs.h" 1 3 4
     
     
     
    # 1 "/usr/include/bits/wordsize.h" 1 3 4
    # 5 "/usr/include/gnu/stubs.h" 2 3 4
     
     
    # 1 "/usr/include/gnu/stubs-32.h" 1 3 4
    # 8 "/usr/include/gnu/stubs.h" 2 3 4
    # 355 "/usr/include/features.h" 2 3 4
    # 29 "/usr/include/stdio.h" 2 3 4
     
     
     
     
     
    # 1 "/usr/lib/gcc/i486-linux-gnu/4.3.2/include/stddef.h" 1 3 4
    # 214 "/usr/lib/gcc/i486-linux-gnu/4.3.2/include/stddef.h" 3 4
    typedef unsigned int size_t;
    # 35 "/usr/include/stdio.h" 2 3 4
     
    # 1 "/usr/include/bits/types.h" 1 3 4
    # 28 "/usr/include/bits/types.h" 3 4
    # 1 "/usr/include/bits/wordsize.h" 1 3 4
    # 29 "/usr/include/bits/types.h" 2 3 4
     
     
    typedef unsigned char __u_char;
    typedef unsigned short int __u_short;
    typedef unsigned int __u_int;
    typedef unsigned long int __u_long;
     
     
    typedef signed char __int8_t;
    typedef unsigned char __uint8_t;
    typedef signed short int __int16_t;
    typedef unsigned short int __uint16_t;
    typedef signed int __int32_t;
    typedef unsigned int __uint32_t;
     
     
     
     
    __extension__ typedef signed long long int __int64_t;
    __extension__ typedef unsigned long long int __uint64_t;
     
     
     
     
     
     
     
    __extension__ typedef long long int __quad_t;
    __extension__ typedef unsigned long long int __u_quad_t;
    # 131 "/usr/include/bits/types.h" 3 4
    # 1 "/usr/include/bits/typesizes.h" 1 3 4
    # 132 "/usr/include/bits/types.h" 2 3 4
     
     
    __extension__ typedef __u_quad_t __dev_t;
    __extension__ typedef unsigned int __uid_t;
    __extension__ typedef unsigned int __gid_t;
    __extension__ typedef unsigned long int __ino_t;
    __extension__ typedef __u_quad_t __ino64_t;
    __extension__ typedef unsigned int __mode_t;
    __extension__ typedef unsigned int __nlink_t;
    __extension__ typedef long int __off_t;
    __extension__ typedef __quad_t __off64_t;
    __extension__ typedef int __pid_t;
    __extension__ typedef struct { int __val[2]; } __fsid_t;
    __extension__ typedef long int __clock_t;
    __extension__ typedef unsigned long int __rlim_t;
    __extension__ typedef __u_quad_t __rlim64_t;
    __extension__ typedef unsigned int __id_t;
    __extension__ typedef long int __time_t;
    __extension__ typedef unsigned int __useconds_t;
    __extension__ typedef long int __suseconds_t;
     
    __extension__ typedef int __daddr_t;
    __extension__ typedef long int __swblk_t;
    __extension__ typedef int __key_t;
     
     
    __extension__ typedef int __clockid_t;
     
     
    __extension__ typedef void * __timer_t;
     
     
    __extension__ typedef long int __blksize_t;
     
     
     
     
    __extension__ typedef long int __blkcnt_t;
    __extension__ typedef __quad_t __blkcnt64_t;
     
     
    __extension__ typedef unsigned long int __fsblkcnt_t;
    __extension__ typedef __u_quad_t __fsblkcnt64_t;
     
     
    __extension__ typedef unsigned long int __fsfilcnt_t;
    __extension__ typedef __u_quad_t __fsfilcnt64_t;
     
    __extension__ typedef int __ssize_t;
     
     
     
    typedef __off64_t __loff_t;
    typedef __quad_t *__qaddr_t;
    typedef char *__caddr_t;
     
     
    __extension__ typedef int __intptr_t;
     
     
    __extension__ typedef unsigned int __socklen_t;
    # 37 "/usr/include/stdio.h" 2 3 4
    # 45 "/usr/include/stdio.h" 3 4
    struct _IO_FILE;
     
     
     
    typedef struct _IO_FILE FILE;
     
     
     
     
     
    # 65 "/usr/include/stdio.h" 3 4
    typedef struct _IO_FILE __FILE;
    # 75 "/usr/include/stdio.h" 3 4
    # 1 "/usr/include/libio.h" 1 3 4
    # 32 "/usr/include/libio.h" 3 4
    # 1 "/usr/include/_G_config.h" 1 3 4
    # 15 "/usr/include/_G_config.h" 3 4
    # 1 "/usr/lib/gcc/i486-linux-gnu/4.3.2/include/stddef.h" 1 3 4
    # 16 "/usr/include/_G_config.h" 2 3 4
     
     
     
     
    # 1 "/usr/include/wchar.h" 1 3 4
    # 78 "/usr/include/wchar.h" 3 4
    typedef struct
    {
      int __count;
      union
      {
     
        unsigned int __wch;
     
     
     
        char __wchb[4];
      } __value;
    } __mbstate_t;
    # 21 "/usr/include/_G_config.h" 2 3 4
     
    typedef struct
    {
      __off_t __pos;
      __mbstate_t __state;
    } _G_fpos_t;
    typedef struct
    {
      __off64_t __pos;
      __mbstate_t __state;
    } _G_fpos64_t;
    # 53 "/usr/include/_G_config.h" 3 4
    typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
    typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
    typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
    typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
    # 33 "/usr/include/libio.h" 2 3 4
    # 53 "/usr/include/libio.h" 3 4
    # 1 "/usr/lib/gcc/i486-linux-gnu/4.3.2/include/stdarg.h" 1 3 4
    # 43 "/usr/lib/gcc/i486-linux-gnu/4.3.2/include/stdarg.h" 3 4
    typedef __builtin_va_list __gnuc_va_list;
    # 54 "/usr/include/libio.h" 2 3 4
    # 170 "/usr/include/libio.h" 3 4
    struct _IO_jump_t; struct _IO_FILE;
    # 180 "/usr/include/libio.h" 3 4
    typedef void _IO_lock_t;
     
     
     
     
     
    struct _IO_marker {
      struct _IO_marker *_next;
      struct _IO_FILE *_sbuf;
     
     
     
      int _pos;
    # 203 "/usr/include/libio.h" 3 4
    };
     
     
    enum __codecvt_result
    {
      __codecvt_ok,
      __codecvt_partial,
      __codecvt_error,
      __codecvt_noconv
    };
    # 271 "/usr/include/libio.h" 3 4
    struct _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;
     
     
     
      unsigned short _cur_column;
      signed char _vtable_offset;
      char _shortbuf[1];
     
     
     
      _IO_lock_t *_lock;
    # 319 "/usr/include/libio.h" 3 4
      __off64_t _offset;
    # 328 "/usr/include/libio.h" 3 4
      void *__pad1;
      void *__pad2;
      void *__pad3;
      void *__pad4;
      size_t __pad5;
     
      int _mode;
     
      char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
     
    };
     
     
    typedef struct _IO_FILE _IO_FILE;
     
     
    struct _IO_FILE_plus;
     
    extern struct _IO_FILE_plus _IO_2_1_stdin_;
    extern struct _IO_FILE_plus _IO_2_1_stdout_;
    extern struct _IO_FILE_plus _IO_2_1_stderr_;
    # 364 "/usr/include/libio.h" 3 4
    typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
     
     
     
     
     
     
     
    typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
         size_t __n);
     
     
     
     
     
     
     
    typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
     
     
    typedef int __io_close_fn (void *__cookie);
    # 416 "/usr/include/libio.h" 3 4
    extern int __underflow (_IO_FILE *);
    extern int __uflow (_IO_FILE *);
    extern int __overflow (_IO_FILE *, int);
    # 458 "/usr/include/libio.h" 3 4
    extern int _IO_getc (_IO_FILE *__fp);
    extern int _IO_putc (int __c, _IO_FILE *__fp);
    extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__));
    extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__));
     
    extern int _IO_peekc_locked (_IO_FILE *__fp);
     
     
     
     
     
    extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__));
    extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__));
    extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__));
    # 488 "/usr/include/libio.h" 3 4
    extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
       __gnuc_va_list, int *__restrict);
    extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
        __gnuc_va_list);
    extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
    extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);
     
    extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
    extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);
     
    extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__));
    # 76 "/usr/include/stdio.h" 2 3 4
    # 89 "/usr/include/stdio.h" 3 4
     
     
    typedef _G_fpos_t fpos_t;
     
     
     
     
    # 141 "/usr/include/stdio.h" 3 4
    # 1 "/usr/include/bits/stdio_lim.h" 1 3 4
    # 142 "/usr/include/stdio.h" 2 3 4
     
     
     
    extern struct _IO_FILE *stdin;
    extern struct _IO_FILE *stdout;
    extern struct _IO_FILE *stderr;
     
     
     
     
     
     
     
    extern int remove (__const char *__filename) __attribute__ ((__nothrow__));
     
    extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__));
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    extern FILE *tmpfile (void) ;
    # 186 "/usr/include/stdio.h" 3 4
    extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)) ;
     
     
     
     
     
    extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)) ;
    # 204 "/usr/include/stdio.h" 3 4
    extern char *tempnam (__const char *__dir, __const char *__pfx)
         __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;
     
     
     
     
     
     
     
     
    extern int fclose (FILE *__stream);
     
     
     
     
    extern int fflush (FILE *__stream);
     
    # 229 "/usr/include/stdio.h" 3 4
    extern int fflush_unlocked (FILE *__stream);
    # 243 "/usr/include/stdio.h" 3 4
     
     
     
     
     
     
    extern FILE *fopen (__const char *__restrict __filename,
          __const char *__restrict __modes) ;
     
     
     
     
    extern FILE *freopen (__const char *__restrict __filename,
            __const char *__restrict __modes,
            FILE *__restrict __stream) ;
    # 272 "/usr/include/stdio.h" 3 4
     
    # 283 "/usr/include/stdio.h" 3 4
    extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__)) ;
    # 304 "/usr/include/stdio.h" 3 4
     
     
     
    extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__));
     
     
     
    extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
          int __modes, size_t __n) __attribute__ ((__nothrow__));
     
     
     
     
     
    extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
             size_t __size) __attribute__ ((__nothrow__));
     
     
    extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__));
     
     
     
     
     
     
     
     
    extern int fprintf (FILE *__restrict __stream,
          __const char *__restrict __format, ...);
     
     
     
     
    extern int printf (__const char *__restrict __format, ...);
     
    extern int sprintf (char *__restrict __s,
          __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
     
     
     
     
     
    extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
           __gnuc_va_list __arg);
     
     
     
     
    extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
     
    extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
           __gnuc_va_list __arg) __attribute__ ((__nothrow__));
     
     
     
     
     
    extern int snprintf (char *__restrict __s, size_t __maxlen,
           __const char *__restrict __format, ...)
         __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
     
    extern int vsnprintf (char *__restrict __s, size_t __maxlen,
            __const char *__restrict __format, __gnuc_va_list __arg)
         __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
     
    # 398 "/usr/include/stdio.h" 3 4
     
     
     
     
     
    extern int fscanf (FILE *__restrict __stream,
         __const char *__restrict __format, ...) ;
     
     
     
     
    extern int scanf (__const char *__restrict __format, ...) ;
     
    extern int sscanf (__const char *__restrict __s,
         __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
    # 441 "/usr/include/stdio.h" 3 4
     
    # 504 "/usr/include/stdio.h" 3 4
     
     
     
     
     
    extern int fgetc (FILE *__stream);
    extern int getc (FILE *__stream);
     
     
     
     
     
    extern int getchar (void);
     
    # 528 "/usr/include/stdio.h" 3 4
    extern int getc_unlocked (FILE *__stream);
    extern int getchar_unlocked (void);
    # 539 "/usr/include/stdio.h" 3 4
    extern int fgetc_unlocked (FILE *__stream);
     
     
     
     
     
     
     
     
     
     
     
    extern int fputc (int __c, FILE *__stream);
    extern int putc (int __c, FILE *__stream);
     
     
     
     
     
    extern int putchar (int __c);
     
    # 572 "/usr/include/stdio.h" 3 4
    extern int fputc_unlocked (int __c, FILE *__stream);
     
     
     
     
     
     
     
    extern int putc_unlocked (int __c, FILE *__stream);
    extern int putchar_unlocked (int __c);
     
     
     
     
     
     
    extern int getw (FILE *__stream);
     
     
    extern int putw (int __w, FILE *__stream);
     
     
     
     
     
     
     
     
    extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
         ;
     
     
     
     
     
     
    extern char *gets (char *__s) ;
     
    # 653 "/usr/include/stdio.h" 3 4
     
     
     
     
     
    extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
     
     
     
     
     
    extern int puts (__const char *__s);
     
     
     
     
     
     
    extern int ungetc (int __c, FILE *__stream);
     
     
     
     
     
     
    extern size_t fread (void *__restrict __ptr, size_t __size,
           size_t __n, FILE *__restrict __stream) ;
     
     
     
     
    extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
            size_t __n, FILE *__restrict __s) ;
     
    # 706 "/usr/include/stdio.h" 3 4
    extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
             size_t __n, FILE *__restrict __stream) ;
    extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
              size_t __n, FILE *__restrict __stream) ;
     
     
     
     
     
     
     
     
    extern int fseek (FILE *__stream, long int __off, int __whence);
     
     
     
     
    extern long int ftell (FILE *__stream) ;
     
     
     
     
    extern void rewind (FILE *__stream);
     
    # 742 "/usr/include/stdio.h" 3 4
    extern int fseeko (FILE *__stream, __off_t __off, int __whence);
     
     
     
     
    extern __off_t ftello (FILE *__stream) ;
    # 761 "/usr/include/stdio.h" 3 4
     
     
     
     
     
     
    extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
     
     
     
     
    extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
    # 784 "/usr/include/stdio.h" 3 4
     
    # 793 "/usr/include/stdio.h" 3 4
     
     
    extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__));
     
    extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) ;
     
    extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) ;
     
     
     
     
    extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
    extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
    extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
     
     
     
     
     
     
     
     
    extern void perror (__const char *__s);
     
     
     
     
     
     
    # 1 "/usr/include/bits/sys_errlist.h" 1 3 4
    # 27 "/usr/include/bits/sys_errlist.h" 3 4
    extern int sys_nerr;
    extern __const char *__const sys_errlist[];
    # 823 "/usr/include/stdio.h" 2 3 4
     
     
     
     
    extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) ;
     
     
     
     
    extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
    # 842 "/usr/include/stdio.h" 3 4
    extern FILE *popen (__const char *__command, __const char *__modes) ;
     
     
     
     
     
    extern int pclose (FILE *__stream);
     
     
     
     
     
    extern char *ctermid (char *__s) __attribute__ ((__nothrow__));
    # 882 "/usr/include/stdio.h" 3 4
    extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__));
     
     
     
    extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) ;
     
     
    extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__));
    # 912 "/usr/include/stdio.h" 3 4
     
    # 2 "rien.c" 2
    int main(int argc,char *argv[])
    {
       exit(0);
    }
    Si dans ton code, tu utilises des include qui ne sont pas situés dans le répertoire standard (/usr/include), il faut utiliser l'option -I de gcc, comme si tu compilais réellement ton source pour en faire un exécutable.

    Et, pour en revenir à ton premier soucis, celui d'enlever les commentaires, l'utilisation du préprocesseur n'est pas la solution !

  5. #5
    Membre très actif Avatar de J4e8a16n
    Profil pro
    Inscrit en
    Mars 2009
    Messages
    271
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2009
    Messages : 271
    Par défaut
    Merci à vous deux,

    Comme je n'ai pas envie de chercher, je suis en train de me créer ma ptit appplication en ce sens.



    JPD

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Outils ou plugin NetBeans pour nettoyer du code
    Par alaninho dans le forum NetBeans
    Réponses: 1
    Dernier message: 16/06/2014, 12h34
  2. Composant pour les codes à barres
    Par Bourak dans le forum Composants VCL
    Réponses: 5
    Dernier message: 11/11/2005, 17h45
  3. pb eval pour le code php dans une feuille xslt
    Par nipepsi dans le forum XSL/XSLT/XPATH
    Réponses: 8
    Dernier message: 10/09/2004, 11h23
  4. un batch DOS pour "nettoyer des fichiers" ?
    Par RoroMinator dans le forum Scripts/Batch
    Réponses: 9
    Dernier message: 12/02/2004, 16h24

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo