From 16c8a442510ce78731e6a55d57ffb7cad5d77bb3 Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Sun, 12 Apr 2020 22:33:47 +0200 Subject: [PATCH] moved from libcommon to libscstring --- Makefile | 2 +- main.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 1b208ad..3bfe6d3 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ else CXXFLAGS += -O3 endif -LDLIBS := -lm -lpthread -lcommon +LDLIBS := -lm -lpthread -lscstring LDFLAGS := all: $(BIN) diff --git a/main.cpp b/main.cpp index 6d29350..925420f 100644 --- a/main.cpp +++ b/main.cpp @@ -6,6 +6,9 @@ // Copyright (c) 2019 SwiftCoder. All rights reserved. // +// libcommon +#include + // UNIX #include #include @@ -14,9 +17,6 @@ #include using namespace std; -// libcommon -#include - 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(argv[0])) << ": " << ex.what() << '\n'; result = EXIT_FAILURE;