Go to the documentation of this file.
24 if (*
list !=
NULL)
return EXIT_FAILURE;
61 if (*
p ==
',') ++(*nitems);
73 for (
p = (
char*) strtok(optarg,
",");
75 p = (
char*) strtok((
char*)
NULL,
",")) {
76 (*list)[
i] =
XMALLOC(
char, strlen(
p) + 1);
79 fprintf(
stderr,
"ERROR: Failed to allocate memory for string.\n");
91 for (; nitems > 0; --nitems) {
101 for (
i = 0;
i < n; ++
i)
102 fprintf(
f,
"%s ",
list[
i]);
113 for (
i = 0;
i < nitems; ++
i) {
135 for (
i = 0;
i < nitems; ++
i) {
154 char** newlist =
NULL;
161 newlist[newsize - 1] = (
char*) malloc(
sizeof (
char)*(strlen(
string) + 1));
162 strcpy(newlist[newsize - 1],
string);
171 int strlistu(
char** list1,
char** list2,
char** listunion,
int n1,
int n2,
int nu) {
176 if (listunion ==
NULL) {
180 for (
i = 0;
i < n1; ++
i) {
181 if (list1[
i] ==
NULL)
continue;
188 for (
i = 0;
i < n2; ++
i) {
189 if (list2[
i] ==
NULL)
continue;
198 int strlistsd(
char** list1,
char** list2,
char** listdiff,
int n1,
int n2,
int nsd) {
201 if (listdiff ==
NULL) {
207 }
else if (n2 == 0) {
209 for (
i = 0;
i < n1; ++
i)
212 for (
i = 0;
i < n1; ++
i) {
221 int copystrlist(
char** listsrc,
char** listdst,
int nsrc,
int ndst) {
227 for (
i = 0;
i < ndst; ++
i) {
232 for (
i = 0;
i < nsrc; ++
i) {
233 if (listsrc[
i] ==
NULL)
continue;
235 listdst[
i] =
XMALLOC(
char, strlen(listsrc[
i]) + 1);
246 for (
i = 0;
i < nlist; ++
i) {
int addstringtolist(char **list, char *string, int nitems)
int strlistsd(char **list1, char **list2, char **listdiff, int n1, int n2, int nsd)
list(APPEND LIBS ${PGSTK_LIBRARIES}) add_executable(atteph_info_modis atteph_info_modis.c) target_link_libraries(atteph_info_modis $
int clearstringlist(char **list, int n)
int getnumstrlist(char **list, int nlist)
int copystrlist(char **listsrc, char **listdst, int nsrc, int ndst)
int newstringlist(char ***list, int *n, int size)
void freestringlist(char ***list, int nitems)
int instringlist(char **list, char *str, int nitems)
double precision function f(R1)
int appendstringtolist(char ***list, const char *string, int *nitems)
void getstringlist(char *optarg, char ***list, int *nitems)
#define XMALLOC(type, num)
void printstrlist(char **list, int n, FILE *f)
int strlistu(char **list1, char **list2, char **listunion, int n1, int n2, int nu)
How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy(l2prod->title, "no title yet")