libDXF 0.0.1
A library with DXF related functions written in C.
|
00001 00035 #include "color.h" 00036 00037 00043 DxfRGBColor * 00044 dxf_RGB_color_new () 00045 { 00046 #if DEBUG 00047 DXF_DEBUG_BEGIN 00048 #endif 00049 DxfRGBColor *RGB_color = NULL; 00050 size_t size; 00051 00052 size = sizeof (DxfRGBColor); 00053 /* avoid malloc of 0 bytes */ 00054 if (size == 0) size = 1; 00055 if ((RGB_color = malloc (size)) == NULL) 00056 { 00057 fprintf (stderr, 00058 (_("Error in %s () could not allocate memory for a DxfRGBCcolor struct.\n")), 00059 __FUNCTION__); 00060 RGB_color = NULL; 00061 } 00062 else 00063 { 00064 memset (RGB_color, 0, size); 00065 } 00066 #if DEBUG 00067 DXF_DEBUG_END 00068 #endif 00069 return (RGB_color); 00070 } 00071 00072 00076 DxfRGBColor * 00077 dxf_RGB_color_set 00078 ( 00079 int red, 00081 int green, 00083 int blue 00085 ) 00086 { 00087 #if DEBUG 00088 DXF_DEBUG_BEGIN 00089 #endif 00090 DxfRGBColor *RGB_color; 00091 int triplet; 00092 char *name = NULL; 00093 00094 RGB_color = dxf_RGB_color_new (); 00095 if ((red <= 255) || (red >= 0)) 00096 { 00097 RGB_color->r = red; 00098 } 00099 else 00100 { 00101 fprintf (stderr, 00102 (_("Error red color value in %s () out of range.\n")), 00103 __FUNCTION__); 00104 return (NULL); 00105 } 00106 if ((green <= 255) || (green >= 0)) 00107 { 00108 RGB_color->g = green; 00109 } 00110 else 00111 { 00112 fprintf (stderr, 00113 (_("Error green color value in %s () out of range.\n")), 00114 __FUNCTION__); 00115 return (NULL); 00116 } 00117 if ((blue <= 255) || (blue >= 0)) 00118 { 00119 RGB_color->b = blue; 00120 } 00121 else 00122 { 00123 fprintf (stderr, 00124 (_("Error blue color value in %s () out of range.\n")), 00125 __FUNCTION__); 00126 return (NULL); 00127 } 00128 triplet = dxf_RGB_to_triplet (red, green, blue); 00129 name = dxf_RGB_color_get_name (triplet); 00130 if (name != NULL) 00131 { 00132 RGB_color->name = strdup (name); 00133 free (name); 00134 } 00135 else 00136 { 00137 fprintf (stderr, 00138 (_("Error name value in %s () contains a NULL pointer.\n")), 00139 __FUNCTION__); 00140 return (NULL); 00141 } 00142 #if DEBUG 00143 DXF_DEBUG_END 00144 #endif 00145 return (RGB_color); 00146 } 00147 00148 00156 int 00157 dxf_ACI_init 00158 ( 00159 DxfRGBColor *ACI[DXF_COLOR_INDEX_MAX_NUMBER_OF_COLORS] 00160 ) 00161 { 00162 #if DEBUG 00163 DXF_DEBUG_BEGIN 00164 #endif 00165 size_t size; 00166 00167 size = sizeof (DxfRGBColor); 00168 /* avoid malloc of 0 bytes */ 00169 if (size == 0) size = 1; 00170 if ((ACI = malloc (size * DXF_COLOR_INDEX_MAX_NUMBER_OF_COLORS)) == NULL) 00171 { 00172 fprintf (stderr, 00173 (_("Error in %s () could not allocate memory for a DxfRGBCcolor array.\n")), 00174 __FUNCTION__); 00175 ACI = NULL; 00176 return (EXIT_FAILURE); 00177 } 00178 else 00179 { 00180 ACI[0] = dxf_RGB_color_set (0,0,0); 00181 ACI[1] = dxf_RGB_color_set (255,0,0); 00182 ACI[2] = dxf_RGB_color_set (255,255,0); 00183 ACI[3] = dxf_RGB_color_set (0,255,0); 00184 ACI[4] = dxf_RGB_color_set (0,255,255); 00185 ACI[5] = dxf_RGB_color_set (0,0,255); 00186 ACI[6] = dxf_RGB_color_set (255,0,255); 00187 ACI[7] = dxf_RGB_color_set (255,255,255); 00188 ACI[8] = dxf_RGB_color_set (128,128,128); 00189 ACI[9] = dxf_RGB_color_set (192,192,192); 00190 ACI[10] = dxf_RGB_color_set (255,0,0); 00191 ACI[11] = dxf_RGB_color_set (255,127,127); 00192 ACI[12] = dxf_RGB_color_set (204,0,0); 00193 ACI[13] = dxf_RGB_color_set (204,102,102); 00194 ACI[14] = dxf_RGB_color_set (153,0,0); 00195 ACI[15] = dxf_RGB_color_set (153,76,76); 00196 ACI[16] = dxf_RGB_color_set (127,0,0); 00197 ACI[17] = dxf_RGB_color_set (127,63,63); 00198 ACI[18] = dxf_RGB_color_set (76,0,0); 00199 ACI[19] = dxf_RGB_color_set (76,38,38); 00200 ACI[20] = dxf_RGB_color_set (255,63,0); 00201 ACI[21] = dxf_RGB_color_set (255,159,127); 00202 ACI[22] = dxf_RGB_color_set (204,51,0); 00203 ACI[23] = dxf_RGB_color_set (204,127,102); 00204 ACI[24] = dxf_RGB_color_set (153,38,0); 00205 ACI[25] = dxf_RGB_color_set (153,95,76); 00206 ACI[26] = dxf_RGB_color_set (127,31,0); 00207 ACI[27] = dxf_RGB_color_set (127,79,63); 00208 ACI[28] = dxf_RGB_color_set (76,19,0); 00209 ACI[29] = dxf_RGB_color_set (76,47,38); 00210 ACI[30] = dxf_RGB_color_set (255,127,0); 00211 ACI[31] = dxf_RGB_color_set (255,191,127); 00212 ACI[32] = dxf_RGB_color_set (204,102,0); 00213 ACI[33] = dxf_RGB_color_set (204,153,102); 00214 ACI[34] = dxf_RGB_color_set (153,76,0); 00215 ACI[35] = dxf_RGB_color_set (153,114,76); 00216 ACI[36] = dxf_RGB_color_set (127,63,0); 00217 ACI[37] = dxf_RGB_color_set (127,95,63); 00218 ACI[38] = dxf_RGB_color_set (76,38,0); 00219 ACI[39] = dxf_RGB_color_set (76,57,38); 00220 ACI[40] = dxf_RGB_color_set (255,191,0); 00221 ACI[41] = dxf_RGB_color_set (255,223,127); 00222 ACI[42] = dxf_RGB_color_set (204,153,0); 00223 ACI[43] = dxf_RGB_color_set (204,178,102); 00224 ACI[44] = dxf_RGB_color_set (153,114,0); 00225 ACI[45] = dxf_RGB_color_set (153,133,76); 00226 ACI[46] = dxf_RGB_color_set (127,95,0); 00227 ACI[47] = dxf_RGB_color_set (127,111,63); 00228 ACI[48] = dxf_RGB_color_set (76,57,0); 00229 ACI[49] = dxf_RGB_color_set (76,66,38); 00230 ACI[50] = dxf_RGB_color_set (255,255,0); 00231 ACI[51] = dxf_RGB_color_set (255,255,127); 00232 ACI[52] = dxf_RGB_color_set (204,204,0); 00233 ACI[53] = dxf_RGB_color_set (204,204,102); 00234 ACI[54] = dxf_RGB_color_set (153,153,0); 00235 ACI[55] = dxf_RGB_color_set (153,153,76); 00236 ACI[56] = dxf_RGB_color_set (127,127,0); 00237 ACI[57] = dxf_RGB_color_set (127,127,63); 00238 ACI[58] = dxf_RGB_color_set (76,76,0); 00239 ACI[59] = dxf_RGB_color_set (76,76,38); 00240 ACI[60] = dxf_RGB_color_set (191,255,0); 00241 ACI[61] = dxf_RGB_color_set (223,255,127); 00242 ACI[62] = dxf_RGB_color_set (153,204,0); 00243 ACI[63] = dxf_RGB_color_set (178,204,102); 00244 ACI[64] = dxf_RGB_color_set (114,153,0); 00245 ACI[65] = dxf_RGB_color_set (133,153,76); 00246 ACI[66] = dxf_RGB_color_set (95,127,0); 00247 ACI[67] = dxf_RGB_color_set (111,127,63); 00248 ACI[68] = dxf_RGB_color_set (57,76,0); 00249 ACI[69] = dxf_RGB_color_set (66,76,38); 00250 ACI[70] = dxf_RGB_color_set (127,255,0); 00251 ACI[71] = dxf_RGB_color_set (191,255,127); 00252 ACI[72] = dxf_RGB_color_set (102,204,0); 00253 ACI[73] = dxf_RGB_color_set (153,204,102); 00254 ACI[74] = dxf_RGB_color_set (76,153,0); 00255 ACI[75] = dxf_RGB_color_set (114,153,76); 00256 ACI[76] = dxf_RGB_color_set (63,127,0); 00257 ACI[77] = dxf_RGB_color_set (95,127,63); 00258 ACI[78] = dxf_RGB_color_set (38,76,0); 00259 ACI[79] = dxf_RGB_color_set (57,76,38); 00260 ACI[80] = dxf_RGB_color_set (63,255,0); 00261 ACI[81] = dxf_RGB_color_set (159,255,127); 00262 ACI[82] = dxf_RGB_color_set (51,204,0); 00263 ACI[83] = dxf_RGB_color_set (127,204,102); 00264 ACI[84] = dxf_RGB_color_set (38,153,0); 00265 ACI[85] = dxf_RGB_color_set (95,153,76); 00266 ACI[86] = dxf_RGB_color_set (31,127,0); 00267 ACI[87] = dxf_RGB_color_set (79,127,63); 00268 ACI[88] = dxf_RGB_color_set (19,76,0); 00269 ACI[89] = dxf_RGB_color_set (47,76,38); 00270 ACI[90] = dxf_RGB_color_set (0,255,0); 00271 ACI[91] = dxf_RGB_color_set (127,255,127); 00272 ACI[92] = dxf_RGB_color_set (0,204,0); 00273 ACI[93] = dxf_RGB_color_set (102,204,102); 00274 ACI[94] = dxf_RGB_color_set (0,153,0); 00275 ACI[95] = dxf_RGB_color_set (76,153,76); 00276 ACI[96] = dxf_RGB_color_set (0,127,0); 00277 ACI[97] = dxf_RGB_color_set (63,127,63); 00278 ACI[98] = dxf_RGB_color_set (0,76,0); 00279 ACI[99] = dxf_RGB_color_set (38,76,38); 00280 ACI[100] = dxf_RGB_color_set (0,255,63); 00281 ACI[101] = dxf_RGB_color_set (127,255,159); 00282 ACI[102] = dxf_RGB_color_set (0,204,51); 00283 ACI[103] = dxf_RGB_color_set (102,204,127); 00284 ACI[104] = dxf_RGB_color_set (0,153,38); 00285 ACI[105] = dxf_RGB_color_set (76,153,95); 00286 ACI[106] = dxf_RGB_color_set (0,127,31); 00287 ACI[107] = dxf_RGB_color_set (63,127,79); 00288 ACI[108] = dxf_RGB_color_set (0,76,19); 00289 ACI[109] = dxf_RGB_color_set (38,76,47); 00290 ACI[110] = dxf_RGB_color_set (0,255,127); 00291 ACI[111] = dxf_RGB_color_set (127,255,191); 00292 ACI[112] = dxf_RGB_color_set (0,204,102); 00293 ACI[113] = dxf_RGB_color_set (102,204,153); 00294 ACI[114] = dxf_RGB_color_set (0,153,76); 00295 ACI[115] = dxf_RGB_color_set (76,153,114); 00296 ACI[116] = dxf_RGB_color_set (0,127,63); 00297 ACI[117] = dxf_RGB_color_set (63,127,95); 00298 ACI[118] = dxf_RGB_color_set (0,76,38); 00299 ACI[119] = dxf_RGB_color_set (38,76,57); 00300 ACI[120] = dxf_RGB_color_set (0,255,191); 00301 ACI[121] = dxf_RGB_color_set (127,255,223); 00302 ACI[122] = dxf_RGB_color_set (0,204,153); 00303 ACI[123] = dxf_RGB_color_set (102,204,178); 00304 ACI[124] = dxf_RGB_color_set (0,153,114); 00305 ACI[125] = dxf_RGB_color_set (76,153,133); 00306 ACI[126] = dxf_RGB_color_set (0,127,95); 00307 ACI[127] = dxf_RGB_color_set (63,127,111); 00308 ACI[128] = dxf_RGB_color_set (0,76,57); 00309 ACI[129] = dxf_RGB_color_set (38,76,66); 00310 ACI[130] = dxf_RGB_color_set (0,255,255); 00311 ACI[131] = dxf_RGB_color_set (127,255,255); 00312 ACI[132] = dxf_RGB_color_set (0,204,204); 00313 ACI[133] = dxf_RGB_color_set (102,204,204); 00314 ACI[134] = dxf_RGB_color_set (0,153,153); 00315 ACI[135] = dxf_RGB_color_set (76,153,153); 00316 ACI[136] = dxf_RGB_color_set (0,127,127); 00317 ACI[137] = dxf_RGB_color_set (63,127,127); 00318 ACI[138] = dxf_RGB_color_set (0,76,76); 00319 ACI[139] = dxf_RGB_color_set (38,76,76); 00320 ACI[140] = dxf_RGB_color_set (0,191,255); 00321 ACI[141] = dxf_RGB_color_set (127,223,255); 00322 ACI[142] = dxf_RGB_color_set (0,153,204); 00323 ACI[143] = dxf_RGB_color_set (102,178,204); 00324 ACI[144] = dxf_RGB_color_set (0,114,153); 00325 ACI[145] = dxf_RGB_color_set (76,133,153); 00326 ACI[146] = dxf_RGB_color_set (0,95,127); 00327 ACI[147] = dxf_RGB_color_set (63,111,127); 00328 ACI[148] = dxf_RGB_color_set (0,57,76); 00329 ACI[149] = dxf_RGB_color_set (38,66,76); 00330 ACI[150] = dxf_RGB_color_set (0,127,255); 00331 ACI[151] = dxf_RGB_color_set (127,191,255); 00332 ACI[152] = dxf_RGB_color_set (0,102,204); 00333 ACI[153] = dxf_RGB_color_set (102,153,204); 00334 ACI[154] = dxf_RGB_color_set (0,76,153); 00335 ACI[155] = dxf_RGB_color_set (76,114,153); 00336 ACI[156] = dxf_RGB_color_set (0,63,127); 00337 ACI[157] = dxf_RGB_color_set (63,95,127); 00338 ACI[158] = dxf_RGB_color_set (0,38,76); 00339 ACI[159] = dxf_RGB_color_set (38,57,76); 00340 ACI[160] = dxf_RGB_color_set (0,63,255); 00341 ACI[161] = dxf_RGB_color_set (127,159,255); 00342 ACI[162] = dxf_RGB_color_set (0,51,204); 00343 ACI[163] = dxf_RGB_color_set (102,127,204); 00344 ACI[164] = dxf_RGB_color_set (0,38,153); 00345 ACI[165] = dxf_RGB_color_set (76,95,153); 00346 ACI[166] = dxf_RGB_color_set (0,31,127); 00347 ACI[167] = dxf_RGB_color_set (63,79,127); 00348 ACI[168] = dxf_RGB_color_set (0,19,76); 00349 ACI[169] = dxf_RGB_color_set (38,47,76); 00350 ACI[170] = dxf_RGB_color_set (0,0,255); 00351 ACI[171] = dxf_RGB_color_set (170,170,255); 00352 ACI[172] = dxf_RGB_color_set (0,0,189); 00353 ACI[173] = dxf_RGB_color_set (126,126,189); 00354 ACI[174] = dxf_RGB_color_set (0,0,129); 00355 ACI[175] = dxf_RGB_color_set (86,86,129); 00356 ACI[176] = dxf_RGB_color_set (0,0,104); 00357 ACI[177] = dxf_RGB_color_set (69,69,104); 00358 ACI[178] = dxf_RGB_color_set (0,0,79); 00359 ACI[179] = dxf_RGB_color_set (53,53,79); 00360 ACI[180] = dxf_RGB_color_set (63,0,255); 00361 ACI[181] = dxf_RGB_color_set (191,170,255); 00362 ACI[182] = dxf_RGB_color_set (46,0,189); 00363 ACI[183] = dxf_RGB_color_set (141,126,189); 00364 ACI[184] = dxf_RGB_color_set (31,0,129); 00365 ACI[185] = dxf_RGB_color_set (96,86,129); 00366 ACI[186] = dxf_RGB_color_set (25,0,104); 00367 ACI[187] = dxf_RGB_color_set (78,69,104); 00368 ACI[188] = dxf_RGB_color_set (19,0,79); 00369 ACI[189] = dxf_RGB_color_set (59,53,79); 00370 ACI[190] = dxf_RGB_color_set (127,0,255); 00371 ACI[191] = dxf_RGB_color_set (212,170,255); 00372 ACI[192] = dxf_RGB_color_set (94,0,189); 00373 ACI[193] = dxf_RGB_color_set (157,126,189); 00374 ACI[194] = dxf_RGB_color_set (64,0,129); 00375 ACI[195] = dxf_RGB_color_set (107,86,129); 00376 ACI[196] = dxf_RGB_color_set (52,0,104); 00377 ACI[197] = dxf_RGB_color_set (86,69,104); 00378 ACI[198] = dxf_RGB_color_set (39,0,79); 00379 ACI[199] = dxf_RGB_color_set (66,53,79); 00380 ACI[200] = dxf_RGB_color_set (191,0,255); 00381 ACI[201] = dxf_RGB_color_set (234,170,255); 00382 ACI[202] = dxf_RGB_color_set (141,0,189); 00383 ACI[203] = dxf_RGB_color_set (173,126,189); 00384 ACI[204] = dxf_RGB_color_set (96,0,129); 00385 ACI[205] = dxf_RGB_color_set (118,86,129); 00386 ACI[206] = dxf_RGB_color_set (78,0,104); 00387 ACI[207] = dxf_RGB_color_set (95,69,104); 00388 ACI[208] = dxf_RGB_color_set (59,0,79); 00389 ACI[209] = dxf_RGB_color_set (73,53,79); 00390 ACI[210] = dxf_RGB_color_set (255,0,255); 00391 ACI[211] = dxf_RGB_color_set (255,170,255); 00392 ACI[212] = dxf_RGB_color_set (189,0,189); 00393 ACI[213] = dxf_RGB_color_set (189,126,189); 00394 ACI[214] = dxf_RGB_color_set (129,0,129); 00395 ACI[215] = dxf_RGB_color_set (129,86,129); 00396 ACI[216] = dxf_RGB_color_set (104,0,104); 00397 ACI[217] = dxf_RGB_color_set (104,69,104); 00398 ACI[218] = dxf_RGB_color_set (79,0,79); 00399 ACI[219] = dxf_RGB_color_set (79,53,79); 00400 ACI[220] = dxf_RGB_color_set (255,0,191); 00401 ACI[221] = dxf_RGB_color_set (255,170,234); 00402 ACI[222] = dxf_RGB_color_set (189,0,141); 00403 ACI[223] = dxf_RGB_color_set (189,126,173); 00404 ACI[224] = dxf_RGB_color_set (129,0,96); 00405 ACI[225] = dxf_RGB_color_set (129,86,118); 00406 ACI[226] = dxf_RGB_color_set (104,0,78); 00407 ACI[227] = dxf_RGB_color_set (104,69,95); 00408 ACI[228] = dxf_RGB_color_set (79,0,59); 00409 ACI[229] = dxf_RGB_color_set (79,53,73); 00410 ACI[230] = dxf_RGB_color_set (255,0,127); 00411 ACI[231] = dxf_RGB_color_set (255,170,212); 00412 ACI[232] = dxf_RGB_color_set (189,0,94); 00413 ACI[233] = dxf_RGB_color_set (189,126,157); 00414 ACI[234] = dxf_RGB_color_set (129,0,64); 00415 ACI[235] = dxf_RGB_color_set (129,86,107); 00416 ACI[236] = dxf_RGB_color_set (104,0,52); 00417 ACI[237] = dxf_RGB_color_set (104,69,86); 00418 ACI[238] = dxf_RGB_color_set (79,0,39); 00419 ACI[239] = dxf_RGB_color_set (79,53,66); 00420 ACI[240] = dxf_RGB_color_set (255,0,63); 00421 ACI[241] = dxf_RGB_color_set (255,170,191); 00422 ACI[242] = dxf_RGB_color_set (189,0,46); 00423 ACI[243] = dxf_RGB_color_set (189,126,141); 00424 ACI[244] = dxf_RGB_color_set (129,0,31); 00425 ACI[245] = dxf_RGB_color_set (129,86,96); 00426 ACI[246] = dxf_RGB_color_set (104,0,25); 00427 ACI[247] = dxf_RGB_color_set (104,69,78); 00428 ACI[248] = dxf_RGB_color_set (79,0,19); 00429 ACI[249] = dxf_RGB_color_set (79,53,59); 00430 ACI[250] = dxf_RGB_color_set (51,51,51); 00431 ACI[251] = dxf_RGB_color_set (80,80,80); 00432 ACI[252] = dxf_RGB_color_set (105,105,105); 00433 ACI[253] = dxf_RGB_color_set (130,130,130); 00434 ACI[254] = dxf_RGB_color_set (190,190,190); 00435 ACI[255] = dxf_RGB_color_set (255,255,255); 00436 } 00437 #if DEBUG 00438 DXF_DEBUG_END 00439 #endif 00440 return (EXIT_SUCCESS); 00441 } 00442 00443 00447 int 00448 dxf_RGB_to_triplet 00449 ( 00450 int red, 00452 int green, 00454 int blue 00456 ) 00457 { 00458 #if DEBUG 00459 DXF_DEBUG_BEGIN 00460 #endif 00461 int triplet; 00462 00463 if ((red <= 255) || (red >= 0)) 00464 { 00465 triplet = red * 65536; 00466 } 00467 else 00468 { 00469 fprintf (stderr, 00470 (_("Error red color value in %s () out of range.\n")), 00471 __FUNCTION__); 00472 return (-1); 00473 } 00474 if ((green <= 255) || (green >= 0)) 00475 { 00476 triplet += green * 256; 00477 } 00478 else 00479 { 00480 fprintf (stderr, 00481 (_("Error green color value in %s () out of range.\n")), 00482 __FUNCTION__); 00483 return (-2); 00484 } 00485 if ((blue <= 255) || (blue >= 0)) 00486 { 00487 triplet += blue; 00488 } 00489 else 00490 { 00491 fprintf (stderr, 00492 (_("Error blue color value in %s () out of range.\n")), 00493 __FUNCTION__); 00494 return (-3); 00495 } 00496 #if DEBUG 00497 DXF_DEBUG_END 00498 #endif 00499 return (triplet); 00500 } 00501 00502 00513 char * 00514 dxf_RGB_color_get_name 00515 ( 00516 int RGB_color_hex_triplet 00521 ) 00522 { 00523 #if DEBUG 00524 DXF_DEBUG_BEGIN 00525 #endif 00526 char *RGB_color_name; 00527 00528 switch (RGB_color_hex_triplet) 00529 { 00530 case 0xF0F8FF : 00531 { 00532 RGB_color_name = strdup ("Alice blue"); 00533 return (RGB_color_name); 00534 } 00535 /* 00536 case 0xE32636 : 00537 { 00538 RGB_color_name = strdup ("Alizarin"); 00539 return (RGB_color_name); 00540 } 00541 */ 00542 case 0xE52B50 : 00543 { 00544 RGB_color_name = strdup ("Amaranth"); 00545 return (RGB_color_name); 00546 } 00547 case 0xF19CBB : 00548 { 00549 RGB_color_name = strdup ("Amaranth Pink"); 00550 return (RGB_color_name); 00551 } 00552 case 0xFFBF00 : 00553 { 00554 RGB_color_name = strdup ("Amber"); 00555 return (RGB_color_name); 00556 } 00557 case 0x9966CC : 00558 { 00559 RGB_color_name = strdup ("Amethyst"); 00560 return (RGB_color_name); 00561 } 00562 case 0xFBCEB1 : 00563 { 00564 RGB_color_name = strdup ("Apricot"); 00565 return (RGB_color_name); 00566 } 00567 /* 00568 case 0x00FFFF : 00569 { 00570 RGB_color_name = strdup ("Aqua"); 00571 return (RGB_color_name); 00572 } 00573 */ 00574 case 0x7FFFD4 : 00575 { 00576 RGB_color_name = strdup ("Aquamarine"); 00577 return (RGB_color_name); 00578 } 00579 case 0x4B5320 : 00580 { 00581 RGB_color_name = strdup ("Aemy green"); 00582 return (RGB_color_name); 00583 } 00584 case 0x7BA05B : 00585 { 00586 RGB_color_name = strdup ("Asparagus"); 00587 return (RGB_color_name); 00588 } 00589 /* 00590 case 0xFF9966 : 00591 { 00592 RGB_color_name = strdup ("Atomic tangerine"); 00593 return (RGB_color_name); 00594 } 00595 */ 00596 case 0x6D351A : 00597 { 00598 RGB_color_name = strdup ("Auburn"); 00599 return (RGB_color_name); 00600 } 00601 case 0x007FFF : 00602 { 00603 RGB_color_name = strdup ("Azure (color wheel)"); 00604 return (RGB_color_name); 00605 } 00606 case 0xF0FFFF : 00607 { 00608 RGB_color_name = strdup ("Azure (web)"); 00609 return (RGB_color_name); 00610 } 00611 case 0xE0FFFF : 00612 { 00613 RGB_color_name = strdup ("Baby blue"); 00614 return (RGB_color_name); 00615 } 00616 case 0xF5F5DC : 00617 { 00618 RGB_color_name = strdup ("Beige"); 00619 return (RGB_color_name); 00620 } 00621 case 0x3D2B1F : 00622 { 00623 RGB_color_name = strdup ("Bistre"); 00624 return (RGB_color_name); 00625 } 00626 case 0x000000 : 00627 { 00628 RGB_color_name = strdup ("Black"); 00629 return (RGB_color_name); 00630 } 00631 case 0x0000FF : 00632 { 00633 RGB_color_name = strdup ("Blue"); 00634 return (RGB_color_name); 00635 } 00636 case 0x333399 : 00637 { 00638 RGB_color_name = strdup ("Blue (pigment)"); 00639 return (RGB_color_name); 00640 } 00641 case 0x0247FE : 00642 { 00643 RGB_color_name = strdup ("Blue (RYB)"); 00644 return (RGB_color_name); 00645 } 00646 case 0x00DDDD : 00647 { 00648 RGB_color_name = strdup ("Blue-green"); 00649 return (RGB_color_name); 00650 } 00651 case 0x8A2BE2 : 00652 { 00653 RGB_color_name = strdup ("Blue-violet"); 00654 return (RGB_color_name); 00655 } 00656 case 0x0095B6 : 00657 { 00658 RGB_color_name = strdup ("Bondi blue"); 00659 return (RGB_color_name); 00660 } 00661 case 0xB5A642 : 00662 { 00663 RGB_color_name = strdup ("Brass"); 00664 return (RGB_color_name); 00665 } 00666 case 0x66FF00 : 00667 { 00668 RGB_color_name = strdup ("Bright green"); 00669 return (RGB_color_name); 00670 } 00671 /* 00672 case 0xFF007F : 00673 { 00674 RGB_color_name = strdup ("Bright pink"); 00675 return (RGB_color_name); 00676 } 00677 */ 00678 case 0x08E8DE : 00679 { 00680 RGB_color_name = strdup ("Bright turquoise"); 00681 return (RGB_color_name); 00682 } 00683 case 0xFF55A3 : 00684 { 00685 RGB_color_name = strdup ("Brilliant rose"); 00686 return (RGB_color_name); 00687 } 00688 case 0xFB607F : 00689 { 00690 RGB_color_name = strdup ("Brink pink"); 00691 return (RGB_color_name); 00692 } 00693 case 0xCD7F32 : 00694 { 00695 RGB_color_name = strdup ("Bronze"); 00696 return (RGB_color_name); 00697 } 00698 case 0x964B00 : 00699 { 00700 RGB_color_name = strdup ("Brown"); 00701 return (RGB_color_name); 00702 } 00703 case 0xF0DC82 : 00704 { 00705 RGB_color_name = strdup ("Buff"); 00706 return (RGB_color_name); 00707 } 00708 case 0x900020 : 00709 { 00710 RGB_color_name = strdup ("Burgundy"); 00711 return (RGB_color_name); 00712 } 00713 case 0xCC5500 : 00714 { 00715 RGB_color_name = strdup ("Burnt orange"); 00716 return (RGB_color_name); 00717 } 00718 case 0xE97451 : 00719 { 00720 RGB_color_name = strdup ("Burnt sienna"); 00721 return (RGB_color_name); 00722 } 00723 case 0x8A3324 : 00724 { 00725 RGB_color_name = strdup ("Burnt umber"); 00726 return (RGB_color_name); 00727 } 00728 case 0x78866B : 00729 { 00730 RGB_color_name = strdup ("Camouflage green"); 00731 return (RGB_color_name); 00732 } 00733 case 0x592720 : 00734 { 00735 RGB_color_name = strdup ("Caput mortuum"); 00736 return (RGB_color_name); 00737 } 00738 case 0xC41E3A : 00739 { 00740 RGB_color_name = strdup ("Cardinal"); 00741 return (RGB_color_name); 00742 } 00743 case 0x960018 : 00744 { 00745 RGB_color_name = strdup ("Carmine"); 00746 return (RGB_color_name); 00747 } 00748 case 0xEB4C42 : 00749 { 00750 RGB_color_name = strdup ("Carmine Pink"); 00751 return (RGB_color_name); 00752 } 00753 case 0xFFA6C9 : 00754 { 00755 RGB_color_name = strdup ("Carnation pink"); 00756 return (RGB_color_name); 00757 } 00758 case 0x99BADD : 00759 { 00760 RGB_color_name = strdup ("Carolina blue"); 00761 return (RGB_color_name); 00762 } 00763 case 0xED9121 : 00764 { 00765 RGB_color_name = strdup ("Carrot orange"); 00766 return (RGB_color_name); 00767 } 00768 case 0xACE1AF : 00769 { 00770 RGB_color_name = strdup ("Celadon"); 00771 return (RGB_color_name); 00772 } 00773 case 0xDE3163 : 00774 { 00775 RGB_color_name = strdup ("Cerise"); 00776 return (RGB_color_name); 00777 } 00778 case 0xEC3B83 : 00779 { 00780 RGB_color_name = strdup ("Cerise Pink"); 00781 return (RGB_color_name); 00782 } 00783 case 0x007BA7 : 00784 { 00785 RGB_color_name = strdup ("Cerulean"); 00786 return (RGB_color_name); 00787 } 00788 case 0x2A52BE : 00789 { 00790 RGB_color_name = strdup ("Cerulean blue"); 00791 return (RGB_color_name); 00792 } 00793 case 0xF7E7CE : 00794 { 00795 RGB_color_name = strdup ("Champagne"); 00796 return (RGB_color_name); 00797 } 00798 case 0x464646 : 00799 { 00800 RGB_color_name = strdup ("Charcoal"); 00801 return (RGB_color_name); 00802 } 00803 case 0xDFFF00 : 00804 { 00805 RGB_color_name = strdup ("Chartreuse (traditional)"); 00806 return (RGB_color_name); 00807 } 00808 case 0x7FFF00 : 00809 { 00810 RGB_color_name = strdup ("Chartreuse (web)"); 00811 return (RGB_color_name); 00812 } 00813 case 0xFFB7C5 : 00814 { 00815 RGB_color_name = strdup ("Cherry blossom pink"); 00816 return (RGB_color_name); 00817 } 00818 case 0xCD5C5C : 00819 { 00820 RGB_color_name = strdup ("Chestnut"); 00821 return (RGB_color_name); 00822 } 00823 case 0x7B3F00 : 00824 { 00825 RGB_color_name = strdup ("Chocolate"); 00826 return (RGB_color_name); 00827 } 00828 /* 00829 case 0xE34234 : 00830 { 00831 RGB_color_name = strdup ("Cinnabar"); 00832 return (RGB_color_name); 00833 } 00834 */ 00835 case 0xD2691E : 00836 { 00837 RGB_color_name = strdup ("Cinnamon"); 00838 return (RGB_color_name); 00839 } 00840 case 0x0047AB : 00841 { 00842 RGB_color_name = strdup ("Cobalt"); 00843 return (RGB_color_name); 00844 } 00845 case 0x9BDDFF : 00846 { 00847 RGB_color_name = strdup ("Columbia blue"); 00848 return (RGB_color_name); 00849 } 00850 case 0xB87333 : 00851 { 00852 RGB_color_name = strdup ("Copper"); 00853 return (RGB_color_name); 00854 } 00855 case 0x996666 : 00856 { 00857 RGB_color_name = strdup ("Copper rose"); 00858 return (RGB_color_name); 00859 } 00860 case 0xFF7F50 : 00861 { 00862 RGB_color_name = strdup ("Coral"); 00863 return (RGB_color_name); 00864 } 00865 case 0xF88379 : 00866 { 00867 RGB_color_name = strdup ("Coral pink"); 00868 return (RGB_color_name); 00869 } 00870 case 0xFF4040 : 00871 { 00872 RGB_color_name = strdup ("Coral red"); 00873 return (RGB_color_name); 00874 } 00875 case 0xFBEC5D : 00876 { 00877 RGB_color_name = strdup ("Corn"); 00878 return (RGB_color_name); 00879 } 00880 case 0x6495ED : 00881 { 00882 RGB_color_name = strdup ("Cornflower blue"); 00883 return (RGB_color_name); 00884 } 00885 case 0xFFF8E7 : 00886 { 00887 RGB_color_name = strdup ("Cosmic latte"); 00888 return (RGB_color_name); 00889 } 00890 case 0xFFFDD0 : 00891 { 00892 RGB_color_name = strdup ("Cream"); 00893 return (RGB_color_name); 00894 } 00895 case 0xDC143C : 00896 { 00897 RGB_color_name = strdup ("Crimson"); 00898 return (RGB_color_name); 00899 } 00900 case 0x00FFFF : 00901 { 00902 RGB_color_name = strdup ("Cyan"); 00903 return (RGB_color_name); 00904 } 00905 case 0x00B7EB : 00906 { 00907 RGB_color_name = strdup ("Cyan (process)"); 00908 return (RGB_color_name); 00909 } 00910 case 0x00008B : 00911 { 00912 RGB_color_name = strdup ("Dark blue"); 00913 return (RGB_color_name); 00914 } 00915 case 0x654321 : 00916 { 00917 RGB_color_name = strdup ("Dark brown"); 00918 return (RGB_color_name); 00919 } 00920 case 0x08457E : 00921 { 00922 RGB_color_name = strdup ("Dark cerulean"); 00923 return (RGB_color_name); 00924 } 00925 case 0x986960 : 00926 { 00927 RGB_color_name = strdup ("Dark chestnut"); 00928 return (RGB_color_name); 00929 } 00930 case 0xCD5B45 : 00931 { 00932 RGB_color_name = strdup ("Dark coral"); 00933 return (RGB_color_name); 00934 } 00935 case 0xB8860B : 00936 { 00937 RGB_color_name = strdup ("Dark goldenrod"); 00938 return (RGB_color_name); 00939 } 00940 case 0x013220 : 00941 { 00942 RGB_color_name = strdup ("Dark green"); 00943 return (RGB_color_name); 00944 } 00945 case 0xBDB76B : 00946 { 00947 RGB_color_name = strdup ("Dark khaki"); 00948 return (RGB_color_name); 00949 } 00950 case 0x8B008B : 00951 { 00952 RGB_color_name = strdup ("Dark magenta"); 00953 return (RGB_color_name); 00954 } 00955 case 0x03C03C : 00956 { 00957 RGB_color_name = strdup ("Dark pastel green"); 00958 return (RGB_color_name); 00959 } 00960 case 0xE75480 : 00961 { 00962 RGB_color_name = strdup ("Dark pink"); 00963 return (RGB_color_name); 00964 } 00965 case 0x560319 : 00966 { 00967 RGB_color_name = strdup ("Dark scarlet"); 00968 return (RGB_color_name); 00969 } 00970 case 0xE9967A : 00971 { 00972 RGB_color_name = strdup ("Dark salmon"); 00973 return (RGB_color_name); 00974 } 00975 case 0x2F4F4F : 00976 { 00977 RGB_color_name = strdup ("Dark slate gray"); 00978 return (RGB_color_name); 00979 } 00980 case 0x177245 : 00981 { 00982 RGB_color_name = strdup ("Dark spring green"); 00983 return (RGB_color_name); 00984 } 00985 case 0x918151 : 00986 { 00987 RGB_color_name = strdup ("Dark tan"); 00988 return (RGB_color_name); 00989 } 00990 case 0x00CED1 : 00991 { 00992 RGB_color_name = strdup ("Dark turquoise"); 00993 return (RGB_color_name); 00994 } 00995 case 0x9400D3 : 00996 { 00997 RGB_color_name = strdup ("Dark violet"); 00998 return (RGB_color_name); 00999 } 01000 case 0xEF3038 : 01001 { 01002 RGB_color_name = strdup ("Deep Carmine Pink"); 01003 return (RGB_color_name); 01004 } 01005 case 0xDA3287 : 01006 { 01007 RGB_color_name = strdup ("Deep cerise"); 01008 return (RGB_color_name); 01009 } 01010 case 0xB94E48 : 01011 { 01012 RGB_color_name = strdup ("Deep chestnut"); 01013 return (RGB_color_name); 01014 } 01015 case 0xC154C1 : 01016 { 01017 RGB_color_name = strdup ("Deep fuchsia"); 01018 return (RGB_color_name); 01019 } 01020 case 0x9955BB : 01021 { 01022 RGB_color_name = strdup ("Deep lilac"); 01023 return (RGB_color_name); 01024 } 01025 case 0xCD00CC : 01026 { 01027 RGB_color_name = strdup ("Deep magenta"); 01028 return (RGB_color_name); 01029 } 01030 case 0xFFCBA4 : 01031 { 01032 RGB_color_name = strdup ("Deep peach"); 01033 return (RGB_color_name); 01034 } 01035 case 0xFF1493 : 01036 { 01037 RGB_color_name = strdup ("Deep pink"); 01038 return (RGB_color_name); 01039 } 01040 case 0x1560BD : 01041 { 01042 RGB_color_name = strdup ("Denim"); 01043 return (RGB_color_name); 01044 } 01045 case 0x1E90FF : 01046 { 01047 RGB_color_name = strdup ("Dodger blue"); 01048 return (RGB_color_name); 01049 } 01050 case 0xC2B280 : 01051 { 01052 RGB_color_name = strdup ("Ecru"); 01053 return (RGB_color_name); 01054 } 01055 case 0x1034A6 : 01056 { 01057 RGB_color_name = strdup ("Egyptian blue"); 01058 return (RGB_color_name); 01059 } 01060 case 0x7DF9FF : 01061 { 01062 RGB_color_name = strdup ("Electric blue"); 01063 return (RGB_color_name); 01064 } 01065 /* 01066 case 0x00FF00 : 01067 { 01068 RGB_color_name = strdup ("Electric green (X11 green)"); 01069 return (RGB_color_name); 01070 } 01071 */ 01072 case 0x6600FF : 01073 { 01074 RGB_color_name = strdup ("Electric indigo"); 01075 return (RGB_color_name); 01076 } 01077 case 0xCCFF00 : 01078 { 01079 RGB_color_name = strdup ("Electric lime"); 01080 return (RGB_color_name); 01081 } 01082 case 0xBF00FF : 01083 { 01084 RGB_color_name = strdup ("Electric purple"); 01085 return (RGB_color_name); 01086 } 01087 case 0x50C878 : 01088 { 01089 RGB_color_name = strdup ("Emerald"); 01090 return (RGB_color_name); 01091 } 01092 case 0x614051 : 01093 { 01094 RGB_color_name = strdup ("Eggplant"); 01095 return (RGB_color_name); 01096 } 01097 case 0x801818 : 01098 { 01099 RGB_color_name = strdup ("Falu red"); 01100 return (RGB_color_name); 01101 } 01102 case 0x4F7942 : 01103 { 01104 RGB_color_name = strdup ("Fern green"); 01105 return (RGB_color_name); 01106 } 01107 case 0xB22222 : 01108 { 01109 RGB_color_name = strdup ("Firebrick"); 01110 return (RGB_color_name); 01111 } 01112 case 0xEEDC82 : 01113 { 01114 RGB_color_name = strdup ("Flax"); 01115 return (RGB_color_name); 01116 } 01117 case 0x228B22 : 01118 { 01119 RGB_color_name = strdup ("Forrest green"); 01120 return (RGB_color_name); 01121 } 01122 case 0xF64A8A : 01123 { 01124 RGB_color_name = strdup ("French Rose"); 01125 return (RGB_color_name); 01126 } 01127 /* 01128 case 0xFF00FF : 01129 { 01130 RGB_color_name = strdup ("Fuchsia"); 01131 return (RGB_color_name); 01132 } 01133 */ 01134 case 0xFF77FF : 01135 { 01136 RGB_color_name = strdup ("Fuchsia Pink"); 01137 return (RGB_color_name); 01138 } 01139 case 0xE49B0F : 01140 { 01141 RGB_color_name = strdup ("Gamboge"); 01142 return (RGB_color_name); 01143 } 01144 case 0xD4AF37 : 01145 { 01146 RGB_color_name = strdup ("Gold (metallic)"); 01147 return (RGB_color_name); 01148 } 01149 case 0xFFD700 : 01150 { 01151 RGB_color_name = strdup ("Gold (web) (Golden)"); 01152 return (RGB_color_name); 01153 } 01154 case 0x996515 : 01155 { 01156 RGB_color_name = strdup ("Golden brown"); 01157 return (RGB_color_name); 01158 } 01159 case 0xFFDF00 : 01160 { 01161 RGB_color_name = strdup ("Golden yellow"); 01162 return (RGB_color_name); 01163 } 01164 case 0xDAA520 : 01165 { 01166 RGB_color_name = strdup ("Goldenrod"); 01167 return (RGB_color_name); 01168 } 01169 case 0x465945 : 01170 { 01171 RGB_color_name = strdup ("Gray-asparagus"); 01172 return (RGB_color_name); 01173 } 01174 case 0x00FF00 : 01175 { 01176 RGB_color_name = strdup ("Green (color wheel) (X11 green)"); 01177 return (RGB_color_name); 01178 } 01179 /* 01180 case 0x008000 : 01181 { 01182 RGB_color_name = strdup ("Green (HTML/CSS green)"); 01183 return (RGB_color_name); 01184 } 01185 */ 01186 case 0x00A550 : 01187 { 01188 RGB_color_name = strdup ("Green (pigment)"); 01189 return (RGB_color_name); 01190 } 01191 case 0x66B032 : 01192 { 01193 RGB_color_name = strdup ("Green (RYB)"); 01194 return (RGB_color_name); 01195 } 01196 case 0xADFF2F : 01197 { 01198 RGB_color_name = strdup ("Green-yellow"); 01199 return (RGB_color_name); 01200 } 01201 case 0x808080 : 01202 { 01203 RGB_color_name = strdup ("Gray"); 01204 return (RGB_color_name); 01205 } 01206 case 0x5218FA : 01207 { 01208 RGB_color_name = strdup ("Han Purple"); 01209 return (RGB_color_name); 01210 } 01211 case 0x3FFF00 : 01212 { 01213 RGB_color_name = strdup ("Harlequin"); 01214 return (RGB_color_name); 01215 } 01216 case 0xDF73FF : 01217 { 01218 RGB_color_name = strdup ("Heliotrope"); 01219 return (RGB_color_name); 01220 } 01221 case 0xF400A1 : 01222 { 01223 RGB_color_name = strdup ("Hollywood Cerise"); 01224 return (RGB_color_name); 01225 } 01226 case 0xFF00CC : 01227 { 01228 RGB_color_name = strdup ("Hot Magenta"); 01229 return (RGB_color_name); 01230 } 01231 case 0xFF69B4 : 01232 { 01233 RGB_color_name = strdup ("Hot Pink"); 01234 return (RGB_color_name); 01235 } 01236 case 0x00416A : 01237 { 01238 RGB_color_name = strdup ("Indigo (dye)"); 01239 return (RGB_color_name); 01240 } 01241 case 0x4B0082 : 01242 { 01243 RGB_color_name = strdup ("Indigo (web)"); 01244 return (RGB_color_name); 01245 } 01246 case 0x002FA7 : 01247 { 01248 RGB_color_name = strdup ("International Klein Blue"); 01249 return (RGB_color_name); 01250 } 01251 case 0xFF4F00 : 01252 { 01253 RGB_color_name = strdup ("International orange"); 01254 return (RGB_color_name); 01255 } 01256 case 0x009000 : 01257 { 01258 RGB_color_name = strdup ("Islamic green"); 01259 return (RGB_color_name); 01260 } 01261 case 0xFFFFF0 : 01262 { 01263 RGB_color_name = strdup ("Ivory"); 01264 return (RGB_color_name); 01265 } 01266 case 0x00A86B : 01267 { 01268 RGB_color_name = strdup ("Jade"); 01269 return (RGB_color_name); 01270 } 01271 case 0x4CBB17 : 01272 { 01273 RGB_color_name = strdup ("Kelly green"); 01274 return (RGB_color_name); 01275 } 01276 case 0xC3B091 : 01277 { 01278 RGB_color_name = strdup ("Khaki"); 01279 return (RGB_color_name); 01280 } 01281 case 0xF0E68C : 01282 { 01283 RGB_color_name = strdup ("Khaki (X11) (Light khaki)"); 01284 return (RGB_color_name); 01285 } 01286 case 0xB57EDC : 01287 { 01288 RGB_color_name = strdup ("Lavender (floral)"); 01289 return (RGB_color_name); 01290 } 01291 case 0xE6E6FA : 01292 { 01293 RGB_color_name = strdup ("Lavender (web)"); 01294 return (RGB_color_name); 01295 } 01296 case 0xCCCCFF : 01297 { 01298 RGB_color_name = strdup ("Lavender blue"); 01299 return (RGB_color_name); 01300 } 01301 case 0xFFF0F5 : 01302 { 01303 RGB_color_name = strdup ("Lavender blush"); 01304 return (RGB_color_name); 01305 } 01306 case 0xC4C3D0 : 01307 { 01308 RGB_color_name = strdup ("Lavender gray"); 01309 return (RGB_color_name); 01310 } 01311 case 0xEE82EE : 01312 { 01313 RGB_color_name = strdup ("Lavender magenta"); 01314 return (RGB_color_name); 01315 } 01316 case 0xFBAED2 : 01317 { 01318 RGB_color_name = strdup ("Lavender pink"); 01319 return (RGB_color_name); 01320 } 01321 case 0x967BB6 : 01322 { 01323 RGB_color_name = strdup ("Lavender purple"); 01324 return (RGB_color_name); 01325 } 01326 case 0xFBA0E3 : 01327 { 01328 RGB_color_name = strdup ("Lavender rose"); 01329 return (RGB_color_name); 01330 } 01331 case 0x7CFC00 : 01332 { 01333 RGB_color_name = strdup ("Lawn green"); 01334 return (RGB_color_name); 01335 } 01336 case 0xFDE910 : 01337 { 01338 RGB_color_name = strdup ("Lemon"); 01339 return (RGB_color_name); 01340 } 01341 case 0xFFFACD : 01342 { 01343 RGB_color_name = strdup ("Lemon chifton"); 01344 return (RGB_color_name); 01345 } 01346 case 0xADD8E6 : 01347 { 01348 RGB_color_name = strdup ("Light blue"); 01349 return (RGB_color_name); 01350 } 01351 case 0xFFB6C1 : 01352 { 01353 RGB_color_name = strdup ("Light pink"); 01354 return (RGB_color_name); 01355 } 01356 case 0xC8A2C8 : 01357 { 01358 RGB_color_name = strdup ("Lilac"); 01359 return (RGB_color_name); 01360 } 01361 case 0xBFFF00 : 01362 { 01363 RGB_color_name = strdup ("Lime (color wheel)"); 01364 return (RGB_color_name); 01365 } 01366 /* 01367 case 0x00FF00 : 01368 { 01369 RGB_color_name = strdup ("Lime (web) (X11 green)"); 01370 return (RGB_color_name); 01371 } 01372 */ 01373 case 0x32CD32 : 01374 { 01375 RGB_color_name = strdup ("Lime green"); 01376 return (RGB_color_name); 01377 } 01378 case 0xFAF0E6 : 01379 { 01380 RGB_color_name = strdup ("Linen"); 01381 return (RGB_color_name); 01382 } 01383 case 0xFF00FF : 01384 { 01385 RGB_color_name = strdup ("Magenta"); 01386 return (RGB_color_name); 01387 } 01388 case 0xCA1F7B : 01389 { 01390 RGB_color_name = strdup ("Magenta (dye)"); 01391 return (RGB_color_name); 01392 } 01393 case 0xFF0090 : 01394 { 01395 RGB_color_name = strdup ("Magenta (process)"); 01396 return (RGB_color_name); 01397 } 01398 case 0xAAF0D1 : 01399 { 01400 RGB_color_name = strdup ("Magic mint"); 01401 return (RGB_color_name); 01402 } 01403 case 0xF8F4FF : 01404 { 01405 RGB_color_name = strdup ("Magnolia"); 01406 return (RGB_color_name); 01407 } 01408 case 0x0BDA51 : 01409 { 01410 RGB_color_name = strdup ("Malachite"); 01411 return (RGB_color_name); 01412 } 01413 case 0x800000 : 01414 { 01415 RGB_color_name = strdup ("Maroon (HTML/CSS)"); 01416 return (RGB_color_name); 01417 } 01418 case 0xB03060 : 01419 { 01420 RGB_color_name = strdup ("Maroon (X11)"); 01421 return (RGB_color_name); 01422 } 01423 case 0x73C2FB : 01424 { 01425 RGB_color_name = strdup ("Maya blue"); 01426 return (RGB_color_name); 01427 } 01428 case 0xE0B0FF : 01429 { 01430 RGB_color_name = strdup ("Mauve"); 01431 return (RGB_color_name); 01432 } 01433 case 0x915F6D : 01434 { 01435 RGB_color_name = strdup ("Mauve Taupe"); 01436 return (RGB_color_name); 01437 } 01438 case 0x0000CD : 01439 { 01440 RGB_color_name = strdup ("Medium blue"); 01441 return (RGB_color_name); 01442 } 01443 /* 01444 case 0xAF4035 : 01445 { 01446 RGB_color_name = strdup ("Medium carmine"); 01447 return (RGB_color_name); 01448 } 01449 */ 01450 case 0xCC99CC : 01451 { 01452 RGB_color_name = strdup ("Medium lavender magenta"); 01453 return (RGB_color_name); 01454 } 01455 case 0x9370DB : 01456 { 01457 RGB_color_name = strdup ("Medium purple"); 01458 return (RGB_color_name); 01459 } 01460 case 0x00FA9A : 01461 { 01462 RGB_color_name = strdup ("Medium spring green"); 01463 return (RGB_color_name); 01464 } 01465 case 0x191970 : 01466 { 01467 RGB_color_name = strdup ("Midnight Blue"); 01468 return (RGB_color_name); 01469 } 01470 case 0x004953 : 01471 { 01472 RGB_color_name = strdup ("Midnight Green (Eagle Green)"); 01473 return (RGB_color_name); 01474 } 01475 case 0x98FF98 : 01476 { 01477 RGB_color_name = strdup ("Mint green"); 01478 return (RGB_color_name); 01479 } 01480 case 0xFFE4E1 : 01481 { 01482 RGB_color_name = strdup ("Misty rose"); 01483 return (RGB_color_name); 01484 } 01485 case 0xADDFAD : 01486 { 01487 RGB_color_name = strdup ("Moss green"); 01488 return (RGB_color_name); 01489 } 01490 case 0x997A8D : 01491 { 01492 RGB_color_name = strdup ("Mountbatten pink"); 01493 return (RGB_color_name); 01494 } 01495 case 0xFFDB58 : 01496 { 01497 RGB_color_name = strdup ("Mustard"); 01498 return (RGB_color_name); 01499 } 01500 case 0x21421E : 01501 { 01502 RGB_color_name = strdup ("Myrtle"); 01503 return (RGB_color_name); 01504 } 01505 case 0x006633 : 01506 { 01507 RGB_color_name = strdup ("MSU Green"); 01508 return (RGB_color_name); 01509 } 01510 case 0xFFDEAD : 01511 { 01512 RGB_color_name = strdup ("Navajo white"); 01513 return (RGB_color_name); 01514 } 01515 case 0x000080 : 01516 { 01517 RGB_color_name = strdup ("Navy Blue"); 01518 return (RGB_color_name); 01519 } 01520 case 0xCC7722 : 01521 { 01522 RGB_color_name = strdup ("Ochre"); 01523 return (RGB_color_name); 01524 } 01525 case 0x008000 : 01526 { 01527 RGB_color_name = strdup ("Office green"); 01528 return (RGB_color_name); 01529 } 01530 case 0xCFB53B : 01531 { 01532 RGB_color_name = strdup ("Old Gold"); 01533 return (RGB_color_name); 01534 } 01535 case 0xFDF5E6 : 01536 { 01537 RGB_color_name = strdup ("Old Lace"); 01538 return (RGB_color_name); 01539 } 01540 case 0x796878 : 01541 { 01542 RGB_color_name = strdup ("Old Lavender"); 01543 return (RGB_color_name); 01544 } 01545 case 0xC08081 : 01546 { 01547 RGB_color_name = strdup ("Old Rose"); 01548 return (RGB_color_name); 01549 } 01550 case 0x808000 : 01551 { 01552 RGB_color_name = strdup ("Olive"); 01553 return (RGB_color_name); 01554 } 01555 case 0x6B8E23 : 01556 { 01557 RGB_color_name = strdup ("Olive Drab"); 01558 return (RGB_color_name); 01559 } 01560 case 0x9AB973 : 01561 { 01562 RGB_color_name = strdup ("Olivine"); 01563 return (RGB_color_name); 01564 } 01565 case 0xFF7F00 : 01566 { 01567 RGB_color_name = strdup ("Orange (color wheel)"); 01568 return (RGB_color_name); 01569 } 01570 case 0xFB9902 : 01571 { 01572 RGB_color_name = strdup ("Orange (RYB)"); 01573 return (RGB_color_name); 01574 } 01575 case 0xFFA500 : 01576 { 01577 RGB_color_name = strdup ("Orange (web)"); 01578 return (RGB_color_name); 01579 } 01580 case 0xFFA000 : 01581 { 01582 RGB_color_name = strdup ("Orange Peel"); 01583 return (RGB_color_name); 01584 } 01585 case 0xFF4500 : 01586 { 01587 RGB_color_name = strdup ("Orange-Red"); 01588 return (RGB_color_name); 01589 } 01590 case 0xDA70D6 : 01591 { 01592 RGB_color_name = strdup ("Orchid"); 01593 return (RGB_color_name); 01594 } 01595 case 0xAFEEEE : 01596 { 01597 RGB_color_name = strdup ("Pale blue"); 01598 return (RGB_color_name); 01599 } 01600 case 0x987654 : 01601 { 01602 RGB_color_name = strdup ("Pale brown"); 01603 return (RGB_color_name); 01604 } 01605 case 0xAF4035 : 01606 { 01607 RGB_color_name = strdup ("Pale carmine"); 01608 return (RGB_color_name); 01609 } 01610 case 0xDDADAF : 01611 { 01612 RGB_color_name = strdup ("Pale chestnut"); 01613 return (RGB_color_name); 01614 } 01615 case 0xABCDEF : 01616 { 01617 RGB_color_name = strdup ("Pale cornflower blue"); 01618 return (RGB_color_name); 01619 } 01620 case 0xF984E5 : 01621 { 01622 RGB_color_name = strdup ("Pale magenta"); 01623 return (RGB_color_name); 01624 } 01625 case 0xFADADD : 01626 { 01627 RGB_color_name = strdup ("Pale pink"); 01628 return (RGB_color_name); 01629 } 01630 case 0xDB7093 : 01631 { 01632 RGB_color_name = strdup ("Pale red-violet"); 01633 return (RGB_color_name); 01634 } 01635 case 0xBC987E : 01636 { 01637 RGB_color_name = strdup ("Pale taupe"); 01638 return (RGB_color_name); 01639 } 01640 case 0xFFEFD5 : 01641 { 01642 RGB_color_name = strdup ("Papaya whip"); 01643 return (RGB_color_name); 01644 } 01645 case 0x77DD77 : 01646 { 01647 RGB_color_name = strdup ("Pastel green"); 01648 return (RGB_color_name); 01649 } 01650 case 0xFFD1DC : 01651 { 01652 RGB_color_name = strdup ("Pastel pink"); 01653 return (RGB_color_name); 01654 } 01655 case 0x40404F : 01656 { 01657 RGB_color_name = strdup ("Payne's grey"); 01658 return (RGB_color_name); 01659 } 01660 case 0xFFE5B4 : 01661 { 01662 RGB_color_name = strdup ("Peach"); 01663 return (RGB_color_name); 01664 } 01665 case 0xFFCC99 : 01666 { 01667 RGB_color_name = strdup ("Peach-orange"); 01668 return (RGB_color_name); 01669 } 01670 case 0xFADFAD : 01671 { 01672 RGB_color_name = strdup ("Peach-yellow"); 01673 return (RGB_color_name); 01674 } 01675 case 0xD1E231 : 01676 { 01677 RGB_color_name = strdup ("Pear"); 01678 return (RGB_color_name); 01679 } 01680 /* 01681 case 0xCCCCFF : 01682 { 01683 RGB_color_name = strdup ("Periwinkle"); 01684 return (RGB_color_name); 01685 } 01686 */ 01687 case 0x1C39BB : 01688 { 01689 RGB_color_name = strdup ("Persian blue"); 01690 return (RGB_color_name); 01691 } 01692 case 0x00A693 : 01693 { 01694 RGB_color_name = strdup ("Persian green"); 01695 return (RGB_color_name); 01696 } 01697 case 0x32127A : 01698 { 01699 RGB_color_name = strdup ("Persian indigo"); 01700 return (RGB_color_name); 01701 } 01702 case 0xD99058 : 01703 { 01704 RGB_color_name = strdup ("Persian orange"); 01705 return (RGB_color_name); 01706 } 01707 case 0xCC3333 : 01708 { 01709 RGB_color_name = strdup ("Persian red"); 01710 return (RGB_color_name); 01711 } 01712 case 0xF77FBE : 01713 { 01714 RGB_color_name = strdup ("Persian pink"); 01715 return (RGB_color_name); 01716 } 01717 case 0xFE28A2 : 01718 { 01719 RGB_color_name = strdup ("Persian rose"); 01720 return (RGB_color_name); 01721 } 01722 case 0xEC5800 : 01723 { 01724 RGB_color_name = strdup ("Persimmon"); 01725 return (RGB_color_name); 01726 } 01727 case 0x01796F : 01728 { 01729 RGB_color_name = strdup ("Pine green"); 01730 return (RGB_color_name); 01731 } 01732 case 0xFFC0CB : 01733 { 01734 RGB_color_name = strdup ("Pink"); 01735 return (RGB_color_name); 01736 } 01737 case 0xFF9966 : 01738 { 01739 RGB_color_name = strdup ("Pink-orange"); 01740 return (RGB_color_name); 01741 } 01742 case 0xE5E4E2 : 01743 { 01744 RGB_color_name = strdup ("Platinum"); 01745 return (RGB_color_name); 01746 } 01747 /* 01748 case 0xCC99CC : 01749 { 01750 RGB_color_name = strdup ("Plum (web)"); 01751 return (RGB_color_name); 01752 } 01753 */ 01754 case 0xFF5A36 : 01755 { 01756 RGB_color_name = strdup ("Portland Orange"); 01757 return (RGB_color_name); 01758 } 01759 /* 01760 case 0xB0E0E6 : 01761 { 01762 RGB_color_name = strdup ("Powder blue (web)"); 01763 return (RGB_color_name); 01764 } 01765 */ 01766 case 0xCC8899 : 01767 { 01768 RGB_color_name = strdup ("Puce"); 01769 return (RGB_color_name); 01770 } 01771 case 0x003153 : 01772 { 01773 RGB_color_name = strdup ("Prusian blue"); 01774 return (RGB_color_name); 01775 } 01776 case 0xDD00FF : 01777 { 01778 RGB_color_name = strdup ("Psychedelic purple"); 01779 return (RGB_color_name); 01780 } 01781 case 0xFF7518 : 01782 { 01783 RGB_color_name = strdup ("Pumpkin"); 01784 return (RGB_color_name); 01785 } 01786 case 0x7F007F : 01787 { 01788 RGB_color_name = strdup ("Purple (HTML/CSS)"); 01789 return (RGB_color_name); 01790 } 01791 case 0xA020F0 : 01792 { 01793 RGB_color_name = strdup ("Purple (X11)"); 01794 return (RGB_color_name); 01795 } 01796 case 0x50404D : 01797 { 01798 RGB_color_name = strdup ("Purple Taupe"); 01799 return (RGB_color_name); 01800 } 01801 case 0xE30B5C : 01802 { 01803 RGB_color_name = strdup ("Raspberry"); 01804 return (RGB_color_name); 01805 } 01806 case 0x734A12 : 01807 { 01808 RGB_color_name = strdup ("Raw umber"); 01809 return (RGB_color_name); 01810 } 01811 case 0xE3256B : 01812 { 01813 RGB_color_name = strdup ("Razzmatazz"); 01814 return (RGB_color_name); 01815 } 01816 case 0xFF0000 : 01817 { 01818 RGB_color_name = strdup ("Red"); 01819 return (RGB_color_name); 01820 } 01821 case 0xED1C24 : 01822 { 01823 RGB_color_name = strdup ("Red (pigment)"); 01824 return (RGB_color_name); 01825 } 01826 case 0xFE2712 : 01827 { 01828 RGB_color_name = strdup ("Red (RYB)"); 01829 return (RGB_color_name); 01830 } 01831 case 0xC71585 : 01832 { 01833 RGB_color_name = strdup ("Red-violet"); 01834 return (RGB_color_name); 01835 } 01836 case 0xD70040 : 01837 { 01838 RGB_color_name = strdup ("Rich carmine"); 01839 return (RGB_color_name); 01840 } 01841 case 0x00CCCC : 01842 { 01843 RGB_color_name = strdup ("Robin egg blue"); 01844 return (RGB_color_name); 01845 } 01846 case 0xFF007F : 01847 { 01848 RGB_color_name = strdup ("Rose"); 01849 return (RGB_color_name); 01850 } 01851 case 0xE32636 : 01852 { 01853 RGB_color_name = strdup ("Rose Madder"); 01854 return (RGB_color_name); 01855 } 01856 case 0xFF66CC : 01857 { 01858 RGB_color_name = strdup ("Rose pink"); 01859 return (RGB_color_name); 01860 } 01861 case 0xAA98A9 : 01862 { 01863 RGB_color_name = strdup ("Rose quartz"); 01864 return (RGB_color_name); 01865 } 01866 case 0x905D5D : 01867 { 01868 RGB_color_name = strdup ("Rose Taupe"); 01869 return (RGB_color_name); 01870 } 01871 case 0x4169E1 : 01872 { 01873 RGB_color_name = strdup ("Royal blue"); 01874 return (RGB_color_name); 01875 } 01876 case 0x6B3FA0 : 01877 { 01878 RGB_color_name = strdup ("Royal purple"); 01879 return (RGB_color_name); 01880 } 01881 case 0xE0115F : 01882 { 01883 RGB_color_name = strdup ("Ruby"); 01884 return (RGB_color_name); 01885 } 01886 case 0x80461B : 01887 { 01888 RGB_color_name = strdup ("Russet"); 01889 return (RGB_color_name); 01890 } 01891 case 0xB7410E : 01892 { 01893 RGB_color_name = strdup ("Rust"); 01894 return (RGB_color_name); 01895 } 01896 case 0xFF6600 : 01897 { 01898 RGB_color_name = strdup ("Safety orange (blaze orange)"); 01899 return (RGB_color_name); 01900 } 01901 case 0xF4C430 : 01902 { 01903 RGB_color_name = strdup ("Saffron"); 01904 return (RGB_color_name); 01905 } 01906 case 0xFF8C69 : 01907 { 01908 RGB_color_name = strdup ("Salmon"); 01909 return (RGB_color_name); 01910 } 01911 case 0xFF91A4 : 01912 { 01913 RGB_color_name = strdup ("Salmon pink"); 01914 return (RGB_color_name); 01915 } 01916 case 0xF4A460 : 01917 { 01918 RGB_color_name = strdup ("Sandy brown"); 01919 return (RGB_color_name); 01920 } 01921 case 0x92000A : 01922 { 01923 RGB_color_name = strdup ("Sangria"); 01924 return (RGB_color_name); 01925 } 01926 case 0x082567 : 01927 { 01928 RGB_color_name = strdup ("Sapphire"); 01929 return (RGB_color_name); 01930 } 01931 case 0xFF2400 : 01932 { 01933 RGB_color_name = strdup ("Scarlet"); 01934 return (RGB_color_name); 01935 } 01936 case 0xFFD800 : 01937 { 01938 RGB_color_name = strdup ("School bus yellow"); 01939 return (RGB_color_name); 01940 } 01941 case 0x2E8B57 : 01942 { 01943 RGB_color_name = strdup ("Sea green"); 01944 return (RGB_color_name); 01945 } 01946 case 0x321414 : 01947 { 01948 RGB_color_name = strdup ("Seal brown"); 01949 return (RGB_color_name); 01950 } 01951 case 0xFFF5EE : 01952 { 01953 RGB_color_name = strdup ("Seashell"); 01954 return (RGB_color_name); 01955 } 01956 case 0xFFBA00 : 01957 { 01958 RGB_color_name = strdup ("Selective yellow"); 01959 return (RGB_color_name); 01960 } 01961 case 0x704214 : 01962 { 01963 RGB_color_name = strdup ("Sepia"); 01964 return (RGB_color_name); 01965 } 01966 case 0x009E60 : 01967 { 01968 RGB_color_name = strdup ("Shamrock green"); 01969 return (RGB_color_name); 01970 } 01971 case 0xFC0FC0 : 01972 { 01973 RGB_color_name = strdup ("Shocking pink"); 01974 return (RGB_color_name); 01975 } 01976 case 0xA0522D : 01977 { 01978 RGB_color_name = strdup ("Sienna"); 01979 return (RGB_color_name); 01980 } 01981 case 0xC0C0C0 : 01982 { 01983 RGB_color_name = strdup ("Silver"); 01984 return (RGB_color_name); 01985 } 01986 case 0x87CEEB : 01987 { 01988 RGB_color_name = strdup ("Sky Blue"); 01989 return (RGB_color_name); 01990 } 01991 case 0x708090 : 01992 { 01993 RGB_color_name = strdup ("Slate grey"); 01994 return (RGB_color_name); 01995 } 01996 case 0x003399 : 01997 { 01998 RGB_color_name = strdup ("Smalt (Dark powder blue)"); 01999 return (RGB_color_name); 02000 } 02001 case 0xA7FC00 : 02002 { 02003 RGB_color_name = strdup ("Spring bud"); 02004 return (RGB_color_name); 02005 } 02006 case 0x00FF7F : 02007 { 02008 RGB_color_name = strdup ("Spring green"); 02009 return (RGB_color_name); 02010 } 02011 case 0x4682B4 : 02012 { 02013 RGB_color_name = strdup ("Steel blue"); 02014 return (RGB_color_name); 02015 } 02016 case 0xD2B48C : 02017 { 02018 RGB_color_name = strdup ("Tan"); 02019 return (RGB_color_name); 02020 } 02021 case 0xF28500 : 02022 { 02023 RGB_color_name = strdup ("Tangerine"); 02024 return (RGB_color_name); 02025 } 02026 case 0xFFCC00 : 02027 { 02028 RGB_color_name = strdup ("Tangerine yellow"); 02029 return (RGB_color_name); 02030 } 02031 case 0x483C32 : 02032 { 02033 RGB_color_name = strdup ("Taupe"); 02034 return (RGB_color_name); 02035 } 02036 case 0x8B8589 : 02037 { 02038 RGB_color_name = strdup ("Taupe gray"); 02039 return (RGB_color_name); 02040 } 02041 case 0xD0F0C0 : 02042 { 02043 RGB_color_name = strdup ("Tea green"); 02044 return (RGB_color_name); 02045 } 02046 /* 02047 case 0xF88379 : 02048 { 02049 RGB_color_name = strdup ("Tea rose (orange)"); 02050 return (RGB_color_name); 02051 } 02052 */ 02053 case 0xF4C2C2 : 02054 { 02055 RGB_color_name = strdup ("Tea rose (rose)"); 02056 return (RGB_color_name); 02057 } 02058 case 0x008080 : 02059 { 02060 RGB_color_name = strdup ("Teal"); 02061 return (RGB_color_name); 02062 } 02063 case 0xCD5700 : 02064 { 02065 RGB_color_name = strdup ("Tenné (Tawny)"); 02066 return (RGB_color_name); 02067 } 02068 case 0xE2725B : 02069 { 02070 RGB_color_name = strdup ("Terra cotta"); 02071 return (RGB_color_name); 02072 } 02073 case 0xD8BFD8 : 02074 { 02075 RGB_color_name = strdup ("Thistle"); 02076 return (RGB_color_name); 02077 } 02078 case 0xDE6FA1 : 02079 { 02080 RGB_color_name = strdup ("Thullian pink"); 02081 return (RGB_color_name); 02082 } 02083 case 0xFF6347 : 02084 { 02085 RGB_color_name = strdup ("Tomato"); 02086 return (RGB_color_name); 02087 } 02088 case 0x30D5C8 : 02089 { 02090 RGB_color_name = strdup ("Turquoise"); 02091 return (RGB_color_name); 02092 } 02093 case 0x66023C : 02094 { 02095 RGB_color_name = strdup ("Tyrian Purple"); 02096 return (RGB_color_name); 02097 } 02098 case 0x120A8F : 02099 { 02100 RGB_color_name = strdup ("Ultramarine"); 02101 return (RGB_color_name); 02102 } 02103 case 0xFF6FFF : 02104 { 02105 RGB_color_name = strdup ("Ultra pink"); 02106 return (RGB_color_name); 02107 } 02108 case 0x5B92E5 : 02109 { 02110 RGB_color_name = strdup ("United Nations blue"); 02111 return (RGB_color_name); 02112 } 02113 case 0xAE2029 : 02114 { 02115 RGB_color_name = strdup ("Upsdell red"); 02116 return (RGB_color_name); 02117 } 02118 case 0xC5B358 : 02119 { 02120 RGB_color_name = strdup ("Vegas Gold"); 02121 return (RGB_color_name); 02122 } 02123 case 0xC80815 : 02124 { 02125 RGB_color_name = strdup ("Venetian red"); 02126 return (RGB_color_name); 02127 } 02128 case 0xE34234 : 02129 { 02130 RGB_color_name = strdup ("Vermilion"); 02131 return (RGB_color_name); 02132 } 02133 case 0x8B00FF : 02134 { 02135 RGB_color_name = strdup ("Violet"); 02136 return (RGB_color_name); 02137 } 02138 /* 02139 case 0xEE82EE : 02140 { 02141 RGB_color_name = strdup ("Violet (web)"); 02142 return (RGB_color_name); 02143 } 02144 */ 02145 case 0x8601AF : 02146 { 02147 RGB_color_name = strdup ("Violet (RYB)"); 02148 return (RGB_color_name); 02149 } 02150 case 0x40826D : 02151 { 02152 RGB_color_name = strdup ("Viridian"); 02153 return (RGB_color_name); 02154 } 02155 case 0xF5DEB3 : 02156 { 02157 RGB_color_name = strdup ("Wheat"); 02158 return (RGB_color_name); 02159 } 02160 case 0xFFFFFF : 02161 { 02162 RGB_color_name = strdup ("White"); 02163 return (RGB_color_name); 02164 } 02165 case 0xC9A0DC : 02166 { 02167 RGB_color_name = strdup ("Wisteria"); 02168 return (RGB_color_name); 02169 } 02170 case 0x738678 : 02171 { 02172 RGB_color_name = strdup ("Xanadu"); 02173 return (RGB_color_name); 02174 } 02175 case 0x0F4D92 : 02176 { 02177 RGB_color_name = strdup ("Yale Blue"); 02178 return (RGB_color_name); 02179 } 02180 case 0xFFFF00 : 02181 { 02182 RGB_color_name = strdup ("Yellow"); 02183 return (RGB_color_name); 02184 } 02185 case 0xFFEF00 : 02186 { 02187 RGB_color_name = strdup ("Yellow (process)"); 02188 return (RGB_color_name); 02189 } 02190 case 0xFEFE33 : 02191 { 02192 RGB_color_name = strdup ("Yellow (RYB)"); 02193 return (RGB_color_name); 02194 } 02195 case 0x9ACD32 : 02196 { 02197 RGB_color_name = strdup ("Yellow-green"); 02198 return (RGB_color_name); 02199 } 02200 default: 02201 { 02202 return (NULL); 02203 } 02204 } 02205 #if DEBUG 02206 DXF_DEBUG_END 02207 #endif 02208 } 02209 02210 02218 int 02219 dxf_RGB_color_free 02220 ( 02221 DxfRGBColor *RGB_color 02224 ) 02225 { 02226 #ifdef DEBUG 02227 DXF_DEBUG_BEGIN 02228 #endif 02229 /* Do some basic checks. */ 02230 if (RGB_color == NULL) 02231 { 02232 fprintf (stderr, 02233 (_("Warning in %s () a NULL pointer was passed.\n")), 02234 __FUNCTION__); 02235 return (EXIT_FAILURE); 02236 } 02237 if (RGB_color->name == NULL) 02238 { 02239 fprintf (stderr, 02240 (_("Warning in %s () a NULL pointer to a DxfRGBColor name was passed.\n")), 02241 __FUNCTION__); 02242 return (EXIT_FAILURE); 02243 } 02244 free (RGB_color->name); 02245 free (RGB_color); 02246 RGB_color = NULL; 02247 #ifdef DEBUG 02248 DXF_DEBUG_END 02249 #endif 02250 return (EXIT_SUCCESS); 02251 } 02252 02253 02264 void 02265 dxf_RGB_color_free_chain 02266 ( 02267 DxfRGBColor *colors 02269 ) 02270 { 02271 #ifdef DEBUG 02272 DXF_DEBUG_BEGIN 02273 #endif 02274 if (colors == NULL) 02275 { 02276 fprintf (stderr, 02277 (_("Warning in %s () a NULL pointer was passed.\n")), 02278 __FUNCTION__); 02279 } 02280 while (colors != NULL) 02281 { 02282 struct DxfRGBColor *iter = colors->next; 02283 dxf_RGB_color_free (colors); 02284 colors = (DxfRGBColor *) iter; 02285 } 02286 #if DEBUG 02287 DXF_DEBUG_END 02288 #endif 02289 } 02290 02291 02292 /* EOF */