#define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
#endif
-void mode_string ();
-static char ftypelet ();
-static void rwx ();
-static void setst ();
+void mode_string (short unsigned int mode, char *str);
+static char ftypelet (long int bits);
+static void rwx (short unsigned int bits, char *chars);
+static void setst (short unsigned int bits, char *chars);
/* filemodestring - fill in string STR with an ls-style ASCII
representation of the st_mode field of file stats block STATP.
'T' if the file is sticky but not executable. */
void
-filemodestring (statp, str)
- struct stat *statp;
- char *str;
+filemodestring (struct stat *statp, char *str)
{
mode_string (statp->st_mode, str);
}
is given as an argument. */
void
-mode_string (mode, str)
- unsigned short mode;
- char *str;
+mode_string (short unsigned int mode, char *str)
{
str[0] = ftypelet ((long) mode);
rwx ((mode & 0700) << 0, &str[1]);
'?' for any other file type. */
static char
-ftypelet (bits)
- long bits;
+ftypelet (long int bits)
{
#ifdef S_ISBLK
if (S_ISBLK (bits))
flags in CHARS accordingly. */
static void
-rwx (bits, chars)
- unsigned short bits;
- char *chars;
+rwx (short unsigned int bits, char *chars)
{
chars[0] = (bits & S_IRUSR) ? 'r' : '-';
chars[1] = (bits & S_IWUSR) ? 'w' : '-';
according to the file mode BITS. */
static void
-setst (bits, chars)
- unsigned short bits;
- char *chars;
+setst (short unsigned int bits, char *chars)
{
#ifdef S_ISUID
if (bits & S_ISUID)