1 /* This program is free software; you can redistribute it and/or modify
2 it under the terms of the GNU General Public License as published by
3 the Free Software Foundation; either version 2, or (at your option)
6 This program is distributed in the hope that it will be useful,
7 but WITHOUT ANY WARRANTY; without even the implied warranty of
8 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 GNU General Public License for more details. */
14 #include <sys/types.h>
16 #include <sys/param.h>
20 /* Expand wildcards in argv. We probably should be expanding wildcards
21 via expand_wild instead; that way we could expand only filenames and
22 not tag names and the like. */
25 os2_initialize (pargc, pargv)
29 _wildcard (pargc, pargv);
33 /* Modifies 'stat' so that always the same inode is returned. EMX never
34 returns the same value for st_ino. Without this modification,
35 release_delete in module src/release.c refuses to work. Care must
36 be taken if someone is using the value of st_ino (but as far as I know,
40 os2_stat (name, buffer)
44 int rc = stat (name, buffer);
46 /* There are no inodes on OS/2. */
53 /* We must not only change the directory, but also the current drive.
54 Otherwise it is be impossible to have the working directory and the
55 repository on different drives. */
61 return _chdir2 (name);
65 /* getwd must return a drive specification. */
70 return _getcwd2 (NULL, 1);
74 /* fnmatch must recognize OS/2 filename conventions: Filename case
75 must be preserved, but ignored in searches. It would perhaps be better
76 to just have CVS pick how to match based on FILENAMES_CASE_INSENSITIVE
77 or something rather than having an OS/2-specific version of CVS_FNMATCH.
78 Note that lib/fnmatch.c uses FOLD_FN_CHAR; that is how we get
79 case-insensitivity on NT (and VMS, I think). */
82 #define _FNM_IGNORECASE 128
85 os2_fnmatch (pattern, name, flags)
90 return fnmatch (pattern, name, _FNM_IGNORECASE | _FNM_OS2 | flags);