Skip to content

Commit

Permalink
Visual Studio 2015 に移行しました。
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancorvussolis committed Apr 16, 2016
1 parent c92b470 commit 5f3eeb7
Show file tree
Hide file tree
Showing 14 changed files with 385 additions and 265 deletions.
407 changes: 245 additions & 162 deletions .gitignore

Large diffs are not rendered by default.

17 changes: 11 additions & 6 deletions README.TXT
Original file line number Diff line number Diff line change
@@ -1,33 +1,38 @@

-------------------------------------------------------------------------------

crvskkserv 2.1.2
crvskkserv 2.2.0

-------------------------------------------------------------------------------

SKK辞書サーバです。IPv4、IPv6に対応しています。
SKK辞書サーバです。

適当な場所に置いて実行して下さい。

タスクトレイのアイコンから設定ダイアログを開き、ポートと辞書を設定して下さい。
辞書の最大数は64個です。

辞書は、SKK辞書ファイル、SKK辞書サーバ、Google CGI API for Japanese Input に
対応しています。辞書の最大数は64個です。
対応しています。
https://www.google.co.jp/ime/cgiapi.html

改行LFでEUC-JIS-2004やUTF-8(BOMなし)等ASCIIと互換性のある文字コードのSKK辞書
ファイルが使用できます。

SKK辞書の文字コード変換は行っていないので、クライアント側のSKK辞書サーバ通信に
使用する文字コードとSKK辞書ファイルの文字コードを揃える必要があります。

SKK辞書サーバ通信は、IPv4、IPv6に対応しています。

Google CGI APIの「見出し語の検索除外条件」設定は、おそらく送りあり(と思われる)
見出し語を除外する正規表現がデフォルトとなっています。
Visual C++ 2013 のTR1正規表現で、文法はECMAScriptを使用しています。
http://msdn.microsoft.com/en-us/library/bb982727%28v=vs.120%29.aspx
Visual C++ 2015 のTR1正規表現で、文法はECMAScriptを使用しています。
https://msdn.microsoft.com/en-us/library/bb982727(v=vs.140).aspx

Google CGI APIの設定でクライアントの文字コードをEUC-JIS-2004にしたとき、
UTF-8からEUC-JIS-2004に変換できない文字を含む候補は除外されます。


プロトコル

"0"
Expand Down Expand Up @@ -67,7 +72,7 @@ crvskkserv

The MIT License

Copyright (C) 2012-2015 SASAKI Nobuyuki
Copyright (C) 2012-2016 SASAKI Nobuyuki

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
Expand Down
4 changes: 2 additions & 2 deletions crvskkserv.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.40629.0
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "crvskkserv", "crvskkserv\crvskkserv.vcxproj", "{EE56E58B-C54E-425C-A0AF-292B4653B1F0}"
EndProject
Expand Down
17 changes: 8 additions & 9 deletions crvskkserv/crvskkserv.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

#include "stdafx.h"
#include "crvskkserv.h"
#include "resource.h"

Expand Down Expand Up @@ -71,15 +70,15 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR lpCmdL
wcex.cbWndExtra = 0;
wcex.hInstance = hInstance;
wcex.hIcon = LoadIconW(hInstance, MAKEINTRESOURCE(IDI_CRVSKKSERV));
wcex.hCursor = LoadCursorW(NULL, IDC_ARROW);
wcex.hCursor = LoadCursorW(nullptr, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = NULL;
wcex.lpszMenuName = nullptr;
wcex.lpszClassName = title;
wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_CRVSKKSERV));

RegisterClassExW(&wcex);

hWnd = CreateWindowW(title, title, WS_OVERLAPPEDWINDOW, 0, 0, 0, 0, NULL, NULL, hInstance, NULL);
hWnd = CreateWindowW(title, title, WS_OVERLAPPEDWINDOW, 0, 0, 0, 0, nullptr, nullptr, hInstance, nullptr);

if(!hWnd)
{
Expand All @@ -89,9 +88,9 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR lpCmdL
//ShowWindow(hWnd, nCmdShow);
//UpdateWindow(hWnd);

while(GetMessageW(&msg, NULL, 0, 0))
while(GetMessageW(&msg, nullptr, 0, 0))
{
if(!TranslateAcceleratorW(msg.hwnd, NULL, &msg))
if(!TranslateAcceleratorW(msg.hwnd, nullptr, &msg))
{
TranslateMessage(&msg);
DispatchMessageW(&msg);
Expand All @@ -110,7 +109,7 @@ void GetIniFileName(LPWSTR ini, size_t len)
WCHAR fname[_MAX_FNAME];
WCHAR ext[_MAX_EXT];

GetModuleFileNameW(NULL, ini, len);
GetModuleFileNameW(nullptr, ini, len);
_wsplitpath_s(ini, drive, dir, fname, ext);
_wmakepath_s(ini, len, drive, dir, fname, L"ini");
}
Expand Down Expand Up @@ -456,7 +455,7 @@ INT_PTR CALLBACK DlgProcConfig(HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
{
case IDOK:
_wfopen_s(&fp, ini, WB);
if(fp != NULL)
if(fp != nullptr)
{
fwrite("\xFF\xFE", 2, 1, fp);
fclose(fp);
Expand Down Expand Up @@ -660,7 +659,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
if(hSubMenu)
{
TrackPopupMenu(hSubMenu, TPM_LEFTALIGN | TPM_BOTTOMALIGN | TPM_RIGHTBUTTON,
pt.x, pt.y, NULL, hWnd, NULL);
pt.x, pt.y, 0, hWnd, nullptr);
}
DestroyMenu(hMenu);
}
Expand Down
13 changes: 8 additions & 5 deletions crvskkserv/crvskkserv.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@

#pragma once
#ifndef CRVSKKSERV_H
#define CRVSKKSERV_H

#define RC_PRODUCT "crvskkserv"
#define RC_VERSION "2.1.2"
#define RC_VERSION_D 2,1,2,0
#define RC_TITLE "crvskkserv (ver. 2.1.2)"
#define RC_VERSION "2.2.0"
#define RC_VERSION_D 2,2,0,0
#define RC_TITLE "crvskkserv (ver. 2.2.0)"
#define RC_AUTHOR "nathancorvussolis"

#define APP_TITLE L"crvskkserv"
#define APP_VERSION L"2.1.2"
#define APP_VERSION L"2.2.0"
#define RES_VER RC_PRODUCT "/" RC_VERSION " "

#define REQ_END '0'
Expand Down Expand Up @@ -81,3 +82,5 @@ BOOL get_skkserv_version(SOCKET &sock);

// search_google_cgiapi
void search_google_cgiapi(DICINFO &dicinfo, const std::string &key, std::string &s);

#endif
8 changes: 5 additions & 3 deletions crvskkserv/crvskkserv.vcxproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
Expand All @@ -19,13 +19,13 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -77,6 +77,8 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>ws2_32.lib;wininet.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>No</GenerateDebugInformation>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
Loading

0 comments on commit 5f3eeb7

Please sign in to comment.