Skip to content

Commit

Permalink
Merge: v1.22.2
Browse files Browse the repository at this point in the history
  • Loading branch information
vain0x committed Jan 14, 2017
2 parents 40eeec7 + 8991385 commit 51ae77c
Show file tree
Hide file tree
Showing 167 changed files with 69,253 additions and 287 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "src/cppformat"]
path = src/cppformat
url = https://github.com/cppformat/cppformat
7 changes: 5 additions & 2 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## 履歴
#### 2017/01/14
* vain0 製の拡張型 vector, assoc, array およびモジュール modptr をサポートしないようにした。

#### 2015/12/05
* 既定フォントを「MS Gothic」(10)に戻した。
* エディットコントロールのフォントを ini ファイルで指定できるようにした。
Expand Down Expand Up @@ -352,7 +355,7 @@
* C++に存在する型をベースにしていると予想して処理する。
```
bool,
char = signed_char,
char = signed_char,
uchar = unsigned_char,
short = signed_short,
ushort = unsigned_short,
Expand Down Expand Up @@ -383,7 +386,7 @@
* 呼び出しノードは、実行中はツリーノードを追加せずに、assert で停止したときにまとめて追加するようにした。
* 削除は行う。
* wait による停止でも追加してしまうという問題がある。

#### 2011.09/20
* 1024バイト以上の文字列を logmes するとバッファーオーバーフローで落ちるバグを修正した。

Expand Down
2 changes: 0 additions & 2 deletions src/CVardataString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#include "CVarinfoText.h"
#include "config_mng.h"

#include "with_ModPtr.h"

using namespace hpiutil::internal_vartype_tags;

CVardataStrWriter::CVardataStrWriter(CVardataStrWriter&& src)
Expand Down
14 changes: 0 additions & 14 deletions src/CVardataString.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ class CStructedStrWriter;
class CLineformedWriter;
class CTreeformedWriter;
class CStrBuf;
#if defined(with_Assoc) || defined(with_Vector) || defined(with_Array)
class CAssoc;
class CVector;
class CArray;
#endif

// 変数データの文字列を作るクラス
class CVardataStrWriter
Expand Down Expand Up @@ -53,15 +48,6 @@ class CVardataStrWriter
void addValueString(char const* name, char const* str);
void addValueStruct(char const* name, FlexValue const* fv);

#ifdef with_Assoc
void addItem_assoc(char const* name, CAssoc* src);
#endif
#ifdef with_Vector
void addItem_vector(char const* name, CVector* src);
#endif
#ifdef with_Array
void addItem_array(char const* name, CArray* src);
#endif
#ifdef with_ExtraBasics
// template<class TNumeric> auto dbgstr_extraBasic(const TNumeric src) -> string;
#endif
Expand Down
164 changes: 0 additions & 164 deletions src/ExVardataString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,158 +144,13 @@ auto vswInfoForInternal() -> std::vector<VswInfoForInternal> const&
{ "long", nullptr, knowbugVsw_addValueSLong },
{ "ulong", nullptr, knowbugVsw_addValueULong },
#endif
#ifdef with_Assoc
{ "assoc_k", nullptr, knowbugVsw_addValueAssoc },
#endif
#ifdef with_Vector
{ "vector_k", knowbugVsw_addVarVector, knowbugVsw_addValueVector },
#endif
#ifdef with_Array
{ "array_k", knowbugVsw_addVarArray, knowbugVsw_addValueArray },
#endif
#ifdef with_Modcmd
{ "modcmd_k", nullptr, knowbugVsw_addValueModcmd },
#endif
#ifdef with_ModPtr
{ "int", nullptr, knowbugVsw_addValueIntOrModPtr },
#endif
};
return vswi;
}

//------------------------------------------------
// 拙作 assoc 型の拡張表示のための関数群
//------------------------------------------------
#ifdef with_Assoc
# include "../../crouton/src/var_assoc/for_knowbug.var_assoc.h"

//void WINAPI knowbugVsw_addVarAssoc(vswriter_t _w, char const* name, PVal const* pval);

void WINAPI knowbugVsw_addValueAssoc(vswriter_t _w, char const* name, void const* ptr)
{
auto const src = *reinterpret_cast<CAssoc* const*>(ptr);

if ( ! ptr ) {
knowbugVsw_catLeafExtra(_w, name, "null_assoc");
return;
}

auto const hvp = hpiutil::tryFindHvp(assoc_vartype_name);
StAssocMapList* const head = (reinterpret_cast<GetMapList_t>(hvp->user))(src);

// 要素なし
if ( ! head ) {
knowbugVsw_catLeafExtra(_w, name, "empty_assoc");
return;
}

// 全キーのリスト
knowbugVsw_catNodeBegin(_w, name, "[");
{
// 列挙
for ( StAssocMapList* list = head; list != nullptr; list = list->next ) {
if ( knowbugVsw_isLineformWriter(_w) ) {
// pair: 「key: value...」
knowbugVsw_catNodeBegin(_w, CStructedStrWriter::stc_strUnused,
strf("%s: ", list->key).c_str());
knowbugVsw_addVar(_w, CStructedStrWriter::stc_strUnused, list->pval);
knowbugVsw_catNodeEnd(_w, "");
} else {
knowbugVsw_addVar(_w, list->key, list->pval);
}
// dbgout("%p: key = %s, pval = %p, next = %p", list, list->key, list->pval, list->next );
}

// リストの解放
for ( StAssocMapList* list = head; list != nullptr; ) {
StAssocMapList* const next = list->next;
exinfo->HspFunc_free(list);
list = next;
}
}
knowbugVsw_catNodeEnd(_w, "]");
}
#endif

//------------------------------------------------
// 拙作 vector 型の拡張表示
//------------------------------------------------
#ifdef with_Vector
# include "../../crouton/src/var_vector/for_knowbug.var_vector.h"

void WINAPI knowbugVsw_addVarVector(vswriter_t _w, char const* name, PVal const* pval)
{
knowbugVsw_addVarScalar(_w, name, pval, 0);
}

void WINAPI knowbugVsw_addValueVector(vswriter_t _w, char const* name, void const* ptr)
{
auto const src = *reinterpret_cast<CVector* const*>(ptr);

if ( ! src ) {
knowbugVsw_catLeafExtra(_w, name, "null_vector");
return;
}

auto const hvp = hpiutil::tryFindHvp(vector_vartype_name);
int len;
PVal** const pvals = (reinterpret_cast<GetVectorList_t>(hvp->user))(src, &len);

// 要素なし
if ( ! pvals ) {
knowbugVsw_catLeafExtra(_w, name, "empty_vector");
return;
}

// 全キーのリスト
knowbugVsw_catNodeBegin(_w, name, "[");
{
knowbugVsw_catAttribute(_w, "length", strf("%d", len).c_str());

for ( int i = 0; i < len; ++i ) {
knowbugVsw_addVar(_w, hpiutil::stringifyArrayIndex({ i }).c_str(), pvals[i]);
//dbgout("%p: idx = %d, pval = %p, next = %p", list, idx, list->pval, list->next );
}

}
knowbugVsw_catNodeEnd(_w, "]");
}
#endif

//------------------------------------------------
// 拙作 array 型の拡張表示
//------------------------------------------------
#ifdef with_Array
# include "crouton/src/var_array/for_knowbug.var_array.h"

void WINAPI knowbugVsw_addVarArray(vswriter_t _w, char const* name, PVal const* pval)
{
knowbugVsw_addVarScalar(_w, name, pval, 0);
}

void WINAPI knowbugVsw_addValueArray(vswriter_t _w, char const* name, void const* ptr)
{
auto const src = *reinterpret_cast<CArray**>(ptr);

if ( ! src ) {
knowbugVsw_catLeafExtra(_w, name, "null_array");
return;
}

auto const hvp = hpiutil::seekHvp(array_vartype_name);
PVal* const pvInner = (reinterpret_cast<GetArray_t>(hvp->user))(src);

// 要素なし
if ( ! pvInner || pvInner->len[1] == 0 ) {
knowbugVsw_catLeafExtra(_w, name, "empty_array");
return;
}

// 表示
knowbugVsw_addVarArray(_w, name, pvInner);
}
#endif

//------------------------------------------------
// 拙作 modcmd 型の拡張表示
//------------------------------------------------
Expand All @@ -311,25 +166,6 @@ void WINAPI knowbugVsw_addValueModcmd(vswriter_t _w, char const* name, void cons

#endif

//------------------------------------------------
// modptr の拡張表示
//------------------------------------------------
#ifdef with_ModPtr

#include "with_ModPtr.h"

void WINAPI knowbugVsw_addValueIntOrModPtr(vswriter_t _w, char const* name, void const* ptr)
{
int const& val = *cptr_cast<int*>(ptr);
if ( ModPtr::isValid(val) ) {
auto name2 = strf("%s = mp#%d", name, ModPtr::getIdx(val));
vswriter(_w).addValueStruct(name2.c_str(), ModPtr::getValue(val));
} else {
knowbugVsw_addValueInt(_w, name, ptr);
}
}
#endif

//------------------------------------------------
// スカラー型の拡張表示
//------------------------------------------------
Expand Down
14 changes: 0 additions & 14 deletions src/ExVswInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,6 @@ extern void WINAPI knowbugVsw_addValueUInt(vswriter_t, char const* name, void co
extern void WINAPI knowbugVsw_addValueSLong(vswriter_t, char const* name, void const* ptr);
extern void WINAPI knowbugVsw_addValueULong(vswriter_t, char const* name, void const* ptr);
#endif
#ifdef with_ModPtr
extern void WINAPI knowbugVsw_addValueIntOrModPtr(vswriter_t, char const* name, void const* ptr);
#endif
#ifdef with_Assoc
extern void WINAPI knowbugVsw_addValueAssoc(vswriter_t, char const* name, void const* ptr);
#endif
#ifdef with_Vector
extern void WINAPI knowbugVsw_addVarVector(vswriter_t, char const* name, PVal const* pval);
extern void WINAPI knowbugVsw_addValueVector(vswriter_t, char const* name, void const* ptr);
#endif
#ifdef with_Array
extern void WINAPI knowbugVsw_addVarArray(vswriter_t, char const* name, PVal const* pval);
extern void WINAPI knowbugVsw_addValueArray(vswriter_t, char const* name, void const* ptr);
#endif
#ifdef with_Modcmd
extern void WINAPI knowbugVsw_addValueModcmd(vswriter_t, char const* name, void const* ptr);
#endif
Expand Down
1 change: 0 additions & 1 deletion src/cppformat
Submodule cppformat deleted from 5f8af5
18 changes: 18 additions & 0 deletions src/cppformat/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
bin/
/_CPack_Packages
/doc/doxyxml
/doc/html
/doc/virtualenv
/Testing
/install_manifest.txt
*~
*.a
*.so*
*.zip
cmake_install.cmake
CPack*Config.cmake
CTestTestfile.cmake
CMakeCache.txt
CMakeFiles
Makefile
run-msbuild.bat
31 changes: 31 additions & 0 deletions src/cppformat/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
language: cpp

os:
- linux
- osx

env:
global:
- secure: |-
Gsnp9ERFnXt+diCfc7Vb72g+7HDn1MCHvw4zfUDdoBh9bxxFlLQRlzZZfwWhzni57lflrt
0QHXafu+oBVOJuNv6WauV3+ZyuWIQRmNGjZFNLvZsXHK/dyad2vGQBPvEkb+8l/aCyTpbr
6pxmyzLHSn1ZR7OX5rfPvwM3tOyZ3H0=
matrix:
- BUILD=Doc
- BUILD=Debug
- BUILD=Release

matrix:
exclude:
- os: osx
env: BUILD=Doc

addons:
apt:
sources:
- kubuntu-backports # cmake 2.8.12
packages:
- cmake

script:
- support/travis-build.py
15 changes: 15 additions & 0 deletions src/cppformat/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE := cppformat_static
LOCAL_MODULE_FILENAME := libcppformat

LOCAL_SRC_FILES := cppformat/format.cc

LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)

LOCAL_CFLAGS += -std=c++11 -fexceptions

include $(BUILD_STATIC_LIBRARY)

Loading

0 comments on commit 51ae77c

Please sign in to comment.