2 * update takes a def string and update and fills the
3 * update with missing defs the update allowing
4 * specification of missing parameters.
5 * the parts are: ^{[~:]#:}{%#</|\>}{[~.]#}{.[~./\:]}$
6 * maximum size of MAXPATHLEN (80) bytes
8 * 4/14/86 dl use U_ flags
14 int upd (def, update, dst)
15 char *def, *update, *dst;
17 char *p, buf[MAXPATHLEN];
23 if (drive(update, p) || drive (def, p))
28 if (path(update, p) || path (def, p))
32 if (filename(update, p) || filename (def, p))
36 if (extention(update, p) || extention (def, p))
45 /* copy a drive from source to dest if present, return TRUE if we found one */
51 p = strbscan (src, ":");
56 return strlen (dst) != 0;
60 /* copy an extention from source to dest if present. include the period.
61 Return TRUE if one found.
66 register char *p, *p1;
69 while (*(p=strbscan(1+(p1=p), ".")) != NULL)
71 /* p1 points to last . or begin of string p points to eos */
72 if (*strbscan (p1, "\\/:") != NULL || *p1 != '.')
75 return strlen (dst) != 0;
78 /* copy a filename part from source to dest if present. return true if one
84 register char *p, *p1;
87 while (*(p=strbscan (p1=p+1, "\\/:")) != NULL)
89 /* p1 points after last / or at bos */
90 p = strbscan (p1, ".");
93 return strlen (dst) != 0;
96 /* copy a filename.ext part from source to dest if present. return true if one
103 if ( filename (src, dst) ) {
105 extention (src, dst);
111 /* copy the paths part of the file description. return true if found
116 register char *p, *p1;
118 if (*(p=strbscan (src, ":")) != NULL)
121 /* p points to beginning of possible path (after potential drive spec) */
122 while (*(p=strbscan (p1=p+1, "\\/:")) != NULL)
124 /* p1 points after final / or bos */;
127 return strlen (dst) != 0;