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
29       potential file names delimited by colons.  Within each name, the per‐
30       cent character specifies a string substitution selected by the follow‐
31       ing character.  The character sequence ``%:'' specifies an embedded
32       colon that is not a delimiter; the sequence is replaced by a single
33       colon.  The character sequence ``%%'' specifies a percent character
34       that does not introduce a substitution; the sequence is replaced by a
35       single percent character.  If a percent character is followed by any
36       other character, XtFindFile looks through the specified substitutions
37       for that character in the match field and if found replaces the percent
38       and match characters with the string in the corresponding substitution
39       field.  A substitution field entry of NULL is equivalent to a pointer
40       to an empty string.  If the operating system does not interpret multi‐
41       ple embedded name separators in the path (i.e., ``/'' in POSIX) the
42       same way as a single separator, XtFindFile will collapse multiple sepa‐
43       rators into a single one after performing all string substitutions.
44       Except for collapsing embedded separators, the contents of the string
45       substitutions are not interpreted by XtFindFile and may therefore con‐
46       tain any operating-system-dependent characters, including additional
47       name separators.  Each resulting string is passed to the predicate pro‐
48       cedure until a string is found for which the procedure returns True;
49       this string is the return value for XtFindFile.  If no string yields a
50       True return 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
56       using 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.1.5.1                   XtFindFile(3)
Impressum