Convert (most) functions in src to standard C.
[bpt/emacs.git] / src / filemode.c
index 4a11d2a..c3a5a92 100644 (file)
 #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.
@@ -132,9 +132,7 @@ static void setst ();
        '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);
 }
@@ -143,9 +141,7 @@ filemodestring (statp, 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]);
@@ -167,8 +163,7 @@ mode_string (mode, str)
    '?' for any other file type.  */
 
 static char
-ftypelet (bits)
-     long bits;
+ftypelet (long int bits)
 {
 #ifdef S_ISBLK
   if (S_ISBLK (bits))
@@ -207,9 +202,7 @@ ftypelet (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' : '-';
@@ -220,9 +213,7 @@ rwx (bits, chars)
    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)