1XtFindFile(3)                    XT FUNCTIONS                    XtFindFile(3)
2
3
4

NAME

6       XtFindFile - search for a file using substitutions in the path list
7

SYNTAX

9       #include <X11/Intrinsic.h>
10
11       char * XtFindFile(const char *path, Substitution substitutions, Cardi‐
12              nal num_substitutions, XtFilePredicate predicate);
13

ARGUMENTS

15       path      Specifies a path of file names, including substitution char‐
16                 acters.
17
18       substitutions
19                 Specifies a list of substitutions to make into a path.
20
21       num_substitutions
22                 Specifies the number of substitutions passed in.
23
24       predicate Specifies a procedure to call to judge a potential file name,
25                 or NULL.
26

DESCRIPTION

28       The path parameter specifies a string that consists of a series of po‐
29       tential file names delimited by colons.  Within each name, the percent
30       character specifies a string substitution selected by the following
31       character.  The character sequence “%:” specifies an embedded colon
32       that is not a delimiter; the sequence is replaced by a single colon.
33       The character sequence “%%” specifies a percent character that does not
34       introduce a substitution; the sequence is replaced by a single percent
35       character.  If a percent character is followed by any other character,
36       XtFindFile looks through the specified substitutions for that character
37       in the match field and if found replaces the percent and match charac‐
38       ters with the string in the corresponding substitution field.  A sub‐
39       stitution field entry of NULL is equivalent to a pointer to an empty
40       string.  If the operating system does not interpret multiple embedded
41       name separators in the path (i.e., “/” in POSIX) the same way as a sin‐
42       gle separator, XtFindFile will collapse multiple separators into a sin‐
43       gle one after performing all string substitutions.  Except for collaps‐
44       ing embedded separators, the contents of the string substitutions are
45       not interpreted by XtFindFile and may therefore contain any operating-
46       system-dependent characters, including additional name separators.
47       Each resulting string is passed to the predicate procedure until a
48       string is found for which the procedure returns True; this string is
49       the return value for XtFindFile.  If no string yields a True return
50       from the predicate, XtFindFile returns NULL.
51
52       If the predicate parameter is NULL, an internal procedure that checks
53       if the file exists, is readable, and is not a directory will be used.
54
55       It is the responsibility of the caller to free the returned string us‐
56       ing XtFree when it is no longer needed.
57

SEE ALSO

59       X Toolkit Intrinsics - C Language Interface
60       Xlib - C Language X Interface
61
62
63
64X Version 11                      libXt 1.2.1                    XtFindFile(3)
Impressum