BEGIN { indicateur = 0; } /^\/\/ BEGIN C PROTOTYPES/ { indicateur = 1; } /^\/\/ END C PROTOTYPES/ { indicateur = 0; } /^([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]+[ ]+)+/ { if (indicateur == 1) { if ($1 == "unsigned" || $1 == "signed") LIGNE = $3; else LIGNE = $2; LIGNE = substr(LIGNE, 1, index(LIGNE, "(") - 1); while(substr(LIGNE, 1, 1) == "*") LIGNE = substr(LIGNE, 2, length(LIGNE) - 1); printf("#define %s librpl_%s\n", LIGNE, LIGNE); } }