#include #include #include #include #include #include "logo_types.h" #include "load_logo.h" /* People can put all kind of strange and wonderful ascii */ /* characters in a logo that would royally confuse printf */ int sanitize_print_string(char *string, FILE *fff) { int i; for(i=0;idescription); fprintf(ggg,"\tnew_logo=calloc(1,sizeof(struct logo_info));\n"); if (logo_number==0) { fprintf(ggg,"\n\tlogo_info_head=new_logo;\n\n"); } else { fprintf(ggg,"\n\tlogo_info_tail->next_logo=new_logo;\n\n"); } fprintf(ggg,"\tnew_logo->description=strdup(\"%s\");\n", logo_info_temp->description); fprintf(ggg,"\tnew_logo->name=strdup(\"%s\");\n",logo_info_temp->name); fprintf(ggg,"\tnew_logo->logo=strdup(\""); sanitize_print_string(logo_info_temp->logo,ggg); fprintf(ggg,"\");\n"); fprintf(ggg,"\tnew_logo->ysize=%d;\n",logo_info_temp->ysize); fprintf(ggg,"\tnew_logo->ascii_logo=strdup(\""); sanitize_print_string(logo_info_temp->ascii_logo,ggg); fprintf(ggg,"\");\n"); fprintf(ggg,"\tnew_logo->ascii_ysize=%d;\n", logo_info_temp->ascii_ysize); fprintf(ggg,"\tnew_logo->sysinfo_position=%d;\n", logo_info_temp->sysinfo_position); fprintf(ggg,"\tnew_logo->next_logo=NULL;\n"); fprintf(ggg,"\tlogo_info_tail=new_logo;\n"); logo_number++; printf("+ Added logo %s containing \"%s\"\n", temp_st,logo_info_temp->description); } } printf("\n"); return 0; }