wip wip wip

This commit is contained in:
tTh
2023-11-18 19:56:25 +01:00
parent 56941f1215
commit 2246a5d744
10 changed files with 58 additions and 65 deletions
+7 -1
View File
@@ -24,6 +24,9 @@ Image_save_color_Map(char *file, char *name, RGB_map *map)
int foo;
FILE *fp;
fprintf(stderr, ">>> %s ( '%s' '%s' %p )\n", __func__,
file, name, map);
if ( (fp=fopen(file, "w")) == NULL ) {
fprintf(stderr, "Save Color Map: err fopen\n");
return FILE_CREATE_ERR;
@@ -81,11 +84,14 @@ FILE *fp;
int nbre, r, g, b, foo, errcode;
char buffer[256];
fprintf(stderr, ">>> %s ( '%s' '%s' %p )\n", __func__,
file, name, where);
if ( name != NULL ) {
if (strlen(name)>IMG_OBJNAME_LEN) return STRING_TOO_LONG;
strcpy(where->name, name);
}
else strcpy(where->name, "no name");
else strcpy(where->name, "<noname>");
/*
* patch du 11 Décembre 2001: on utilise une fonction qui recherche le