1/**
2 * \file initialize.c
3 *
4 * initialize the libopts data structures.
5 *
6 * @addtogroup autoopts
7 * @{
8 */
--- 83 unchanged lines hidden (view full) ---
92 }
93
94 /*
95 * If the program name hasn't been set, then set the name and the path
96 * and the set of equivalent characters.
97 */
98 if (opts->pzProgName == NULL) {
99 char const * pz = strrchr(pname, DIRCH);
100 char const ** pp = VOIDP(&(opts->pzProgName));
101
102 if (pz != NULL)
103 *pp = pz+1;
104 else
105 *pp = pname;
106
107 pz = pathfind(getenv("PATH"), pname, "rx");
108 if (pz != NULL)
109 pname = VOIDP(pz);
110
111 pp = (char const **)VOIDP(&(opts->pzProgPath));
112 *pp = pname;
113
114 /*
115 * when comparing long names, these are equivalent
--- 178 unchanged lines hidden ---
2 * \file initialize.c
3 *
4 * initialize the libopts data structures.
5 *
6 * @addtogroup autoopts
7 * @{
8 */
--- 83 unchanged lines hidden (view full) ---
92 }
93
94 /*
95 * If the program name hasn't been set, then set the name and the path
96 * and the set of equivalent characters.
97 */
98 if (opts->pzProgName == NULL) {
99 char const * pz = strrchr(pname, DIRCH);
100 char const ** pp = VOIDP(&(opts->pzProgName));
101
102 if (pz != NULL)
103 *pp = pz+1;
104 else
105 *pp = pname;
106
107 pz = pathfind(getenv("PATH"), pname, "rx");
108 if (pz != NULL)
109 pname = VOIDP(pz);
110
111 pp = (char const **)VOIDP(&(opts->pzProgPath));
112 *pp = pname;
113
114 /*
115 * when comparing long names, these are equivalent
--- 178 unchanged lines hidden ---