From 64089dca388f5a9a8235a94b4372763875132219 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Wed, 2 Feb 2000 14:01:15 +0000 Subject: Passage en Zinc --- generic/MapInfo.c | 230 +++++++++++++++++++++++++++--------------------------- 1 file changed, 115 insertions(+), 115 deletions(-) (limited to 'generic/MapInfo.c') diff --git a/generic/MapInfo.c b/generic/MapInfo.c index be4c4ae..30d20cd 100644 --- a/generic/MapInfo.c +++ b/generic/MapInfo.c @@ -57,7 +57,7 @@ static const char compile_id[]="$Compile: " __FILE__ " " __DATE__ " " __TIME__ " *----------------------------------------------------------------------- */ typedef struct { - RadarPtr tag; + ZnPtr tag; MapInfoLineStyle style; int width; MapInfoPointStruct center; @@ -67,7 +67,7 @@ typedef struct { } MapInfoArcStruct, *MapInfoArc; typedef struct { - RadarPtr tag; + ZnPtr tag; MapInfoLineStyle style; int width; MapInfoPointStruct from; @@ -77,13 +77,13 @@ typedef struct { } MapInfoLineStruct, *MapInfoLine; typedef struct { - RadarPtr tag; + ZnPtr tag; MapInfoPointStruct at; char symbol[2]; } MapInfoSymbolStruct, *MapInfoSymbol; typedef struct { - RadarPtr tag; + ZnPtr tag; MapInfoTextStyle text_style; MapInfoLineStyle line_style; MapInfoPointStruct at; @@ -92,10 +92,10 @@ typedef struct { typedef struct { char *name; - RadarList lines; - RadarList symbols; - RadarList texts; - RadarList arcs; + ZnList lines; + ZnList symbols; + ZnList texts; + ZnList arcs; } MapInfoStruct, *MapInfo; @@ -148,7 +148,7 @@ ComputeLineMarks(MapInfoLine marked_line) } if (marked_line->num_marks) { - marked_line->marks = (MapInfoPoint) RadarMalloc(marked_line->num_marks * sizeof(MapInfoPointStruct)); + marked_line->marks = (MapInfoPoint) ZnMalloc(marked_line->num_marks * sizeof(MapInfoPointStruct)); } for (j = 0; j < marked_line->num_marks; j++) { @@ -163,12 +163,12 @@ MapInfoCreate(char *name) { MapInfo new_map; - new_map = (MapInfo) RadarMalloc(sizeof(MapInfoStruct)); + new_map = (MapInfo) ZnMalloc(sizeof(MapInfoStruct)); memset((char *) new_map, 0, sizeof(MapInfoStruct)); if (!name) { name = ""; } - new_map->name = (char *) RadarMalloc(strlen(name)+1); + new_map->name = (char *) ZnMalloc(strlen(name)+1); strcpy(new_map->name, name); return((MapInfoId) new_map); @@ -201,15 +201,15 @@ MapInfoDuplicate(MapInfoId map_info) new_map = (MapInfo) MapInfoCreate(cur_map->name); if (cur_map->lines) { - new_map->lines = RadarListDuplicate(cur_map->lines); + new_map->lines = ZnListDuplicate(cur_map->lines); - cur_lines = (MapInfoLine) RadarListArray(cur_map->lines); - new_lines = (MapInfoLine) RadarListArray(new_map->lines); - num_lines = RadarListSize(cur_map->lines); + cur_lines = (MapInfoLine) ZnListArray(cur_map->lines); + new_lines = (MapInfoLine) ZnListArray(new_map->lines); + num_lines = ZnListSize(cur_map->lines); for (i = 0; i < num_lines; i++) { if (new_lines[i].style == MapInfoLineMarked) { - new_lines[i].marks = (MapInfoPoint) RadarMalloc(new_lines[i].num_marks * + new_lines[i].marks = (MapInfoPoint) ZnMalloc(new_lines[i].num_marks * sizeof(MapInfoPointStruct)); memcpy((char *) new_lines[i].marks, (char *) cur_lines[i].marks, @@ -218,22 +218,22 @@ MapInfoDuplicate(MapInfoId map_info) } } if (cur_map->symbols) { - new_map->symbols = RadarListDuplicate(cur_map->symbols); + new_map->symbols = ZnListDuplicate(cur_map->symbols); } if (cur_map->texts) { - new_map->texts = RadarListDuplicate(cur_map->texts); + new_map->texts = ZnListDuplicate(cur_map->texts); - cur_texts = (MapInfoText) RadarListArray(cur_map->texts); - new_texts = (MapInfoText) RadarListArray(new_map->texts); - num_texts = RadarListSize(cur_map->texts); + cur_texts = (MapInfoText) ZnListArray(cur_map->texts); + new_texts = (MapInfoText) ZnListArray(new_map->texts); + num_texts = ZnListSize(cur_map->texts); for (i = 0; i < num_texts; i++) { - new_texts[i].text = (char *) RadarMalloc(strlen(cur_texts[i].text) + 1); + new_texts[i].text = (char *) ZnMalloc(strlen(cur_texts[i].text) + 1); strcpy(new_texts[i].text, cur_texts[i].text); } } if (cur_map->arcs) { - new_map->arcs = RadarListDuplicate(cur_map->arcs); + new_map->arcs = ZnListDuplicate(cur_map->arcs); } return((MapInfoId) new_map); @@ -250,39 +250,39 @@ MapInfoDelete(MapInfoId map_info) if (cur_map) { if (cur_map->texts) { - num_texts = RadarListSize(cur_map->texts); - cur_texts = (MapInfoText) RadarListArray(cur_map->texts); + num_texts = ZnListSize(cur_map->texts); + cur_texts = (MapInfoText) ZnListArray(cur_map->texts); for (i = 0; i < num_texts; i++) { - RadarFree((char *) cur_texts[i].text); + ZnFree((char *) cur_texts[i].text); } - RadarListFree(cur_map->texts); + ZnListFree(cur_map->texts); } if (cur_map->lines) { - num_lines = RadarListSize(cur_map->lines); - cur_lines = (MapInfoLine) RadarListArray(cur_map->lines); + num_lines = ZnListSize(cur_map->lines); + cur_lines = (MapInfoLine) ZnListArray(cur_map->lines); for (i = 0; i < num_lines; i++) { if (cur_lines[i].style == MapInfoLineMarked) { - RadarFree((char *) cur_lines[i].marks); + ZnFree((char *) cur_lines[i].marks); } } - RadarListFree(cur_map->lines); + ZnListFree(cur_map->lines); } if (cur_map->symbols) { - RadarListFree(cur_map->symbols); + ZnListFree(cur_map->symbols); } if (cur_map->arcs) { - RadarListFree(cur_map->arcs); + ZnListFree(cur_map->arcs); } - RadarFree(cur_map->name); - RadarFree(cur_map); + ZnFree(cur_map->name); + ZnFree(cur_map); } } @@ -293,16 +293,16 @@ MapInfoEmpty(MapInfoId map_info) if (cur_map) { if (cur_map->texts) { - RadarListEmpty(cur_map->texts); + ZnListEmpty(cur_map->texts); } if (cur_map->lines) { - RadarListEmpty(cur_map->lines); + ZnListEmpty(cur_map->lines); } if (cur_map->symbols) { - RadarListEmpty(cur_map->symbols); + ZnListEmpty(cur_map->symbols); } if (cur_map->arcs) { - RadarListEmpty(cur_map->arcs); + ZnListEmpty(cur_map->arcs); } } } @@ -311,7 +311,7 @@ MapInfoEmpty(MapInfoId map_info) void MapInfoAddLine(MapInfoId map_info, unsigned int index, - RadarPtr tag, + ZnPtr tag, MapInfoLineStyle line_style, int line_width, int x_from, @@ -324,7 +324,7 @@ MapInfoAddLine(MapInfoId map_info, if (cur_map) { if (!cur_map->lines) { - cur_map->lines = RadarListNew(16, sizeof(MapInfoLineStruct)); + cur_map->lines = ZnListNew(16, sizeof(MapInfoLineStruct)); } line_struct.style = line_style; @@ -344,7 +344,7 @@ MapInfoAddLine(MapInfoId map_info, ComputeLineMarks(&line_struct); } - RadarListAdd(cur_map->lines, &line_struct, index); + ZnListAdd(cur_map->lines, &line_struct, index); } } @@ -352,7 +352,7 @@ MapInfoAddLine(MapInfoId map_info, void MapInfoReplaceLine(MapInfoId map_info, unsigned int index, - RadarPtr tag, + ZnPtr tag, MapInfoLineStyle line_style, int line_width, int x_from, @@ -364,10 +364,10 @@ MapInfoReplaceLine(MapInfoId map_info, MapInfoLine line_ptr; if (cur_map && cur_map->lines) { - line_ptr = (MapInfoLine) RadarListAt(cur_map->lines, index); + line_ptr = (MapInfoLine) ZnListAt(cur_map->lines, index); if (line_ptr) { if (line_ptr->style == MapInfoLineMarked) { - RadarFree((char *) line_ptr->marks); + ZnFree((char *) line_ptr->marks); } line_ptr->style = line_style; @@ -399,13 +399,13 @@ MapInfoRemoveLine(MapInfoId map_info, MapInfoLine line_ptr; if (cur_map && cur_map->lines) { - line_ptr = (MapInfoLine) RadarListAt(cur_map->lines, index); + line_ptr = (MapInfoLine) ZnListAt(cur_map->lines, index); if (line_ptr) { if (line_ptr->style == MapInfoLineMarked) { - RadarFree((char *) line_ptr->marks); + ZnFree((char *) line_ptr->marks); } - RadarListDelete(cur_map->lines, index); + ZnListDelete(cur_map->lines, index); } } } @@ -414,7 +414,7 @@ MapInfoRemoveLine(MapInfoId map_info, void MapInfoGetLine(MapInfoId map_info, unsigned int index, - RadarPtr *tag, + ZnPtr *tag, MapInfoLineStyle *line_style, int *line_width, int *x_from, @@ -426,7 +426,7 @@ MapInfoGetLine(MapInfoId map_info, MapInfoLine line_ptr; if (cur_map && cur_map->lines) { - line_ptr = (MapInfoLine) RadarListAt(cur_map->lines, index); + line_ptr = (MapInfoLine) ZnListAt(cur_map->lines, index); if (line_ptr) { if (tag) { *tag = line_ptr->tag; @@ -469,7 +469,7 @@ MapInfoGetMarks(MapInfoId map_info, MapInfoLine line_ptr; if (cur_map && cur_map->lines) { - line_ptr = (MapInfoLine) RadarListAt(cur_map->lines, index); + line_ptr = (MapInfoLine) ZnListAt(cur_map->lines, index); if (line_ptr && line_ptr->style == MapInfoLineMarked) { if (marks) { *marks = line_ptr->marks; @@ -488,7 +488,7 @@ MapInfoNumLines(MapInfoId map_info) MapInfo cur_map = (MapInfo) map_info; if (cur_map && cur_map->lines) { - return RadarListSize(cur_map->lines); + return ZnListSize(cur_map->lines); } else { return 0; @@ -499,7 +499,7 @@ MapInfoNumLines(MapInfoId map_info) void MapInfoAddSymbol(MapInfoId map_info, unsigned int index, - RadarPtr tag, + ZnPtr tag, int x, int y, char symbol) @@ -509,7 +509,7 @@ MapInfoAddSymbol(MapInfoId map_info, if (cur_map) { if (!cur_map->symbols) { - cur_map->symbols = RadarListNew(16, sizeof(MapInfoSymbolStruct)); + cur_map->symbols = ZnListNew(16, sizeof(MapInfoSymbolStruct)); } symbol_struct.tag = tag; @@ -518,7 +518,7 @@ MapInfoAddSymbol(MapInfoId map_info, symbol_struct.symbol[0] = symbol; symbol_struct.symbol[1] = '\0'; - RadarListAdd(cur_map->symbols, &symbol_struct, index); + ZnListAdd(cur_map->symbols, &symbol_struct, index); } } @@ -526,7 +526,7 @@ MapInfoAddSymbol(MapInfoId map_info, void MapInfoReplaceSymbol(MapInfoId map_info, unsigned int index, - RadarPtr tag, + ZnPtr tag, int x, int y, char symbol) @@ -541,7 +541,7 @@ MapInfoReplaceSymbol(MapInfoId map_info, symbol_struct.symbol[0] = symbol; symbol_struct.symbol[1] = '\0'; - RadarListAtPut(cur_map->symbols, &symbol_struct, index); + ZnListAtPut(cur_map->symbols, &symbol_struct, index); } } @@ -553,7 +553,7 @@ MapInfoRemoveSymbol(MapInfoId map_info, MapInfo cur_map = (MapInfo) map_info; if (cur_map && cur_map->symbols) { - RadarListDelete(cur_map->symbols, index); + ZnListDelete(cur_map->symbols, index); } } @@ -561,7 +561,7 @@ MapInfoRemoveSymbol(MapInfoId map_info, void MapInfoGetSymbol(MapInfoId map_info, unsigned int index, - RadarPtr *tag, + ZnPtr *tag, int *x, int *y, char *symbol) @@ -570,7 +570,7 @@ MapInfoGetSymbol(MapInfoId map_info, MapInfoSymbol symbol_ptr; if (cur_map && cur_map->symbols) { - symbol_ptr = (MapInfoSymbol) RadarListAt(cur_map->symbols, index); + symbol_ptr = (MapInfoSymbol) ZnListAt(cur_map->symbols, index); if (symbol_ptr) { if (tag) { *tag = symbol_ptr->tag; @@ -595,7 +595,7 @@ MapInfoNumSymbols(MapInfoId map_info) MapInfo cur_map = (MapInfo) map_info; if (cur_map && cur_map->symbols) { - return RadarListSize(cur_map->symbols); + return ZnListSize(cur_map->symbols); } else { return 0; @@ -606,7 +606,7 @@ MapInfoNumSymbols(MapInfoId map_info) void MapInfoAddText(MapInfoId map_info, unsigned int index, - RadarPtr tag, + ZnPtr tag, MapInfoTextStyle text_style, MapInfoLineStyle line_style, int x, @@ -618,7 +618,7 @@ MapInfoAddText(MapInfoId map_info, if (cur_map) { if (!cur_map->texts) { - cur_map->texts = RadarListNew(16, sizeof(MapInfoTextStruct)); + cur_map->texts = ZnListNew(16, sizeof(MapInfoTextStruct)); } text_struct.tag = tag; @@ -626,10 +626,10 @@ MapInfoAddText(MapInfoId map_info, text_struct.line_style = NOT_MARKED_STYLE(line_style); text_struct.at.x = x; text_struct.at.y = y; - text_struct.text = (char *) RadarMalloc(strlen(text) + 1); + text_struct.text = (char *) ZnMalloc(strlen(text) + 1); strcpy(text_struct.text, text); - RadarListAdd(cur_map->texts, &text_struct, index); + ZnListAdd(cur_map->texts, &text_struct, index); } } @@ -637,7 +637,7 @@ MapInfoAddText(MapInfoId map_info, void MapInfoReplaceText(MapInfoId map_info, unsigned int index, - RadarPtr tag, + ZnPtr tag, MapInfoTextStyle text_style, MapInfoLineStyle line_style, int x, @@ -648,16 +648,16 @@ MapInfoReplaceText(MapInfoId map_info, MapInfoText text_ptr; if (cur_map && cur_map->texts) { - text_ptr = (MapInfoText) RadarListAt(cur_map->texts, index); + text_ptr = (MapInfoText) ZnListAt(cur_map->texts, index); if (text_ptr) { - RadarFree(text_ptr->text); + ZnFree(text_ptr->text); text_ptr->tag = tag; text_ptr->text_style = text_style; text_ptr->line_style = NOT_MARKED_STYLE(line_style); text_ptr->at.x = x; text_ptr->at.y = y; - text_ptr->text = (char *) RadarMalloc(strlen(text) + 1); + text_ptr->text = (char *) ZnMalloc(strlen(text) + 1); strcpy(text_ptr->text, text); } } @@ -672,11 +672,11 @@ MapInfoRemoveText(MapInfoId map_info, MapInfoText text_ptr; if (cur_map && cur_map->texts) { - text_ptr = (MapInfoText) RadarListAt(cur_map->texts, index); + text_ptr = (MapInfoText) ZnListAt(cur_map->texts, index); if (text_ptr) { - RadarFree(text_ptr->text); + ZnFree(text_ptr->text); - RadarListDelete(cur_map->texts, index); + ZnListDelete(cur_map->texts, index); } } } @@ -685,7 +685,7 @@ MapInfoRemoveText(MapInfoId map_info, void MapInfoGetText(MapInfoId map_info, unsigned int index, - RadarPtr *tag, + ZnPtr *tag, MapInfoTextStyle *text_style, MapInfoLineStyle *line_style, int *x, @@ -696,7 +696,7 @@ MapInfoGetText(MapInfoId map_info, MapInfoText text_ptr; if (cur_map && cur_map->texts) { - text_ptr = (MapInfoText) RadarListAt(cur_map->texts, index); + text_ptr = (MapInfoText) ZnListAt(cur_map->texts, index); if (text_ptr) { if (tag) { *tag = text_ptr->tag; @@ -727,7 +727,7 @@ MapInfoNumTexts(MapInfoId map_info) MapInfo cur_map = (MapInfo) map_info; if (cur_map && cur_map->texts) { - return RadarListSize(cur_map->texts); + return ZnListSize(cur_map->texts); } else { return 0; @@ -738,7 +738,7 @@ MapInfoNumTexts(MapInfoId map_info) void MapInfoAddArc(MapInfoId map_info, unsigned int index, - RadarPtr tag, + ZnPtr tag, MapInfoLineStyle line_style, int line_width, int center_x, @@ -752,7 +752,7 @@ MapInfoAddArc(MapInfoId map_info, if (cur_map) { if (!cur_map->arcs) { - cur_map->arcs = RadarListNew(16, sizeof(MapInfoArcStruct)); + cur_map->arcs = ZnListNew(16, sizeof(MapInfoArcStruct)); } arc_struct.style = NOT_MARKED_STYLE(line_style); @@ -769,7 +769,7 @@ MapInfoAddArc(MapInfoId map_info, arc_struct.start_angle = start_angle; arc_struct.extend = extend; - RadarListAdd(cur_map->arcs, &arc_struct, index); + ZnListAdd(cur_map->arcs, &arc_struct, index); } } @@ -777,7 +777,7 @@ MapInfoAddArc(MapInfoId map_info, void MapInfoReplaceArc(MapInfoId map_info, unsigned int index, - RadarPtr tag, + ZnPtr tag, MapInfoLineStyle line_style, int line_width, int center_x, @@ -790,7 +790,7 @@ MapInfoReplaceArc(MapInfoId map_info, MapInfoArc arc_ptr; if (cur_map && cur_map->arcs) { - arc_ptr = (MapInfoArc) RadarListAt(cur_map->arcs, index); + arc_ptr = (MapInfoArc) ZnListAt(cur_map->arcs, index); if (arc_ptr) { arc_ptr->style = NOT_MARKED_STYLE(line_style); if (line_width == 1) { @@ -818,9 +818,9 @@ MapInfoRemoveArc(MapInfoId map_info, MapInfoArc arc_ptr; if (cur_map && cur_map->arcs) { - arc_ptr = (MapInfoArc) RadarListAt(cur_map->arcs, index); + arc_ptr = (MapInfoArc) ZnListAt(cur_map->arcs, index); if (arc_ptr) { - RadarListDelete(cur_map->arcs, index); + ZnListDelete(cur_map->arcs, index); } } } @@ -829,7 +829,7 @@ MapInfoRemoveArc(MapInfoId map_info, void MapInfoGetArc(MapInfoId map_info, unsigned int index, - RadarPtr *tag, + ZnPtr *tag, MapInfoLineStyle *line_style, int *line_width, int *center_x, @@ -842,7 +842,7 @@ MapInfoGetArc(MapInfoId map_info, MapInfoArc arc_ptr; if (cur_map && cur_map->arcs) { - arc_ptr = (MapInfoArc) RadarListAt(cur_map->arcs, index); + arc_ptr = (MapInfoArc) ZnListAt(cur_map->arcs, index); if (arc_ptr) { if (tag) { *tag = arc_ptr->tag; @@ -883,7 +883,7 @@ MapInfoNumArcs(MapInfoId map_info) MapInfo cur_map = (MapInfo) map_info; if (cur_map && cur_map->arcs) { - return RadarListSize(cur_map->arcs); + return ZnListSize(cur_map->arcs); } else { return 0; @@ -902,8 +902,8 @@ MapInfoScale(MapInfoId map_info, MapInfoArc arc_ptr; if (mp && mp->lines) { - num = RadarListSize(mp->lines); - line_ptr = (MapInfoLine) RadarListArray(mp->lines); + num = ZnListSize(mp->lines); + line_ptr = (MapInfoLine) ZnListArray(mp->lines); for (i = 0; i < num; i++, line_ptr++) { line_ptr->from.x *= factor; line_ptr->from.y *= factor; @@ -912,24 +912,24 @@ MapInfoScale(MapInfoId map_info, } } if (mp && mp->symbols) { - num = RadarListSize(mp->symbols); - sym_ptr = (MapInfoSymbol) RadarListArray(mp->symbols); + num = ZnListSize(mp->symbols); + sym_ptr = (MapInfoSymbol) ZnListArray(mp->symbols); for (i = 0; i < num; i++, sym_ptr++) { sym_ptr->at.x *= factor; sym_ptr->at.y *= factor; } } if (mp && mp->texts) { - num = RadarListSize(mp->texts); - text_ptr = (MapInfoText) RadarListArray(mp->texts); + num = ZnListSize(mp->texts); + text_ptr = (MapInfoText) ZnListArray(mp->texts); for (i = 0; i < num; i++, text_ptr++) { text_ptr->at.x *= factor; text_ptr->at.y *= factor; } } if (mp && mp->arcs) { - num = RadarListSize(mp->arcs); - arc_ptr = (MapInfoArc) RadarListArray(mp->arcs); + num = ZnListSize(mp->arcs); + arc_ptr = (MapInfoArc) ZnListArray(mp->arcs); for (i = 0; i < num; i++, arc_ptr++) { arc_ptr->center.x *= factor; arc_ptr->center.y *= factor; @@ -951,8 +951,8 @@ MapInfoTranslate(MapInfoId map_info, MapInfoArc arc_ptr; if (mp && mp->lines) { - num = RadarListSize(mp->lines); - line_ptr = (MapInfoLine) RadarListArray(mp->lines); + num = ZnListSize(mp->lines); + line_ptr = (MapInfoLine) ZnListArray(mp->lines); for (i = 0; i < num; i++, line_ptr++) { line_ptr->from.x += x; line_ptr->from.y += y; @@ -961,24 +961,24 @@ MapInfoTranslate(MapInfoId map_info, } } if (mp && mp->symbols) { - num = RadarListSize(mp->symbols); - sym_ptr = (MapInfoSymbol) RadarListArray(mp->symbols); + num = ZnListSize(mp->symbols); + sym_ptr = (MapInfoSymbol) ZnListArray(mp->symbols); for (i = 0; i < num; i++, sym_ptr++) { sym_ptr->at.x += x; sym_ptr->at.y += y; } } if (mp && mp->texts) { - num = RadarListSize(mp->texts); - text_ptr = (MapInfoText) RadarListArray(mp->texts); + num = ZnListSize(mp->texts); + text_ptr = (MapInfoText) ZnListArray(mp->texts); for (i = 0; i < num; i++, text_ptr++) { text_ptr->at.x += x; text_ptr->at.y += y; } } if (mp && mp->arcs) { - num = RadarListSize(mp->arcs); - arc_ptr = (MapInfoArc) RadarListArray(mp->arcs); + num = ZnListSize(mp->arcs); + arc_ptr = (MapInfoArc) ZnListArray(mp->arcs); for (i = 0; i < num; i++, arc_ptr++) { arc_ptr->center.x += x; arc_ptr->center.y += y; @@ -1052,13 +1052,13 @@ ReorderVidomap(VideoMap *vm) static void FillMap(MapInfoId map, VideoMap *vm) { unsigned int i; - RadarBool has_start_pos = False; + ZnBool has_start_pos = False; int x_cur=0, y_cur=0; char ch; int text_x=0, text_y=0; char text[TEXT_SIZE]; - RadarBool in_text = False; - RadarBool in_mod_text = False; + ZnBool in_text = False; + ZnBool in_mod_text = False; unsigned int text_size=0; for (i = 0; i < vm->num_elements; i++) { @@ -1091,7 +1091,7 @@ static void FillMap(MapInfoId map, VideoMap *vm) case 't': case 'T': if (!has_start_pos) { - RadarWarning("Bloc carte incorrect, il est elimine"); + ZnWarning("Bloc carte incorrect, il est elimine"); return; } @@ -1122,7 +1122,7 @@ static void FillMap(MapInfoId map, VideoMap *vm) case 'v': case 'V': if (!has_start_pos) { - RadarWarning("Bloc carte incorrect, il est elimine"); + ZnWarning("Bloc carte incorrect, il est elimine"); return; } @@ -1195,7 +1195,7 @@ MapInfoGetVideomap(MapInfoId map, /* Open the specified map file. */ file = fopen(filename, "r"); if (file == NULL) { - return RADAR_ERROR; + return ZN_ERROR; } /* Load the map */ @@ -1227,11 +1227,11 @@ MapInfoGetVideomap(MapInfoId map, while ((cur_id == ntohi(current_vm.id)) && !feof(file)); fclose(file); - return RADAR_OK; + return ZN_OK; error: fclose(file); - return RADAR_ERROR; + return ZN_ERROR; } /* @@ -1245,13 +1245,13 @@ error: *----------------------------------------------------------------------- */ -RadarList +ZnList MapInfoVideomapIds(char *filename) { FILE *file; VideoMap current_vm; int cur_id; - RadarList ids; + ZnList ids; /* Open the specified map file. */ file = fopen(filename, "r"); @@ -1263,9 +1263,9 @@ MapInfoVideomapIds(char *filename) goto error; } cur_id = ntohi(current_vm.id); - ids = RadarListNew(16, sizeof(int)); + ids = ZnListNew(16, sizeof(int)); /*printf("id %d\n", cur_id);*/ - RadarListAdd(ids, &cur_id, RadarListTail); + ZnListAdd(ids, &cur_id, ZnListTail); do { if (fread(¤t_vm, sizeof(VideoMap), 1, file) < 0) { @@ -1274,7 +1274,7 @@ MapInfoVideomapIds(char *filename) if (cur_id != ntohi(current_vm.id)) { cur_id = ntohi(current_vm.id); /*printf("id %d\n", cur_id);*/ - RadarListAdd(ids, &cur_id, RadarListTail); + ZnListAdd(ids, &cur_id, ZnListTail); } } while (!feof(file)); @@ -1284,6 +1284,6 @@ MapInfoVideomapIds(char *filename) error: fclose(file); - RadarListFree(ids); + ZnListFree(ids); return NULL; } -- cgit v1.1