File librcc-0.2.9-provide_prototype.patch of Package librcc0

Description: Fix clean-up in the case of context initialization failure (call rccFreeContext instead of rccFree)
Author: Suren A. Chilingaryan <csa@dside.dyndns.org>

Index: src/librcc.c
===================================================================
--- src/librcc.c.orig	2010-06-05 13:56:37.000000000 +0400
+++ src/librcc.c	2010-06-05 13:56:40.000000000 +0400
@@ -82,7 +82,7 @@ rcc_compiled_configuration rccGetCompile
     return &compiled_configuration;
 }
 
-int rccInit() {
+int rccInit(void) {
     int err;
     unsigned long i, rpos;
     
@@ -126,7 +126,7 @@ int rccInit() {
     return 0;
 }
 
-void rccFree() {
+void rccFree(void) {
     if (rcc_default_ctx) {
 	rccFreeContext(rcc_default_ctx);
 	rcc_default_ctx = NULL;
@@ -233,7 +233,7 @@ rcc_context rccCreateContext(const char
 
     if (locale_variable) {
 	if (strlen(locale_variable)>=RCC_MAX_VARIABLE_CHARS) {
-	    rccFree(ctx);
+	    rccFreeContext(ctx);
 	    return NULL;
 	}
 	strcpy(ctx->locale_variable, locale_variable);
@@ -251,7 +251,7 @@ rcc_context rccCreateContext(const char
 	    rccRegisterLanguage(ctx, rcc_default_languages+i);
 
 	if (max_languages < i) {
-	    rccFree(ctx);
+	    rccFreeContext(ctx);
 	    return NULL;
 	}
 
@@ -266,7 +266,7 @@ rcc_context rccCreateContext(const char
 	    rccRegisterClass(ctx, defclasses+i);
 
 	if (max_classes < i) {
-	    rccFree(ctx);
+	    rccFreeContext(ctx);
 	    return NULL;
 	}	    
     }