blob: 22db3d4d15c47c3daf4abff23761a063492724d5 [file] [log] [blame]
Keisuke Kuroyanagie101a532014-10-31 20:27:06 +09001/*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include <cstdio>
18
Keisuke Kuroyanagi4bfa3b22014-11-07 06:49:34 +090019#include "dict_toolkit_defines.h"
20#include "utils/command_utils.h"
21
22void usage(int argc, char **argv) {
23 fprintf(stderr, "Usage: %s <command> [arguments]\n", argc > 0 ? argv[0] : "dicttoolkit");
24}
25
Keisuke Kuroyanagie101a532014-10-31 20:27:06 +090026int main(int argc, char **argv) {
Keisuke Kuroyanagi4bfa3b22014-11-07 06:49:34 +090027 if (argc < MIN_ARG_COUNT) {
28 usage(argc, argv);
29 return 0;
30 }
31 using namespace latinime::dicttoolkit;
32 const CommandType commandType = CommandUtils::getCommandType(argv[1]);
33 if (commandType == CommandType::Unknown) {
34 CommandUtils::printCommandUnknownMessage(argv[0], argv[1]);
35 return 0;
36 }
Keisuke Kuroyanagie101a532014-10-31 20:27:06 +090037 // TODO: Implement.
Keisuke Kuroyanagi4bfa3b22014-11-07 06:49:34 +090038 fprintf(stderr, "Command '%s' has not been implemented yet.\n", argv[1]);
Keisuke Kuroyanagie101a532014-10-31 20:27:06 +090039 return 0;
40}