projects
/
ossec-hids.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dodan override za lintian
[ossec-hids.git]
/
src
/
os_regex
/
examples
/
regex_str.c
diff --git
a/src/os_regex/examples/regex_str.c
b/src/os_regex/examples/regex_str.c
index
c28346f
..
08e6044
100755
(executable)
--- a/
src/os_regex/examples/regex_str.c
+++ b/
src/os_regex/examples/regex_str.c
@@
-2,12
+2,12
@@
* Under the public domain. It is just an example.
* Some examples of usage for the os_regex library.
*/
* Under the public domain. It is just an example.
* Some examples of usage for the os_regex library.
*/
-
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-
-/* Must be included */
+
+/* Must be included */
#include "os_regex.h"
int main(int argc,char **argv)
#include "os_regex.h"
int main(int argc,char **argv)
@@
-17,7
+17,7
@@
int main(int argc,char **argv)
/* OSRegex structure */
OSRegex reg;
/* OSRegex structure */
OSRegex reg;
-
+
/* checking for arguments */
if(argc != 3)
{
/* checking for arguments */
if(argc != 3)
{
@@
-33,7
+33,7
@@
int main(int argc,char **argv)
if(OSRegex_Compile(argv[1], ®, OS_RETURN_SUBSTRING))
{
char *retv;
if(OSRegex_Compile(argv[1], ®, OS_RETURN_SUBSTRING))
{
char *retv;
- /* If the execution succeeds, the substrings will be
+ /* If the execution succeeds, the substrings will be
* at reg.sub_strings
*/
if((retv = OSRegex_Execute(argv[2], ®)))
* at reg.sub_strings
*/
if((retv = OSRegex_Execute(argv[2], ®)))
@@
-45,7
+45,7
@@
int main(int argc,char **argv)
printf("next pt: '%s'\n", retv);
/* Assigning reg.sub_strings to ret */
ret = reg.sub_strings;
printf("next pt: '%s'\n", retv);
/* Assigning reg.sub_strings to ret */
ret = reg.sub_strings;
-
+
printf("substrings:\n");
while(*ret)
{
printf("substrings:\n");
while(*ret)
{
@@
-63,13
+63,13
@@
int main(int argc,char **argv)
OSRegex_FreePattern(®);
}
OSRegex_FreePattern(®);
}
-
+
/* Compilation error */
else
{
printf("Error: Regex Compile Error: %d\n", reg.error);
}
/* Compilation error */
else
{
printf("Error: Regex Compile Error: %d\n", reg.error);
}
-
+
return(r_code);
}
/* EOF */
return(r_code);
}
/* EOF */