moved from libcommon to libscstring

This commit is contained in:
Bob Polis 2020-04-12 22:33:47 +02:00
parent a94f6d1f27
commit 16c8a44251
2 changed files with 6 additions and 6 deletions

View File

@ -22,7 +22,7 @@ else
CXXFLAGS += -O3
endif
LDLIBS := -lm -lpthread -lcommon
LDLIBS := -lm -lpthread -lscstring
LDFLAGS :=
all: $(BIN)

View File

@ -6,6 +6,9 @@
// Copyright (c) 2019 SwiftCoder. All rights reserved.
//
// libcommon
#include <libscstring.hpp>
// UNIX
#include <unistd.h>
#include <libgen.h>
@ -14,9 +17,6 @@
#include <iostream>
using namespace std;
// libcommon
#include <libcommon.hpp>
int main(int argc, const char * argv[]) {
int result = EXIT_SUCCESS;
try {
@ -24,9 +24,9 @@ int main(int argc, const char * argv[]) {
if (argc == 1) {
cin >> text;
} else {
text = su::file_get_contents(argv[1]);
text = sc::file_get_contents(argv[1]);
}
result = su::is_valid_utf8(text) ? EXIT_SUCCESS : EXIT_FAILURE;
result = sc::is_valid_utf8(text) ? EXIT_SUCCESS : EXIT_FAILURE;
} catch (const exception& ex) {
cerr << basename(const_cast<char*>(argv[0])) << ": " << ex.what() << '\n';
result = EXIT_FAILURE;