Index: trunk/ab5.0/ablib/src/Classes/ActiveBasic/Strings/SPrintF.ab
===================================================================
--- trunk/ab5.0/ablib/src/Classes/ActiveBasic/Strings/SPrintF.ab	(revision 519)
+++ trunk/ab5.0/ablib/src/Classes/ActiveBasic/Strings/SPrintF.ab	(revision 521)
@@ -917,4 +917,18 @@
 
 /*!
+@brief	IntegerConvertTraits用。変換関数へのポインタ。
+@author	Egtra
+@date	2008/06/08
+*/
+TypeDef ConvertFunc = *Function(buf As *Char, x As QWord, flags As FormatFlags) As DWord
+
+/*!
+@brief	IntegerConvertTraits用。接頭辞取得関数へのポインタ。
+@author	Egtra
+@date	2008/06/08
+*/
+TypeDef PrefixFunc = *Function(x As QWord, flags As FormatFlags) As String
+
+/*!
 @brief	FormatIntegerExへ渡す変換特性を表す構造体型。
 @author	Egtra
@@ -926,7 +940,7 @@
 Type IntegerConvertTraits
 	'!変換を行う関数へのポインタ。
-	Convert As *Function(buf As *Char, x As QWord, flags As FormatFlags) As DWord
+	Convert As ConvertFunc
 	'!接頭辞を取得する関数へのポインタ。
-	Prefix As *Function(x As QWord, flags As FormatFlags) As String
+	Prefix As PrefixFunc
 End Type
 
Index: trunk/ab5.0/ablib/src/Classes/System/Text/StringBuilder.ab
===================================================================
--- trunk/ab5.0/ablib/src/Classes/System/Text/StringBuilder.ab	(revision 519)
+++ trunk/ab5.0/ablib/src/Classes/System/Text/StringBuilder.ab	(revision 521)
@@ -362,5 +362,5 @@
 		separateBuffer()
 		Dim i As Long
-		Dim last = ELM(start + count)
+		Dim last = start + count - 1'ELM(start + count)
 		For i = start To last
 			If chars[i] = oldChar Then
Index: trunk/ab5.0/ablib/src/api_imm.sbp
===================================================================
--- trunk/ab5.0/ablib/src/api_imm.sbp	(revision 519)
+++ trunk/ab5.0/ablib/src/api_imm.sbp	(revision 521)
@@ -358,5 +358,5 @@
 Declare Function ImmGetImeMenuItems Lib "imm32" Alias "ImmGetImeMenuItemsA" (himc As HIMC, dwFlags As DWord, dwType As DWord, ByRef ImeParentMenu As IMEMENUITEMINFOA, lpImeMenu As LPIMEMENUITEMINFOA, dwSoze As DWord) As DWord
 #endif
-Declare Function ImmDisableTextFrameService Lib "imm32"(idThread As DWord) As BOOL
+Declare Function ImmDisableTextFrameService Lib "imm32" (idThread As DWord) As BOOL
 
 ' wParam for WM_IME_CONTROL
Index: trunk/ab5.0/ablib/src/api_reg.sbp
===================================================================
--- trunk/ab5.0/ablib/src/api_reg.sbp	(revision 519)
+++ trunk/ab5.0/ablib/src/api_reg.sbp	(revision 521)
@@ -129,5 +129,5 @@
 Declare Function RegFlushKey Lib "advapi32" (hKey As HKEY) As Long
 '#if _WIN32_WINNT >= &h0310 'AB
-Declare Function RegGetKeySecurity Lib "advapi32"(hKey As HKEY, SecurityInformation As SECURITY_INFORMATION, pSecurityDescriptor As *SECURITY_DESCRIPTOR, ByRef lpcbSecurityDescriptor As DWord) As Long
+Declare Function RegGetKeySecurity Lib "advapi32" (hKey As HKEY, SecurityInformation As SECURITY_INFORMATION, pSecurityDescriptor As *SECURITY_DESCRIPTOR, ByRef lpcbSecurityDescriptor As DWord) As Long
 '#endif
 Declare Function RegLoadKey Lib "advapi32" Alias _FuncName_RegLoadKey (hKey As HKEY, pSubKey As PCTSTR, pFile As PCTSTR) As Long
Index: trunk/ab5.0/ablib/src/api_shell.sbp
===================================================================
--- trunk/ab5.0/ablib/src/api_shell.sbp	(revision 519)
+++ trunk/ab5.0/ablib/src/api_shell.sbp	(revision 521)
@@ -367,5 +367,5 @@
 
 ' ShellApi.h
-Declare Function SHEmptyRecycleBin Lib"shell32" Alias _FuncName_SHEmptyRecycleBin (hwnd As HWND, pszRootPath As LPCTSTR, dwFlags As DWord) As HRESULT
+Declare Function SHEmptyRecycleBin Lib "shell32" Alias _FuncName_SHEmptyRecycleBin (hwnd As HWND, pszRootPath As LPCTSTR, dwFlags As DWord) As HRESULT
 
 ' ShlObj.h
Index: trunk/ab5.0/ablib/src/api_system.sbp
===================================================================
--- trunk/ab5.0/ablib/src/api_system.sbp	(revision 519)
+++ trunk/ab5.0/ablib/src/api_system.sbp	(revision 521)
@@ -487,5 +487,5 @@
 Declare Function FindNextFile Lib "kernel32" Alias _FuncName_FindNextFile (hFindFile As HANDLE, ByRef FindFildData As WIN32_FIND_DATA) As BOOL
 Declare Function FlushFileBuffers Lib "kernel32" (hFile As HANDLE) As BOOL
-Declare Function FlushInstructionCache Lib "kernel32"(hProcess As HANDLE, pBaseAddress As VoidPtr, Size As SIZE_T) As BOOL
+Declare Function FlushInstructionCache Lib "kernel32" (hProcess As HANDLE, pBaseAddress As VoidPtr, Size As SIZE_T) As BOOL
 
 Const FORMAT_MESSAGE_ALLOCATE_BUFFER = &H00000100
Index: trunk/ab5.0/ablib/src/api_window.sbp
===================================================================
--- trunk/ab5.0/ablib/src/api_window.sbp	(revision 519)
+++ trunk/ab5.0/ablib/src/api_window.sbp	(revision 521)
@@ -1552,5 +1552,5 @@
 Declare Function SetTimer Lib "user32" (hWnd As HWND, nIDEvent As ULONG_PTR, nElapse As DWord, lpTimerFunc As TIMERPROC) As ULONG_PTR
 
-Declare Function SetWindowContextHelpId Lib "user32"(hwnd As HWND, dwContextHelpId As DWord) As BOOL
+Declare Function SetWindowContextHelpId Lib "user32" (hwnd As HWND, dwContextHelpId As DWord) As BOOL
 #ifdef _WIN64
 Declare Function SetWindowLong Lib "user32" Alias _FuncName_SetWindowLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
Index: trunk/ab5.0/ablib/src/api_winsock2.sbp
===================================================================
--- trunk/ab5.0/ablib/src/api_winsock2.sbp	(revision 519)
+++ trunk/ab5.0/ablib/src/api_winsock2.sbp	(revision 521)
@@ -119,6 +119,6 @@
 
 Type netent
-	FAR * n_name As *Byte
-	FAR * FAR * n_aliases As **Byte
+	n_name As *Byte
+	n_aliases As **Byte
 	n_addrtyp As Integer
 	n_net As DWord
