X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Fheaders%2Fstring_op.h;fp=src%2Fheaders%2Fstring_op.h;h=44e30b10cdf60d493f2f147149507d2f23d76bf0;hp=b56f49ae531470a199e46fee5f3115ddfb4096db;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hpb=927951d1c1ad45ba9e7325f07d996154a91c911b diff --git a/src/headers/string_op.h b/src/headers/string_op.h old mode 100755 new mode 100644 index b56f49a..44e30b1 --- a/src/headers/string_op.h +++ b/src/headers/string_op.h @@ -1,6 +1,3 @@ -/* @(#) $Id: ./src/headers/string_op.h, 2011/09/08 dcid Exp $ - */ - /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. * @@ -8,30 +5,22 @@ * and/or modify it under the terms of the GNU General Public * License (version 2) as published by the FSF - Free Software * Foundation - * - * License details at the LICENSE file included with OSSEC or - * online at: http://www.ossec.net/en/licensing.html */ - #ifndef H_STRINGOP_OS #define H_STRINGOP_OS - -/** os_trimcrlf - * Trims the cr and/or LF from the last positions of a string - */ -void os_trimcrlf(char *str); +/* Trim the CR and/or LF from the last positions of a string */ +void os_trimcrlf(char *str) __attribute__((nonnull)); /* Similiar to Perl's substr() function */ -int os_substr(char *dest, const char *src, int position, int length); +int os_substr(char *dest, const char *src, size_t position, ssize_t length) __attribute__((nonnull(1))); /* Remove a character from a string */ -char *os_strip_char(char *source, char remove); +char *os_strip_char(const char *source, char remove) __attribute__((nonnull)); /* Escape a list of characters with a backslash */ char *os_shell_escape(const char *src); #endif -/* EOF */