]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/info.c
commands: Rename the command functions
[empserver] / src / lib / commands / info.c
index cd9d4a008bb8d1af4f5a125220722037bb886e95..dd7069b5bcc97e782a8a99f52583f2e08e37bc28 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2020, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2021, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
@@ -63,7 +63,7 @@ lowerit(char *buf, int n, char *orig)
 #if !defined(_WIN32)
 
 int
-info(void)
+c_info(void)
 {
     char buf[255];
     FILE *fp;
@@ -145,7 +145,7 @@ info(void)
        fclose(fp);
        return RET_FAIL;
     }
-    if ((statb.st_mode & S_IFREG) == 0) {
+    if (!S_ISREG(statb.st_mode)) {
        pr("Error reading info file for %s\n", name);
        logerror("The info file \"%s\" is not regular file\n", filename);
        fclose(fp);
@@ -159,7 +159,7 @@ info(void)
 }
 
 int
-apro(void)
+c_apropos(void)
 {
     FILE *fp;
     char *name, *lbp;
@@ -220,7 +220,7 @@ apro(void)
                fclose(fp);
                continue;
            }
-           if ((statb.st_mode & S_IFREG) == 0) {
+           if (!S_ISREG(statb.st_mode)) {
                logerror("The info file \"%s\" is not regular file\n",
                         filename);
                fclose(fp);