home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / Xt / XtFindFile.z / XtFindFile
Encoding:
Text File  |  2002-10-03  |  4.6 KB  |  133 lines

  1.  
  2.  
  3.  
  4.      XXXXttttFFFFiiiinnnnddddFFFFiiiilllleeee((((3333XXXXtttt))))    XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))     XXXXttttFFFFiiiinnnnddddFFFFiiiilllleeee((((3333XXXXtttt))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XtFindFile - search for a file using substitutions in the
  10.           path list
  11.  
  12.      SSSSYYYYNNNNTTTTAAAAXXXX
  13.           String XtFindFile(_p_a_t_h, _s_u_b_s_t_i_t_u_t_i_o_n_s,
  14.           _n_u_m__s_u_b_s_t_i_t_u_t_i_o_n_s,_p_r_e_d_i_c_a_t_e)
  15.                 String _p_a_t_h;
  16.                 Substitution _s_u_b_s_t_i_t_u_t_i_o_n_s;
  17.                 Cardinal _n_u_m__s_u_b_s_t_i_t_u_t_i_o_n_s;
  18.                 XtFilePredicate _p_r_e_d_i_c_a_t_e;
  19.  
  20.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  21.           _p_a_t_h      Specifies a path of file names, including
  22.                     substitution characters.
  23.  
  24.           _s_u_b_s_t_i_t_u_t_i_o_n_s
  25.                     Specifies a list of substitutions to make into a
  26.                     path.
  27.  
  28.           _n_u_m__s_u_b_s_t_i_t_u_t_i_o_n_s
  29.                     Specifies the number of substitutions passed in.
  30.  
  31.           _p_r_e_d_i_c_a_t_e Specifies a procedure to call to judge a potential
  32.                     file name, or NULL.
  33.  
  34.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  35.           The _p_a_t_h parameter specifies a string that consists of a
  36.           series of potential file names delimited by colons.  Within
  37.           each name, the percent character specifies a string
  38.           substitution selected by the following character.  The
  39.           character sequence ``%:'' specifies an embedded colon that
  40.           is not a delimiter; the sequence is replaced by a single
  41.           colon.  The character sequence ``%%'' specifies a percent
  42.           character that does not introduce a substitution; the
  43.           sequence is replaced by a single percent character.  If a
  44.           percent character is followed by any other character, looks
  45.           through the specified _s_u_b_s_t_i_t_u_t_i_o_n_s for that character in
  46.           the _m_a_t_c_h field and if found replaces the percent and match
  47.           characters with the string in the corresponding _s_u_b_s_t_i_t_u_t_i_o_n
  48.           field.  A _s_u_b_s_t_i_t_u_t_i_o_n field entry of NULL is equivalent to
  49.           a pointer to an empty string.  If the operating system does
  50.           not interpret multiple embedded name separators in the path
  51.           (i.e., ``/'' in POSIX) the same way as a single separator,
  52.           will collapse multiple separators into a single one after
  53.           performing all string substitutions.  Except for collapsing
  54.           embedded separators, the contents of the string
  55.           substitutions are not interpreted by and may therefore
  56.           contain any operating-system-dependent characters, including
  57.           additional name separators.  Each resulting string is passed
  58.           to the predicate procedure until a string is found for which
  59.           the procedure returns this string is the return value for If
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 10/3/02)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXttttFFFFiiiinnnnddddFFFFiiiilllleeee((((3333XXXXtttt))))    XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))     XXXXttttFFFFiiiinnnnddddFFFFiiiilllleeee((((3333XXXXtttt))))
  71.  
  72.  
  73.  
  74.           no string yields a return from the predicate, returns NULL.
  75.  
  76.           If the _p_r_e_d_i_c_a_t_e parameter is NULL, an internal procedure
  77.           that checks if the file exists, is readable, and is not a
  78.           directory will be used.
  79.  
  80.           It is the responsibility of the caller to free the returned
  81.           string using when it is no longer needed.
  82.  
  83.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  84.           _X _T_o_o_l_k_i_t _I_n_t_r_i_n_s_i_c_s - _C _L_a_n_g_u_a_g_e _I_n_t_e_r_f_a_c_e
  85.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 10/3/02)
  130.  
  131.  
  132.  
  133.