Changeset 1250 for cacamoo/trunk
- Timestamp:
- Oct 27, 2006, 10:42:52 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cacamoo/trunk/src/main.c
r1246 r1250 252 252 253 253 /* Import our buffer as an ansi (color) one */ 254 input_buffer = cucul_load_memory(buffer, buffer_size );254 input_buffer = cucul_load_memory(buffer, buffer_size-1); 255 255 if(input_buffer == NULL) 256 256 { … … 265 265 } 266 266 /* Export given canvas to format we want */ 267 output_buffer = cucul_export_canvas(canvas, " irc");267 output_buffer = cucul_export_canvas(canvas, "ansi"); 268 268 if(output_buffer == NULL) 269 269 { … … 369 369 /* AHAHAH, THAT'S A COOL PERL INTERPRETER ! */ 370 370 temp2 = replace(temp, " = <<\"EOC\";", ""); 371 if(temp 2 != temp)371 if(temp!=temp2 && temp2 !=NULL) 372 372 { 373 373 free(temp); … … 375 375 } 376 376 temp2 = replace(temp, " = <<EOC;" , ""); 377 if(temp 2 != temp)377 if(temp!=temp2 && temp2 !=NULL) 378 378 { 379 379 free(temp); … … 381 381 } 382 382 temp2 = replace(temp, " = <<EOC" , ""); 383 if(temp 2 != temp)383 if(temp!=temp2 && temp2 !=NULL) 384 384 { 385 385 free(temp); … … 387 387 } 388 388 temp2 = replace(temp, " = << EOC" , ""); 389 if(temp 2 != temp)389 if(temp!=temp2 && temp2 !=NULL) 390 390 { 391 391 free(temp); … … 393 393 } 394 394 temp2 = replace(temp, "EOC" , ""); 395 if(temp 2 != temp)395 if(temp!=temp2 && temp2 !=NULL) 396 396 { 397 397 free(temp); … … 399 399 } 400 400 temp2 = replace(temp, "$eyes" , cacamoo_use_eyes); 401 if(temp 2 != temp)401 if(temp!=temp2 && temp2 !=NULL) 402 402 { 403 403 free(temp); … … 405 405 } 406 406 temp2 = replace(temp, "${eyes}" , cacamoo_use_eyes); 407 if(temp2 != temp) 408 { 409 free(temp); 410 temp = temp2; 411 } 412 407 if(temp!=temp2 && temp2 !=NULL) 408 { 409 free(temp); 410 temp = temp2; 411 } 413 412 temp2 = replace(temp, "$tongue" , cacamoo_use_tongue); 414 if(temp 2 != temp)413 if(temp!=temp2 && temp2 !=NULL) 415 414 { 416 415 free(temp); … … 418 417 } 419 418 temp2 = replace(temp, "${tongue}" , cacamoo_use_tongue); 420 if(temp2 != temp) 421 { 422 free(temp); 423 temp = temp2; 424 } 425 419 if(temp!=temp2 && temp2 !=NULL) 420 { 421 free(temp); 422 temp = temp2; 423 } 426 424 temp2 = replace(temp, "$thoughts" , cacamoo_thoughts); 427 if(temp 2 != temp)425 if(temp!=temp2 && temp2 !=NULL) 428 426 { 429 427 free(temp); … … 431 429 } 432 430 temp2 = replace(temp, "${thoughts}" , cacamoo_thoughts); 433 if(temp2 != temp) 434 { 435 free(temp); 436 temp = temp2; 437 } 438 431 if(temp!=temp2 && temp2 !=NULL) 432 { 433 free(temp); 434 temp = temp2; 435 } 439 436 temp2 = replace(temp, "$the_cow" , (const char*)string); 440 if(temp 2 != temp)437 if(temp!=temp2 && temp2 !=NULL) 441 438 { 442 439 free(temp); … … 444 441 } 445 442 temp2 = replace(temp, "${the_cow}" , (const char*)string); 446 if(temp2 != temp) 447 { 448 free(temp); 449 temp = temp2; 450 } 451 443 if(temp!=temp2 && temp2 !=NULL) 444 { 445 free(temp); 446 temp = temp2; 447 } 452 448 *size = strlen(temp)+1; 453 449 … … 509 505 } 510 506 511 512 507 char *replace(char *str, char *oldpiece, const char *newpiece) 513 508 { … … 554 549 if((c = (char *) strstr(str+str_index, oldpiece)) != NULL) 555 550 oldpiece_index = c - str; 556 557 558 551 } 559 552 /* Copy remaining characters from the right of last matched pattern */
Note: See TracChangeset
for help on using the changeset viewer.