1XtFindFile(3) XT FUNCTIONS XtFindFile(3)
2
3
4
6 XtFindFile - search for a file using substitutions in the path list
7
9 String XtFindFile(String path, Substitution substitutions, Cardinal
10 num_substitutions, XtFilePredicate predicate);
11
13 path Specifies a path of file names, including substitution char‐
14 acters.
15
16 substitutions
17 Specifies a list of substitutions to make into a path.
18
19 num_substitutions
20 Specifies the number of substitutions passed in.
21
22 predicate Specifies a procedure to call to judge a potential file name,
23 or NULL.
24
26 The path parameter specifies a string that consists of a series of
27 potential file names delimited by colons. Within each name, the per‐
28 cent character specifies a string substitution selected by the follow‐
29 ing character. The character sequence ``%:'' specifies an embedded
30 colon that is not a delimiter; the sequence is replaced by a single
31 colon. The character sequence ``%%'' specifies a percent character
32 that does not introduce a substitution; the sequence is replaced by a
33 single percent character. If a percent character is followed by any
34 other character, XtFindFile looks through the specified substitutions
35 for that character in the match field and if found replaces the percent
36 and match characters with the string in the corresponding substitution
37 field. A substitution field entry of NULL is equivalent to a pointer
38 to an empty string. If the operating system does not interpret multi‐
39 ple embedded name separators in the path (i.e., ``/'' in POSIX) the
40 same way as a single separator, XtFindFile will collapse multiple sepa‐
41 rators into a single one after performing all string substitutions.
42 Except for collapsing embedded separators, the contents of the string
43 substitutions are not interpreted by XtFindFile and may therefore con‐
44 tain any operating-system-dependent characters, including additional
45 name separators. Each resulting string is passed to the predicate pro‐
46 cedure until a string is found for which the procedure returns True;
47 this string is the return value for XtFindFile. If no string yields a
48 True return from the predicate, XtFindFile returns NULL.
49
50 If the predicate parameter is NULL, an internal procedure that checks
51 if the file exists, is readable, and is not a directory will be used.
52
53 It is the responsibility of the caller to free the returned string
54 using XtFree when it is no longer needed.
55
57 X Toolkit Intrinsics - C Language Interface
58 Xlib - C Language X Interface
59
60
61
62X Version 11 libXt 1.1.4 XtFindFile(3)