diff --git a/GitVer/GitVer_process.h b/GitVer/GitVer_process.h index 233a01a..2463d70 100644 --- a/GitVer/GitVer_process.h +++ b/GitVer/GitVer_process.h @@ -2,8 +2,8 @@ BOOL ReplaceFileContent(LPCTSTR lpFile, std::vector& vtOldContent, std::vector& vtNewContent); /// -/// 启动子进程并捕获 stdout/stderr。 -/// nOutputCodePage 为管道原始字节的解码代码页,默认 CP_ACP(按系统 ANSI/GBK 直接使用); -/// CP_UTF8 时先按 UTF-8 解码为宽字符,MultiByte 工程再转为 GBK 存入 CString。 +/// ӽ̲ stdout/stderr +/// nOutputCodePage ΪܵԭʼֽڵĽҳĬ CP_ACPϵͳ ANSI/GBK ֱʹã +/// CP_UTF8 ʱȰ UTF-8 ΪַMultiByte תΪ GBK CString /// CString StartProcess(LPCTSTR program, LPCTSTR args, LPCTSTR lpCurrentDirectory, UINT nOutputCodePage = CP_ACP); diff --git a/GitVer/framework.h b/GitVer/framework.h index aa87d07..f4351f0 100644 --- a/GitVer/framework.h +++ b/GitVer/framework.h @@ -1,23 +1,23 @@ -#pragma once +#pragma once #include "targetver.h" #include #include -#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // 部分 CString 构造函数将是显式的 -#define _AFX_NO_MFC_CONTROLS_IN_DIALOGS // 移除对话框中的 MFC 控件支持 +#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // CString 캯ʽ +#define _AFX_NO_MFC_CONTROLS_IN_DIALOGS // ƳԻе MFC ؼ֧ #ifndef VC_EXTRALEAN -#define VC_EXTRALEAN // 从 Windows 头文件中排除极少使用的内容 +#define VC_EXTRALEAN // Windows ͷļųʹõ #endif #include -#include // MFC 核心组件和标准组件 -#include // MFC 扩展 +#include // MFC ͱ׼ +#include // MFC չ #ifndef _AFX_NO_OLE_SUPPORT -#include // MFC 对 Internet Explorer 4 公共控件的支持 +#include // MFC Internet Explorer 4 ؼ֧ #endif #ifndef _AFX_NO_AFXCMN_SUPPORT -#include // MFC 对 Windows 公共控件的支持 +#include // MFC Windows ؼ֧ #endif // _AFX_NO_AFXCMN_SUPPORT #include diff --git a/GitVer/httplib.h b/GitVer/httplib.h index d5a18ef..2300b7b 100644 --- a/GitVer/httplib.h +++ b/GitVer/httplib.h @@ -833,7 +833,7 @@ namespace httplib { // Without :// or //, the entire input must be consumed as host[:port]. // If there is leftover (path, query, etc.), this is not a valid - // host[:port] string — clear and reparse as a plain path. + // host[:port] string clear and reparse as a plain path. if (!has_authority_prefix && pos < url.size()) { uc.host.clear(); uc.port.clear(); @@ -960,7 +960,7 @@ namespace httplib { /* * detail: type-erased storage used by UserData. - * ABI-stable regardless of C++ standard — always uses this custom + * ABI-stable regardless of C++ standard always uses this custom * implementation instead of std::any. */ namespace detail { @@ -1402,7 +1402,7 @@ namespace httplib { std::string body; std::string location; // Redirect location - // User-defined context — set by pre-routing/pre-request handlers and read + // User-defined context set by pre-routing/pre-request handlers and read // by route handlers to pass arbitrary data (e.g. decoded auth tokens). UserData user_data; @@ -5172,7 +5172,7 @@ namespace httplib { if (!detail::fields::is_field_value(val)) { return false; } - // RFC 9110 §5.5: header field values are opaque octets and MUST NOT be + // RFC 9110 5.5: header field values are opaque octets and MUST NOT be // percent-decoded by the recipient. Applications that need to interpret a // value as a URI component should call httplib::decode_uri_component() // (or decode_path_component()) explicitly. @@ -6537,7 +6537,7 @@ namespace httplib { // Recursive form retained so operator""_t below can compute hashes for // switch-case labels at compile time (C++11 constexpr forbids loops). Do not - // call from runtime paths with arbitrary-length inputs — use str2tag() + // call from runtime paths with arbitrary-length inputs use str2tag() // instead, which is iterative and stack-safe. inline constexpr unsigned int str2tag_core(const char* s, size_t l, unsigned int h) { @@ -10878,7 +10878,7 @@ namespace httplib { } // Bracketed entries can only be IPv6. If the IPv6 parse above failed, - // the entry is malformed — don't fall through to the hostname branch. + // the entry is malformed don't fall through to the hostname branch. if (bracketed) { return false; } // A '/' on a non-IP token means a CIDR prefix without an address. Reject. @@ -11791,7 +11791,7 @@ namespace httplib { size_t /*len*/) { return receiver(buf, n); }; } - // RFC 9112 §6: no Transfer-Encoding and no Content-Length means no body. + // RFC 9112 6: no Transfer-Encoding and no Content-Length means no body. // For non-SSL builds we still scan non-persistent connections for stray // body bytes so the payload limit is enforced (413). On keep-alive, // pending bytes may be the next request (issue #2450), so skip. @@ -12469,7 +12469,7 @@ namespace httplib { return write_response(strm, close_connection, req, res); } - // RFC 9112 §6.3: Reject requests with both a non-zero Content-Length and + // RFC 9112 6.3: Reject requests with both a non-zero Content-Length and // any Transfer-Encoding to prevent request smuggling. Content-Length: 0 is // tolerated for compatibility with existing clients. if (req.get_header_value_u64("Content-Length") > 0 && @@ -12711,7 +12711,7 @@ namespace httplib { } // Drain any unconsumed framed body to prevent request smuggling on - // keep-alive. Without framing there is no body to drain — reading would + // keep-alive. Without framing there is no body to drain reading would // consume the next request (issue #2450). if (!req.body_consumed_ && detail::has_framed_body(req)) { int dummy_status; @@ -13025,7 +13025,7 @@ namespace httplib { #endif if (!is_alive) { - // Peer seems gone — non-graceful shutdown to avoid SIGPIPE. + // Peer seems gone non-graceful shutdown to avoid SIGPIPE. disconnect(/*gracefully=*/false); } } @@ -13402,7 +13402,7 @@ namespace httplib { stream_line_reader lr(strm, line_buf, sizeof(line_buf)); if (!lr.getline()) { return -1; } - // RFC 9112 §7.1: chunk-size = 1*HEXDIG + // RFC 9112 7.1: chunk-size = 1*HEXDIG const char* p = lr.ptr(); int v = 0; if (!is_hex(*p, v)) { return -1; } @@ -13807,7 +13807,7 @@ namespace httplib { } // Proxy-Authorization is only sent when the proxy is actually used for - // this target — otherwise NO_PROXY-matched requests would leak proxy + // this target otherwise NO_PROXY-matched requests would leak proxy // credentials directly to the destination server. if (is_proxy_enabled_for_host(host_)) { if (!proxy_basic_auth_username_.empty() && diff --git a/GitVer/pch.cpp b/GitVer/pch.cpp index 781d282..3985185 100644 --- a/GitVer/pch.cpp +++ b/GitVer/pch.cpp @@ -1,5 +1,5 @@ -// pch.cpp: 与预编译标头对应的源文件 +// pch.cpp: ԤͷӦԴļ #include "pch.h" -// 当使用预编译的头时,需要使用此源文件,编译才能成功。 \ No newline at end of file +// ʹԤͷʱҪʹôԴļܳɹ \ No newline at end of file diff --git a/GitVer/pch.h b/GitVer/pch.h index 9660927..4cb9845 100644 --- a/GitVer/pch.h +++ b/GitVer/pch.h @@ -1,13 +1,13 @@ -// pch.h: 这是预编译标头文件。 -// 下方列出的文件仅编译一次,提高了将来生成的生成性能。 -// 这还将影响 IntelliSense 性能,包括代码完成和许多代码浏览功能。 -// 但是,如果此处列出的文件中的任何一个在生成之间有更新,它们全部都将被重新编译。 -// 请勿在此处添加要频繁更新的文件,这将使得性能优势无效。 +// pch.h: Ԥͷļ +// ·гļһΣ˽ɵܡ +// ⻹Ӱ IntelliSense ܣɺܡ +// ǣ˴гļеκһ֮и£ȫ±롣 +// ڴ˴ҪƵµļ⽫ʹЧ #ifndef PCH_H #define PCH_H -// 添加要在此处预编译的标头 +// Ҫڴ˴Ԥıͷ #include "framework.h" #endif //PCH_H