Lines Matching +full:clang +full:- +full:5

1 /* Copyright (c) 2013-2018 the Civetweb developers
2 * Copyright (c) 2004-2013 Sergey Lyubka
39 * http://man7.org/linux/man-pages/man3/realpath.3.html, but in
42 * #pragma GCC diagnostic ignored "-Wimplicit-function-declaration"
43 * #pragma clang diagnostic ignored "-Wimplicit-function-declaration"
66 #define _FILE_OFFSET_BITS 64 /* Use 64-bit file offsets by default */
95 #define _WIN32_WINNT 0x0501 /* for tdm-gcc so we can use getconsolewindow */
123 #else /* defined(_WIN32) && !defined(__SYMBIAN32__) - WINDOWS / UNIX include \
134 #endif /* defined(_WIN32) && !defined(__SYMBIAN32__) - WINDOWS / UNIX include \
241 (void)vsnprintf(msg, sizeof(msg) - 1, fmt, ap); in die()
242 msg[sizeof(msg) - 1] = 0; in die()
286 fprintf(stderr, " %s [-option value ...]\n", exeName); in show_usage_and_exit()
288 fprintf(stderr, " %s -C url\n", exeName); in show_usage_and_exit()
290 fprintf(stderr, " %s -I\n", exeName); in show_usage_and_exit()
293 " %s -A <htpasswd_file> <realm> <user> <passwd>\n", in show_usage_and_exit()
296 fprintf(stderr, " %s -R <htpasswd_file> <realm> <user>\n", exeName); in show_usage_and_exit()
302 " -%s %s\n", in show_usage_and_exit()
312 " -%s %s\n", in show_usage_and_exit()
340 == 5) { in get_url_to_first_open_port()
416 return (unsigned)x - (unsigned)'0';
419 return (unsigned)x - (unsigned)'A' + 10u;
422 return (unsigned)x - (unsigned)'a' + 10u;
467 && isxdigit(d[5])) {
471 + hex2dec(d[5]));
476 memmove(d + mbl, d + 6, strlen(d + 5));
478 d += (mbl - 1);
546 /* TODO (low, api makeover): options should be an array of key-value-pairs, in get_option()
663 die("Unknown option type - option %s", name); in set_option()
731 /* strip UTF-8 BOM */ in read_config_file()
747 && (isspace((unsigned char)p[j - 1]) in read_config_file()
748 || iscntrl((unsigned char)p[j - 1]));) in read_config_file()
749 p[--j] = 0; in read_config_file()
755 /* Terminate the string - then the string at (p+i) contains the in read_config_file()
760 /* Trim additional spaces between option name and value - then in read_config_file()
792 if ((argc > 1) && (argv[1] != NULL) && (argv[1][0] != '-') in process_command_line_arguments()
796 sizeof(g_config_file_name) - 1, in process_command_line_arguments()
804 sizeof(g_config_file_name) - 1, in process_command_line_arguments()
811 sizeof(g_config_file_name) - 1, in process_command_line_arguments()
813 (int)(p - argv[0]), in process_command_line_arguments()
818 g_config_file_name[sizeof(g_config_file_name) - 1] = 0; in process_command_line_arguments()
848 argument is process serial number, -psn_..... in process_command_line_arguments()
850 if (argv[1] == NULL || memcmp(argv[1], "-psn_", 5) != 0) { in process_command_line_arguments()
854 if (argv[i][0] != '-' || argv[i + 1] == NULL) { in process_command_line_arguments()
915 if (ud->first_message == NULL) { in log_message()
916 ud->first_message = sdup(message); in log_message()
953 CP_UTF8, 0, path, -1, wbuf, sizeof(wbuf) / sizeof(wbuf[0]) - 1); in verify_existence()
954 wcstombs(mbbuf, wbuf, sizeof(mbbuf) - 1); in verify_existence()
985 leave it as it is -- it's already absolute. */ in set_absolute_path()
994 sizeof(path) - 1, in set_absolute_path()
996 (int)(p - path_to_civetweb_exe), in set_absolute_path()
998 path[sizeof(path) - 1] = 0; in set_absolute_path()
1001 strncat(path, "/", sizeof(path) - strlen(path) - 1); in set_absolute_path()
1002 strncat(path, option_value, sizeof(path) - strlen(path) - 1); in set_absolute_path()
1034 fprintf(stderr, "%s\n", duk_safe_to_string(ctx, -1)); in run_duktape()
1167 ri->status_code, in run_client()
1168 ri->status_text); in run_client()
1231 /* Start option -I: in start_civetweb()
1234 if (argc > 1 && !strcmp(argv[1], "-I")) { in start_civetweb()
1248 /* Edit passwords file: Add user or change password, if -A option is in start_civetweb()
1250 if (argc > 1 && !strcmp(argv[1], "-A")) { in start_civetweb()
1254 exit(mg_modify_passwords_file(argv[2], argv[3], argv[4], argv[5]) in start_civetweb()
1259 /* Edit passwords file: Remove user, if -R option is specified */ in start_civetweb()
1260 if (argc > 1 && !strcmp(argv[1], "-R")) { in start_civetweb()
1261 if (argc != 5) { in start_civetweb()
1270 if (argc > 1 && !strcmp(argv[1], "-C")) { in start_civetweb()
1278 /* Call Lua with additional CivetWeb specific Lua functions, if -L option in start_civetweb()
1280 if (argc > 1 && !strcmp(argv[1], "-L")) { in start_civetweb()
1297 /* Call Duktape, if -E option is specified */ in start_civetweb()
1298 if (argc > 1 && !strcmp(argv[1], "-E")) { in start_civetweb()
1315 /* Show usage if -h or --help options are specified */ in start_civetweb()
1317 && (!strcmp(argv[1], "-h") || !strcmp(argv[1], "-H") in start_civetweb()
1318 || !strcmp(argv[1], "--help"))) { in start_civetweb()
1331 /* Setup signal handler: quit on Ctrl-C */ in start_civetweb()
1462 static const char *service_magic_argument = "--";
1492 ss.dwWin32ExitCode = (DWORD)-1; in ServiceMain()
1536 sizeof(value) - 1, in save_config()
1539 value[sizeof(value) - 1] = 0; in save_config()
1576 /* disable MSVC warning C4204 (non-constant used to initialize structure) */ in GetDlgHeader()
1735 pdlg_proc_param->hWnd = hDlg; in SettingsDlgProc()
1784 GetWindowText(hIn, inBuf->buffer, (int)inBuf->buflen); in InputDlgProc()
1785 if (inBuf->buffer[0] != 0) { in InputDlgProc()
1797 hIn = GetDlgItem(hDlg, inBuf->idRetry); in InputDlgProc()
1801 GetWindowText(hIn, inBuf->buffer, (int)inBuf->buflen); in InputDlgProc()
1802 if (inBuf->fRetry) { in InputDlgProc()
1803 if (inBuf->fRetry(inBuf)) { in InputDlgProc()
1804 SetWindowText(hIn, inBuf->buffer); in InputDlgProc()
1822 inBuf->hWnd = hDlg; in InputDlgProc()
1825 SetWindowText(hDlg, inBuf->name); in InputDlgProc()
1830 DEBUG_ASSERT((inBuf->buffer != NULL) && (inBuf->buflen != 0)); in InputDlgProc()
1831 DEBUG_ASSERT(strlen(inBuf->buffer) < inBuf->buflen); in InputDlgProc()
1834 SendMessage(hIn, EM_LIMITTEXT, inBuf->buflen - 1, 0); in InputDlgProc()
1835 SetWindowText(hIn, inBuf->buffer); in InputDlgProc()
1865 num.li.QuadPart -= u; in suggest_passwd()
1953 WIDTH - LABEL_WIDTH - 25, in get_password()
1976 WIDTH - LABEL_WIDTH - 25, in get_password()
1998 WIDTH - LABEL_WIDTH - 25, in get_password()
2024 DEBUG_ASSERT((intptr_t)p - (intptr_t)mem < (intptr_t)sizeof(mem)); in get_password()
2026 dia->cy = y + (WORD)(HEIGHT * 1.5); in get_password()
2078 GetWindowText(GetDlgItem(hDlg, ctrlId - ID_FILE_BUTTONS_DELTA * 3), in PasswordDlgProc()
2081 GetWindowText(GetDlgItem(hDlg, ctrlId - ID_FILE_BUTTONS_DELTA * 2), in PasswordDlgProc()
2091 GetWindowText(GetDlgItem(hDlg, ctrlId - ID_FILE_BUTTONS_DELTA * 2), in PasswordDlgProc()
2094 GetWindowText(GetDlgItem(hDlg, ctrlId - ID_FILE_BUTTONS_DELTA), in PasswordDlgProc()
2104 pdlg_proc_param->hWnd = hDlg; in PasswordDlgProc()
2105 passfile = pdlg_proc_param->name; in PasswordDlgProc()
2135 dia->cdit++; in add_control()
2140 tp->id = id; in add_control()
2141 tp->style = style; in add_control()
2142 tp->dwExtendedStyle = 0; in add_control()
2143 tp->x = x; in add_control()
2144 tp->y = y; in add_control()
2145 tp->cx = cx; in add_control()
2146 tp->cy = cy; in add_control()
2197 y = (nelems / 2 + 1) * HEIGHT + 5; in show_settings_dialog()
2198 width = WIDTH / 2 - 20 - LABEL_WIDTH; in show_settings_dialog()
2209 width -= 20; in show_settings_dialog()
2216 x + width + LABEL_WIDTH + 5, in show_settings_dialog()
2252 DEBUG_ASSERT(((intptr_t)p - (intptr_t)mem) < (intptr_t)sizeof(mem)); in show_settings_dialog()
2255 y = (((nelems + 1) / 2 + 1) * HEIGHT + 5); in show_settings_dialog()
2261 5, in show_settings_dialog()
2262 5, in show_settings_dialog()
2263 WIDTH - 10, in show_settings_dialog()
2272 WIDTH - 70, in show_settings_dialog()
2282 WIDTH - 140, in show_settings_dialog()
2292 WIDTH - 210, in show_settings_dialog()
2302 WIDTH - 280, in show_settings_dialog()
2312 5, in show_settings_dialog()
2318 DEBUG_ASSERT(((intptr_t)p - (intptr_t)mem) < (intptr_t)sizeof(mem)); in show_settings_dialog()
2320 dia->cy = ((nelems + 1) / 2 + 1) * HEIGHT + 30; in show_settings_dialog()
2408 y = (nelems + 1) * HEIGHT + 5; in change_password_file()
2453 DEBUG_ASSERT(((intptr_t)p - (intptr_t)mem) < (intptr_t)sizeof(mem)); in change_password_file()
2497 5, in change_password_file()
2498 5, in change_password_file()
2499 WIDTH - 10, in change_password_file()
2509 5, in change_password_file()
2515 DEBUG_ASSERT(((intptr_t)p - (intptr_t)mem) < (intptr_t)sizeof(mem)); in change_password_file()
2517 dia->cy = y + 20; in change_password_file()
2550 prm->buffer = "Server not running"; in sysinfo_reload()
2552 prm->buffer = "No server statistics available"; in sysinfo_reload()
2554 prm->buffer = "Please retry"; in sysinfo_reload()
2557 prm->buffer = buf; in sysinfo_reload()
2613 WIDTH - LABEL_WIDTH - 25, in show_system_info()
2624 WIDTH - 10 - 55 - 10 - 55, in show_system_info()
2635 WIDTH - 10 - 55, in show_system_info()
2641 DEBUG_ASSERT((intptr_t)p - (intptr_t)mem < (intptr_t)sizeof(mem)); in show_system_info()
2643 dia->cy = y + (WORD)(HEIGHT * 1.5); in show_system_info()
2683 path[sizeof(path) - 1] = 0; in manage_service()
2684 GetModuleFileName(NULL, path, sizeof(path) - 1); in manage_service()
2685 strncat(path, " ", sizeof(path) - 1 - strlen(path)); in manage_service()
2686 strncat(path, service_magic_argument, sizeof(path) - 1 - strlen(path)); in manage_service()
2811 sizeof(buf) - 1, in WindowProc()
2814 buf[sizeof(buf) - 1] = 0; in WindowProc()
2883 * https://stackoverflow.com/questions/9020790/using-stdin-with-an-allocconsole in MakeConsole()
2983 - (void)openBrowser;
2984 - (void)shutDown;
2988 - (void)openBrowser {
2994 - (void)editConfig {
3007 - (void)shutDown {