author | Brandon Schaefer <brandon.schaefer@canonical.com> |
Wed, 08 Jun 2016 08:01:21 -0700 | |
changeset 10181 | b82c0f22d22a |
parent 7924 | fcb86d323770 |
permissions | -rw-r--r-- |
7924
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
1 |
/* See COPYING.txt for the full license governing this code. */ |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
2 |
/** |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
3 |
* \file SDL_visualtest_parsehelper.h |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
4 |
* |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
5 |
* Header with some helper functions for parsing strings. |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
6 |
*/ |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
7 |
|
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
8 |
#ifndef _SDL_visualtest_parsehelper_h |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
9 |
#define _SDL_visualtest_parsehelper_h |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
10 |
|
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
11 |
/* Set up for C function definitions, even when using C++ */ |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
12 |
#ifdef __cplusplus |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
13 |
extern "C" { |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
14 |
#endif |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
15 |
|
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
16 |
/** |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
17 |
* Takes an string of command line arguments and breaks them up into an array |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
18 |
* based on whitespace. |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
19 |
* |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
20 |
* \param args The string of arguments. |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
21 |
* |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
22 |
* \return NULL on failure, an array of strings on success. The last element |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
23 |
* of the array is NULL. The first element of the array is NULL and should |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
24 |
* be set to the path of the executable by the caller. |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
25 |
*/ |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
26 |
char** SDLVisualTest_ParseArgsToArgv(char* args); |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
27 |
|
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
28 |
/** |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
29 |
* Takes a string and breaks it into tokens by splitting on whitespace. |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
30 |
* |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
31 |
* \param str The string to be split. |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
32 |
* \param max_token_len Length of each element in the array to be returned. |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
33 |
* |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
34 |
* \return NULL on failure; an array of strings with the tokens on success. The |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
35 |
* last element of the array is NULL. |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
36 |
*/ |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
37 |
char** SDLVisualTest_Tokenize(char* str, int max_token_len); |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
38 |
|
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
39 |
/* Ends C function definitions when using C++ */ |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
40 |
#ifdef __cplusplus |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
41 |
} |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
42 |
#endif |
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
43 |
|
fcb86d323770
Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
44 |
#endif /* _SDL_visualtest_parsehelper_h */ |