File: common.cpp

package info (click to toggle)
dtl 1.19-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 424 kB
  • sloc: cpp: 2,214; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 313 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

#include "common.hpp"

bool isFileExist (string& fs) {
    FILE *fp;
    if ((fp = fopen(fs.c_str(), "r")) == NULL) {
        return false;
    }
    fclose(fp);
    return true;
}

bool isFewArgs (int argc, int limit) {
    bool ret = false;
    if (argc < limit) {
        ret = true;
    }
    return ret;
}