X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Fheaders%2Fcustom_output_search.h;fp=src%2Fheaders%2Fcustom_output_search.h;h=b803583947964093063405710ceef17a576040ba;hp=a5af2a97b538edc72a19cc30a7dc8d019aa0dae0;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hpb=927951d1c1ad45ba9e7325f07d996154a91c911b diff --git a/src/headers/custom_output_search.h b/src/headers/custom_output_search.h index a5af2a9..b803583 100644 --- a/src/headers/custom_output_search.h +++ b/src/headers/custom_output_search.h @@ -1,77 +1,15 @@ -/* - * custom_output_search.h - * - * Created on: 10/10/2012 - * Author: crosa - */ - -#ifndef CUSTOM_OUTPUT_SEARCH_H_ -#define CUSTOM_OUTPUT_SEARCH_H_ -/** char *searchAndReplace(char* orig, char* search, char*value) - * Searchs for 'search' on orig's string and replaces it by value. - * Returns NULL on error, otherwise returns the orig string with the replacements. - */ -char * searchAndReplace(char* orig, char* search, char*value); - -/** char* escape_newlines(char *orig); - * Escape the newlines characters - * Returns NULL on error, otherwise returns a new allocated string. - */ -char* escape_newlines(char *orig); - - -#endif /* CUSTOM_OUTPUT_SEARCH_H_ */ -/* - * custom_output_search.h - * - * Created on: 10/10/2012 - * Author: crosa - */ - #ifndef CUSTOM_OUTPUT_SEARCH_H_ #define CUSTOM_OUTPUT_SEARCH_H_ -/** char *searchAndReplace(char* orig, char* search, char*value) - * Searchs for 'search' on orig's string and replaces it by value. - * Returns NULL on error, otherwise returns the orig string with the replacements. - */ -char * searchAndReplace(char* orig, char* search, char*value); - - -#endif /* CUSTOM_OUTPUT_SEARCH_H_ */ -/* - * custom_output_search.h - * - * Created on: 10/10/2012 - * Author: crosa +/* Search for 'search' in string and replaces it by value + * Returns NULL on error, otherwise returns the orig string with the replacements */ +char *searchAndReplace(const char *orig, const char *search, const char *value) __attribute__((nonnull)); -#ifndef CUSTOM_OUTPUT_SEARCH_H_ -#define CUSTOM_OUTPUT_SEARCH_H_ -/** char *searchAndReplace(char* orig, char* search, char*value) - * Searchs for 'search' on orig's string and replaces it by value. - * Returns NULL on error, otherwise returns the orig string with the replacements. +/* Escape the newline characters + * Returns NULL on error, otherwise returns a newly allocated string */ -char * searchAndReplace(char* orig, char* search, char*value); - - +char *escape_newlines(const char *orig) __attribute__((nonnull)); #endif /* CUSTOM_OUTPUT_SEARCH_H_ */ -/* - * custom_output_search.h - * - * Created on: 10/10/2012 - * Author: crosa - */ -#ifndef CUSTOM_OUTPUT_SEARCH_H_ -#define CUSTOM_OUTPUT_SEARCH_H_ -/** char *searchAndReplace(char* orig, char* search, char*value) - * Searchs for 'search' on orig's string and replaces it by value. - * Returns NULL on error, otherwise returns the orig string with the replacements. - */ -char * searchAndReplace(char* orig, char* search, char*value); - - - -#endif /* CUSTOM_OUTPUT_SEARCH_H_ */