deprecation-warning.cpp 576 B

12345678910111213141516171819202122
  1. #include <cstdio>
  2. #include <string>
  3. int main(int argc, char** argv) {
  4. std::string filename = "main";
  5. if (argc >= 1) {
  6. filename = argv[0];
  7. }
  8. // Get only the program name from the full path
  9. size_t pos = filename.find_last_of("/\\");
  10. if (pos != std::string::npos) {
  11. filename = filename.substr(pos+1);
  12. }
  13. fprintf(stdout, "\n");
  14. fprintf(stdout, "WARNING: The binary '%s' is deprecated.\n", filename.c_str());
  15. fprintf(stdout, "Please use 'llama-mtmd-cli' instead.\n");
  16. fprintf(stdout, "\n");
  17. return EXIT_FAILURE;
  18. }