diff options
Diffstat (limited to 'generic/Attrs.c')
-rw-r--r-- | generic/Attrs.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/generic/Attrs.c b/generic/Attrs.c index 2bc3a81..a7238cd 100644 --- a/generic/Attrs.c +++ b/generic/Attrs.c @@ -49,7 +49,7 @@ static const char compile_id[]="$Compile: " __FILE__ " " __DATE__ " " __TIME__ " ****************************************************************** */ static Tcl_HashTable format_cache; -static RadarBool format_inited = False; +static ZnBool format_inited = False; #if 0 static char @@ -159,13 +159,13 @@ LabelFormatCreate(Tcl_Interp *interp, char *format_str, int num_fields) { - RadarList fields; + ZnList fields; Tcl_HashEntry *entry; FieldFormatStruct field_struct; FieldFormat field_array; LabelFormat format; int width, height; - RadarDim c_width=0.0, c_height=0.0; + ZnDim c_width=0.0, c_height=0.0; int index, num_tok, num_ffs, new; int field_index=0; char *ptr = format_str, *next_ptr; @@ -189,7 +189,7 @@ LabelFormatCreate(Tcl_Interp *interp, } } - fields = RadarListNew(1, sizeof(FieldFormatStruct)); + fields = ZnListNew(1, sizeof(FieldFormatStruct)); /* * Try to see if it starts with a number or a leader spec. @@ -201,17 +201,17 @@ LabelFormatCreate(Tcl_Interp *interp, goto lf_end_parse; } if ((*ptr != 'x') && (*ptr != 'f') && (*ptr != 'i') && (*ptr != 'a')) { - c_width = (RadarDim) strtod(ptr, &next_ptr); + c_width = (ZnDim) strtod(ptr, &next_ptr); if ((ptr == next_ptr) || (*next_ptr != 'x')) { lf_error_syn: Tcl_AppendResult(interp, "invalid label format specification \"", ptr, "\"", NULL); lf_error: - RadarListFree(fields); + ZnListFree(fields); return NULL; } ptr = next_ptr+1; - c_height = (RadarDim) strtod(ptr, &next_ptr); + c_height = (ZnDim) strtod(ptr, &next_ptr); if (ptr == next_ptr) { goto lf_error_syn; } @@ -225,7 +225,7 @@ LabelFormatCreate(Tcl_Interp *interp, field_struct.width_spec = (short) c_width; field_struct.height_spec = (short) c_height; c_width = c_height = 0.0; - RadarListAdd(fields, &field_struct, RadarListTail); + ZnListAdd(fields, &field_struct, ZnListTail); goto lf_end_parse; } @@ -284,7 +284,7 @@ LabelFormatCreate(Tcl_Interp *interp, } field_struct.width_spec = (short) width; field_struct.height_spec = (short) height; - RadarListAdd(fields, &field_struct, RadarListTail); + ZnListAdd(fields, &field_struct, ZnListTail); field_index++; goto lf_parse2; } @@ -293,16 +293,16 @@ LabelFormatCreate(Tcl_Interp *interp, } lf_end_parse: - field_array = (FieldFormat) RadarListArray(fields); - num_ffs = RadarListSize(fields); + field_array = (FieldFormat) ZnListArray(fields); + num_ffs = ZnListSize(fields); - format = (LabelFormat) RadarMalloc(sizeof(LabelFormatStruct) + + format = (LabelFormat) ZnMalloc(sizeof(LabelFormatStruct) + (num_ffs-1) * sizeof(FieldFormatStruct)); format->clip_width = (short) c_width; format->clip_height = (short) c_height; format->num_fields = num_ffs; memcpy(&format->fields, field_array, num_ffs * sizeof(FieldFormatStruct)); - RadarListFree(fields); + ZnListFree(fields); format->ref_count = 1; format->entry = entry; @@ -326,7 +326,7 @@ LabelFormatDelete(LabelFormat lf) lf->ref_count--; if (lf->ref_count == 0) { Tcl_DeleteHashEntry(lf->entry); - RadarFree(lf); + ZnFree(lf); } } @@ -381,17 +381,17 @@ LabelFormatGetString(LabelFormat lf) * If the clip box has both its width and its height * set to zero, it means that there is no clipbox. */ -RadarBool +ZnBool LabelFormatGetClipBox(LabelFormat lf, - RadarDim *w, - RadarDim *h) + ZnDim *w, + ZnDim *h) { if ((lf->clip_width == 0) && (lf->clip_height == 0)) { return False; } - *w = (RadarDim) lf->clip_width; - *h = (RadarDim) lf->clip_height; + *w = (ZnDim) lf->clip_width; + *h = (ZnDim) lf->clip_height; return True; } @@ -431,7 +431,7 @@ LabelFormatGetField(LabelFormat lf, **************************************************************** */ static Tcl_HashTable line_end_cache; -static RadarBool line_end_inited = False; +static ZnBool line_end_inited = False; LineEnd @@ -441,7 +441,7 @@ LineEndCreate(Tcl_Interp *interp, Tcl_HashEntry *entry; LineEnd le; int new, argc; - RadarReal a, b ,c; + ZnReal a, b ,c; if (!line_end_inited) { Tcl_InitHashTable(&line_end_cache, TCL_STRING_KEYS); @@ -457,7 +457,7 @@ LineEndCreate(Tcl_Interp *interp, argc = sscanf(line_end_str, "%lf %lf %lf", &a, &b, &c); if (argc == 3) { - le = (LineEnd) RadarMalloc(sizeof(LineEndStruct)); + le = (LineEnd) ZnMalloc(sizeof(LineEndStruct)); le->shape_a = a; le->shape_b = b; le->shape_c = c; @@ -487,7 +487,7 @@ LineEndDelete(LineEnd le) le->ref_count--; if (le->ref_count == 0) { Tcl_DeleteHashEntry(le->entry); - RadarFree(le); + ZnFree(le); } } |