31 行
716 B
C
31 行
716 B
C
/*********************************************
|
|
* Description - Convert VNM files to C arrays
|
|
* Author - Vilyaem
|
|
* Date - May 03 2024
|
|
* *******************************************/
|
|
|
|
/*----------PREPROCESSOR----------*/
|
|
#include <stdio.h>
|
|
|
|
/*----------FUNCTIONS----------*/
|
|
|
|
/*********************************************
|
|
* Description - Main
|
|
* Author - Vilyaem
|
|
* Date - May 03 2024
|
|
* *******************************************/
|
|
int main(void){
|
|
int c;
|
|
puts("/* Generated by VNMCARR */\nuint8_t vnm[] = {");
|
|
while((c = fgetc(stdin)) != EOF){
|
|
if(c % 2 == 0){ /*Avoid the last indice having a comma*/
|
|
printf(",%d",c);
|
|
}
|
|
else{
|
|
printf("%d",c);
|
|
}
|
|
}
|
|
puts("\n};");
|
|
return 0;
|
|
}
|