cmake_minimum_required(VERSION 2.6)
-if(${CMAKE_VERSION} VERSION_GREATER "2.8.3")
+if(POLICY CMP0017)
# Shadow cmake provided modules
cmake_policy(SET CMP0017 OLD)
endif()
# Don't escape preprocessor definition values added via add_definitions
cmake_policy(SET CMP0005 OLD)
+cmake_policy(SET CMP0002 NEW)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
set(CMAKE_SKIP_PREPROCESSED_SOURCE_RULES TRUE)
set(CMAKE_SKIP_ASSEMBLY_SOURCE_RULES TRUE)
set(CMAKE_COLOR_MAKEFILE OFF)
-set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
+#set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
if(NOT ARCH)
set(ARCH i386)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
+
+ #useful stuff!
+ include(CMakeParseArguments)
# Do some cleanup
file(REMOVE
# IDL macros for widl/midl
include(cmake/idl-support.cmake)
- #Some useful variables
- set(LIVECD_DIR "${REACTOS_BINARY_DIR}/boot/livecd")
- set(BOOTCD_DIR "${REACTOS_BINARY_DIR}/boot/bootcd")
-
# Activate support for assembly source files
enable_language(ASM)
include(baseaddress.cmake)
- add_subdirectory(base)
+ #begin with boot so reactos_cab target is defined before all other modules
add_subdirectory(boot)
+ add_subdirectory(base)
add_subdirectory(dll)
add_subdirectory(drivers)
add_subdirectory(hal)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/importlibs)
- #bootcd and livecd
- include(ros_cd.cmake)
-
add_dependency_footer()
endif()
DEPENDS ${_asm_file})\r
set_source_files_properties(${_object_file} PROPERTIES GENERATED TRUE)\r
add_custom_target(${_target_name} ALL DEPENDS ${_object_file})\r
- add_minicd(${_object_file} loader ${OBJECT_NAME})\r
endmacro()\r
\r
else()\r
\r
endif()\r
\r
-macro(add_minicd_target _targetname _dir) # optional parameter: _nameoncd\r
- if("${ARGN}" STREQUAL "")\r
- get_target_property(FILENAME ${_targetname} LOCATION)\r
- get_filename_component(_nameoncd ${FILENAME} NAME)\r
- else()\r
- set(_nameoncd ${ARGN})\r
- endif()\r
-\r
- file(APPEND ${REACTOS_BINARY_DIR}/boot/ros_minicd_target.txt "${_targetname}\t${_dir}\t${_nameoncd}\n")\r
-endmacro()\r
-\r
-macro(add_minicd FILENAME _dir _nameoncd)\r
- file(APPEND ${REACTOS_BINARY_DIR}/boot/ros_minicd.txt "${FILENAME}\t${_dir}\t${_nameoncd}\n")\r
-endmacro()\r
-\r
macro(set_cpp)\r
include_directories(BEFORE ${REACTOS_SOURCE_DIR}/include/c++/stlport)\r
set(IS_CPP 1)\r
-DNATIVE_C_INCLUDE=${REACTOS_SOURCE_DIR}/include/crt)\r
endmacro()\r
\r
-macro(add_livecd_target _targetname _dir )# optional parameter : _nameoncd\r
- if("${ARGN}" STREQUAL "")\r
- get_target_property(FILENAME ${_targetname} LOCATION)\r
- get_filename_component(_nameoncd ${FILENAME} NAME)\r
- else()\r
- set(_nameoncd ${ARGN})\r
- endif()\r
-\r
- file(APPEND ${REACTOS_BINARY_DIR}/boot/ros_livecd_target.txt "${_targetname}\t${_dir}\t${_nameoncd}\n")\r
-endmacro()\r
-\r
-macro(add_livecd FILENAME _dir)# optional parameter : _nameoncd\r
- if("${ARGN}" STREQUAL "")\r
- get_filename_component(_nameoncd ${FILENAME} NAME)\r
- else()\r
- set(_nameoncd ${ARGN})\r
- endif()\r
- file(APPEND ${REACTOS_BINARY_DIR}/boot/ros_livecd.txt "${FILENAME}\t${_dir}\t${_nameoncd}\n")\r
-endmacro()\r
-\r
-macro(cab_to_dir _dir_num _var_name)\r
-# 1 = system32\r
-# 2 = system32\drivers\r
-# 3 = Fonts\r
-# 4 =\r
-# 5 = system32\drivers\etc\r
-# 6 = inf\r
-# 7 = bin\r
-# 8 = media\r
- if(${_dir_num} STREQUAL "1")\r
- set(${_var_name} "reactos/system32")\r
- elseif(${_dir_num} STREQUAL "2")\r
- set(${_var_name} "reactos/system32/drivers")\r
- elseif(${_dir_num} STREQUAL "3")\r
- set(${_var_name} "reactos/fonts")\r
- elseif(${_dir_num} STREQUAL "4")\r
- set(${_var_name} "reactos")\r
- elseif(${_dir_num} STREQUAL "5")\r
- set(${_var_name} "reactos/system32/drivers/etc")\r
- elseif(${_dir_num} STREQUAL "6")\r
- set(${_var_name} "reactos/inf")\r
- elseif(${_dir_num} STREQUAL "7")\r
- set(${_var_name} "reactos/bin")\r
- elseif(${_dir_num} STREQUAL "8")\r
- set(${_var_name} "reactos/system32/drivers")\r
- else()\r
- message(FATAL_ERROR "Wrong directory ${_dir_num}")\r
- endif()\r
-endmacro()\r
-\r
-macro(add_cab_target _targetname _num )\r
- file(APPEND ${REACTOS_BINARY_DIR}/boot/ros_cab_target.txt "${_targetname}\t${_num}\n")\r
- cab_to_dir(${_num} _dir)\r
- add_livecd_target(${_targetname} ${_dir})\r
-endmacro()\r
-\r
-macro(add_cab FILENAME _num)\r
- file(APPEND ${REACTOS_BINARY_DIR}/boot/ros_cab.txt "${FILENAME}\t${_num}\n")\r
- cab_to_dir(${_num} _dir)\r
- add_livecd(${FILENAME} ${_dir})\r
-endmacro()\r
-\r
macro(add_dependency_node _node)\r
if(GENERATE_DEPENDENCY_GRAPH)\r
get_target_property(_type ${_node} TYPE)\r
endforeach()\r
endmacro()\r
\r
+macro(dir_to_num dir var)\r
+ if(${dir} STREQUAL reactos/system32)\r
+ set(${var} 1)\r
+ elseif(${dir} STREQUAL reactos/system32/drivers)\r
+ set(${var} 2)\r
+ elseif(${dir} STREQUAL reactos/Fonts)\r
+ set(${var} 3)\r
+ elseif(${dir} STREQUAL reactos)\r
+ set(${var} 4)\r
+ elseif(${dir} STREQUAL reactos/system32/drivers/etc)\r
+ set(${var} 5)\r
+ elseif(${dir} STREQUAL reactos/inf)\r
+ set(${var} 6)\r
+ elseif(${dir} STREQUAL reactos/bin)\r
+ set(${var} 7)\r
+ elseif(${dir} STREQUAL reactos/media)\r
+ set(${var} 8)\r
+ else()\r
+ message(ERROR "Wrong destination: ${dir}")\r
+ endif()\r
+endmacro()\r
+\r
+function(add_cd_file)\r
+ cmake_parse_arguments(_CD "NO_CAB" "DESTINATION;NAME_ON_CD;TARGET" "FILE;FOR" ${ARGN})\r
+ if(NOT (_CD_TARGET OR _CD_FILE))\r
+ message(FATAL_ERROR "You must provide a target or a file to install!")\r
+ endif()\r
+ \r
+ if(NOT _CD_DESTINATION)\r
+ message(FATAL_ERROR "You must provide a destination")\r
+ elseif(${_CD_DESTINATION} STREQUAL root)\r
+ set(_CD_DESTINATION "")\r
+ endif()\r
+ \r
+ if(NOT _CD_FOR)\r
+ message(FATAL_ERROR "You must provide a cd name (or "all" for all of them) to install the file on!")\r
+ endif()\r
+ \r
+ #get file if we need to\r
+ if(NOT _CD_FILE)\r
+ get_target_property(_CD_FILE ${_CD_TARGET} LOCATION)\r
+ endif()\r
+ \r
+ #do we add it to all CDs?\r
+ if(_CD_FOR STREQUAL all)\r
+ set(_CD_FOR "bootcd;livecd;regtest")\r
+ endif()\r
+ \r
+ #do we add it to bootcd?\r
+ list(FIND _CD_FOR bootcd __cd)\r
+ if(NOT __cd EQUAL -1)\r
+ #whether or not we should put it in reactos.cab or directly on cd\r
+ if(_CD_NO_CAB)\r
+ #directly on cd\r
+ foreach(item ${_CD_FILE})\r
+ file(APPEND ${REACTOS_BINARY_DIR}/boot/bootcd.cmake "file(COPY \"${item}\" DESTINATION \"\${CD_DIR}/${_CD_DESTINATION}\")\n")\r
+ endforeach()\r
+ if(_CD_NAME_ON_CD)\r
+ get_filename_component(__file ${_CD_FILE} NAME)\r
+ #rename it in the cd tree\r
+ file(APPEND ${REACTOS_BINARY_DIR}/boot/bootcd.cmake "file(RENAME \${CD_DIR}/${_CD_DESTINATION}/${__file} \${CD_DIR}/${_CD_DESTINATION}/${_CD_NAME_ON_CD})\n")\r
+ endif()\r
+ if(_CD_TARGET)\r
+ #manage dependency\r
+ add_dependencies(bootcd ${_CD_TARGET})\r
+ endif()\r
+ else()\r
+ #add it in reactos.cab\r
+ dir_to_num(${_CD_DESTINATION} _num)\r
+ if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
+ file(APPEND ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.dff.dyn "${_CD_FILE} ${_num}\n")
+ else()
+ file(APPEND ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.dff.dyn "\"${_CD_FILE}\" ${_num}\n")
+ endif()
+ if(_CD_TARGET)\r
+ #manage dependency\r
+ add_dependencies(reactos_cab ${_CD_TARGET})\r
+ endif()\r
+ endif()\r
+ endif() #end bootcd\r
+ \r
+ #do we add it to livecd?\r
+ list(FIND _CD_FOR livecd __cd)\r
+ if(NOT __cd EQUAL -1)\r
+ #manage dependency\r
+ if(_CD_TARGET)\r
+ add_dependencies(livecd ${_CD_TARGET})\r
+ endif()\r
+ foreach(item ${_CD_FILE})\r
+ file(APPEND ${REACTOS_BINARY_DIR}/boot/livecd.cmake "file(COPY \"${item}\" DESTINATION \"\${CD_DIR}/${_CD_DESTINATION}\")\n")\r
+ endforeach()\r
+ if(_CD_NAME_ON_CD)\r
+ get_filename_component(__file ${_CD_FILE} NAME)\r
+ #rename it in the cd tree\r
+ file(APPEND ${REACTOS_BINARY_DIR}/boot/livecd.cmake "file(RENAME \${CD_DIR}/${_CD_DESTINATION}/${__file} \${CD_DIR}/${_CD_DESTINATION}/${_CD_NAME_ON_CD})\n")\r
+ endif()\r
+ endif() #end livecd\r
+ \r
+endfunction()\r
add_subdirectory(magnify)
add_subdirectory(mmc)
add_subdirectory(mplay32)
-add_subdirectory(msconfig)
+# add_subdirectory(msconfig)
add_subdirectory(mscutils)
add_subdirectory(mstsc)
add_subdirectory(network)
set_module_type(cacls win32cui)
add_importlibs(cacls advapi32 user32 shell32 msvcrt kernel32)
-add_cab_target(cacls 1)
+add_cd_file(TARGET cacls DESTINATION reactos/system32 FOR all)
add_importlibs(calc ntdll)
endif()
-add_cab_target(calc 1)
+add_cd_file(TARGET calc DESTINATION reactos/system32 FOR all)
static const conv_t conv_ANGLE[] = {
DECLARE_CONV_UNIT(ANGLE, DEGREES, "$", "$")
DECLARE_CONV_UNIT(ANGLE, GRADIANS, "$*0.9", "$/0.9")
- DECLARE_CONV_UNIT(ANGLE, RADIANS, "$*180/P", "$*P/180")
+ DECLARE_CONV_UNIT(ANGLE, RADIANS, "$/P*180", "$*P/180")
DECLARE_CONV_END
};
*/
static const conv_t conv_TEMPERATURE[] = {
DECLARE_CONV_UNIT(TEMPERATURE, CELSIUS, "$+273.15", "$-273.15")
- DECLARE_CONV_UNIT(TEMPERATURE, FAHRENHEIT, "($-459.67)*5/9", "$*9/5-459.67")
+ DECLARE_CONV_UNIT(TEMPERATURE, FAHRENHEIT, "($+459.67)*5/9", "$*9/5-459.67")
DECLARE_CONV_UNIT(TEMPERATURE, KELVIN, "$", "$")
DECLARE_CONV_UNIT(TEMPERATURE, RANKINE, "$*5/9", "$*9/5")
DECLARE_CONV_END
#include "lang/es-ES.rc"
#include "lang/fr-FR.rc"
#include "lang/it-IT.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/ko-KR.rc"
#include "lang/nl-NL.rc"
#include "lang/no-NO.rc"
add_importlibs(charmap user32 gdi32 comctl32 kernel32 msvcrt)
-add_cab_target(charmap 1)
+add_cd_file(TARGET charmap DESTINATION reactos/system32 FOR all)
#define ID_ABOUT 0x1
+typedef struct {
+ BOOL IsAdvancedView;
+} SETTINGS;
+
HINSTANCE hInstance;
+HWND hCharmapDlg;
+HWND hAdvancedDlg;
+HWND hStatusWnd;
+HICON hSmIcon;
+HICON hBgIcon;
+SETTINGS Settings;
/* Font-enumeration callback */
static
}
+static
+void
+UpdateSettings(HWND hDlg)
+{
+ if (hDlg == hCharmapDlg)
+ {
+ Settings.IsAdvancedView =
+ SendDlgItemMessage(hDlg, IDC_CHECK_ADVANCED, BM_GETCHECK, 0, 0);
+ }
+
+ if (hDlg == hAdvancedDlg)
+ {
+ }
+}
+
+static
+void
+ChangeView(HWND hWnd)
+{
+ RECT rcCharmap;
+ RECT rcAdvanced;
+ RECT rcPanelExt;
+ RECT rcPanelInt;
+ RECT rcStatus;
+ UINT DeX, DeY;
+ UINT xPos, yPos;
+ UINT Width, Height;
+ UINT DeskTopWidth, DeskTopHeight;
+
+ GetClientRect(hCharmapDlg, &rcCharmap);
+ GetClientRect(hAdvancedDlg, &rcAdvanced);
+ GetWindowRect(hWnd, &rcPanelExt);
+ GetClientRect(hWnd, &rcPanelInt);
+ GetClientRect(hStatusWnd, &rcStatus);
+
+ DeskTopWidth = GetSystemMetrics(SM_CXFULLSCREEN);
+ DeskTopHeight = GetSystemMetrics(SM_CYFULLSCREEN);
+
+ DeX = (rcPanelExt.right - rcPanelExt.left) - rcPanelInt.right;
+ DeY = (rcPanelExt.bottom - rcPanelExt.top) - rcPanelInt.bottom;
+
+ MoveWindow(hCharmapDlg, 0, 0, rcCharmap.right, rcCharmap.bottom, FALSE);
+ MoveWindow(hAdvancedDlg, 0, rcCharmap.bottom, rcAdvanced.right, rcAdvanced.bottom, FALSE);
+
+ ShowWindow(hAdvancedDlg, (Settings.IsAdvancedView) ? SW_SHOW : SW_HIDE);
+
+ xPos = rcPanelExt.left;
+ yPos = rcPanelExt.top;
+
+ Width = DeX + rcCharmap.right;
+ Height = DeY + rcCharmap.bottom + rcStatus.bottom;
+
+ if (Settings.IsAdvancedView)
+ Height += rcAdvanced.bottom;
+
+ if ((xPos + Width) > DeskTopWidth)
+ xPos += DeskTopWidth - (xPos + Width);
+
+ if ((yPos + Height) > DeskTopHeight)
+ yPos += DeskTopHeight - (yPos + Height);
+
+ MoveWindow(hWnd,
+ xPos, yPos,
+ Width, Height,
+ TRUE);
+}
+
static
INT_PTR
CALLBACK
-DlgProc(HWND hDlg,
- UINT Message,
- WPARAM wParam,
- LPARAM lParam)
+CharMapDlgProc(HWND hDlg,
+ UINT Message,
+ WPARAM wParam,
+ LPARAM lParam)
{
- static HICON hSmIcon;
- static HICON hBgIcon;
- LPWSTR lpAboutText = NULL;
-
switch(Message)
{
case WM_INITDIALOG:
{
- HMENU hSysMenu;
DWORD evMask;
- hSmIcon = LoadImageW(hInstance,
- MAKEINTRESOURCEW(IDI_ICON),
- IMAGE_ICON,
- 16,
- 16,
- 0);
- if (hSmIcon)
- {
- SendMessageW(hDlg,
- WM_SETICON,
- ICON_SMALL,
- (LPARAM)hSmIcon);
- }
-
- hBgIcon = LoadImageW(hInstance,
- MAKEINTRESOURCEW(IDI_ICON),
- IMAGE_ICON,
- 32,
- 32,
- 0);
- if (hBgIcon)
- {
- SendMessageW(hDlg,
- WM_SETICON,
- ICON_BIG,
- (LPARAM)hBgIcon);
- }
-
FillFontStyleComboList(GetDlgItem(hDlg,
IDC_FONTCOMBO));
ChangeMapFont(hDlg);
- hSysMenu = GetSystemMenu(hDlg,
- FALSE);
- if (hSysMenu != NULL)
- {
- if (LoadStringW(hInstance,
- IDS_ABOUT,
- lpAboutText,
- 0))
- {
- AppendMenuW(hSysMenu,
- MF_SEPARATOR,
- 0,
- NULL);
- AppendMenuW(hSysMenu,
- MF_STRING,
- ID_ABOUT,
- lpAboutText);
- }
- }
// Configure Richedi control for sending notification changes.
evMask = SendDlgItemMessage(hDlg, IDC_TEXTBOX, EM_GETEVENTMASK, 0, 0);
CopyCharacters(hDlg);
break;
- case IDOK:
- if (hSmIcon)
- DestroyIcon(hSmIcon);
- if (hBgIcon)
- DestroyIcon(hBgIcon);
- EndDialog(hDlg, 0);
+ case IDC_CHECK_ADVANCED:
+ UpdateSettings(hDlg);
+ ChangeView(GetParent(hDlg));
break;
}
}
break;
- case WM_SYSCOMMAND:
+ default:
+ break;
+ }
+
+ return FALSE;
+}
+
+static
+INT_PTR
+CALLBACK
+AdvancedDlgProc(HWND hDlg,
+ UINT Message,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ switch(Message)
+ {
+ case WM_INITDIALOG:
+ return TRUE;
+
+ default:
+ return FALSE;
+ }
+
+ return FALSE;
+}
+
+static int
+OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
+{
+ HMENU hSysMenu;
+ WCHAR lpAboutText[256];
+
+ hCharmapDlg = CreateDialog(hInstance,
+ MAKEINTRESOURCE(IDD_CHARMAP),
+ hWnd,
+ CharMapDlgProc);
+
+ hAdvancedDlg = CreateDialog(hInstance,
+ MAKEINTRESOURCE(IDD_ADVANCED),
+ hWnd,
+ AdvancedDlgProc);
+
+ hStatusWnd = CreateWindow(STATUSCLASSNAME,
+ NULL,
+ WS_CHILD | WS_VISIBLE,
+ 0, 0, 0, 0,
+ hWnd,
+ (HMENU)IDD_STATUSBAR,
+ hInstance,
+ NULL);
+
+ // Set the status bar for multiple parts output
+ SendMessage(hStatusWnd, SB_SIMPLE, (WPARAM)FALSE, (LPARAM)0);
+
+ ChangeView(hWnd);
+
+ hSysMenu = GetSystemMenu(hWnd, FALSE);
+
+ if (hSysMenu != NULL)
+ {
+ if (LoadStringW(hInstance, IDS_ABOUT, lpAboutText, SIZEOF(lpAboutText)))
{
- switch(wParam)
- {
- case ID_ABOUT:
- ShowAboutDlg(hDlg);
- break;
- }
+ AppendMenuW(hSysMenu, MF_SEPARATOR, 0, NULL);
+ AppendMenuW(hSysMenu, MF_STRING, ID_ABOUT, lpAboutText);
}
+ }
+
+ return 0;
+}
+
+static LRESULT CALLBACK
+PanelWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ switch (msg) {
+ case WM_CREATE:
+ return OnCreate(hWnd, wParam, lParam);
+
+ case WM_CLOSE:
+ DestroyWindow(hWnd);
+ return 0;
+
+ case WM_SIZE:
+ SendMessage(hStatusWnd, msg, wParam, lParam);
break;
- case WM_CLOSE:
- if (hSmIcon)
- DestroyIcon(hSmIcon);
- if (hBgIcon)
- DestroyIcon(hBgIcon);
- EndDialog(hDlg, 0);
+ case WM_DESTROY:
+ PostQuitMessage(0);
+ return 0;
+
+ case WM_SYSCOMMAND:
+ switch(wParam) {
+ case ID_ABOUT:
+ ShowAboutDlg(hWnd);
break;
+ }
+ break;
- default:
- return FALSE;
}
- return FALSE;
+ return DefWindowProc(hWnd, msg, wParam, lParam);
}
+static HWND
+InitInstance(HINSTANCE hInst)
+{
+ WCHAR szClass[] = L"CharMap";
+ WCHAR szTitle[256];
+ WNDCLASSEXW wc;
+ HWND hWnd;
+
+ LoadStringW(hInst, IDS_TITLE, szTitle, SIZEOF(szTitle));
+
+ hSmIcon = LoadImage(hInstance,
+ MAKEINTRESOURCE(IDI_ICON),
+ IMAGE_ICON,
+ 16,
+ 16,
+ 0);
+
+ hBgIcon = LoadImage(hInstance,
+ MAKEINTRESOURCE(IDI_ICON),
+ IMAGE_ICON,
+ 32,
+ 32,
+ 0);
+
+ // Create workspace
+ ZeroMemory(&wc, sizeof(wc));
+
+ wc.cbSize = sizeof(wc);
+ wc.lpfnWndProc = PanelWndProc;
+ wc.hInstance = hInst;
+ wc.hIcon = hBgIcon;
+ wc.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wc.hbrBackground = (HBRUSH)GetStockObject(NULL_BRUSH);
+ wc.lpszMenuName = NULL;
+ wc.lpszClassName = szClass;
+ wc.hIconSm = hSmIcon;
+
+ RegisterClassExW(&wc);
+
+ hWnd = CreateWindowW(
+ szClass,
+ szTitle,
+ WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX,
+ CW_USEDEFAULT,
+ CW_USEDEFAULT,
+ CW_USEDEFAULT,
+ CW_USEDEFAULT,
+ NULL,
+ NULL,
+ hInst,
+ NULL);
+
+ if (hWnd != NULL)
+ {
+ ShowWindow(hWnd, SW_SHOW);
+ UpdateWindow(hWnd);
+ }
+
+ return hWnd;
+}
INT
WINAPI
INITCOMMONCONTROLSEX iccx;
INT Ret = 1;
HMODULE hRichEd20;
+ MSG Msg;
hInstance = hInst;
if (hRichEd20 != NULL)
{
- Ret = DialogBoxW(hInstance,
- MAKEINTRESOURCEW(IDD_CHARMAP),
- NULL,
- DlgProc) >= 0;
+ InitInstance(hInst);
+
+ for (;;)
+ {
+ if (GetMessage(&Msg, NULL, 0, 0) <= 0)
+ {
+ Ret = Msg.wParam;
+ break;
+ }
+
+ TranslateMessage(&Msg);
+ DispatchMessage(&Msg);
+ }
FreeLibrary(hRichEd20);
}
LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "Çíàêîâ èçáîðíèê"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 8,"MS Shell Dlg",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "Øðèôò :", IDC_STATIC, 6, 7, 24, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Èçáîð", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Çàïîìíÿíå", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
- //AUTOCHECKBOX "Ðaçøèðåí èçãëåä", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Charset:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Group by:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Search for:",IDC_STATIC,8,48,42,8
+ LTEXT "Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
BEGIN
IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_ABOUT "&Çà..."
+ IDS_TITLE "Character Map"
END
LANGUAGE LANG_CATALAN, SUBLANG_DEFAULT
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "Mapa de caràcters"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 8,"MS Shell Dlg",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "Font :", IDC_STATIC, 6, 7, 24, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Selecciona", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Copia", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
- //AUTOCHECKBOX "Vista avançada", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Charset:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Group by:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Search for:",IDC_STATIC,8,48,42,8
+ LTEXT "Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
BEGIN
IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_ABOUT "&En quant a..."
+ IDS_TITLE "Character Map"
END
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "Mapa znakù"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 8,"MS Shell Dlg",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "Písmo:", IDC_STATIC, 6, 7, 24, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Oznaèit", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Kopírovat", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
- //AUTOCHECKBOX "Pokroèilé zobrazení", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Charset:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Group by:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Search for:",IDC_STATIC,8,48,42,8
+ LTEXT "Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
BEGIN
IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_ABOUT "&O programu..."
+ IDS_TITLE "Character Map"
END
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "Zeichentabelle"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 8,"MS Shell Dlg",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "Schrift:", IDC_STATIC, 6, 7, 24, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
- PUSHBUTTON "Hilfe", IDC_CMHELP, 249, 5, 35, 13
+ PUSHBUTTON "&Hilfe", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
- LTEXT "Zeichenauswahl:", IDC_STATIC, 6, 188, 66, 9
+ LTEXT "Zeichenaus&wahl:", IDC_STATIC, 6, 188, 66, 9
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
- DEFPUSHBUTTON "Auswählen", IDC_SELECT, 194, 186, 44, 13
- PUSHBUTTON "Kopieren", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
- //AUTOCHECKBOX "Erweiterte Ansicht", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ DEFPUSHBUTTON "&Auswählen", IDC_SELECT, 194, 186, 44, 13
+ PUSHBUTTON "&Kopieren", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
+ CONTROL "&Erweiterte Ansicht",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "&Zeichensatz:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "&Gruppieren nach:",IDC_STATIC,8,28,58,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "&Suchen",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Su&chen nach:",IDC_STATIC,8,48,46,8
+ LTEXT "&Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
BEGIN
IDS_LICENSE "Dieses Programm ist kostenlos; Sie können es frei verteilen mit od. ohne Änderungen unter der GNU Lesser General Public License wie es von der Free Software Foundation veröffentlicht wurde; entweder Version 2.1 der Lizenz, oder eine spätere Version (ihrer Wahl).\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_ABOUT "Ü&ber..."
+ IDS_TITLE "Zeichentabelle"
END
LANGUAGE LANG_GREEK, SUBLANG_DEFAULT
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205
-STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Ðßíáêáò ÷áñáêôÞñùí"
-FONT 8, "MS Shell Dlg"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
+FONT 8,"MS Shell Dlg",0,0
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "ÃñáììáôïóåéñÜ :",IDC_STATIC,6,7,60,9
COMBOBOX IDC_FONTCOMBO,65,5,181,210,CBS_DROPDOWNLIST | CBS_SORT |
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "ÅðéëïãÞ",IDC_SELECT,194,186,44,13
PUSHBUTTON "ÁíôéãñáöÞ",IDC_COPY,242,186,44,13,WS_DISABLED
+ CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Charset:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Group by:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Search for:",IDC_STATIC,8,48,42,8
+ LTEXT "Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22, 16, 210, 182
BEGIN
IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_ABOUT "&Ðëçñïöïñßåò..."
+ IDS_TITLE "Character Map"
END
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "Character Map"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 8,"MS Shell Dlg",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "Font:", IDC_STATIC, 6, 7, 24, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Select", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Copy", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
- //AUTOCHECKBOX "Advanced view", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Charset:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Group by:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Search for:",IDC_STATIC,8,48,42,8
+ LTEXT "Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
BEGIN
IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_ABOUT "A&bout..."
+ IDS_TITLE "Character Map"
END
LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "Mapa de Caracteres"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 8,"MS Shell Dlg",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "Fuente :", IDC_STATIC, 6, 7, 24, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Seleccionar", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Copiar", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
- //AUTOCHECKBOX "Vista Avanzada", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Charset:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Group by:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Search for:",IDC_STATIC,8,48,42,8
+ LTEXT "Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
BEGIN
IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_ABOUT "&Acerca de ..."
+ IDS_TITLE "Character Map"
END
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "Table des Caractères"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 8,"MS Shell Dlg",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "Police :", IDC_STATIC, 6, 7, 24, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Sélectionner", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Copier", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
- //AUTOCHECKBOX "Vue avancée", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Charset:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Group by:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Search for:",IDC_STATIC,8,48,42,8
+ LTEXT "Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
BEGIN
IDS_LICENSE "Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier tout en respectant les termes de la ""GNU General Public License"" publiée par la Free Software Foundation; dans sa version 2 (ou selon votre préférence) toute version ultérieure.\r\n\r\nCe programme est distribué dans l'espoir qu'il sera utile, cependant SANS GARANTIE D'AUCUNE SORTE ; sans même une garantie implicite de COMMERCIABILITÉ ou DE CONFORMITÉ À UNE UTILISATION PARTICULIÈRE. \r\n\r\nVoir la Licence Publique Générale GNU pour plus de détails. Vous devriez avoir reçu un exemplaire de la Licence Publique Générale GNU avec ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_ABOUT "À propos..."
+ IDS_TITLE "Character Map"
END
LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "Peta Karakter"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 8,"MS Shell Dlg",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "Font :", IDC_STATIC, 6, 7, 24, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Pilih", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Copy", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
- //AUTOCHECKBOX "Advanced view", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Charset:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Group by:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Search for:",IDC_STATIC,8,48,42,8
+ LTEXT "Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
BEGIN
IDS_LICENSE "Program ini adalah software bebas; anda dapat mendistribusikan dan/atau mengubahnya di bawah term GNU General Public License seperti dipublikasikan oleh Free Software Foundation; baik Lisensi versi 2, atau (menurut opini anda) setiap versi berikutnya.\r\n\r\nProgram ini didistribusikan dengan harapan ia akan berguna, tetapi TANPA JAMINAN APAPUN; bahkan tanpa jaminan berarti dari MERCANTABILITAS atau KECUKUPAN UNTUK KEPERLUAN TERTENTU. Lihat GNU General Public License untuk lebih jelasnya.\r\n\r\nAnda seharusnya menerima duplikat GNU General Public License bersamaan dengan program ini; jika tidak, tulis ke Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_ABOUT "Te&ntang..."
+ IDS_TITLE "Character Map"
END
LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "Character Map"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 8,"MS Shell Dlg",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
- LTEXT "Font :", IDC_STATIC, 6, 7, 24, 9
+ LTEXT "Font:", IDC_STATIC, 6, 7, 24, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
PUSHBUTTON "Aiuto", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Selezionare", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Copiare", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
- //AUTOCHECKBOX "Visualizzazione avanzata", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ CONTROL "Visualizzazione avanzata",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Set di caratteri:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Raggruppa per:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Ce&rca",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "C&erca:",IDC_STATIC,8,48,22,8
+ LTEXT "Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
FONT 8,"MS Shell Dlg",0,0
STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME
BEGIN
- LTEXT "Character Map v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36
+ LTEXT "Mappa caratteri v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36
PUSHBUTTON "Chiudi", IDOK, 75, 162, 44, 15
ICON IDI_ICON, IDC_STATIC, 10, 10, 7, 30
EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE
BEGIN
IDS_LICENSE, "Questo programma è software libero; può redistribuirlo e/o modificarlo sotto\ni termini della licenza pubblica GNU come pubblicata dalla Free Software Foundation; sia la versione 2 sia una versione successiva (a sua scelta).\r\n\r\nQuesto programma è distribuito\nnella speranza che sia utile, ma SENZA ALCUNA GARANZIA; senza neanche la garanzia implicita\ndi NEGOZIABILITA' o APPLICABILITA' per un particolare scopo. Si veda la licenza generale pubblica GNU per maggiori dettagli.\r\n\r\nDovrebbe aver ricevuto una copia assieme a questo programma; se così non fosse, scriva alla Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_ABOUT "&Informazioni su..."
+ IDS_TITLE "Mappa caratteri"
END
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "\95¶\8e\9a\83R\81[\83h\95\\"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 9,"MS UI Gothic",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "\83t\83H\83\93\83g:", IDC_STATIC, 6, 7, 24, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "\91I\91ð", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "\83R\83s\81[", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
- //AUTOCHECKBOX "\8fÚ\8d×\95\\\8e¦", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Charset:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Group by:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Search for:",IDC_STATIC,8,48,42,8
+ LTEXT "Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
BEGIN
IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_ABOUT "\83o\81[\83W\83\87\83\93\8fî\95ñ(&B)..."
+ IDS_TITLE "Character Map"
END
*/
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "¹®ÀÚÇ¥"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 8,"MS Shell Dlg",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "±Û²Ã:", IDC_STATIC, 6, 7, 24, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "¼±ÅÃ", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "º¹»ç", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
- //AUTOCHECKBOX "È®Àå ¸ðµå", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Charset:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Group by:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Search for:",IDC_STATIC,8,48,42,8
+ LTEXT "Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
BEGIN
IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_ABOUT "Á¤º¸(&A)"
+ IDS_TITLE "Character Map"
END
LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "Simboliø lentelë"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 8,"MS Shell Dlg",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "Ðriftas:", IDC_STATIC, 6, 7, 24, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Parinkti", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Kopijuoti", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
- //AUTOCHECKBOX "Advanced view", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Charset:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Group by:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Search for:",IDC_STATIC,8,48,42,8
+ LTEXT "Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
BEGIN
IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_ABOUT "&Apie..."
+ IDS_TITLE "Character Map"
END
LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "Speciale tekens"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 8,"MS Shell Dlg",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "Lettertype:", IDC_STATIC, 6, 7, 24, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Selecteren", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Kopiëren", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
- //AUTOCHECKBOX "Geavanceerde weergave", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Charset:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Group by:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Search for:",IDC_STATIC,8,48,42,8
+ LTEXT "Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
BEGIN
IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_ABOUT "Over..."
+ IDS_TITLE "Character Map"
END
LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "Tegnkart"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 8,"MS Shell Dlg",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "Skrift:", IDC_STATIC, 6, 7, 24, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Velg", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Kopier", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
- //AUTOCHECKBOX "Avansert visning", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Charset:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Group by:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Search for:",IDC_STATIC,8,48,42,8
+ LTEXT "Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
BEGIN
IDS_LICENSE "Dette programmet er gratis programvare; du kan distribuere det og/eller endre det under betingelsene av GNU General Public License som er utgitt av Free Software Foundation; version 2 av lisensen, eller (etter din mening) alle senere versjoner.\r\n\r\nDette programmet er utgitt i håp for at det skal kunne brukes, men DET ER INGEN GARANTIER; uten heller forutsatt garantier av SALGBARHET eller SIKKETHET FOR EN ENKELTHET FORMÅL. Se på GNU General Public Lisensen for mere detaljer.\r\n\r\nDu skal ha motatt en kopi av GNU General Public Lisensen sammen med denne programmet; hvis du ikke har motatt det, skriv til Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_ABOUT "O&m..."
+ IDS_TITLE "Character Map"
END
* translated by xrogers
* xxrogers@users.sourceforge.net
* https://sourceforge.net/projects/reactospl
+* updated by Olaf Siejka (May, 2011)
*/
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "Tablica znaków"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 8,"MS Shell Dlg",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "Czci&onka:", IDC_STATIC, 6, 7, 24, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Wy&bierz", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "&Kopiuj", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
- //AUTOCHECKBOX "Widok z&aawansowany", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ CONTROL "Widok zaawansowany",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Zestaw znaków:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Grupowanie wed³ug:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Szukaj",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Wyszukaj:",IDC_STATIC,8,48,42,8
+ LTEXT "Symbol Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
BEGIN
IDS_LICENSE "Niniejszy program jest wolnym oprogramowaniem; mo¿esz go rozprowadzaæ dalej i/lub modyfikowaæ na warunkach Powszechnej Licencji Publicznej GNU, wydanej przez Fundacjê Wolnego Oprogramowania - wed³ug wersji 2 tej Licencji lub (wed³ug twojego wyboru) której\9c z pó\9fniejszych wersji.\r\n\r\nNiniejszy program rozpowszechniany jest z nadziej¹, i¿ bêdzie on u¿yteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domy\9clnej gwarancji PRZYDATNO\8cCI HANDLOWEJ albo PRZYDATNO\8cCI DO OKRE\8cLONYCH ZASTOSOWAÑ. W celu uzyskania bli¿szych informacji siêgnij do Powszechnej Licencji Publicznej GNU.\r\n\r\nZ pewno\9cci¹ wraz z niniejszym programem otrzyma³e\9c te¿ egzemplarz Powszechnej Licencji Publicznej GNU (GNU General Public License); je\9cli nie - napisz do Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_ABOUT "&O programie..."
+ IDS_TITLE "Tablica znaków"
END
LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "Mapa de caracteres"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 8,"MS Shell Dlg",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "Fonte :", IDC_STATIC, 6, 7, 24, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Selecionar", IDC_SELECT, 194, 186, 46, 13
PUSHBUTTON "Copiar", IDC_COPY, 244, 186, 46, 13, WS_DISABLED
- //AUTOCHECKBOX "Modo de exibição avançado", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Charset:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Group by:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Search for:",IDC_STATIC,8,48,42,8
+ LTEXT "Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
BEGIN
IDS_LICENSE "Este programa é software livre; você pode redistribuí-lo e/ou modificá-lo sob os termos da GNU General Public License conforme publicada pela Free Software Foundation; quer a versão 2 da licença, ou (conforme você escolha) qualquer versão posterior.\r\n\r\nEste programa é distribuído com a esperança de que seja útil, mas SEM QUALQUER GARANTIA; mesmo sem a garantia implícita de MERCANTIBILIDADE OU ADEQUAÇÃO A UM DETERMINADO PROPÓSITO. Para mais detalhes, veja a GNU General Public License.\r\n\r\nVocê deve ter recebido uma cópia da GNU General Public License juntamente com este programa; caso contrário, escreva para a Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA."
IDS_ABOUT "So&bre..."
+ IDS_TITLE "Character Map"
END
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "Òàáëèöà ñèìâîëîâ"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 8,"MS Shell Dlg",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "Øðèôò:", IDC_STATIC, 6, 7, 27, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Âûáðàòü", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Êîïèðîâàòü", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
- //AUTOCHECKBOX "Advanced view", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Charset:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Group by:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Search for:",IDC_STATIC,8,48,42,8
+ LTEXT "Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
BEGIN
IDS_LICENSE "Ýòà ïðîãðàììà ÿâëÿåòñÿ ñâîáîäíî ðàñïðîñòðàíÿåìîé; Âû ìîæåòå ðàñïðîñòðàíÿòü åå ïîâòîðíî è (èëè) èçìåíÿòü, ñîáëþäàÿ óñëîâèÿ Îòêðûòîãî ëèöåíçèîííîãî ñîãëàøåíèÿ GNU, îïóáëèêîâàííîãî Ôîíäîì ñâîáîäíî ðàñïðîñòðàíÿåìîãî ïðîãðàììíîãî îáåñïå÷åíèÿ; ëèáî ðåäàêöèè 2 Ñîãëàøåíèÿ, ëèáî (íà âàøå óñìîòðåíèå) ëþáîé ðåäàêöèè, âûïóùåííîé ïîçæå.\r\n\r\nÝòà ïðîãðàììà ðàñïðîñòðàíÿåòñÿ â íàäåæäå íà òî, ÷òî îíà îêàæåòñÿ ïîëåçíîé, íî ÁÅÇ ÊÀÊÈÕ-ËÈÁÎ ÃÀÐÀÍÒÈÉ, âêëþ÷àÿ ïîäðàçóìåâàåìóþ ãàðàíòèþ ÊÀ×ÅÑÒÂÀ ëèáî ÏÐÈÃÎÄÍÎÑÒÈ ÄËß ÎÏÐÅÄÅËÅÍÍÛÕ ÖÅËÅÉ. Ïîäðîáíîñòè ñîäåðæàòñÿ â Îòêðûòîì ëèöåíçèîííîì ñîãëàøåíèè GNU.\r\n\r\nÂìåñòå ñ ýòîé ïðîãðàììîé äîëæåí ðàñïðîñòðàíÿòüñÿ ýêçåìïëÿð Îòêðûòîãî ëèöåíçèîííîãî ñîãëàøåíèÿ GNU, åñëè îí îòñóòñòâóåò, ñîîáùèòå îá ýòîì â Ôîíä ñâîáîäíî ðàñïðîñòðàíÿåìîãî ïðîãðàììíîãî îáåñïå÷åíèÿ (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_ABOUT "&Î ïðîãðàììå..."
+ IDS_TITLE "Character Map"
END
LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "Mapa znakov"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 8,"MS Shell Dlg",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "Pís&mo:", IDC_STATIC, 6, 7, 24, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "&Vybra\9d", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "&Kopírova\9d", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
- //AUTOCHECKBOX "R&oz\9aírené zobrazenie", IDC_ADVVIEW, 10, 204, 75, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Charset:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Group by:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Search for:",IDC_STATIC,8,48,42,8
+ LTEXT "Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
BEGIN
IDS_LICENSE, "Tento program je vo¾ný softvér; mô\9eete ho \9aíri\9d a/alebo modifikova\9d pod¾a podmienok GNU V\9aeobecnej verejnej licencie (GNU General Public License) ako bola zverejnená nadáciou Free Software Foundation; buï verzie 2 tejto licencie, alebo (pod¾a Vá\9aho uvá\9eenia) niektorej neskor\9aej verzie.\r\n\r\nTento program je distribuovaný v nádeji, \9ee bude u\9eitoèný, av\9aak BEZ AKEJKO¼VEK ZÁRUKY; rovnako bez záruky PREDAJNOSTI alebo VHODNOSTI PRE URÈITÝ ÚÈEL. Pre viac detailov si pozrite GNU V\9aeobecnú verejnú licenciu (GNU General Public License).\r\n\r\nKópiu V\9aeobecnej verejnej licencie GNU ste mali dosta\9d spolu s týmto programom; ak nie, napí\9ate si o òu na Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_ABOUT "È&o je Mapa znakov"
+ IDS_TITLE "Character Map"
END
* FILE: \base\applications\charmap\lang\sv-SE.rc
* PURPOSE: Swedish resource file
* Translation: Jaix Bly
- */LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
+ */
+ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
CAPTION "Teckenuppsättning"
LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "Òàáëèöÿ ñèìâîë³â"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 8,"MS Shell Dlg",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "Øðèôò :", IDC_STATIC, 6, 7, 24, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Âèáðàòè", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Êîï³þâàòè", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
- //AUTOCHECKBOX "Ðîçøèðåíèé âèãëÿä", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Charset:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Group by:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Search for:",IDC_STATIC,8,48,42,8
+ LTEXT "Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
BEGIN
IDS_LICENSE "Òàáëèöÿ ñèìâîë³â - â³ëüíå ïðîãðàìíå çàáåçïå÷åííÿ; Âè ìîæåòå ðîçïîâñþäæóâàòè ¿¿ òà çì³íþâàòè, äîòðèìóþ÷èñü óìîâè ³äêðèòî¿ ë³öåíç³éíî¿ óãîäè GNU, îïóáë³êîâàíî¿ Ôîíäîì â³ëüíîãî ïðîãðàìíîãî çàáåçïå÷åííÿ; àáî ðåäàêö³¿ 2 Óãîäè, àáî áóäü-ÿêî¿ ðåäàêö³¿, âèïóùåíî¿ ï³çí³øå.\r\n\r\nÖÿ ïðîãðàìà ðîçïîâñþäæóºòüñÿ â íà䳿 íà òå, ùî âîíà âèÿâèòüñÿ êîðèñíîþ, àëå ÁÅÇ ÁÓÄÜ-ßÊÈÕ ÃÀÐÀÍÒ²É, âêëþ÷àþ÷è ÓßÂÍÎÞ ÃÀÐÀÍÒ²ªÞ ßÊÎÑÒ² àáî ÏÐÈÄÀÒÍÎÑÒ² äëÿ ïåâíèõ ö³ëåé. Ïîäðîáèö³ ì³ñòÿòüñÿ ó ³äêðèò³é ë³öåíç³éí³é óãîä³ GNU.\r\n\r\nÐàçîì ç ö³ºþ ïðîãðàìîþ ïîâèíåí ïîøèðþâàòèñÿ ïðèì³ðíèê ³äêðèòî¿ ë³öåíç³éíî¿ óãîäè GNU. ßêùî â³í â³äñóòí³é, ïîâ³äîìòå ïðî öå â Ôîíä â³ëüíîãî ïðîãðàìíîãî çàáåçïå÷åííÿ (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
IDS_ABOUT "&Ïðî ïðîãðàìó..."
+ IDS_TITLE "Character Map"
END
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "×Ö·û±í"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 8,"MS Shell Dlg",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "×ÖÌå:", IDC_STATIC, 6, 7, 24, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Ñ¡Ôñ", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "¸´ÖÆ", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
- //AUTOCHECKBOX "Advanced view", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Charset:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Group by:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Search for:",IDC_STATIC,8,48,42,8
+ LTEXT "Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
BEGIN
IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA."
IDS_ABOUT "¹ØÓÚ(&A)..."
+ IDS_TITLE "Character Map"
END
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
-IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233
-CAPTION "¦r²Åªí"
+IDD_CHARMAP DIALOGEX 6, 6, 292, 224
FONT 8,"MS Shell Dlg",0,0
-STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
+STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE
BEGIN
LTEXT "¦rÅé¡G", IDC_STATIC, 6, 7, 24, 9
COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS
CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "¿ï¾Ü", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "½Æ»s", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
- //AUTOCHECKBOX "Advanced view", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 292, 64
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Charset:",IDC_STATIC,8,8,48,8
+ COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Group by:",IDC_STATIC,8,28,50,8
+ COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14
+ EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL
+ LTEXT "Search for:",IDC_STATIC,8,48,42,8
+ LTEXT "Unicode:",IDC_STATIC,200,8,30,8
+ EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL
END
IDD_ABOUTBOX DIALOGEX 22,16,210,182
BEGIN
IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA."
IDS_ABOUT "Ãö©ó(&A)..."
+ IDS_TITLE "Character Map"
END
#ifndef __CHARMAP_PRECOMP_H
#define __CHARMAP_PRECOMP_H
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
-#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
#include "resource.h"
+#define SIZEOF(_v) (sizeof(_v) / sizeof(*_v))
+
#define XCELLS 20
#define YCELLS 10
#define XLARGE 45
-#define IDC_STATIC -1
+#define IDC_STATIC -1
-#define IDI_ICON 100
+#define IDI_ICON 100
-#define IDD_CHARMAP 200
-#define IDD_ABOUTBOX 201
+#define IDD_CHARMAP 200
+#define IDD_ABOUTBOX 201
+#define IDD_STATUSBAR 202
+#define IDD_ADVANCED 203
-#define IDC_FONTCOMBO 1001
-#define IDC_CMHELP 1002
-#define IDC_FONTMAP 1003
-#define IDC_TEXTBOX 1004
-#define IDC_SELECT 1005
-#define IDC_COPY 1006
-#define IDC_ADVVIEW 1007
-#define IDC_DISPLAY 1008
-#define IDC_LICENSE_EDIT 1009
+#define IDC_FONTCOMBO 1001
+#define IDC_CMHELP 1002
+#define IDC_FONTMAP 1003
+#define IDC_TEXTBOX 1004
+#define IDC_SELECT 1005
+#define IDC_COPY 1006
+#define IDC_ADVVIEW 1007
+#define IDC_DISPLAY 1008
+#define IDC_LICENSE_EDIT 1009
+#define IDC_COMBO_CHARSET 1000
+#define IDC_COMBO_GROUPBY 1001
+#define IDC_BUTTON_SEARCH 1002
+#define IDC_EDIT_SEARCH 1003
+#define IDC_EDIT_UNICODE 1004
+#define IDC_CHECK_ADVANCED 1007
-#define IDS_LICENSE 1010
-#define IDS_ABOUT 1011
+#define IDS_LICENSE 1010
+#define IDS_ABOUT 1011
+#define IDS_TITLE 1012
add_executable(dbgprint dbgprint.c)
set_module_type(dbgprint win32cui)
add_importlibs(dbgprint msvcrt kernel32)
-add_cab_target(dbgprint 1)
+add_cd_file(TARGET dbgprint DESTINATION reactos/system32 FOR all)
set_module_type(doskey win32cui)
add_importlibs(doskey user32 msvcrt kernel32)
-add_cab_target(doskey 1)
+add_cd_file(TARGET doskey DESTINATION reactos/system32 FOR all)
set_module_type(find win32cui)
add_importlibs(find user32 msvcrt kernel32)
-add_cab_target(find 1)
+add_cd_file(TARGET find DESTINATION reactos/system32 FOR all)
IDS_USAGE, "FIND: Skriver ut alla rader i en fil som innehåller en sträng.\n\n\
FIND [ /C ] [ /I ] [ /N ] [ /V ] ""sträng"" [ fil... ]\n\
- /C Räkna nummren av linjer som innehåller en strängen\n\
+ /C Räkna antalet rader som innehåller en strängen\n\
/I Ignorera skiftläge\n\
/N Antal visade rader, börjar på 1\n\
/V Skriver ut rader som inte innehåller strängen"
set_module_type(hostname win32cui)
add_importlibs(hostname msvcrt kernel32)
-add_cab_target(hostname 1)
+add_cd_file(TARGET hostname DESTINATION reactos/system32 FOR all)
set_module_type(lodctr win32cui)
add_importlibs(lodctr loadperf msvcrt kernel32)
-add_cab_target(lodctr 1)
+add_cd_file(TARGET lodctr DESTINATION reactos/system32 FOR all)
set_module_type(more win32cui)
add_importlibs(more user32 msvcrt kernel32)
-add_cab_target(more 1)
+add_cd_file(TARGET more DESTINATION reactos/system32 FOR all)
set_module_type(reg win32cui)
add_importlibs(reg advapi32 user32 msvcrt kernel32)
-add_cab_target(reg 1)
+add_cd_file(TARGET reg DESTINATION reactos/system32 FOR all)
set_module_type(xcopy win32cui)
add_importlibs(xcopy shell32 user32 msvcrt kernel32 ntdll)
-add_cab_target(xcopy 1)
+add_cd_file(TARGET xcopy DESTINATION reactos/system32 FOR all)
set_module_type(control win32gui)
add_importlibs(control advapi32 shell32 msvcrt kernel32)
-add_cab_target(control 1)
+add_cd_file(TARGET control DESTINATION reactos/system32 FOR all)
add_importlibs(dxdiag user32 advapi32 comctl32 dinput8 setupapi dsound ddraw version gdi32 winmm d3d9 msvcrt kernel32 ntdll)
-add_cab_target(dxdiag 1)
+add_cd_file(TARGET dxdiag DESTINATION reactos/system32 FOR all)
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Detta verktyget rapporterar detaljerad information om ReactX komponenter och enheter som är installerade på ditt system.", -1, 10, 10, 443, 17
- LTEXT "Om du vet vilket område som skapar problemer, välger du den aktuella kategorin ovanför. Om inte, kan du använda knappen ""Nästa sida"" nedanför för att besöka alla sidorna sekventiellt.", -1, 10, 30, 443, 25
+ LTEXT "Om du vet vilket område som skapar problem, kan du klicka på motsvarande flik ovanför. Om inte, kan du använda knappen ""Nästa sida"" nedanför för att besöka alla sidorna sekventiellt.", -1, 10, 30, 443, 25
GROUPBOX "System Information", -1, 10, 55, 443, 130, SS_RIGHT
- LTEXT "Nuvarende Datum/Tid:", -1, 70, 70, 80, 10, SS_RIGHT
+ LTEXT "Aktuellt Datum/Tid:", -1, 70, 70, 80, 10, SS_RIGHT
LTEXT "Datornamn:", -1, 70, 80, 80, 10, SS_RIGHT
LTEXT "Operativsystem:", -1, 70, 90, 80, 10, SS_RIGHT
LTEXT "Språk:", -1, 70, 100, 80, 10, SS_RIGHT
IDS_FORMAT_UNIPROC "%s (%u processor)"
IDS_FORMAT_MPPROC "%s (%u procesorer)"
IDS_VERSION_UNKNOWN "Okänd version"
- IDS_DEVICE_STATUS_ATTACHED "Kopplad till"
- IDS_DEVICE_STATUS_MISSING "Kopplad från"
+ IDS_DEVICE_STATUS_ATTACHED "Ansluten"
+ IDS_DEVICE_STATUS_MISSING "Saknas"
IDS_DEVICE_STATUS_UNKNOWN "Okänd"
IDS_DEVICE_NAME "Enhetsnamn"
IDS_DEVICE_STATUS "Status"
IDS_DIRECTPLAY8_SERIALSP "DirectPlay8 Serial Service Provider"
IDS_DIRECTPLAY8_IPXSP "DirectPlay8 IPX Service Provider"
IDS_DIRECTPLAY8_TCPSP "DirectPlay8-TCP/IP Service Provider"
- IDS_DIRECTPLAY_TCPCONN "Internet TCP/IP koppling for DirectPlay"
- IDS_DIRECTPLAY_IPXCONN "IPX koppling for DirectPlay"
- IDS_DIRECTPLAY_MODEMCONN "Modem koppling for DirectPlay"
- IDS_DIRECTPLAY_SERIALCONN "Serial kopplig for DirectPlay"
+ IDS_DIRECTPLAY_TCPCONN "Internet TCP/IP koppling för DirectPlay"
+ IDS_DIRECTPLAY_IPXCONN "IPX koppling för DirectPlay"
+ IDS_DIRECTPLAY_MODEMCONN "Modemkoppling för DirectPlay"
+ IDS_DIRECTPLAY_SERIALCONN "Seriell kopplig för DirectPlay"
IDS_REG_SUCCESS "OK"
IDS_REG_FAIL "Fel"
IDS_DDTEST_ERROR "Testet misslyckes!"
#include "lang/en-US.rc"
#include "lang/es-ES.rc"
#include "lang/fr-FR.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/ko-KR.rc"
#include "lang/nl-NL.rc"
#include "lang/no-NO.rc"
set_module_type(extrac32 win32gui)
add_importlibs(extrac32 shell32 setupapi shlwapi user32 msvcrt kernel32 ntdll)
-add_cab_target(extrac32 1)
+add_cd_file(TARGET extrac32 DESTINATION reactos/system32 FOR all)
set_module_type(findstr win32cui)
add_importlibs(findstr user32 msvcrt kernel32)
-add_cab_target(findstr 1)
+add_cd_file(TARGET findstr DESTINATION reactos/system32 FOR all)
set_module_type(fontview win32gui)
add_importlibs(fontview gdi32 shell32 user32 msvcrt kernel32)
-add_cab_target(fontview 1)
+add_cd_file(TARGET fontview DESTINATION reactos/system32 FOR all)
add_importlibs(sol advapi32 comctl32 user32 gdi32 kernel32 msvcrt)
-add_cab_target(sol 1)
+add_cd_file(TARGET sol DESTINATION reactos/system32 FOR all)
add_importlibs(spider advapi32 comctl32 user32 gdi32 kernel32 msvcrt)
-add_cab_target(spider 1)
+add_cd_file(TARGET spider DESTINATION reactos/system32 FOR all)
target_link_libraries(winmine wine)
add_importlibs(winmine user32 gdi32 advapi32 shell32 msvcrt kernel32 ntdll)
-add_cab_target(winmine 1)
+add_cd_file(TARGET winmine DESTINATION reactos/system32 FOR all)
add_executable(hh main.c hh.rc)
set_module_type(hh win32gui)
add_importlibs(hh gdi32 user32 msvcrt kernel32)
-add_cab_target(hh 4)
+add_cd_file(TARGET hh DESTINATION reactos FOR all)
add_executable(iexplore main.c iexplore.rc)
set_module_type(iexplore win32gui)
add_importlibs(iexplore shdocvw msvcrt kernel32)
-add_cab_target(iexplore 4)
+add_cd_file(TARGET iexplore DESTINATION reactos FOR all)
set_module_type(kbswitch win32gui)
add_importlibs(kbswitch advapi32 user32 shell32 gdi32 msvcrt kernel32)
-add_cab_target(kbswitch 1)
+add_cd_file(TARGET kbswitch DESTINATION reactos/system32 FOR all)
add_subdirectory(kbsdll)
set_module_type(kbsdll win32dll)
add_importlibs(kbsdll user32 comctl32 kernel32 msvcrt)
-add_cab_target(kbsdll 1)
+add_cd_file(TARGET kbsdll DESTINATION reactos/system32 FOR all)
set_module_type(logoff win32cui)
add_importlibs(logoff advapi32 user32 msvcrt kernel32)
-add_cab_target(logoff 1)
+add_cd_file(TARGET logoff DESTINATION reactos/system32 FOR all)
set_module_type(magnify win32gui)
add_importlibs(magnify user32 gdi32 advapi32 shell32 msvcrt kernel32)
-add_cab_target(magnify 1)
+add_cd_file(TARGET magnify DESTINATION reactos/system32 FOR all)
set_module_type(mplay32 win32gui)
add_importlibs(mplay32 advapi32 comctl32 comdlg32 user32 gdi32 winmm shell32 msvcrt kernel32)
-add_cab_target(mplay32 1)
+add_cd_file(TARGET mplay32 DESTINATION reactos/system32 FOR all)
--- /dev/null
+/*
+ * PROJECT: ReactOS RAPPS
+ * FILE: \base\applications\mplay32\lang\sv-SE.rc
+ * PURPOSE: Swedish resource file
+ * Translation: Jaix Bly
+ */
+LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
+
+IDR_MAINMENU MENU
+BEGIN
+ POPUP "&Arkiv"
+ BEGIN
+ MENUITEM "&Öppna...", IDM_OPEN_FILE
+ MENUITEM "&Stäng", IDM_CLOSE_FILE
+ MENUITEM SEPARATOR
+ MENUITEM "&Avsluta", IDM_EXIT
+ END
+ POPUP "&Hjälp"
+ BEGIN
+ MENUITEM "&Om...", IDM_ABOUT
+ END
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_ALL_TYPES_FILTER "Alla kompaktibla filer (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0"
+ IDS_TOOLTIP_PLAY "Spela upp"
+ IDS_TOOLTIP_STOP "Stopp"
+ IDS_TOOLTIP_EJECT "Mata ut"
+ IDS_TOOLTIP_BACKWARD "Spola tillbaka"
+ IDS_TOOLTIP_SEEKBACK "Sök bakåt"
+ IDS_TOOLTIP_SEEKFORW "Sök framåt"
+ IDS_TOOLTIP_FORWARD "Spola fremåt"
+ IDS_APPTITLE "ReactOS Multimediaspelare"
+END
#include "lang/es-ES.rc"
#include "lang/fr-FR.rc"
#include "lang/it-IT.rc"
-// #include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/nl-NL.rc"
#include "lang/no-NO.rc"
#include "lang/pl-PL.rc"
#include "lang/ru-RU.rc"
#include "lang/sk-SK.rc"
+#include "lang/sv-SE.rc"
#include "lang/uk-UA.rc"
set_module_type(msconfig win32gui)
add_importlibs(msconfig user32 advapi32 version comctl32 shell32 shlwapi msvcrt kernel32)
-add_cab_target(msconfig 1)
+add_cd_file(TARGET msconfig DESTINATION reactos/system32 FOR all)
--- /dev/null
+/*
+ * PROJECT: ReactOS APPS
+ * FILE: \base\applications\msconfig\lang\sv-SE.rc
+ * PURPOSE: Swedish resource file
+ * Translation: Jaix Bly
+ */
+LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
+
+IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220
+STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP |
+ WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU |
+ WS_THICKFRAME
+CAPTION "Systemkonfigurastion"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,2,2,374,195
+ DEFPUSHBUTTON "OK", IDOK, 211, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ PUSHBUTTON "&Hjälp", IDC_BTN_HELP, 2, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ PUSHBUTTON "Avbryt", IDCANCEL, 267, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ PUSHBUTTON "Verkställ", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+END
+
+IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175
+STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL "List3",IDC_STARTUP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 148
+ PUSHBUTTON "&Aktivera allt",IDC_BTN_STARTUP_ACTIVATE,223,155,66,14
+ PUSHBUTTON "&Inaktivera allt",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14
+END
+
+IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175
+STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL "", 237, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_EDITLABELS | TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 2, 1, 280, 148
+ PUSHBUTTON "Flytta &upp", IDC_BTN_SYSTEM_UP, 290, 5, 66, 14
+ PUSHBUTTON "Flytta &ner", IDC_BTN_SYSTEM_DOWN, 290, 25, 66, 14
+
+ PUSHBUTTON "&Aktivera", IDC_BTN_SYSTEM_ENABLE, 290, 50, 66, 14
+ PUSHBUTTON "I&naktivera", IDC_BTN_SYSTEM_DISABLE, 290, 70, 66, 14
+
+ PUSHBUTTON "&Sök", IDC_BTN_SYSTEM_FIND, 290, 95, 66, 14
+ PUSHBUTTON "&Ny", IDC_BTN_SYSTEM_NEW, 290, 115, 66, 14
+ PUSHBUTTON "Re&digera", IDC_BTN_SYSTEM_EDIT, 290, 135, 66, 14
+
+ PUSHBUTTON "A&ktivera allt", IDC_BTN_SYSTEM_ACTIVATE, 123, 155, 66, 14
+ PUSHBUTTON "I&naktivera allt",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14
+END
+
+IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175
+STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL "List2",IDC_TOOLS_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 134
+ EDITTEXT IDC_TOOLS_CMDLINE, 1, 139, 360, 12, ES_READONLY
+ PUSHBUTTON "&Kör", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+END
+
+IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175
+STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL "List1",IDC_SERVICES_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,2,1,360,148
+ PUSHBUTTON "&Aktivera allt",IDC_BTN_SERVICES_ACTIVATE,223,155,66,14
+ PUSHBUTTON "&Inaktivera allt",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14
+END
+
+IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175
+STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
+FONT 8, "MS Shell Dlg"
+BEGIN
+ GROUPBOX "Uppstartsval", -1, 10, 10, 340, 150,0,WS_EX_TRANSPARENT
+ CONTROL "&Normal uppstart - ladda in alla drivrutiner och tjänster", IDC_CBX_NORMAL_START, "Button", 0x50010009, 20, 30, 236, 10
+ CONTROL "&Diagnostisk uppstart - ladda bara in grundläggande drivrutiner och tjänster", IDC_CBX_DIAGNOSTIC_START, "Button", 0x50010009, 20, 45, 236, 10
+ CONTROL "&Selektiv uppstart", IDC_CBX_SELECTIVE_STARTUP, "Button", 0x50010009, 20, 60, 70, 10
+ AUTOCHECKBOX "L&adda in SYSTEM.INI Filen", IDC_CBX_SYSTEM_INI, 30, 80, 95, 10
+ AUTOCHECKBOX "&Ladda in Systemtjänster", IDC_CBX_SYSTEM_SERVICE, 30, 95, 105, 10
+ AUTOCHECKBOX "La&dda in uppstartsprylar", IDC_CBX_STARTUP_ITEM, 30, 110, 105, 10
+END
+
+IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175
+STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200
+ PUSHBUTTON "&Undersök alla bootvägar", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 75, 12
+ PUSHBUTTON "&Sätt som standard", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12
+ PUSHBUTTON "Flytta &upp", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12
+ PUSHBUTTON "Flytta &ner", IDC_BTN_MOVE_DOWN_BOOT_OPTION, 280, 65, 70, 12
+ GROUPBOX "Uppstarts alternativ", -1, 10, 80, 250, 95,0,WS_EX_TRANSPARENT
+ CHECKBOX "/Sä&ker uppstart", IDC_CBX_SAFE_BOOT, 15, 90, 95, 10
+ CHECKBOX "/&Ingen grafisk uppstart", IDC_CBX_NO_GUI_BOOT, 15, 105, 95, 10
+ CHECKBOX "/&Uppstartslogg", IDC_CBX_BOOT_LOG, 15, 120, 80, 10
+ CHECKBOX "/Enkel &grafik", IDC_CBX_BASE_VIDEO, 15, 135, 95, 10
+ CHECKBOX "/H&jälp", IDC_CBX_SOS, 15, 150, 50, 10
+ PUSHBUTTON "Av&ancerade alternativ...", IDC_BTN_ADVANCED_OPTIONS, 100, 150, 93, 12
+ LTEXT "&Timeout:", -1, 280, 91, 70, 10
+ EDITTEXT IDC_TXT_BOOT_TIMEOUT, 280, 100, 25, 12, ES_LEFT
+ LTEXT "sekunder", -1, 310, 100, 85, 10
+END
+
+IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175
+STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CHECKBOX "/&Maximalt minnestorlek:=", IDC_CBX_MAX_MEM, 10, 10, 50, 10
+ EDITTEXT IDC_TXT_MAX_MEM, 80, 10, 60, 12
+ CONTROL "",IDC_SCR_MAX_MEM, "msctls_updown32", 0x50000000, 140, 10, 11, 11
+ CHECKBOX "/&Antal processorer:=", IDC_CBX_NUM_PROC, 10, 25, 50, 10
+ COMBOBOX IDC_DRP_NUM_PROC, 80, 25, 60, 10, CBS_DROPDOWNLIST | CBS_SORT | WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CHECKBOX "/&PCILOCK", IDC_CBX_PCI_LOCK, 10, 40, 50, 10
+ CHECKBOX "/P&ROFIL", IDC_CBX_PROFILE, 10, 55, 50, 10
+ CHECKBOX "/&IRQ", IDC_CBX_IRQ, 10, 70, 40, 12
+ EDITTEXT IDC_TXT_IRQ, 80, 70, 60, 12, ES_LEFT
+ CHECKBOX "/&DEBUG", IDC_CBX_DEBUG, 10, 85, 40, 10
+ CHECKBOX "/D&EBUGPORT", IDC_CBX_DEBUG_PORT, 20, 100, 60, 10
+ COMBOBOX IDC_DRP_DEBUG_PORT, 80, 100, 60, 10, CBS_DROPDOWNLIST | CBS_SORT | WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CHECKBOX "/&BAUDRATE", IDC_CBX_BAUD_RATE, 20, 115, 50, 10
+ COMBOBOX IDC_DRP_DRP_BAUD_RATE, 80, 115, 60, 10, CBS_DROPDOWNLIST | CBS_SORT | WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CHECKBOX "/&Kanal", IDC_CBX_CHANNEL, 20, 130, 50, 10
+ EDITTEXT IDC_TXT_CHANNEL, 80, 130, 60, 12, ES_LEFT
+ CONTROL "",IDC_SCR_CHANNEL, "msctls_updown32", 0x50000000, 140, 130, 11, 11
+ PUSHBUTTON "Ok", IDC_OK, 20, 160, 50, 12
+ PUSHBUTTON "Avbryt", IDC_CANCEL, 100, 160, 50, 12
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_MSCONFIG "Systemkonfiguration"
+ IDS_TAB_GENERAL "Generellt"
+ IDS_TAB_SYSTEM "SYSTEM.INI"
+ IDS_TAB_FREELDR "FREELDR.INI"
+ IDS_TAB_SERVICES "Tjänster"
+ IDS_TAB_STARTUP "Uppstart"
+ IDS_TAB_TOOLS "Verktyg"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_SERVICES_COLUMN_SERVICE "Tjänst"
+ IDS_SERVICES_COLUMN_REQ "Viktigt"
+ IDS_SERVICES_COLUMN_VENDOR "Tillverkare"
+ IDS_SERVICES_COLUMN_STATUS "Status"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_TOOLS_COLUMN_NAME "Namn"
+ IDS_TOOLS_COLUMN_DESCR "Beskrivning"
+
+ IDS_TOOLS_CMD_NAME "Kommando prompt"
+ IDS_TOOLS_CMD_DESCR "Kommando tolk för att kontrollera systemet"
+ IDS_TOOLS_CMD_CMD "cmd.exe"
+
+ IDS_TOOLS_INFO_NAME "Version"
+ IDS_TOOLS_INFO_DESCR "Visa version information."
+ IDS_TOOLS_INFO_CMD "winver.exe"
+
+ IDS_TOOLS_REGEDIT_NAME "Registereditor"
+ IDS_TOOLS_REGEDIT_DESCR "Öppna registereditorn."
+ IDS_TOOLS_REGEDIT_CMD "regedit.exe"
+
+ IDS_TOOLS_SYSDM_NAME "Systemegenskaper"
+ IDS_TOOLS_SYSDM_DESCR "Visa information om denna datorn."
+ IDS_TOOLS_SYSDM_CMD "control.exe"
+ IDS_TOOLS_SYSDM_PARAM "sysdm.cpl"
+
+ IDS_STARTUP_COLUMN_ELEMENT "Element"
+ IDS_STARTUP_COLUMN_CMD "Kommando"
+ IDS_STARTUP_COLUMN_PATH "Plassering"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_SERVICES_STATUS_RUNNING "Körs"
+ IDS_SERVICES_STATUS_STOPPED "Stoppad"
+ IDS_SERVICES_YES "Ja"
+ IDS_SERVICES_UNKNOWN "Okänt"
+END
}
break;
+ case WM_SYSCOLORCHANGE:
+ /* Forward WM_SYSCOLORCHANGE to common controls */
+ SendMessage(hServicesListCtrl, WM_SYSCOLORCHANGE, 0, 0);
+ SendMessage(hStartupListCtrl, WM_SYSCOLORCHANGE, 0, 0);
+ SendMessage(hToolsListCtrl, WM_SYSCOLORCHANGE, 0, 0);
+ break;
+
case WM_DESTROY:
if (hToolsPage)
DestroyWindow(hToolsPage);
#include "lang/ro-RO.rc"
#include "lang/ru-RU.rc"
#include "lang/sk-SK.rc"
+#include "lang/sv-SE.rc"
#include "lang/th-TH.rc"
#include "lang/uk-UA.rc"
#include "lang/zh-CN.rc"
set_module_type(devmgmt win32gui)
add_importlibs(devmgmt setupapi gdi32 user32 comctl32 advapi32 devmgr msvcrt kernel32)
-add_cab_target(devmgmt 1)
+add_cd_file(TARGET devmgmt DESTINATION reactos/system32 FOR all)
--- /dev/null
+/*
+ * PROJECT: ReactOS APPS
+ * FILE: \base\applications\mscutils\devmgmt\lang\sv-SE.rc
+ * PURPOSE: Swedish resource file
+ * Translation: Jaix Bly
+ */
+LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
+
+IDR_MAINMENU MENU
+BEGIN
+ POPUP "&Arkiv"
+ BEGIN
+ MENUITEM "A&vsluta", IDC_EXIT
+ END
+ POPUP "Åtgärd"
+ BEGIN
+ MENUITEM "Skriv ut", IDC_PRINT, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Egenskaper", IDC_PROP, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Hjälp", IDC_PROGHELP, GRAYED
+ END
+ POPUP "Visa"
+ BEGIN
+ MENUITEM "Enheter efter typ", IDC_DEVBYTYPE, CHECKED
+ MENUITEM "Enheter efter koppling", IDC_STATIC, GRAYED
+ MENUITEM "Resurcer efter typ", IDC_STATIC, GRAYED
+ MENUITEM "Resurcer efter koppling", IDC_STATIC, GRAYED
+ END
+ POPUP "Hjälp"
+ BEGIN
+ MENUITEM "Hjälp", IDC_PROGHELP
+ MENUITEM "Om", IDC_ABOUT
+ END
+END
+
+IDR_POPUP MENU
+BEGIN
+ POPUP "popup"
+ BEGIN
+ MENUITEM "Egenskaper", IDC_PROP, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Hjälp", IDC_PROGHELP
+ END
+END
+
+IDD_ABOUTBOX DIALOGEX 22,16,190,182
+CAPTION "Om Enhetshanteraren"
+FONT 8,"MS Shell Dlg",0,0
+STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME
+BEGIN
+ LTEXT "Enhetshanteraren v0.1\nCopyright (C) 2006\nby Ged Murphy (gedmurphy@gmail.com)", IDC_STATIC, 48, 7, 130, 30
+ PUSHBUTTON "Stäng", IDOK, 75, 162, 44, 15
+ ICON IDI_MAIN_ICON, IDC_STATIC, 10, 10, 7, 30
+ EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_LICENSE "Detta programmet är fri programvara; du kan distribuera det och/eller ändra det under villkoren enligt GNU General Public License som är utgivet av Free Software Foundation; version 2, eller (om du så önskar) alla senare versioner.\r\n\r\nDette programmet er utgivet i hopp om att det skall kunne användas, men DET FINNS INGA GARANTIER; även utan underförstådd garanti om SÄLJBARHET eller LÄMPLIGHET FÖR ETT VISST ÄNDAMÅL. Se på GNU General Public Licensen för mer detaljer.\r\n\r\nDu skall ha motagit en kopia av GNU General Public Licensen tillsammans med detta programmet; om du inte har fått det, skriv til Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_TOOLTIP_PROP "Egenskaper"
+ IDS_TOOLTIP_REFRESH "Uppdater"
+ IDS_TOOLTIP_HELP "Hjälp"
+ IDS_TOOLTIP_EXIT "Avsluta"
+END
+
+/* Hints */
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_APPNAME "ReactOS Enhetshanterare"
+ IDS_HINT_BLANK " "
+ IDS_HINT_EXIT " Avsluta programmet."
+ IDS_HINT_REFRESH " Uppdatera tjänstelistan."
+ IDS_HINT_PROP " Öppna egenskaper för markerat val."
+ IDS_HINT_HELP " Visa hjälpfönstret."
+ IDS_HINT_ABOUT " Om ReactOS Enhetshanterare."
+
+ IDS_HINT_SYS_RESTORE " Återställ detta fönstret till normal storlek."
+ IDS_HINT_SYS_MOVE " Flytta detta fönstret."
+ IDS_HINT_SYS_SIZE " Ändra storleken på detta fönstret."
+ IDS_HINT_SYS_MINIMIZE " Minimera detta fönstret till en ikon."
+ IDS_HINT_SYS_MAXIMIZE " Maximera dette fönstret så det fyller hela skärmen."
+ IDS_HINT_SYS_CLOSE " Stäng detta fönstret."
+END
#include "lang/fr-FR.rc"
#include "lang/id-ID.rc"
#include "lang/it-IT.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/ko-KR.rc"
#include "lang/no-NO.rc"
#include "lang/pl-PL.rc"
#include "lang/ro-RO.rc"
#include "lang/ru-RU.rc"
#include "lang/sk-SK.rc"
+#include "lang/sv-SE.rc"
#include "lang/th-TH.rc"
#include "lang/uk-UA.rc"
-
add_importlibs(eventvwr ntdll)
endif()
-add_cab_target(eventvwr 1)
+add_cd_file(TARGET eventvwr DESTINATION reactos/system32 FOR all)
}
else
{
- wcscpy(CategoryName, L"None");
+ LoadStringW(hInst, IDS_NONE, CategoryName, MAX_PATH);
}
if (hLibrary != NULL)
}
}
- wcscpy(CategoryName, L"None");
+ LoadStringW(hInst, IDS_NONE, CategoryName, MAX_PATH);
return FALSE;
}
while (dwRead > 0)
{
- wcscpy(szUsername , L"N/A");
- wcscpy(szEventText , L"N/A");
- wcscpy(szCategory , L"None");
+ LoadStringW(hInst, IDS_NOT_AVAILABLE, szUsername, MAX_PATH);
+ LoadStringW(hInst, IDS_NOT_AVAILABLE, szEventText, MAX_PATH);
+ LoadStringW(hInst, IDS_NONE, szCategory, MAX_PATH);
// Get the event source name.
lpSourceName = (LPWSTR)((LPBYTE)pevlr + sizeof(EVENTLOGRECORD));
SetDlgItemTextW(hDlg, IDC_EVENTDATESTATIC, szDate);
SetDlgItemTextW(hDlg, IDC_EVENTTIMESTATIC, szTime);
+
SetDlgItemTextW(hDlg, IDC_EVENTUSERSTATIC, szUser);
SetDlgItemTextW(hDlg, IDC_EVENTSOURCESTATIC, szSource);
SetDlgItemTextW(hDlg, IDC_EVENTCOMPUTERSTATIC, szComputer);
IDS_COLUMNCOMPUTER "Êîìïþòúð"
IDS_COLUMNEVENTDATA "Äàííè çà ñúáèòèåòî"
END
+
+STRINGTABLE
+BEGIN
+ IDS_NONE "None"
+ IDS_NOT_AVAILABLE "N/A"
+END
IDS_COLUMNCOMPUTER "Computer"
IDS_COLUMNEVENTDATA "Ereignisdaten"
END
+
+STRINGTABLE
+BEGIN
+ IDS_NONE "Keine"
+ IDS_NOT_AVAILABLE "Nicht verfügbar"
+END
IDS_COLUMNCOMPUTER "Computer"
IDS_COLUMNEVENTDATA "Event Data"
END
+
+STRINGTABLE
+BEGIN
+ IDS_NONE "None"
+ IDS_NOT_AVAILABLE "N/A"
+END
IDS_COLUMNCOMPUTER "Computer"
IDS_COLUMNEVENTDATA "Event Data"
END
+
+STRINGTABLE
+BEGIN
+ IDS_NONE "None"
+ IDS_NOT_AVAILABLE "N/A"
+END
IDS_COLUMNCOMPUTER "Computadora"
IDS_COLUMNEVENTDATA "Datos del evento"
END
+
+STRINGTABLE
+BEGIN
+ IDS_NONE "Ninguna"
+ IDS_NOT_AVAILABLE "N/A"
+END
IDS_COLUMNCOMPUTER "Ordinateur"
IDS_COLUMNEVENTDATA "Données"
END
+
+STRINGTABLE
+BEGIN
+ IDS_NONE "None"
+ IDS_NOT_AVAILABLE "N/A"
+END
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
ICON IDI_EVENTVWR,IDC_MYICON,14,9,21,20
- LTEXT "ReactOS Visualizzatore eventi Version 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX
+ LTEXT "ReactOS Visualizzatore eventi Versione 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX
LTEXT "Copyright (C) 2007 Marc Piulachs (marc.piulachs@codexchange.net)",IDC_STATIC,49,20,119,22
DEFPUSHBUTTON "OK",IDOK,90,48,42,16,WS_GROUP
END
IDS_COLUMNCOMPUTER "Computer"
IDS_COLUMNEVENTDATA "Dati Evento"
END
+
+STRINGTABLE
+BEGIN
+ IDS_NONE "Nessuna"
+ IDS_NOT_AVAILABLE "N/A"
+END
IDS_COLUMNCOMPUTER "Computer"
IDS_COLUMNEVENTDATA "Event Data"
END
+
+STRINGTABLE
+BEGIN
+ IDS_NONE "None"
+ IDS_NOT_AVAILABLE "N/A"
+END
IDS_COLUMNCOMPUTER "Computer"
IDS_COLUMNEVENTDATA "Event Data"
END
+
+STRINGTABLE
+BEGIN
+ IDS_NONE "None"
+ IDS_NOT_AVAILABLE "N/A"
+END
IDS_COLUMNCOMPUTER "Computer"
IDS_COLUMNEVENTDATA "Event Data"
END
+
+STRINGTABLE
+BEGIN
+ IDS_NONE "None"
+ IDS_NOT_AVAILABLE "N/A"
+END
* FILE: base/applications/mscutils/eventvwr/lang/en-US.rc
* PURPOSE: English Language File for ReactOS Event Viewer
*
- * translated by Caemyr - Olaf Siejka (Dec,2007)
+ * translated by Caemyr - Olaf Siejka (Dec,2007;May,2011)
* Use ReactOS forum PM or IRC to contact me
* http://www.reactos.org
* IRC: irc.freenode.net #reactos-pl;
IDS_COLUMNCOMPUTER "Komputer"
IDS_COLUMNEVENTDATA "Dane zdarzenia"
END
+
+STRINGTABLE
+BEGIN
+ IDS_NONE "Brak"
+ IDS_NOT_AVAILABLE "N/A"
+END
IDS_COLUMNCOMPUTER "Computer"
IDS_COLUMNEVENTDATA "Event Data"
END
+
+STRINGTABLE
+BEGIN
+ IDS_NONE "None"
+ IDS_NOT_AVAILABLE "N/A"
+END
IDS_COLUMNCOMPUTER "Computer"
IDS_COLUMNEVENTDATA "Event Data"
END
+
+STRINGTABLE
+BEGIN
+ IDS_NONE "None"
+ IDS_NOT_AVAILABLE "N/A"
+END
IDS_COLUMNCOMPUTER "Computer"
IDS_COLUMNEVENTDATA "Event Data"
END
+
+STRINGTABLE
+BEGIN
+ IDS_NONE "None"
+ IDS_NOT_AVAILABLE "N/A"
+END
--- /dev/null
+/*
+ * PROJECT: ReactOS Event Viewer
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: base/applications/mscutils/eventvwr/lang/en-US.rc
+ * PURPOSE: Swedish Language File for ReactOS Event Viewer
+ * TRANSLATORS: Jaix Bly
+ */
+
+LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
+
+IDC_EVENTVWR MENU
+BEGIN
+ POPUP "&Logg"
+ BEGIN
+ MENUITEM "&Applikation", ID_LOG_APPLICATION
+ MENUITEM "&Säkerhet", ID_LOG_SECURITY
+ MENUITEM "&System", ID_LOG_SYSTEM
+ MENUITEM SEPARATOR
+ MENUITEM "A&vsluta", IDM_EXIT
+ END
+ POPUP "&Visa"
+ BEGIN
+ MENUITEM "&Uppdatera", IDM_REFRESH
+ END
+ MENUITEM "&Åtgärd", ID_OPTIONS
+ POPUP "&Hjälp"
+ BEGIN
+ MENUITEM "Hj&älp", IDM_HELP
+ MENUITEM SEPARATOR
+ MENUITEM "&Om...", IDM_ABOUT
+ END
+END
+
+IDC_EVENTVWR ACCELERATORS
+BEGIN
+ "?", IDM_ABOUT, ASCII, ALT
+ "/", IDM_ABOUT, ASCII, ALT
+END
+
+IDD_ABOUTBOX DIALOGEX 0, 0, 230, 75
+STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_CAPTION | WS_SYSMENU
+CAPTION "Om"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ ICON IDI_EVENTVWR,IDC_MYICON,14,9,21,20
+ LTEXT "ReactOS Händelselogg Versjon 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX
+ LTEXT "Copyright (C) 2007 Marc Piulachs (marc.piulachs@codexchange.net)",IDC_STATIC,49,20,119,22
+ DEFPUSHBUTTON "OK",IDOK,90,48,42,16,WS_GROUP
+END
+
+IDD_PROGRESSBOX DIALOGEX 0, 0, 230, 40
+STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER
+CAPTION "Vänta.."
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ CTEXT "Laddar in Händelseloggen. Vänligen vänta...",IDC_STATIC,0,15,230,8,SS_NOPREFIX
+END
+
+IDD_EVENTDETAILDIALOG DIALOGEX 0, 0, 276, 282
+STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_CONTEXTHELP
+CAPTION "Händelsedetaljer"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ DEFPUSHBUTTON "&Stäng",IDOK,12,258,50,14
+ PUSHBUTTON "&Föregående",IDPREVIOUS,78,258,50,14
+ PUSHBUTTON "&Näste",IDNEXT,144,258,50,14
+ PUSHBUTTON "&Hjälp",IDHELP,210,258,50,14
+ EDITTEXT IDC_EVENTTEXTEDIT,14,81,247,108,ES_MULTILINE | ES_READONLY
+ LTEXT "&Beskrivning:",IDC_STATIC,15,70,39,8
+ LTEXT "Datum:",IDC_STATIC,14,14,36,8
+ LTEXT "Static",IDC_EVENTDATESTATIC,56,14,72,8
+ LTEXT "Tid:",IDC_STATIC,14,27,36,8
+ LTEXT "Static",IDC_EVENTTIMESTATIC,56,27,72,8
+ LTEXT "&Användare:",IDC_STATIC,14,41,36,8
+ LTEXT "Static",IDC_EVENTUSERSTATIC,56,41,72,8
+ LTEXT "&Dator:",IDC_STATIC,14,54,36,8
+ LTEXT "Static",IDC_EVENTCOMPUTERSTATIC,56,54,72,8
+ LTEXT "Händelse ID:",IDC_STATIC,133,15,36,8
+ LTEXT "Static",IDC_EVENTIDSTATIC,175,15,87,8
+ LTEXT "Källa:",IDC_STATIC,133,28,36,8
+ LTEXT "Static",IDC_EVENTSOURCESTATIC,175,28,87,8
+ LTEXT "Type:",IDC_STATIC,133,42,36,8
+ LTEXT "Static",IDC_EVENTTYPESTATIC,175,42,87,8
+ LTEXT "Kategori:",IDC_STATIC,133,55,36,8
+ LTEXT "Static",IDC_EVENTCATEGORYSTATIC,175,55,87,8
+ EDITTEXT IDC_EVENTDATAEDIT,14,204,247,44,ES_MULTILINE | ES_READONLY
+ LTEXT "D&ata",IDC_STATIC,14,194,20,8
+ CONTROL "&Byte",IDC_BYTESRADIO,"Button",BS_AUTORADIOBUTTON,39,194,34,10
+ CONTROL "&Ord",IDC_WORDRADIO,"Button",BS_AUTORADIOBUTTON,77,194,33,10
+END
+
+STRINGTABLE
+BEGIN
+ IDS_APP_TITLE "Händelselogg"
+ IDS_EVENTSTRINGIDNOTFOUND "Beskrivning av Händelse ID ( %lu ) i källan ( %s ) kan inte hittas. Lokal dator har inte nödvendig registerinformation eller meddelander DLL filer for å vise meddelander från en fjärr dator."
+ IDS_EVENTLOG_ERROR_TYPE "Fel"
+ IDS_EVENTLOG_WARNING_TYPE "Varning"
+ IDS_EVENTLOG_INFORMATION_TYPE "Information"
+ IDS_EVENTLOG_AUDIT_SUCCESS "Revision lyckades"
+ IDS_EVENTLOG_AUDIT_FAILURE "Revision misslyckades"
+ IDS_EVENTLOG_SUCCESS "Uppgift lyckades"
+ IDS_EVENTLOG_UNKNOWN_TYPE "Okänd händelse"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_COLUMNTYPE "Typ"
+ IDS_COLUMNDATE "Datum"
+ IDS_COLUMNTIME "Tid"
+ IDS_COLUMNSOURCE "Källa"
+ IDS_COLUMNCATEGORY "Kategori"
+ IDS_COLUMNEVENT "Händelse"
+ IDS_COLUMNUSER "Användare"
+ IDS_COLUMNCOMPUTER "Dator"
+ IDS_COLUMNEVENTDATA "Händelsedata"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_NONE "None"
+ IDS_NOT_AVAILABLE "N/A"
+END
IDS_COLUMNCOMPUTER "Êîìï'þòåð"
IDS_COLUMNEVENTDATA "Äàí³ ïî䳿"
END
+
+STRINGTABLE
+BEGIN
+ IDS_NONE "None"
+ IDS_NOT_AVAILABLE "N/A"
+END
#define IDS_COLUMNCOMPUTER 307
#define IDS_COLUMNEVENTDATA 308
+#define IDS_NONE 320
+#define IDS_NOT_AVAILABLE 321
+
#include "lang/es-ES.rc"
#include "lang/fr-FR.rc"
#include "lang/it-IT.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/ko-KR.rc"
#include "lang/no-NO.rc"
-//#include "lang/pl-PL.rc" FIXME: iconv issue
+#include "lang/pl-PL.rc"
#include "lang/ro-RO.rc"
#include "lang/ru-RU.rc"
#include "lang/sk-SK.rc"
+#include "lang/sv-SE.rc"
#include "lang/uk-UA.rc"
add_importlibs(servman user32 gdi32 advapi32 version comctl32 shell32 comdlg32 msvcrt kernel32)
-add_cab_target(servman 1)
+add_cd_file(TARGET servman DESTINATION reactos/system32 FOR all)
--- /dev/null
+/*
+ * PROJECT: ReactOS APPS
+ * FILE: \base\applications\mscutils\servman\lang\sv-SE.rc
+ * PURPOSE: Swedish resource file
+ * Translation: Jaix Bly
+ */
+LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
+
+IDR_MAINMENU MENU
+BEGIN
+ POPUP "&Arkiv"
+ BEGIN
+ MENUITEM "Exportera...", ID_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "A&vsluta", ID_EXIT
+ END
+ POPUP "Åtgärd"
+ BEGIN
+ MENUITEM "Koppla till...", ID_CONNECT, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Starta", ID_START, GRAYED
+ MENUITEM "Stoppa", ID_STOP, GRAYED
+ MENUITEM "Pausa", ID_PAUSE, GRAYED
+ MENUITEM "Fortsätta", ID_RESUME, GRAYED
+ MENUITEM "Starta om", ID_RESTART, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Uppdatera", ID_REFRESH
+ MENUITEM SEPARATOR
+ MENUITEM "Redigera...", ID_EDIT, GRAYED
+ MENUITEM "Skapa...", ID_CREATE, GRAYED
+ MENUITEM "Ta bort...", ID_DELETE, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Egenskaper...", ID_PROP, GRAYED
+ END
+ POPUP "Visa"
+ BEGIN
+ MENUITEM "Stora ikoner", ID_VIEW_LARGE
+ MENUITEM "Små ikoner", ID_VIEW_SMALL
+ MENUITEM "Lista", ID_VIEW_LIST
+ MENUITEM "Detaljer", ID_VIEW_DETAILS
+ MENUITEM SEPARATOR
+ MENUITEM "Anpassa...",ID_VIEW_CUST, GRAYED
+ END
+ POPUP "Hjälp"
+ BEGIN
+ MENUITEM "Hjälp", ID_HELP
+ MENUITEM "Om", ID_ABOUT
+ END
+END
+
+IDR_POPUP MENU
+BEGIN
+ POPUP "popup"
+ BEGIN
+ MENUITEM "Starta", ID_START, GRAYED
+ MENUITEM "Stoppa", ID_STOP, GRAYED
+ MENUITEM "Pausa", ID_PAUSE, GRAYED
+ MENUITEM "Fortsätta", ID_RESUME, GRAYED
+ MENUITEM "Starta om", ID_RESTART, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Uppdatera", ID_REFRESH
+ MENUITEM SEPARATOR
+ MENUITEM "Redigera...", ID_EDIT, GRAYED
+ MENUITEM "Ta bort...", ID_DELETE, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Egenskaper...", ID_PROP, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Hjälp...", ID_HELP
+ END
+END
+
+IDD_ABOUTBOX DIALOGEX 22,16,190,182
+CAPTION "Om Tjänster"
+FONT 8, "MS Shell Dlg",0,0
+STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME
+BEGIN
+ LTEXT "Tjänster v0.8\nCopyright (C) 2005-2007\nby Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 135, 30
+ PUSHBUTTON "Stäng", IDOK, 75, 162, 44, 15
+ ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30
+ EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE
+END
+
+IDD_DLG_GENERAL DIALOGEX 6, 6, 253, 232
+CAPTION "Allmännt"
+FONT 8, "MS Shell Dlg",0,0
+STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP
+BEGIN
+ LTEXT "", IDC_SERV_NAME, 70,11,176,11, WS_CHILD | WS_VISIBLE
+ EDITTEXT IDC_DISP_NAME, 70, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ EDITTEXT IDC_DESCRIPTION, 70, 46, 176, 24, WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_MULTILINE | ES_READONLY
+ EDITTEXT IDC_EXEPATH, 6, 86, 240, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY
+ COMBOBOX IDC_START_TYPE, 70, 107, 176, 40, WS_CHILD | WS_VISIBLE | WS_TABSTOP | CBS_DROPDOWNLIST
+ PUSHBUTTON "Starta", IDC_START, 6, 155, 54, 15, WS_DISABLED
+ PUSHBUTTON "Stoppa", IDC_STOP, 68, 155, 54, 15, WS_DISABLED
+ PUSHBUTTON "Pausa", IDC_PAUSE , 130, 155, 54, 15, WS_DISABLED
+ PUSHBUTTON "Fortsätta", IDC_RESUME, 192, 155, 54, 15, WS_DISABLED
+ LTEXT "Tjänstenamn:", IDC_STATIC, 4, 11, 53, 11
+ LTEXT "Visningsnamn:", IDC_STATIC, 4, 29, 53, 11
+ LTEXT "Beskrivning:", IDC_STATIC, 4, 51, 53, 11
+ LTEXT "Väg till körbar fil:", IDC_STATIC, 6, 73, 82, 9
+ LTEXT "Startmetod:", IDC_STATIC, 6, 108, 53, 11
+ LTEXT "Tjänstestatus:", IDC_STATIC, 4, 138, 53, 11
+ LTEXT "", IDC_SERV_STATUS, 70, 138, 176, 11, WS_CHILD | WS_VISIBLE
+ LTEXT "Du kan ange startparametrar som gäller när du startar tjänsten härifrån.",IDC_STATIC, 6,177,240,15
+ LTEXT "startparametrar:", IDC_STATIC, 6, 200, 58, 11
+ EDITTEXT IDC_START_PARAM, 68, 199, 178, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ PUSHBUTTON "Redigera", IDC_EDIT, 192, 215, 54, 15, WS_DISABLED
+END
+
+IDD_DLG_DEPEND DIALOGEX 6,6,253,225
+CAPTION "Beroenden"
+FONT 8, "MS Shell Dlg",0,0
+STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP
+BEGIN
+ CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68
+ CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67
+ LTEXT "Några tjänster är beroende av andra tjänster, systemdrivrutiner och laddsystemsgrupper. Om systemkomponenten är stoppad eller inte kör korrekt, kan tjänster som är beroende av den bli påverkade.", IDC_STATIC,8, 7, 238, 26
+ LTEXT "Denna tjänsten är beroende av följande komponenter", IDC_STATIC, 8, 57, 236, 9
+ LTEXT "", IDC_DEPEND_SERVICE, 8, 38, 236, 13
+END
+
+IDD_DLG_CREATE DIALOGEX 6,6,225,209
+CAPTION "Skapa en tjänst"
+FONT 8, "MS Shell Dlg",0,0
+STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP
+BEGIN
+ EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE
+ EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE
+ EDITTEXT IDC_CREATE_PATH, 10, 62, 210, 13, WS_CHILD | WS_VISIBLE
+ EDITTEXT IDC_CREATE_DESC, 10, 97, 210, 48, WS_CHILD | WS_VISIBLE
+ EDITTEXT IDC_CREATE_OPTIONS, 10, 162, 210, 13, WS_CHILD | WS_VISIBLE
+ LTEXT "*Tjänstenamn:", IDC_STATIC, 12, 12, 54, 9
+ LTEXT "*Visningsnamn:", IDC_STATIC, 12, 33, 54, 9
+ LTEXT "*Väg till körbar fil:", IDC_STATIC, 10, 51, 68, 9
+ LTEXT "Beskrivning:", IDC_STATIC, 12, 86, 44, 9
+ PUSHBUTTON "OK", IDOK, 126, 192, 44, 13
+ PUSHBUTTON "Avbryt", IDCANCEL, 176, 192, 46, 13
+ LTEXT "'Ytterligere val (klicka hjälp för detaljer)", IDC_STATIC, 10, 151, 134, 9
+ PUSHBUTTON "Hjälp", ID_CREATE_HELP, 10, 192, 44, 13
+END
+
+IDD_DLG_DELETE DIALOGEX 6,6,185,148
+CAPTION "Ta bort en tjänt"
+FONT 8, "MS Shell Dlg",0,0
+STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | DS_MODALFRAME
+BEGIN
+ ICON IDI_WARNING, IDC_STATIC, 10, 8, 24, 22
+ LTEXT "Är du säker på att du vill ta bort denna tjänsten? Detta kan inte ångras när den blivit raderad!", IDC_STATIC, 50, 6, 125, 25
+ LTEXT "Tjönstenamn:",IDC_STATIC, 6, 40, 80, 9
+ LTEXT "", IDC_DEL_NAME, 15, 53, 160, 15
+ EDITTEXT IDC_DEL_DESC, 6, 73, 174, 48, WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_EX_STATICEDGE | ES_MULTILINE | ES_READONLY
+ PUSHBUTTON "Ja", IDOK, 26, 129, 54, 13
+ DEFPUSHBUTTON "Nej", IDCANCEL, 102, 129, 54, 13
+END
+
+IDD_DLG_DEPEND_STOP DIALOGEX 6,6,240,148
+CAPTION "Stoppa Annan Tjänst"
+FONT 8, "MS Shell Dlg",0,0
+STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | DS_MODALFRAME
+BEGIN
+ ICON IDI_WARNING, IDC_STATIC, 10, 8, 24, 22
+ LTEXT "", IDC_STOP_DEPENDS, 40, 8, 170, 25
+ LISTBOX IDC_STOP_DEPENDS_LB, 15, 40, 210, 70, WS_CHILD | WS_VISIBLE | WS_EX_STATICEDGE | LBS_NOSEL
+ LTEXT "Vill du stoppa dessa tjänster?",IDC_STATIC, 15, 110, 150, 10
+ DEFPUSHBUTTON "Ja", IDOK, 60, 129, 54, 14
+ PUSHBUTTON "Nej", IDCANCEL, 120, 129, 54, 14
+END
+
+IDD_DLG_HELP_OPTIONS DIALOGEX 6,6,200,150
+CAPTION "Val"
+FONT 8, "MS Shell Dlg",0,0
+STYLE 0x10CF0000
+BEGIN
+ LTEXT "", IDC_CREATE_HELP, 6, 5, 200, 150
+ PUSHBUTTON "Ok", IDOK, 75, 130, 44, 13
+END
+
+IDD_DLG_PROGRESS DIALOGEX 6,6,255,89
+CAPTION "Tjänst kontroll"
+FONT 8, "MS Shell Dlg",0,0
+STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | WS_VISIBLE | DS_MODALFRAME
+EXSTYLE WS_EX_TOOLWINDOW
+BEGIN
+ CONTROL "", IDC_SERVCON_PROGRESS, "msctls_progress32", 0x50000000, 8, 46, 238, 13
+ LTEXT "", IDC_SERVCON_INFO, 8, 5, 236, 11
+ LTEXT "", IDC_SERVCON_NAME, 8, 25, 66, 11
+ PUSHBUTTON "&Stäng", IDOK, 100, 70, 54, 13
+END
+
+
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_FIRSTCOLUMN "Namn"
+ IDS_SECONDCOLUMN "Beskrivning"
+ IDS_THIRDCOLUMN "Status"
+ IDS_FOURTHCOLUMN "Startmetod"
+ IDS_FITHCOLUMN "Logga på som"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_SERVICES_STARTED "Startad"
+ IDS_SERVICES_STOPPED "Stoppad"
+ IDS_SERVICES_AUTO "Automatisk"
+ IDS_SERVICES_MAN "Manuell"
+ IDS_SERVICES_DIS "Inaktiverad"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_NUM_SERVICES "Num tjänster: %d"
+ IDS_STOP_DEPENDS "När %s stoppas, kommer också dessa tjänster att stanna"
+ IDS_NO_DEPENDS "<No Dependencies>"
+ IDS_LICENSE "Detta programmet är fri programvara; du kan distribuera det och/eller ändra det under villkoren enligt GNU General Public License som är utgivet av Free Software Foundation; version 2, eller (om du så önskar) alla senare versioner.\r\n\r\nDette programmet er utgivet i hopp om att det skall kunne användas, men DET FINNS INGA GARANTIER; även utan underförstådd garanti om SÄLJBARHET eller LÄMPLIGHET FÖR ETT VISST ÄNDAMÅL. Se på GNU General Public Licensen för mer detaljer.\r\n\r\nDu skall ha motagit en kopia av GNU General Public Licensen tillsammans med detta programmet; om du inte har fått det, skriv til Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_TOOLTIP_PROP "Egenskaper"
+ IDS_TOOLTIP_REFRESH "Uppdatera"
+ IDS_TOOLTIP_EXPORT "Exportera lista"
+ IDS_TOOLTIP_CREATE "Skapa en ny tjänst"
+ IDS_TOOLTIP_DELETE "Tar bort en exiterande tjänst"
+ IDS_TOOLTIP_START "Starta tjänest"
+ IDS_TOOLTIP_STOP "Stoppa tjänst"
+ IDS_TOOLTIP_PAUSE "Pausa tjänst"
+ IDS_TOOLTIP_RESTART "Starta om tjänest"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_PROGRESS_INFO_START "ReactOS försöker att starta följande tjänst"
+ IDS_PROGRESS_INFO_STOP "ReactOS försöker att stoppa följande tjänst"
+ IDS_PROGRESS_INFO_PAUSE "ReactOS försöker att pausa följande tjänst"
+ IDS_PROGRESS_INFO_RESUME "ReactOS försöker att fortsätta följende tjänst"
+ IDS_CREATE_SUCCESS "Tjänsten blev skapad"
+ IDS_DELETE_SUCCESS "Tjänsten togs bort"
+ IDS_CREATE_REQ "Fält markerade med en\nasterisk är obligatoriska"
+ IDS_DELETE_STOP "Du måste manuellt stoppa tjänsten före den kan raderas!"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_HELP_OPTIONS "CREATE OPTIONS:\r\nNOTE: The option name includes the equal sign.\r\n type= <own|share|interact|kernel|filesys|rec>\r\n (default = own)\r\n start= <boot|system|auto|demand|disabled>\r\n (default = demand) \r\n error= <normal|severe|critical|ignore>\r\n (default = normal)\r\n group= <LoadOrderGroup>\r\n tag= <yes|no>\r\n depend= <Dependencies(separated by / (forward slash))>\r\n obj= <AccountName|ObjectName>\r\n (default = LocalSystem)\r\n password= <password>\r\n"
+END
+
+/* Hints */
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_HINT_BLANK " "
+ IDS_HINT_EXPORT " Exportera nuvarende lista till en fil."
+ IDS_HINT_EXIT " Avsluta programmet."
+
+ IDS_HINT_CONNECT " Kontrollera en annan dator."
+ IDS_HINT_START " Starta valda tjänster."
+ IDS_HINT_STOP " Stoppa valda tjänster."
+ IDS_HINT_PAUSE " Pausa valda tjänster."
+ IDS_HINT_RESUME " Fortsätt valda tjänster."
+ IDS_HINT_RESTART " Stoppa och starta valda tjänster."
+ IDS_HINT_REFRESH " Uppdatera tjänstelistan."
+ IDS_HINT_EDIT " Editera egenskaperna för den valda tjänsten."
+ IDS_HINT_CREATE " Skapa en ny tjänst."
+ IDS_HINT_DELETE " Radera valda tjänster."
+ IDS_HINT_PROP " Öppna egenskaperna för nuvarande val."
+
+ IDS_HINT_LARGE " Visa objekt med store ikoner."
+ IDS_HINT_SMALL " Visa objekt med mindre ikoner."
+ IDS_HINT_LIST " Visa objekt i en liste."
+ IDS_HINT_DETAILS " Visa information om varje objekt i ett fönster."
+ IDS_HINT_CUST " Anpassa vy."
+
+ IDS_HINT_HELP " Visa hjälpfönstret."
+ IDS_HINT_ABOUT " Om ReactOS tjänster."
+
+ IDS_HINT_SYS_RESTORE " Återställ fönstret till normal storlek."
+ IDS_HINT_SYS_MOVE " Flytta detta fönstret."
+ IDS_HINT_SYS_SIZE " Ändra storleken på dette fönstret."
+ IDS_HINT_SYS_MINIMIZE " Minimera dette fönstret till en ikon."
+ IDS_HINT_SYS_MAXIMIZE " Maximera dette fönstret till fullskärm."
+ IDS_HINT_SYS_CLOSE " Stäng detta fönstret."
+END
+
+/* Application title */
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_APPNAME "ReactOS tjänster"
+END
#include "lang/fr-FR.rc"
#include "lang/id-ID.rc"
#include "lang/it-IT.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/ko-KR.rc"
#include "lang/no-NO.rc"
#include "lang/pl-PL.rc"
#include "lang/ro-RO.rc"
#include "lang/ru-RU.rc"
#include "lang/sk-SK.rc"
+#include "lang/sv-SE.rc"
#include "lang/th-TH.rc"
#include "lang/uk-UA.rc"
set_module_type(mspaint win32gui)
add_importlibs(mspaint comdlg32 shell32 user32 gdi32 advapi32 comctl32 msvcrt kernel32)
-add_cab_target(mspaint 1)
+add_cd_file(TARGET mspaint DESTINATION reactos/system32 FOR all)
// menu and button events
+ case WM_SYSCOLORCHANGE:
+ {
+ /* Redirect message to common controls */
+ HWND hToolbar = FindWindowEx(hToolBoxContainer, NULL, TOOLBARCLASSNAME, NULL);
+ SendMessage(hToolbar, WM_SYSCOLORCHANGE, 0, 0);
+ break;
+ }
+
case WM_COMMAND:
switch (LOWORD(wParam))
{
add_importlibs(mstsc user32 gdi32 comctl32 ws2_32 advapi32 shell32 ole32 comdlg32 msvcrt kernel32)
-add_cab_target(mstsc 1)
+add_cd_file(TARGET mstsc DESTINATION reactos/system32 FOR all)
--- /dev/null
+/*
+ * PROJECT: ReactOS RAPPS
+ * FILE: \base\applications\mstsc\lang\sv-SE.rc
+ * PURPOSE: Swedish resource file
+ * Translation: Jaix Bly
+ */
+LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
+
+IDD_GENERAL DIALOGEX 0, 0, 242, 175
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ GROUPBOX "Inloggningsinställningar",IDC_STATIC,7,7,228,89
+ GROUPBOX "Anslutningsinställningar",IDC_STATIC,7,103,228,65
+ ICON "", IDC_LOGONICON, 15,19,20,20
+ LTEXT "Skriv in serveradressen",IDC_STATIC,47,24,81,8
+ LTEXT "Server:",IDC_STATIC,47,41,25,8
+ LTEXT "Användarnamn:",IDC_STATIC,47,58,38,8
+ COMBOBOX IDC_SERVERCOMBO,79,39,141,150,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Spara",IDC_SAVE,67,139,50,14
+ PUSHBUTTON "Spara som...",IDC_SAVEAS,123,139,50,14
+ PUSHBUTTON "Öppna...",IDC_OPEN,177,139,50,14
+ ICON "", IDC_CONNICON, 16,114,20,20
+ LTEXT "Spara nuvarende anslutningsinställing eller öppna lagrad anslutning",IDC_STATIC,50,115,172,20
+END
+
+IDD_DISPLAY DIALOGEX 0, 0, 242, 175
+STYLE DS_SHELLFONT | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ GROUPBOX "Storlek på fjärrskrivbord",IDC_STATIC,7,7,228,68
+ GROUPBOX "Färger",IDC_STATIC,7,83,228,85
+ ICON "", IDC_REMICON, 15,19,20,20
+ ICON "", IDC_COLORSICON, 15,98,20,20
+ LTEXT "Välj din skärmstorlek på fjärrskrivbordet. Dra glidreglaget helt till höger för att få fullskärmsvisning.",IDC_STATIC,53,22,175,21
+ CONTROL "", IDC_GEOSLIDER, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 56, 42, 124, 17
+ COMBOBOX IDC_BPPCOMBO,56,102,128,80, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+ CONTROL "",IDC_COLORIMAGE,"Static",SS_OWNERDRAW | SS_SUNKEN, 56,121,127,10
+ LTEXT "OBS: Inställingen på fjärdatorn kan ersätta denna inställingen.",IDC_STATIC,56,143,165,18
+ LTEXT "Mindre",IDC_STATIC,35,42,22,8
+ LTEXT "Större",IDC_STATIC,189,42,19,8
+ LTEXT "", IDC_SETTINGS_RESOLUTION_TEXT, 56, 62, 120, 10, SS_CENTER
+END
+
+IDD_CONNECTDIALOG DIALOGEX 0, 0, 260, 262
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Anslutning till fjärrskrivbord"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ DEFPUSHBUTTON "Anslut",IDOK,147,245,50,14
+ PUSHBUTTON "Avbryt",IDCANCEL,203,245,50,14
+ CONTROL "",IDC_TAB,"SysTabControl32",0x0,7,50,246,190
+END
+
+
+STRINGTABLE
+BEGIN
+ IDS_TAB_GENERAL "Allmännt"
+ IDS_TAB_DISPLAY "Skärm"
+ IDS_256COLORS "256 Färger"
+ IDS_HIGHCOLOR15 "32,768 Färger (15 bit)"
+ IDS_HIGHCOLOR16 "65,536 Färger (16 bit)"
+ IDS_HIGHCOLOR24 "16,777,216 Färger (24 bit)"
+ IDS_PIXEL "%lux%lu Pixlar"
+ IDS_FULLSCREEN "Fullskärm"
+ IDS_BROWSESERVER "<Bläddra efter fler...>"
+ IDS_HEADERTEXT1 "Fjärrskrivbord"
+ IDS_HEADERTEXT2 "Anslutning"
+END
#include "lang/es-ES.rc"
#include "lang/fr-FR.rc"
#include "lang/it-IT.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/ko-KR.rc"
#include "lang/lt-LT.rc"
#include "lang/no-NO.rc"
#include "lang/pl-PL.rc"
#include "lang/ru-RU.rc"
#include "lang/sk-SK.rc"
+#include "lang/sv-SE.rc"
#include "lang/uk-UA.rc"
add_importlibs(arp iphlpapi ws2_32 shlwapi msvcrt kernel32)
-add_cab_target(arp 1)
+add_cd_file(TARGET arp DESTINATION reactos/system32 FOR all)
add_importlibs(dwnl ntdll)
endif()
-add_cab_target(dwnl 1)
+add_cd_file(TARGET dwnl DESTINATION reactos/system32 FOR all)
set_module_type(finger win32cui)
add_importlibs(finger ws2_32 msvcrt kernel32)
-add_cab_target(finger 1)
+add_cd_file(TARGET finger DESTINATION reactos/system32 FOR all)
add_importlibs(ftp ntdll)
endif()
-add_cab_target(ftp 1)
+add_cd_file(TARGET ftp DESTINATION reactos/system32 FOR all)
add_executable(ipconfig ipconfig.c ipconfig.rc)
set_module_type(ipconfig win32cui)
add_importlibs(ipconfig user32 iphlpapi advapi32 msvcrt kernel32)
-add_cab_target(ipconfig 1)
+add_cd_file(TARGET ipconfig DESTINATION reactos/system32 FOR all)
#include "lang/pl-PL.rc"
#include "lang/ru-RU.rc"
#include "lang/sk-SK.rc"
+#include "lang/sv-SE.rc"
#include "lang/uk-UA.rc"
--- /dev/null
+/*
+ * PROJECT: ReactOS RAPPS
+ * FILE: \base\applications\network\ipconfig\lang\sv-SE.rc
+ * PURPOSE: Swedish resource file
+ * Translation: Jaix Bly
+ */
+LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_BCAST "Broadcast"
+ IDS_P2P "Peer To Peer"
+ IDS_MIXED "Mixad"
+ IDS_HYBRID "Hybrid"
+ IDS_UNKNOWN "Okänd"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_OTHER "Annan Typ av Adapter"
+ IDS_ETH "Ethernet Adapter"
+ IDS_TOKEN "Token Ring Adapter"
+ IDS_FDDI "FDDI Adapter"
+ IDS_PPP "PPP Adapter"
+ IDS_LOOP "Loopback Adapter"
+ IDS_SLIP "SLIP Adapter"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+/* Please keep the spacing/formatting as per En.rc when translating */
+ IDS_USAGE
+ "\nSYNTAX:\n \
+ ipconfig [/? | /all | /renew [kort] | /release [kort] |\n \
+ /flushdns | /displaydns | /registerdns |\n \
+ /showclassid kort |\n \
+ /setclassid kort [classid] ]\n \
+ \n \
+ där\n \
+ kort Anslutningssnamn\n \
+ (jokertecken * och ? är tillåtet, se exempeln)\n \
+ \n \
+ Alternativ:\n \
+ /? Visar detta hjälpmeddelandet\n \
+ /all Visar detaljerd information.\n \
+ /release Frigör IP adressen för det angivna kortet.\n \
+ /renew Förnya alla IP adresser för det angivna kortet.\n \
+ /flushdns Tömmer DNS Resolver-buffern.\n \
+ /registerdns Uppdaterar alla DHCP leaseavtal och registerer DNS namn på nytt.\n \
+ /displaydns Visar inhåll i DNS Resolver-bufferen.\n \
+ /showclassid Visar alla klass-ID:na för DHCP som är tillåtet för kortet.\n \
+ /setclassid Ändrar DHCP-klass-ID:t.\n \
+ \n \
+ Som standard visas bara IP-adressen, nätsmasken och\n \
+ standardgateway för varje nätverkskort som är bundet till TCP/IP.\n \
+ \n \
+ Om inget nätverkskort angetts för Release och Renew, kommer IP-adresserna\n \
+ för alla nätverkskort som är bundna till TCP/IP att frigöras eller förnyas.\n \
+ \n \
+ Om inget klass-ID har angetts för Setclassid tas klass-ID:t bort.\n \
+ \n \
+ Exempel:\n \
+ > ipconfig ... Visar informastion.\n \
+ > ipconfig /all ... Visar detaljerd information\n \
+ > ipconfig /renew ... Förnyar alla kort\n \
+ > ipconfig /renew EL* ... Förnyar alle kort med navn som\n \
+ börjar med EL\n \
+ > ipconfig /release *Ans* ... frigör alla matchande anslutningar,\n \
+ t.ex. ""Anslutning till lokalt nätverk 1"" eller\n \
+ ""Anslutning till lokalt nätverk 2""\n \ "
+END
set_module_type(net win32cui)
add_importlibs(net ws2_32 msvcrt kernel32)
-add_cab_target(net 1)
+add_cd_file(TARGET net DESTINATION reactos/system32 FOR all)
add_executable(netstat netstat.c netstat.rc)
set_module_type(netstat win32cui)
add_importlibs(netstat user32 ws2_32 snmpapi iphlpapi msvcrt kernel32)
-add_cab_target(netstat 1)
+add_cd_file(TARGET netstat DESTINATION reactos/system32 FOR all)
set_module_type(nslookup win32cui)
add_importlibs(nslookup user32 ws2_32 snmpapi iphlpapi msvcrt kernel32)
-add_cab_target(nslookup 1)
+add_cd_file(TARGET nslookup DESTINATION reactos/system32 FOR all)
add_importlibs(ping ntdll)
endif()
-add_cab_target(ping 1)
+add_cd_file(TARGET ping DESTINATION reactos/system32 FOR all)
--- /dev/null
+/*
+ * PROJECT: ReactOS RAPPS
+ * FILE: \base\applications\network\ping\lang\sv-SE.rc
+ * PURPOSE: Swedish resource file
+ * Translation: Jaix Bly
+ */
+LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_USAGE "\nSYNTAX: ping [-t] [-n antal] [-l storlek] [-w timeout] värddator\n\n\
+Alternativ:\n\
+ -t Pinga den angivna datorn tills kommandor stoppas.\n\
+ För att stoppa - tryck Ctrl-C.\n\
+ -n antal Antal ekobegäranden som ska skickas.\n\
+ -l storlek Sändniningsbuffertens storlek.\n\
+ -w timeout Timeout i millisekunder att vänta på varje svar.\n\n\0"
+
+ IDS_PING_WITH_BYTES "\nPingar %1 [%2] med %3!d! bytes data:\n\n\0"
+ IDS_PING_STATISTICS "\nPing statistk för %1:\n\0"
+ IDS_PACKETS_SENT_RECEIVED_LOST " Packet: Sända = %1!d!, Mottagna = %2!d!, Förlorade = %3!d! (%4!d!%% förlust),\n\0"
+ IDS_APPROXIMATE_ROUND_TRIP "Ungefärliga slingtider i millisekunder:\n\0"
+ IDS_MIN_MAX_AVERAGE " Minimum = %1, Maximum = %2, Genomsnittlig = %3\n\0"
+ IDS_NOT_ENOUGH_RESOURCES "Inte tillräckliga resurser tillgänliga.\n\0"
+ IDS_UNKNOWN_HOST "Okänd Värd %1.\n\0"
+ IDS_SETSOCKOPT_FAILED "setsockopt misslyckades (%1!d!).\n\0"
+ IDS_COULD_NOT_CREATE_SOCKET "Kunde inte skapa socket (#%1!d!).\n\0"
+ IDS_COULD_NOT_INIT_WINSOCK "Kunde inte initialisera winsock dll.\n\0"
+ IDS_DEST_MUST_BE_SPECIFIED "Namn eller IP adress till värd måste anges.\n\0"
+ IDS_BAD_PARAMETER "Ogiltig parameter %1.\n\0"
+ IDS_BAD_OPTION_FORMAT "Ogiltigt format på alternativ %1.\n\0"
+ IDS_BAD_OPTION "Ogiltigt alternativ %1.\n\0"
+ IDS_BAD_VALUE_OPTION_L "Ogiltigt värde för alternativ -l, giltig intervall är från 0 till %1!d!.\n\0"
+ IDS_REPLY_FROM "Svar från %1: bytes=%2!d! tid%3%4 TTL=%5!d!\n\0"
+ IDS_DEST_UNREACHABLE "Värddatorn går inte att nå.\n\0"
+ IDS_COULD_NOT_TRANSMIT "Kunde inte sända data (%1!d!).\n\0"
+ IDS_COULD_NOT_RECV "Kunde inte ta emot data (%1!d!).\n\0"
+ IDS_REQUEST_TIMEOUT "Förfrågan gjorde timeout.\n\0"
+ IDS_MS "ms\0"
+ IDS_1MS "1ms\0"
+END
#include "lang/de-DE.rc"
#include "lang/en-US.rc"
#include "lang/fr-FR.rc"
-#include "lang/pl-PL.rc"
#include "lang/it-IT.rc"
+#include "lang/pl-PL.rc"
+#include "lang/sv-SE.rc"
#include "lang/uk-UA.rc"
set_module_type(route win32cui)
add_importlibs(route ws2_32 iphlpapi msvcrt kernel32)
-add_cab_target(route 1)
+add_cd_file(TARGET route DESTINATION reactos/system32 FOR all)
set_module_type(telnet win32cui)
add_importlibs(telnet ws2_32 user32 kernel32 msvcrt)
-add_cab_target(telnet 1)
+add_cd_file(TARGET telnet DESTINATION reactos/system32 FOR all)
add_importlibs(tracert ntdll)
endif()
-add_cab_target(tracert 1)
+add_cd_file(TARGET tracert DESTINATION reactos/system32 FOR all)
set_module_type(whois win32cui)
add_importlibs(whois ws2_32 msvcrt kernel32)
-add_cab_target(whois 1)
+add_cd_file(TARGET whois DESTINATION reactos/system32 FOR all)
set_module_type(notepad win32gui)
add_importlibs(notepad user32 gdi32 comctl32 comdlg32 advapi32 shell32 msvcrt kernel32)
-add_cab_target(notepad 1)
+add_cd_file(TARGET notepad DESTINATION reactos/system32 FOR all)
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "ReactOS Notisblokk v1.0\r\nenerett 1997,98 Marcel Baur <mbaur@g26.ethz.ch>\r\nEnerett 2000 Mike McCormack <Mike_McCormack@looksmart.com.au>\r\nEnerett 2002 Sylvain Petreolle <spetreolle@yahoo.fr>\r\nEnerett 2002 Andriy Palamarchuk\r\n",
- -1,"Statisk",SS_LEFTNOWORDWRAP | WS_GROUP,46,7,232,39
+ -1,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,46,7,232,39
CONTROL " ",
- -1,"Statisk",0x50000000,8,48,272,11
+ -1,"Static",0x50000000,8,48,272,11
DEFPUSHBUTTON "Avslutt",IDOK,114,149,44,15,WS_GROUP
ICON IDI_NPICON,-1,12,9,20,30
EDITTEXT IDC_LICENSE,8,64,272,81,ES_MULTILINE |
MENUITEM SEPARATOR
MENUITEM "Sök...", CMD_SEARCH
MENUITEM "&Sök nästa\tF3", CMD_SEARCH_NEXT
- MENUITEM "Replace\tCtrl+H", CMD_REPLACE
- MENUITEM "Go To...\tCtrl+G", CMD_GOTO
+ MENUITEM "Ersätt\tCtrl+H", CMD_REPLACE
+ MENUITEM "Gå Till...\tCtrl+G", CMD_GOTO
MENUITEM SEPARATOR
MENUITEM "Markera &allt", CMD_SELECT_ALL
MENUITEM "&Tid/datum\tF5", CMD_TIME_DATE
MENUITEM "&Automatiskt radbyte", CMD_WRAP
MENUITEM "&Font...", CMD_FONT
END
- POPUP "&View"
+ POPUP "&Visa"
BEGIN
- MENUITEM "Status&bar", CMD_STATUSBAR
+ MENUITEM "Status&rad", CMD_STATUSBAR
END
POPUP "&Hjälp"
BEGIN
MENUITEM "&Sök...", CMD_HELP_SEARCH
MENUITEM "Anvisningar för hjälpen", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
- MENUITEM "&About", CMD_ABOUT
+ MENUITEM "Om &Anteckningar", CMD_ABOUT
MENUITEM "Inf&ormation...", CMD_ABOUT_WINE
END
END
FONT 8, "MS Shell Dlg"
CAPTION "Skrivarinställningar"
BEGIN
-LTEXT "&Huvudnot:", 0x140, 10, 07, 40, 15
+LTEXT "&Sidhuvud:", 0x140, 10, 07, 40, 15
EDITTEXT 0x141, 60, 05,110, 12, WS_BORDER | WS_TABSTOP
-LTEXT "&Fotnot:", 0x142, 10, 24, 40, 15
+LTEXT "&Sidfot:", 0x142, 10, 24, 40, 15
EDITTEXT 0x143, 60, 22,110, 12, WS_BORDER | WS_TABSTOP
GROUPBOX "Marginaler:", 0x144, 10, 43,160, 45
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS |
WS_CAPTION | WS_SYSMENU
FONT 8, "MS Shell Dlg"
-CAPTION "Encoding"
+CAPTION "Kodning"
BEGIN
COMBOBOX ID_ENCODING,54,0,156,80,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
-LTEXT "Encoding:",0x155,5,2,41,12
+LTEXT "Kodning:",0x155,5,2,41,12
COMBOBOX ID_EOLN,54,18,156,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-LTEXT "Endlines:",0x156,5,20,41,12
+LTEXT "Slutrader:",0x156,5,20,41,12
END
/* Dialog 'Go To' */
DIALOG_GOTO DIALOGEX 0,0,165,50
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "MS Shell Dlg"
-CAPTION "Goto line"
+CAPTION "Gå till rad"
BEGIN
EDITTEXT ID_LINENUMBER,54,10,106,12,WS_CHILD | WS_BORDER | WS_TABSTOP
-LTEXT "Line number:",0x155,5,12,41,12,WS_CHILD | WS_TABSTOP | ES_NUMBER
+LTEXT "Radnummer:",0x155,5,12,41,12,WS_CHILD | WS_TABSTOP | ES_NUMBER
DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP
-PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP
+PUSHBUTTON "Avbryt", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP
END
IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
-CAPTION "About ReactOS Notepad"
+CAPTION "Om ReactOS Anteckningar"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "ReactOS Notepad v1.0\r\nCopyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>\r\nCopyright 2000 Mike McCormack <Mike_McCormack@looksmart.com.au>\r\nCopyright 2002 Sylvain Petreolle <spetreolle@yahoo.fr>\r\nCopyright 2002 Andriy Palamarchuk\r\n ",
+ CONTROL "ReactOS Anteckningar v1.0\r\nCopyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>\r\nCopyright 2000 Mike McCormack <Mike_McCormack@looksmart.com.au>\r\nCopyright 2002 Sylvain Petreolle <spetreolle@yahoo.fr>\r\nCopyright 2002 Andriy Palamarchuk\r\n ",
-1,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,46,7,232,39
CONTROL " ",
-1,"Static",0x50000000,8,48,272,11
- DEFPUSHBUTTON "Close",IDOK,114,149,44,15,WS_GROUP
+ DEFPUSHBUTTON "Stäng",IDOK,114,149,44,15,WS_GROUP
ICON IDI_NPICON,-1,12,9,20,30
EDITTEXT IDC_LICENSE,8,64,272,81,ES_MULTILINE |
ES_READONLY | WS_VSCROLL
#include "lang/hy-AM.rc"
#include "lang/id-ID.rc"
#include "lang/it-IT.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/lt-LT.rc"
#include "lang/nl-NL.rc"
#include "lang/no-NO.rc"
add_importlibs(rapps advapi32 comctl32 gdi32 urlmon user32 shell32 shlwapi kernel32 msvcrt ntdll)
add_dependencies(rapps rappsmsg)
add_message_headers(rappsmsg.mc)
-add_cab_target(rapps 1)
+add_cd_file(TARGET rapps DESTINATION reactos/system32 FOR all)
IDR_MAINMENU MENU
BEGIN
- POPUP "\83t\83@\83C\83\8b(&F)"
+ POPUP "ファイル(&F)"
BEGIN
- MENUITEM "\90Ý\92è(&S)", ID_SETTINGS
+ MENUITEM "設定(&S)", ID_SETTINGS
MENUITEM SEPARATOR
- MENUITEM "\8fI\97¹(&X)", ID_EXIT
+ MENUITEM "終了(&X)", ID_EXIT
END
- POPUP "\83v\83\8d\83O\83\89\83\80(&P)"
+ POPUP "プログラム(&P)"
BEGIN
- MENUITEM "\83C\83\93\83X\83g\81[\83\8b(&I)", ID_INSTALL
- MENUITEM "\83A\83\93\83C\83\93\83X\83g\81[\83\8b(&U)",ID_UNINSTALL
- MENUITEM "\95Ï\8dX(&M)", ID_MODIFY
+ MENUITEM "インストール(&I)", ID_INSTALL
+ MENUITEM "アンインストール(&U)",ID_UNINSTALL
+ MENUITEM "変更(&M)", ID_MODIFY
MENUITEM SEPARATOR
- MENUITEM "\83\8c\83W\83X\83g\83\8a\82©\82ç\8dí\8f\9c(&R)",ID_REGREMOVE
+ MENUITEM "レジストリから削除(&R)",ID_REGREMOVE
MENUITEM SEPARATOR
- MENUITEM "\8dX\90V(&R)", ID_REFRESH
+ MENUITEM "更新(&R)", ID_REFRESH
END
- POPUP "\83w\83\8b\83v"
+ POPUP "ヘルプ"
BEGIN
- MENUITEM "\83w\83\8b\83v", ID_HELP, GRAYED
- MENUITEM "\83o\81[\83W\83\87\83\93\8fî\95ñ", ID_ABOUT
+ MENUITEM "ヘルプ", ID_HELP, GRAYED
+ MENUITEM "バージョン情報", ID_ABOUT
END
END
BEGIN
POPUP "popup"
BEGIN
- MENUITEM "\83u\83\89\83E\83U\82Å\83\8a\83\93\83N\82ð\8aJ\82(&O)", ID_OPEN_LINK
- MENUITEM "\83N\83\8a\83b\83v\83{\81[\83h\82É\83R\83s\81[\82·\82é(&C)", ID_COPY_LINK
+ MENUITEM "ブラウザでリンクを開く(&O)", ID_OPEN_LINK
+ MENUITEM "クリップボードにコピーする(&C)", ID_COPY_LINK
END
END
BEGIN
POPUP "popup"
BEGIN
- MENUITEM "\83C\83\93\83X\83g\81[\83\8b(&I)", ID_INSTALL
- MENUITEM "\83A\83\93\83C\83\93\83X\83g\81[\83\8b(&U)", ID_UNINSTALL
- MENUITEM "\95Ï\8dX(&M)", ID_MODIFY
+ MENUITEM "インストール(&I)", ID_INSTALL
+ MENUITEM "アンインストール(&U)", ID_UNINSTALL
+ MENUITEM "変更(&M)", ID_MODIFY
MENUITEM SEPARATOR
- MENUITEM "\83\8c\83W\83X\83g\83\8a\82©\82ç\8dí\8f\9c(&R)", ID_REGREMOVE
+ MENUITEM "レジストリから削除(&R)", ID_REGREMOVE
MENUITEM SEPARATOR
- MENUITEM "\8dX\90V(&R)", ID_REFRESH
+ MENUITEM "更新(&R)", ID_REFRESH
END
END
IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "\90Ý\92è"
+CAPTION "設定"
FONT 9, "MS UI Gothic"
BEGIN
- GROUPBOX "\91S\94Ê", -1, 4, 2, 240, 61
- AUTOCHECKBOX "\83E\83B\83\93\83h\83E\82Ì\8fê\8f\8a\82ð\95Û\91¶\82·\82é(&S)", IDC_SAVE_WINDOW_POS, 15, 12, 219, 12
- AUTOCHECKBOX "\8bN\93®\8e\9e\82É\97\98\97p\82Å\82«\82é\83v\83\8d\83O\83\89\83\80\82Ì\83\8a\83X\83g\82ð\8dX\90V\82·\82é(&U)", IDC_UPDATE_AVLIST, 15, 29, 219, 12
- AUTOCHECKBOX "\83v\83\8d\83O\83\89\83\80\82Ì\83C\83\93\83X\83g\81[\83\8b\82Æ\8dí\8f\9c\82ð\8bL\98^\82·\82é(&L)", IDC_LOG_ENABLED, 15, 46, 219, 12
+ GROUPBOX "全般", -1, 4, 2, 240, 61
+ AUTOCHECKBOX "ウィンドウの場所を保存する(&S)", IDC_SAVE_WINDOW_POS, 15, 12, 219, 12
+ AUTOCHECKBOX "起動時に利用できるプログラムのリストを更新する(&U)", IDC_UPDATE_AVLIST, 15, 29, 219, 12
+ AUTOCHECKBOX "プログラムのインストールと削除を記録する(&L)", IDC_LOG_ENABLED, 15, 46, 219, 12
- GROUPBOX "\83_\83E\83\93\83\8d\81[\83h\8f\88\97\9d", -1, 4, 65, 240, 51
- LTEXT "\83_\83E\83\93\83\8d\81[\83h\82·\82é\83t\83H\83\8b\83_:", -1, 16, 75, 100, 9
+ GROUPBOX "ダウンロード処理", -1, 4, 65, 240, 51
+ LTEXT "ダウンロードするフォルダ:", -1, 16, 75, 100, 9
EDITTEXT IDC_DOWNLOAD_DIR_EDIT, 15, 86, 166, 12, WS_CHILD | WS_VISIBLE | WS_GROUP
- PUSHBUTTON "\91I\91ð(&C)", IDC_CHOOSE, 187, 85, 50, 14
- AUTOCHECKBOX "\83C\83\93\83X\83g\81[\83\8b\8cã\82É\83v\83\8d\83O\83\89\83\80\82Ì\83C\83\93\83X\83g\81[\83\89\82ð\8dí\8f\9c\82·\82é(&D)", IDC_DEL_AFTER_INSTALL, 16, 100, 218, 12
+ PUSHBUTTON "選択(&C)", IDC_CHOOSE, 187, 85, 50, 14
+ AUTOCHECKBOX "インストール後にプログラムのインストーラを削除する(&D)", IDC_DEL_AFTER_INSTALL, 16, 100, 218, 12
- PUSHBUTTON "\83f\83t\83H\83\8b\83g", IDC_DEFAULT_SETTINGS, 8, 124, 60, 14
+ PUSHBUTTON "デフォルト", IDC_DEFAULT_SETTINGS, 8, 124, 60, 14
PUSHBUTTON "OK", IDOK, 116, 124, 60, 14
- PUSHBUTTON "\83L\83\83\83\93\83Z\83\8b", IDCANCEL, 181, 124, 60, 14
+ PUSHBUTTON "キャンセル", IDCANCEL, 181, 124, 60, 14
END
IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "\83v\83\8d\83O\83\89\83\80\82Ì\83C\83\93\83X\83g\81[\83\8b"
+CAPTION "プログラムのインストール"
FONT 9, "MS UI Gothic"
BEGIN
LTEXT "...", IDC_INSTALL_TEXT, 4, 5, 209, 35
- AUTORADIOBUTTON "\83f\83B\83X\83N\82©\82ç\83C\83\93\83X\83g\81[\83\8b (CD \82â DVD)(&I)", IDC_CD_INSTALL, 10, 46, 197, 11, WS_GROUP
- AUTORADIOBUTTON "\83_\83E\83\93\83\8d\81[\83h\82µ\82Ä\83C\83\93\83X\83g\81[\83\8b(&D)", IDC_DOWNLOAD_INSTALL, 10, 59, 197, 11, NOT WS_TABSTOP
+ AUTORADIOBUTTON "ディスクからインストール (CD や DVD)(&I)", IDC_CD_INSTALL, 10, 46, 197, 11, WS_GROUP
+ AUTORADIOBUTTON "ダウンロードしてインストール(&D)", IDC_DOWNLOAD_INSTALL, 10, 59, 197, 11, NOT WS_TABSTOP
PUSHBUTTON "OK", IDOK, 86, 78, 60, 14
- PUSHBUTTON "\83L\83\83\83\93\83Z\83\8b", IDCANCEL, 150, 78, 60, 14
+ PUSHBUTTON "キャンセル", IDCANCEL, 150, 78, 60, 14
END
IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76
STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE
-CAPTION "\83_\83E\83\93\83\8d\81[\83h..."
+CAPTION "ダウンロード..."
FONT 9, "MS UI Gothic"
BEGIN
CONTROL "Progress1", IDC_DOWNLOAD_PROGRESS, "msctls_progress32", WS_BORDER | PBS_SMOOTH, 10, 10, 200, 12
LTEXT "", IDC_DOWNLOAD_STATUS, 10, 30, 200, 10, SS_CENTER
- PUSHBUTTON "\83L\83\83\83\93\83Z\83\8b", IDCANCEL, 85, 58, 50, 15, WS_GROUP | WS_TABSTOP
+ PUSHBUTTON "キャンセル", IDCANCEL, 85, 58, 50, 15, WS_GROUP | WS_TABSTOP
END
IDD_ABOUT_DIALOG DIALOGEX 22, 16, 190, 66
STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME
-CAPTION "\83o\81[\83W\83\87\83\93\8fî\95ñ"
+CAPTION "バージョン情報"
FONT 9, "MS UI Gothic"
BEGIN
- LTEXT "ReactOS \83A\83v\83\8a\83P\81[\83V\83\87\83\93 \83}\83l\81[\83W\83\83\nCopyright (C) 2009\nby Dmitry Chapyshev (dmitry@reactos.org)", IDC_STATIC, 48, 7, 130, 39
- PUSHBUTTON "\95Â\82¶\82é", IDOK, 133, 46, 50, 14
+ LTEXT "ReactOS アプリケーション マネージャ\nCopyright (C) 2009\nby Dmitry Chapyshev (dmitry@reactos.org)", IDC_STATIC, 48, 7, 130, 39
+ PUSHBUTTON "閉じる", IDOK, 133, 46, 50, 14
ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30
END
STRINGTABLE DISCARDABLE
BEGIN
- IDS_TOOLTIP_INSTALL "\83C\83\93\83X\83g\81[\83\8b"
- IDS_TOOLTIP_UNINSTALL "\83A\83\93\83C\83\93\83X\83g\81[\83\8b"
- IDS_TOOLTIP_MODIFY "\95Ï\8dX"
- IDS_TOOLTIP_SETTINGS "\90Ý\92è"
- IDS_TOOLTIP_REFRESH "\8dX\90V"
- IDS_TOOLTIP_EXIT "\8fI\97¹"
+ IDS_TOOLTIP_INSTALL "インストール"
+ IDS_TOOLTIP_UNINSTALL "アンインストール"
+ IDS_TOOLTIP_MODIFY "変更"
+ IDS_TOOLTIP_SETTINGS "設定"
+ IDS_TOOLTIP_REFRESH "更新"
+ IDS_TOOLTIP_EXIT "終了"
END
STRINGTABLE DISCARDABLE
BEGIN
- IDS_APP_NAME "\96¼\91O"
- IDS_APP_INST_VERSION "\83o\81[\83W\83\87\83\93"
- IDS_APP_DESCRIPTION "\8aT\97v"
+ IDS_APP_NAME "名前"
+ IDS_APP_INST_VERSION "バージョン"
+ IDS_APP_DESCRIPTION "概要"
END
STRINGTABLE DISCARDABLE
BEGIN
- IDS_INFO_VERSION "\n\83o\81[\83W\83\87\83\93: "
- IDS_INFO_DESCRIPTION "\n\8aT\97v: "
- IDS_INFO_PUBLISHER "\n\94\8ds\8c³: "
- IDS_INFO_HELPLINK "\n\83w\83\8b\83v\82Ö\82Ì\83\8a\83\93\83N: "
- IDS_INFO_HELPPHONE "\n\83w\83\8b\83v\82Ì\93d\98b\94Ô\8d\86: "
- IDS_INFO_README "\nReadme\82Ì\88Ê\92u: "
- IDS_INFO_REGOWNER "\n\93o\98^\82³\82ê\82½\8f\8a\97L\8eÒ: "
- IDS_INFO_PRODUCTID "\n\83v\83\8d\83_\83N\83gID: "
- IDS_INFO_CONTACT "\n\98A\97\8d\90æ: "
- IDS_INFO_UPDATEINFO "\n\83A\83b\83v\83f\81[\83g\8fî\95ñ: "
- IDS_INFO_INFOABOUT "\n\82±\82ê\82É\8aÖ\82·\82é\8fî\95ñ: "
- IDS_INFO_COMMENTS "\n\83R\83\81\83\93\83g: "
- IDS_INFO_INSTLOCATION "\n\83C\83\93\83X\83g\81[\83\8b\8fê\8f\8a: "
- IDS_INFO_INSTALLSRC "\n\83C\83\93\83X\83g\81[\83\8b\8c³: "
- IDS_INFO_UNINSTALLSTR "\n\83A\83\93\83C\83\93\83X\83g\81[\83\8b\82É\8eg\97p\82·\82é\95¶\8e\9a\97ñ: "
- IDS_INFO_MODIFYPATH "\n\95Ï\8dX\82É\8eg\97p\82·\82é\83p\83X: "
- IDS_INFO_INSTALLDATE "\n\83C\83\93\83X\83g\81[\83\8b\82µ\82½\93ú\95t: "
+ IDS_INFO_VERSION "\nバージョン: "
+ IDS_INFO_DESCRIPTION "\n概要: "
+ IDS_INFO_PUBLISHER "\n発行元: "
+ IDS_INFO_HELPLINK "\nヘルプへのリンク: "
+ IDS_INFO_HELPPHONE "\nヘルプの電話番号: "
+ IDS_INFO_README "\nReadmeの位置: "
+ IDS_INFO_REGOWNER "\n登録された所有者: "
+ IDS_INFO_PRODUCTID "\nプロダクトID: "
+ IDS_INFO_CONTACT "\n連絡先: "
+ IDS_INFO_UPDATEINFO "\nアップデート情報: "
+ IDS_INFO_INFOABOUT "\nこれに関する情報: "
+ IDS_INFO_COMMENTS "\nコメント: "
+ IDS_INFO_INSTLOCATION "\nインストール場所: "
+ IDS_INFO_INSTALLSRC "\nインストール元: "
+ IDS_INFO_UNINSTALLSTR "\nアンインストールに使用する文字列: "
+ IDS_INFO_MODIFYPATH "\n変更に使用するパス: "
+ IDS_INFO_INSTALLDATE "\nインストールした日付: "
END
STRINGTABLE DISCARDABLE
BEGIN
- IDS_AINFO_VERSION "\n\83o\81[\83W\83\87\83\93: "
- IDS_AINFO_DESCRIPTION "\n\8aT\97v: "
- IDS_AINFO_SIZE "\n\83T\83C\83Y: "
- IDS_AINFO_URLSITE "\n\83z\81[\83\80\83y\81[\83W: "
- IDS_AINFO_LICENCE "\n\83\89\83C\83Z\83\93\83X: "
+ IDS_AINFO_VERSION "\nバージョン: "
+ IDS_AINFO_DESCRIPTION "\n概要: "
+ IDS_AINFO_SIZE "\nサイズ: "
+ IDS_AINFO_URLSITE "\nホームページ: "
+ IDS_AINFO_LICENCE "\nライセンス: "
END
STRINGTABLE DISCARDABLE
BEGIN
- IDS_CAT_AUDIO "\83I\81[\83f\83B\83I"
- IDS_CAT_DEVEL "\8aJ\94"
- IDS_CAT_DRIVERS "\83h\83\89\83C\83o"
- IDS_CAT_EDU "\8b³\88ç"
- IDS_CAT_ENGINEER "\8dH\8aw"
- IDS_CAT_FINANCE "\8co\89c"
- IDS_CAT_GAMES "\83Q\81[\83\80\82Æ\82¨\8ay\82µ\82Ý"
- IDS_CAT_GRAPHICS "\83O\83\89\83t\83B\83b\83N\83X"
- IDS_CAT_INTERNET "\83C\83\93\83^\81[\83l\83b\83g\82Æ\83l\83b\83g\83\8f\81[\83N"
- IDS_CAT_LIBS "\83\89\83C\83u\83\89\83\8a"
- IDS_CAT_OFFICE "\83I\83t\83B\83X"
- IDS_CAT_OTHER "\82»\82Ì\91¼"
- IDS_CAT_SCIENCE "\89È\8aw"
- IDS_CAT_TOOLS "\83c\81[\83\8b"
- IDS_CAT_VIDEO "\83r\83f\83I"
+ IDS_CAT_AUDIO "オーディオ"
+ IDS_CAT_DEVEL "開発"
+ IDS_CAT_DRIVERS "ドライバ"
+ IDS_CAT_EDU "教育"
+ IDS_CAT_ENGINEER "工学"
+ IDS_CAT_FINANCE "経営"
+ IDS_CAT_GAMES "ゲームとお楽しみ"
+ IDS_CAT_GRAPHICS "グラフィックス"
+ IDS_CAT_INTERNET "インターネットとネットワーク"
+ IDS_CAT_LIBS "ライブラリ"
+ IDS_CAT_OFFICE "オフィス"
+ IDS_CAT_OTHER "その他"
+ IDS_CAT_SCIENCE "科学"
+ IDS_CAT_TOOLS "ツール"
+ IDS_CAT_VIDEO "ビデオ"
END
STRINGTABLE DISCARDABLE
BEGIN
- IDS_APPTITLE "ReactOS \83A\83v\83\8a\83P\81[\83V\83\87\83\93 \83}\83l\81[\83W\83\83"
- IDS_SEARCH_TEXT "\8c\9f\8dõ..."
- IDS_INSTALL "\83C\83\93\83X\83g\81[\83\8b"
- IDS_UNINSTALL "\83A\83\93\83C\83\93\83X\83g\81[\83\8b"
- IDS_MODIFY "\95Ï\8dX"
- IDS_APPS_COUNT "\83A\83v\83\8a\83P\81[\83V\83\87\83\93\90\94: %d"
- IDS_WELCOME_TITLE "ReactOS \83A\83v\83\8a\83P\81[\83V\83\87\83\93 \83}\83l\81[\83W\83\83\82Ö\82æ\82¤\82±\82»!\n\n"
- IDS_WELCOME_TEXT "\8d¶\91¤\82©\82ç\83J\83e\83S\83\8a\82ð\91I\91ð\82µ\81A\83C\83\93\83X\83g\81[\83\8b\96\94\82Í\83A\83\93\83C\83\93\83X\83g\81[\83\8b\82·\82é\83A\83v\83\8a\83P\81[\83V\83\87\83\93\82ð\91I\82ñ\82Å\82\82¾\82³\82¢\81B\nReactOS \83E\83F\83u \83T\83C\83g: "
+ IDS_APPTITLE "ReactOS アプリケーション マネージャ"
+ IDS_SEARCH_TEXT "検索..."
+ IDS_INSTALL "インストール"
+ IDS_UNINSTALL "アンインストール"
+ IDS_MODIFY "変更"
+ IDS_APPS_COUNT "アプリケーション数: %d"
+ IDS_WELCOME_TITLE "ReactOS アプリケーション マネージャへようこそ!\n\n"
+ IDS_WELCOME_TEXT "左側からカテゴリを選択し、インストール又はアンインストールするアプリケーションを選んでください。\nReactOS ウェブ サイト: "
IDS_WELCOME_URL "http://www.reactos.org"
- IDS_INSTALLED "\83C\83\93\83X\83g\81[\83\8b\8dÏ\82Ý"
- IDS_AVAILABLEFORINST "\83C\83\93\83X\83g\81[\83\8b\89Â\94\\"
- IDS_UPDATES "\83A\83b\83v\83f\81[\83g"
- IDS_APPLICATIONS "\83A\83v\83\8a\83P\81[\83V\83\87\83\93"
- IDS_CHOOSE_FOLDER_TEXT "\83v\83\8d\83O\83\89\83\80\82Ì\83_\83E\83\93\83\8d\81[\83h\82É\8eg\97p\82·\82é\83t\83H\83\8b\83_\82ð\91I\91ð\82µ\82Ä\82\82¾\82³\82¢:"
- IDS_CHOOSE_FOLDER_ERROR "\8ew\92è\82³\82ê\82½\83t\83H\83\8b\83_\82Í\91¶\8dÝ\82µ\82Ü\82¹\82ñ!"
- IDS_USER_NOT_ADMIN """ReactOS \83A\83v\83\8a\83P\81[\83V\83\87\83\93 \83}\83l\81[\83W\83\83"" \82ð\8bN\93®\82·\82é\82É\82Í\8aÇ\97\9d\8eÒ\8c \8cÀ\82Å\82 \82é\95K\97v\82ª\82 \82è\82Ü\82·!"
- IDS_APP_REG_REMOVE "\83\8c\83W\83X\83g\83\8a\82©\82ç\83C\83\93\83X\83g\81[\83\8b\82³\82ê\82½\83v\83\8d\83O\83\89\83\80\82É\8aÖ\82·\82é\83f\81[\83^\82ð\8dí\8f\9c\82µ\82Ä\82à\82æ\82ë\82µ\82¢\82Å\82·\82©?"
- IDS_INFORMATION "\8fî\95ñ"
- IDS_UNABLE_TO_REMOVE "\83\8c\83W\83X\83g\83\8a\82©\82ç\82±\82Ì\83v\83\8d\83O\83\89\83\80\82É\8aÖ\82·\82é\83f\81[\83^\82ð\8dí\8f\9c\82Å\82«\82Ü\82¹\82ñ!"
+ IDS_INSTALLED "インストール済み"
+ IDS_AVAILABLEFORINST "インストール可能"
+ IDS_UPDATES "アップデート"
+ IDS_APPLICATIONS "アプリケーション"
+ IDS_CHOOSE_FOLDER_TEXT "プログラムのダウンロードに使用するフォルダを選択してください:"
+ IDS_CHOOSE_FOLDER_ERROR "指定されたフォルダは存在しません!"
+ IDS_USER_NOT_ADMIN """ReactOS アプリケーション マネージャ"" を起動するには管理者権限である必要があります!"
+ IDS_APP_REG_REMOVE "レジストリからインストールされたプログラムに関するデータを削除してもよろしいですか?"
+ IDS_INFORMATION "情報"
+ IDS_UNABLE_TO_REMOVE "レジストリからこのプログラムに関するデータを削除できません!"
END
/*
* PROJECT: ReactOS RAPPS
- * FILE: \base\applications\rapps\lang\sv-SE.rc
+ * FILE: \base\applications\rapps\lang\sv-SE.rc
* PURPOSE: Swedish resource file
- * Translation: Jaix Bly
+ * Translation: Jaix Bly
*/
#pragma code_page(65001) // UTF-8
MENUITEM "&Avinstallera",ID_UNINSTALL
MENUITEM "&Ändra", ID_MODIFY
MENUITEM SEPARATOR
- MENUITEM "&Ta bort från Registret", ID_REGREMOVE
+ MENUITEM "&Ta bort frĺn Registret", ID_REGREMOVE
MENUITEM SEPARATOR
- MENUITEM "&Uppdatere", ID_REFRESH
+ MENUITEM "&Uppdatera", ID_REFRESH
END
POPUP "Hjälp"
BEGIN
BEGIN
POPUP "popup"
BEGIN
- MENUITEM "&Öppne länk i webläsare", ID_OPEN_LINK
- MENUITEM "&Kopier länk till urklipp", ID_COPY_LINK
+ MENUITEM "&Öppna länk i webläsare", ID_OPEN_LINK
+ MENUITEM "&Kopiera länk till urklipp", ID_COPY_LINK
END
END
BEGIN
MENUITEM "&Installera", ID_INSTALL
MENUITEM "&Avinstallera", ID_UNINSTALL
- MENUITEM "&Ändre", ID_MODIFY
+ MENUITEM "&Ändra", ID_MODIFY
MENUITEM SEPARATOR
- MENUITEM "&Ta bort från Registret", ID_REGREMOVE
+ MENUITEM "&Ta bort frĺn Registret", ID_REGREMOVE
MENUITEM SEPARATOR
MENUITEM "&Uppdatera", ID_REFRESH
END
FONT 8, "MS Shell Dlg"
BEGIN
GROUPBOX "Allmänna", -1, 4, 2, 240, 61
- AUTOCHECKBOX "&Spara fönster position", IDC_SAVE_WINDOW_POS, 15, 12, 219, 12
+ AUTOCHECKBOX "&Spara fönsterposition", IDC_SAVE_WINDOW_POS, 15, 12, 219, 12
AUTOCHECKBOX "&Uppdatera listan med tillgängliga program vid start", IDC_UPDATE_AVLIST, 15, 29, 219, 12
AUTOCHECKBOX "&Logga ur installation och borttagning program", IDC_LOG_ENABLED, 15, 46, 219, 12
LTEXT "Mapp för nerladdningar:", -1, 16, 75, 100, 9
EDITTEXT IDC_DOWNLOAD_DIR_EDIT, 15, 86, 166, 12, WS_CHILD | WS_VISIBLE | WS_GROUP
PUSHBUTTON "&Välj", IDC_CHOOSE, 187, 85, 50, 14
- AUTOCHECKBOX "&Ta bort programms installerare efter installation", IDC_DEL_AFTER_INSTALL, 16, 100, 218, 12
+ AUTOCHECKBOX "&Ta bort programinstallerare efter installation", IDC_DEL_AFTER_INSTALL, 16, 100, 218, 12
- PUSHBUTTON "Förinställd", IDC_DEFAULT_SETTINGS, 8, 124, 60, 14
+ PUSHBUTTON "Standard", IDC_DEFAULT_SETTINGS, 8, 124, 60, 14
PUSHBUTTON "OK", IDOK, 116, 124, 60, 14
PUSHBUTTON "Avbryt", IDCANCEL, 181, 124, 60, 14
END
BEGIN
LTEXT "...", IDC_INSTALL_TEXT, 4, 5, 209, 35
- AUTORADIOBUTTON "&Installera från disk (CD or DVD)", IDC_CD_INSTALL, 10, 46, 197, 11, WS_GROUP
+ AUTORADIOBUTTON "&Installera frĺn disk (CD or DVD)", IDC_CD_INSTALL, 10, 46, 197, 11, WS_GROUP
AUTORADIOBUTTON "&Ladda ner och installera", IDC_DOWNLOAD_INSTALL, 10, 59, 197, 11, NOT WS_TABSTOP
PUSHBUTTON "OK", IDOK, 86, 78, 60, 14
IDS_MODIFY "Ändra"
IDS_APPS_COUNT "Programantal: %d"
IDS_WELCOME_TITLE "Välkommen till ReactOS programhanterare!\n\n"
- IDS_WELCOME_TEXT "Välj en kategori till vänstre, och sedan ett program för att installera eller avinstallera.\nReactOS Web sida: "
+ IDS_WELCOME_TEXT "Välj en kategori till vänster, och sedan ett program för att installera eller avinstallera.\nReactOS Web sida: "
IDS_WELCOME_URL "http://www.reactos.org"
IDS_INSTALLED "Installerat"
IDS_AVAILABLEFORINST "Tillgängliga for installation"
IDS_UPDATES "Uppdateringar"
IDS_APPLICATIONS "Program"
IDS_CHOOSE_FOLDER_TEXT "Välj en mapp som kommer att användas för nerladdning av program:"
- IDS_CHOOSE_FOLDER_ERROR "Du har specificrat en obefintlig mapp!"
- IDS_USER_NOT_ADMIN "Du måste vara administratör för att starta ""ReactOS programhanterare""!"
- IDS_APP_REG_REMOVE "Är du säker på att du vill ta bort data det installerade programmets data från registret?"
+ IDS_CHOOSE_FOLDER_ERROR "Du har specificrat en ej existerande mapp! Vill du skapa den?"
+ IDS_USER_NOT_ADMIN "Du mĺste vara administratör för att starta ""ReactOS programhanterare""!"
+ IDS_APP_REG_REMOVE "Är du säker pĺ att du vill ta bort data det installerade programmets data frĺn registret?"
IDS_INFORMATION "Information"
- IDS_UNABLE_TO_REMOVE "Det gick ej att ta bort programmets data från registret!"
+ IDS_UNABLE_TO_REMOVE "Det gick ej att ta bort programmets data frĺn registret!"
END
[Section.0407]\r
Description = Abyss Web Server ermöglicht es Webseiten auf Ihrem Computer zu hosten. Er unterstützt sichere SSL/TLS Verbindungen (HTTPS) sowie eine Vielfalt an Web Technologien. Er kann ebenfalls PHP, Perl, Python, ASP, ASP.NET, und Ruby on Rails Web Anwendungen ausführen, welche von Datenbanken, wie MySQL, SQLite, MS SQL Server, MS Access, oder Oracle unterstützt werden können.\r
\r
+[Section.040a]\r
+Description = Abyss Web Server le permite alojar sitios Web en su ordenador. Soporta conexiones seguras SSL / TLS (HTTPS) así como una gran cantidad de tecnología web. También puede ejecutar aplicaciones web PHP, Perl, Python, ASP, ASP.Net, Ruby y Ruby on Rails, que pueden ser asociadas con bases de datos tales como MySQL, SQLite, MS SQL Server, MS Access u Oracle.\r
+\r
[Section.040c]\r
Description = Abyss Web Server vous permet d'héberger vos sites internet sur votre ordinateur. Il supporte les connexions sécurisées SSL/TLS (HTTPS) ainsi qu'un grand nombre de technologies web. Il peut également faire tourner des applications web PHP, Perl, Python, ASP, ASP.Net, Ruby et Ruby on Rails, qui peuvent être associées à des bases de données telles que MySQL, SQLite, MS SQL Server, MS Access ou Oracle.\r
\r
[Section.0407]\r
Description = Kleiner und einfacher Mediaplayer.\r
\r
+[Section.040a]\r
+Description = Reproductor de audio simple y ligero.\r
+\r
[Section.040c]\r
Description = Lecteur audio simple et léger.\r
\r
Description = Один из самых популярных и лучших бесплатных браузеров.\r
URLSite = http://www.mozilla-europe.org/ru/\r
\r
+[Section.041b] \r
+Description = Najpopulárnejší a jeden z najlepších slobodný webových prehliadačov.\r
+Size = 6,1 MB\r
+URLSite = http://www.mozilla-europe.org/sk/\r
+URLDownload = http://mozilla.mirrors.skynet.be/pub/ftp.mozilla.org/firefox/releases/2.0.0.20/win32/sk/Firefox%20Setup%202.0.0.20.exe\r
+\r
[Section.0422]\r
Description = Найпопулярніший та один з кращих безплатних веб-браузерів.\r
URLSite = http://www.mozilla-europe.org/uk/\r
Size = 7.8M\r
URLSite = http://www.mozilla-europe.org/ru/\r
\r
+[Section.041b] \r
+Description = Najpopulárnejší a jeden z najlepších slobodný webových prehliadačov.\r
+Size = 7,5 MB\r
+URLSite = http://www.mozilla-europe.org/sk/\r
+URLDownload = http://hyperion.zih.tu-dresden.de/moz/firefox/releases/3.0.19-real-real/win32/sk/Firefox%20Setup%203.0.19.exe\r
+\r
[Section.0422]\r
Description = Найпопулярніший та один з кращих безплатних веб-браузерів.\r
Size = 7.4M\r
URLSite = http://www.mozilla-europe.org/ru/\r
URLDownload = http://mozilla.cdn.leaseweb.com/firefox/releases/3.6.16/win32/ru/Firefox%20Setup%203.6.16.exe\r
\r
+[Section.041b] \r
+Description = Najpopulárnejší a jeden z najlepších slobodný webových prehliadačov.\r
+Size = 8,5 MB\r
+URLSite = http://www.mozilla-europe.org/sk/\r
+URLDownload = http://mozilla.cdn.leaseweb.com/firefox/releases/3.6.16/win32/sk/Firefox%20Setup%203.6.16.exe\r
+\r
[Section.0422]\r
Description = Найпопулярніший та один з кращих безплатних веб-браузерів.\r
Size = 8.5M\r
[Section.0407]\r
Description = KDE für Windows.\r
\r
+[Section.040a]\r
+Description = KDE para Windows.\r
+\r
[Section.040c]\r
Description = KDE pour Windows.\r
\r
URLDownload = http://ftp.novell.com/pub/mono/archive/2.8.2/windows-installer/1/mono-2.8.2-gtksharp-2.12.10-win32-1.exe\r
CDPath = none\r
\r
+[Section.040a]\r
+Description = Versión open-source de .NET Framework\r
+\r
[Section.040c]\r
Description = Framework .net open source.\r
\r
[Section.0415]\r
Description = Odtwarzacz multimediów.\r
\r
+[Section.041b]\r
+Description = Multimediálny prehrávač.\r
+\r
[Section.0422]\r
Description = Мультимедійний програвач.\r
URLDownload = http://download.microsoft.com/download/a/a/c/aac39226-8825-44ce-90e3-bf8203e74006/dotnetfx.exe\r
CDPath = none\r
\r
+[Section.040a]\r
+Description = Microsoft .NET Framework versión 1.1 - Paquete redistribuible.\r
+\r
[Section.040c]\r
Description = Microsoft .NET Framework version 1.1 - Paquet redistribuable.\r
\r
URLDownload = http://download.microsoft.com/download/5/6/7/567758a3-759e-473e-bf8f-52154438565a/dotnetfx.exe\r
CDPath = none\r
\r
+[Section.040a]\r
+Description = Microsoft .NET Framework versión 2.0 - Paquete redistribuible.\r
+\r
[Section.040c]\r
Description = Microsoft .NET Framework version 2.0 - Paquet redistribuable.\r
\r
URLDownload = http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x86.exe\r
CDPath = none\r
\r
+[Section.040a]\r
+Description = Microsoft .NET Framework versión 2.0 Service Pack 2.\r
+\r
[Section.040c]\r
Description = Microsoft .NET Framework version 2.0 Service Pack 2.\r
\r
; UTF-8\r
\r
[Section]\r
-Name = Python\r
+Name = Python 2\r
Version = 2.7.1\r
Licence = GPL/LGPL\r
Description = A remarkably powerful dynamic programming language.\r
[Section.0407]\r
Description = Eine sehr mächtige, dynamische Programmiersprache.\r
\r
+[Section.040a]\r
+Description = Un lenguaje de programación dinámico sumamente potente. \r
+\r
[Section.040c]\r
Description = Un langage de programmation dynamique remarquablement puissant.\r
\r
--- /dev/null
+; UTF-8
+
+[Section]
+Name = Python 3
+Version = 3.2
+Licence = GPL/LGPL
+Description = A remarkably powerful dynamic programming language.
+Size = 17.2MB
+Category = 7
+URLSite = http://www.python.org/
+URLDownload = http://www.python.org/ftp/python/3.2/python-3.2.msi
+CDPath = none
+
+[Section.0407]
+Description = Eine sehr mächtige, dynamische Programmiersprache.
+
+[Section.040a]
+Description = Un lenguaje de programación dinámico sumamente potente.
+
+[Section.040c]
+Description = Un langage de programmation dynamique remarquablement puissant.
+
+[Section.0415]
+Description = Potęży i dynamiczny język programowania.
+
+[Section.0422]
+Description = Дуже потужна динамічна мова програмування.
[Section.0407]\r
Description = ReMooD ist ein Port des Doom Legacy Sources. Es versucht das klassische Legacy Erfahrung zusammen mit neuen Features und mehr Stabilität zu bieten.\r
\r
+[Section.040a]\r
+Description = ReMood es un port de Doom Legacy. Su fin es proporcionar la clásica experiencia anterior con nuevas características y mayor estabilidad.\r
+\r
[Section.040c]\r
Description = ReMood est un portage du source de Doom Legacy. Son but est de fournir l'expérience classique de Legacy avec de nouvelles fonctionnalités et plus de stabilité.\r
\r
[Section.0407]\r
Description = Die STEAM Spieleplattform, die von viele Spielen verwendet wird.\r
\r
+[Section.040a]\r
+Description = La plataforma de juego STEAM usada por muchos juegos actuales.\r
+\r
[Section.040c]\r
Description = La plateforme de jeu STEAM utilisée par beaucoup de jeux de nos jours.\r
\r
[Section.0407]\r
Description = Sumatra PDF ist ein freies, schlankes, Open-Source PDF-Anzeigeprogramm.\r
\r
+[Section.040a]\r
+Description = Sumatra PDF es un lector PDF ligero, libre y open-source.\r
+\r
+[Section.040c]\r
+Description = Sumatra PDF est un lecteur PDF léger, libre et open-source.\r
+\r
[Section.0410]\r
Description = Sumatra PDF è un visualizzatore di file PDF. E' molto leggero ed è open source.\r
\r
[Section.0407]\r
Description = Eine schnelle und effektive Suchanwendung.\r
\r
+[Section.040a]\r
+Description = Una aplicación de búsqueda rápida llena de opciones.\r
+\r
[Section.040c]\r
Description = Une application de recherche rapide et riche en fonctionnalités.\r
\r
Licence = Unbekannt\r
Description = Tahoma Font pack, der von einigen Anwendungen benötigt wird (Steam).\r
\r
+[Section.040a]\r
+Licence = Desconocida\r
+Description = Paquete de fuente Tahoma, necesaria para ciertas aplicaciones (Steam).\r
+\r
[Section.040c]\r
Licence = Inconnue\r
Description = Package pour la police Tahoma, nécessaire pour certaines applications (Steam).\r
[Section.0419]\r
Description = Мультимедийный проигрыватель.\r
\r
+[Section.041b]\r
+Description = Multimediálny prehrávač.\r
+\r
[Section.0422]\r
Description = Мультимедійний програвач.\r
[Section.040a]\r
Licence = Desconocida\r
\r
-[Section.040a]\r
+[Section.040c]\r
Licence = Inconnue\r
\r
[Section.0415]\r
Licence = Nieznana\r
\r
+[Section.041b]\r
+Description = Neznáma\r
+\r
[Section.0422]\r
Licence = Невідома\r
#include "lang/es-ES.rc"
#include "lang/fr-FR.rc"
#include "lang/it-IT.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/no-NO.rc"
#include "lang/pl-PL.rc"
#include "lang/ru-RU.rc"
return TRUE;
}
+ case WM_SYSCOLORCHANGE:
+ {
+ /* Forward WM_SYSCOLORCHANGE to common controls */
+ SendMessage(hListView, WM_SYSCOLORCHANGE, 0, 0);
+ SendMessage(hTreeView, WM_SYSCOLORCHANGE, 0, 0);
+ SendMessage(hToolBar, WM_SYSCOLORCHANGE, 0, 0);
+ SendMessageW(hRichEdit, EM_SETBKGNDCOLOR, 0, GetSysColor(COLOR_BTNFACE));
+ }
+ break;
+
case WM_DESTROY:
{
ShowWindow(hwnd, SW_HIDE);
#add_subdirectory(clb)
-add_cab_target(regedit 4)
+add_cd_file(TARGET regedit DESTINATION reactos FOR all)
{
PostMessage(g_pChildWnd->hAddressBarWnd, WM_KEYUP, VK_RETURN, 0);
}
- else if (!_CmdWndProc(hWnd, message, wParam, lParam))
+
+ if (!_CmdWndProc(hWnd, message, wParam, lParam))
{
goto def;
}
--- /dev/null
+/* *
+ * French Language Resource File *
+ * Traduit par : Jeisson Toscano en 2011 *
+ * */
+
+LANGUAGE LANG_FRENCH, SUBLANG_DEFAULT
+
+IDD_COLUMNLISTBOXSTYLES DIALOGEX 0, 0, 227, 215
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Styles de Boites de la Liste de la Colonne"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ GROUPBOX "Styles des Colonne de la Liste", -1, 6, 7, 158, 71
+ CHECKBOX "&Standard", 1710, 10, 20, 42, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
+ CHECKBOX "&Bordure", 1713, 10, 30, 34, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
+ CHECKBOX "&Ordre", 1705, 10, 40, 26, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
+ CHECKBOX "Notif&ier", 1706, 10, 50, 32, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
+ CHECKBOX "Barre de Déplac. V&ert.", 1707, 10, 60, 64, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
+ CHECKBOX "Sélection &Multiple", -1, 79, 20, 72, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP | WS_DISABLED
+ CHECKBOX "Sélection E&tendue", -1, 79, 30, 77, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP | WS_DISABLED
+ CHECKBOX "Montrer &Chevet", 1714, 79, 40, 68, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
+ CHECKBOX "Colonnes &Elastiques", 1715, 79, 50, 66, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
+ GROUPBOX "Styles Basiques", -1, 6, 80, 158, 34
+ CHECKBOX "&Visible", 1701, 10, 92, 34, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
+ CHECKBOX "&Désactivé", 1702, 10, 102, 41, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
+ CHECKBOX "&Groupe", 1703, 79, 92, 32, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
+ CHECKBOX "Arrêter &Tab", 1704, 79, 102, 44, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
+ PUSHBUTTON "Accepter", IDOK, 37, 125, 40, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
+ PUSHBUTTON "Annuler", IDCANCEL, 93, 125, 40, 14, BS_PUSHBUTTON | WS_GROUP | WS_TABSTOP
+ CHECKBOX "Dé&sactiver Non-Déplac.", 1708, 79, 60, 66, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
+END
+
#include "lang/de-DE.rc"
#include "lang/el-GR.rc"
#include "lang/en-US.rc"
+#include "lang/fr-FR.rc"
#include "lang/es-ES.rc"
#include "lang/id-ID.rc"
#include "lang/it-IT.rc"
case WM_MENUSELECT:
OnMenuSelect(hWnd, LOWORD(wParam), HIWORD(wParam), (HMENU)lParam);
break;
+ case WM_SYSCOLORCHANGE:
+ /* Forward WM_SYSCOLORCHANGE to common controls */
+ SendMessage(g_pChildWnd->hListWnd, WM_SYSCOLORCHANGE, 0, 0);
+ SendMessage(g_pChildWnd->hTreeWnd, WM_SYSCOLORCHANGE, 0, 0);
+ break;
case WM_DESTROY:
WinHelp(hWnd, _T("regedit"), HELP_QUIT, 0);
PostQuitMessage(0);
/*
* Regedit (Swedish resources)
*
- * Copyright 2005 Andreas Bjerkeholt
+ * Copyright 2005 Andreas Bjerkeholt modifierad 2011 Jaix Bly
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
MENUITEM "&Exportera registerfil...", ID_REGISTRY_EXPORTREGISTRYFILE
MENUITEM SEPARATOR
- MENUITEM "Load Hive...", ID_REGISTRY_LOADHIVE, GRAYED
- MENUITEM "Unload Hive...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ MENUITEM "Läs in Registerdata...", ID_REGISTRY_LOADHIVE, GRAYED
+ MENUITEM "Ta bort Registerdata...", ID_REGISTRY_UNLOADHIVE, GRAYED
MENUITEM SEPARATOR
MENUITEM "&Anslut Nätverksregister...",
ID_REGISTRY_CONNECTNETWORKREGISTRY
BEGIN
MENUITEM "&Ändra", ID_EDIT_MODIFY
MENUITEM SEPARATOR
- POPUP "&Ny(tt)"
+ POPUP "&Nytt"
BEGIN
MENUITEM "&Nyckel", ID_EDIT_NEW_KEY
MENUITEM SEPARATOR
MENUITEM "&Strängvärde", ID_EDIT_NEW_STRINGVALUE
MENUITEM "&Binärvärde", ID_EDIT_NEW_BINARYVALUE
MENUITEM "&DWORD-värde", ID_EDIT_NEW_DWORDVALUE
- MENUITEM "&Multi-String Value", ID_EDIT_NEW_MULTISTRINGVALUE
- MENUITEM "&Expandable String Value", ID_EDIT_NEW_EXPANDABLESTRINGVALUE
+ MENUITEM "&Multisträngvärde", ID_EDIT_NEW_MULTISTRINGVALUE
+ MENUITEM "&Expanderbart Strängvärde", ID_EDIT_NEW_EXPANDABLESTRINGVALUE
END
MENUITEM SEPARATOR
MENUITEM "B&ehörigheter...", ID_EDIT_PERMISSIONS
MENUITEM SEPARATOR
MENUITEM "&Kopiera nyckelnamn", ID_EDIT_COPYKEYNAME
MENUITEM SEPARATOR
- MENUITEM "&Sök\tCtrl+F", ID_EDIT_FIND
+ MENUITEM "&Sök...\tCtrl+F", ID_EDIT_FIND
MENUITEM "Sök N&ästa\tF3", ID_EDIT_FINDNEXT
END
POPUP "&Visa"
END
POPUP ""
BEGIN
- POPUP "&Ny(tt)"
+ POPUP "&Nytt"
BEGIN
MENUITEM "&Nyckel", ID_EDIT_NEW_KEY
MENUITEM SEPARATOR
MENUITEM "&Strängvärde", ID_EDIT_NEW_STRINGVALUE
MENUITEM "&Binärvärde", ID_EDIT_NEW_BINARYVALUE
MENUITEM "&DWORD-värde", ID_EDIT_NEW_DWORDVALUE
- MENUITEM "&Multi-String Value", ID_EDIT_NEW_MULTISTRINGVALUE
- MENUITEM "&Expandable String Value", ID_EDIT_NEW_EXPANDABLESTRINGVALUE
+ MENUITEM "&Multisträngvärde", ID_EDIT_NEW_MULTISTRINGVALUE
+ MENUITEM "&Expanderbart Strängvalue", ID_EDIT_NEW_EXPANDABLESTRINGVALUE
END
END
POPUP ""
MENUITEM "&Ta bort", ID_TREE_DELETE
MENUITEM "&Byt namn", ID_TREE_RENAME
MENUITEM SEPARATOR
- MENUITEM "&Export", ID_TREE_EXPORT
- MENUITEM "&Permissions...", ID_TREE_PERMISSIONS, GRAYED
+ MENUITEM "&Exportera", ID_TREE_EXPORT
+ MENUITEM "&Behörigheter...", ID_TREE_PERMISSIONS, GRAYED
MENUITEM SEPARATOR
MENUITEM "&Kopiera nyckelnamn", ID_EDIT_COPYKEYNAME
END
POPUP ""
BEGIN
- MENUITEM "C&ut", ID_HEXEDIT_CUT
- MENUITEM "&Copy", ID_HEXEDIT_COPY
- MENUITEM "&Paste", ID_HEXEDIT_PASTE
- MENUITEM "&Delete", ID_HEXEDIT_DELETE
+ MENUITEM "Klipp &ut", ID_HEXEDIT_CUT
+ MENUITEM "&Kopiera", ID_HEXEDIT_COPY
+ MENUITEM "Klistra &in", ID_HEXEDIT_PASTE
+ MENUITEM "&Ta bort", ID_HEXEDIT_DELETE
MENUITEM SEPARATOR
- MENUITEM "Select &All", ID_HEXEDIT_SELECT_ALL
+ MENUITEM "Markera &Allt", ID_HEXEDIT_SELECT_ALL
END
END
*/
IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Load Hive"
+CAPTION "Läs in registerdata"
FONT 8, "Ms Shell Dlg"
{
- LTEXT "&Key:", IDC_STATIC, 4, 4, 15, 8, SS_LEFT
+ LTEXT "&Nyckel:", IDC_STATIC, 4, 4, 15, 8, SS_LEFT
EDITTEXT IDC_EDIT_KEY, 23, 2, 167, 13
DEFPUSHBUTTON "OK", IDOK, 140, 17, 50, 14
- PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14
+ PUSHBUTTON "Avbryt", IDCANCEL, 89, 17, 50, 14
}
IDD_EDIT_STRING DIALOGEX 32, 24, 252, 84
IDD_EDIT_MULTI_STRING DIALOGEX 32, 24, 252, 174
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP |
WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Ändra multi-sträng"
+CAPTION "Ändra multisträng"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "&Värde:",IDC_STATIC,6,6,134,8
ID_REGISTRY_EXPORTREGISTRYFILE
"Exporterar hela eller en del av registret till en textfil"
ID_REGISTRY_LOADHIVE
- "Loads a hive file into the registry"
+ "Läser in registerdatafil till registret"
ID_REGISTRY_UNLOADHIVE
- "Unloads a hive from the registry"
+ "Tar bort registerdatafil från registret"
ID_REGISTRY_CONNECTNETWORKREGISTRY
"Ansluter till en annan dators register"
ID_REGISTRY_DISCONNECTNETWORKREGISTRY
BEGIN
IDS_ERROR "Fel"
IDS_WARNING "Varning"
- IDS_BAD_KEY "Can't query key '%s'"
+ IDS_BAD_KEY "Kan inte läsa nyckel '%s'"
IDS_BAD_VALUE "Kan inte läsa värdet '%s'"
IDS_UNSUPPORTED_TYPE "Kan inte ändra nycklar av typen %ld"
IDS_TOO_BIG_VALUE "Värdet är för stort (%ld)"
IDS_MULTI_SZ_EMPTY_STRING "Data av typen REG_MULTI_SZ kan inte innehålla tomma strängar.\nDe tomma strängarna har tagits bort från listan."
- IDS_QUERY_DELETE_KEY_ONE "Are you sure you want to delete this key?"
- IDS_QUERY_DELETE_KEY_MORE "Are you sure you want to delete these keys?"
- IDS_QUERY_DELETE_KEY_CONFIRM "Confirm Key Delete"
- IDS_QUERY_DELETE_ONE "Är du säker på att du vill ta bort detta värde?"
- IDS_QUERY_DELETE_MORE "Är du säker på att du vill ta bort dessa värden?"
+ IDS_QUERY_DELETE_KEY_ONE "Är du säker på att du vill ta bort denna nyckeln?"
+ IDS_QUERY_DELETE_KEY_MORE "Är du säker på att du vill ta bort dessa nycklarna?"
+ IDS_QUERY_DELETE_KEY_CONFIRM "Bekärfta borttagning av nyckel"
+ IDS_QUERY_DELETE_ONE "Är du säker på att du vill ta bort detta värdet?"
+ IDS_QUERY_DELETE_MORE "Är du säker på att du vill ta bort dessa värdena?"
IDS_QUERY_DELETE_CONFIRM "Bekräfta borttagning av värde"
- IDS_ERR_DELVAL_CAPTION "Borttagning misslyckades"
+ IDS_ERR_DELVAL_CAPTION "Fel vid borttagning av värde"
IDS_ERR_DELETEVALUE "Det gick inte att ta bort alla specificerade värden!"
- IDS_ERR_RENVAL_CAPTION "Namnbyte misslyckades"
+ IDS_ERR_RENVAL_CAPTION "Fel vid namnändring av värde"
IDS_ERR_RENVAL_TOEMPTY "Kunde inte byta namn på %s. Det specificerade värdenamnet är tomt. Ange ett annat namn och försök igen."
- IDS_NEW_KEY "New Key #%d"
- IDS_NEW_VALUE "New Value #%d"
+ IDS_NEW_KEY "Ny Nyckel #%d"
+ IDS_NEW_VALUE "Nytt Värde #%d"
END
STRINGTABLE DISCARDABLE
IDS_MY_COMPUTER "Den här datorn"
IDS_IMPORT_REG_FILE "Importera registerfil"
IDS_EXPORT_REG_FILE "Exportera registerfil"
- IDS_LOAD_HIVE "Load Hive"
- IDS_UNLOAD_HIVE "Unload Hive"
+ IDS_LOAD_HIVE "Läs in registerdatafil"
+ IDS_UNLOAD_HIVE "Ta bort registerdatafil"
IDS_INVALID_DWORD "(felaktigt DWORD-värde)"
END
STRINGTABLE DISCARDABLE
BEGIN
- IDS_FLT_REGFILE "Registration File"
+ IDS_FLT_REGFILE "Registerfil"
IDS_FLT_REGFILES "Registerfiler"
IDS_FLT_REGFILES_FLT "*.reg"
IDS_FLT_REGEDIT4 "Win9x/NT4-Registerfiler (REGEDIT4)"
IDS_EXPAND "&Visa nivå"
IDS_COLLAPSE "&Dölj nivå"
IDS_GOTO_SUGGESTED_KEY "&Go to '%s'"
- IDS_FINISHEDFIND "Finished searching through the registry."
+ IDS_FINISHEDFIND "Slutfört sökningen av registret."
END
/*****************************************************************/
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER
FONT 8, "MS Shell Dlg"
BEGIN
- GROUPBOX "Export Range",IDC_STATIC,2,0,366,48
- CONTROL "&All",IDC_EXPORT_ALL,"Button",BS_AUTORADIOBUTTON,10,10, 29,11
- CONTROL "S&elected Branch",IDC_EXPORT_BRANCH,"Button",BS_AUTORADIOBUTTON,10,22, 100,11
+ GROUPBOX "Exportera Intervall",IDC_STATIC,2,0,366,48
+ CONTROL "&Alla",IDC_EXPORT_ALL,"Button",BS_AUTORADIOBUTTON,10,10, 29,11
+ CONTROL "&Vald Gren",IDC_EXPORT_BRANCH,"Button",BS_AUTORADIOBUTTON,10,22, 100,11
EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12
END
IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Add to Favorites"
+CAPTION "Lägg till i Favoriter"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK",IDOK,129,7,50,14
- PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14
- LTEXT "&Favorite Name:",IDC_STATIC,7,7,70,10
+ PUSHBUTTON "Avbryt",IDCANCEL,129,24,50,14
+ LTEXT "&Namn på Favorit:",IDC_STATIC,7,7,70,10
EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL
END
IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Remove Favorites"
+CAPTION "Ta bort Favoriter"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK",IDOK,107,114,50,14
- PUSHBUTTON "Cancel",IDCANCEL,7,114,50,14
+ PUSHBUTTON "Avbryt",IDCANCEL,7,114,50,14
CONTROL "List1",IDC_FAVORITESLIST,"SysListView32",LVS_LIST |
WS_BORDER | WS_TABSTOP,7,20,150,90
- LTEXT "Select Favorite(s):",IDC_STATIC,7,7,99,12
+ LTEXT "Välj Favorit(er):",IDC_STATIC,7,7,99,12
END
IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Find"
+CAPTION "Sök"
FONT 8, "MS Shell Dlg"
BEGIN
- DEFPUSHBUTTON "&Find Next",IDOK,197,7,50,14
- PUSHBUTTON "Cancel",IDCANCEL,197,24,50,14
- GROUPBOX "Look at",IDC_STATIC,7,25,63,51
- LTEXT "Fi&nd what:",IDC_STATIC,7,8,37,10
+ DEFPUSHBUTTON "&Sök Nästa",IDOK,197,7,50,14
+ PUSHBUTTON "Avbryt",IDCANCEL,197,24,50,14
+ GROUPBOX "Sök i",IDC_STATIC,7,25,63,51
+ LTEXT "&Sök efter:",IDC_STATIC,7,8,37,10
EDITTEXT IDC_FINDWHAT,47,7,142,13,ES_AUTOHSCROLL
- CONTROL "&Keys",IDC_LOOKAT_KEYS,"Button",BS_AUTOCHECKBOX |
+ CONTROL "&Nycklar",IDC_LOOKAT_KEYS,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,14,36,35,8
- CONTROL "&Values",IDC_LOOKAT_VALUES,"Button",BS_AUTOCHECKBOX |
+ CONTROL "&Värden",IDC_LOOKAT_VALUES,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,14,48,36,8
CONTROL "&Data",IDC_LOOKAT_DATA,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,14,60,42,8
- CONTROL "Match &whole string only",IDC_MATCHSTRING,"Button",
+ CONTROL "Matcha endast &hela strängar",IDC_MATCHSTRING,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,83,32,94,13
- CONTROL "Match &case",IDC_MATCHCASE,"Button",BS_AUTOCHECKBOX |
+ CONTROL "Matcha &shiftläge",IDC_MATCHCASE,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,83,48,90,12
END
IDD_FINDING DIALOGEX 0, 0, 145, 50
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP |
WS_CAPTION | WS_SYSMENU
-CAPTION "Find"
+CAPTION "Sök"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
ICON IDI_REGEDIT,IDC_STATIC,7,7,20,20
- DEFPUSHBUTTON "&Cancel",IDCANCEL,93,29,45,14
- LTEXT "Searching the registry...",IDC_STATIC,33,12,83,8
+ DEFPUSHBUTTON "&Avbryt",IDCANCEL,93,29,45,14
+ LTEXT "Sök i registret...",IDC_STATIC,33,12,83,8
END
/*
#include "lang/hu-HU.rc"
#include "lang/id-ID.rc"
#include "lang/it-IT.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/ko-KR.rc"
#include "lang/nl-NL.rc"
#include "lang/no-NO.rc"
set_module_type(regedt32 win32gui)
add_importlibs(regedt32 shell32 shlwapi msvcrt kernel32)
-add_cab_target(regedt32 1)
+add_cd_file(TARGET regedt32 DESTINATION reactos/system32 FOR all)
set_module_type(sc win32cui)
add_importlibs(sc advapi32 msvcrt kernel32)
-add_cab_target(sc 1)
+add_cd_file(TARGET sc DESTINATION reactos/system32 FOR all)
target_link_libraries(3dtext scrnsave)
add_importlibs(3dtext user32 gdi32 opengl32 glu32 advapi32 msvcrt kernel32)
-add_cab_target(3dtext 1)
+add_cd_file(TARGET 3dtext DESTINATION reactos/system32 FOR all)
--- /dev/null
+LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
+
+DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 273, 178
+STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "3D Text skärmsläckarinställingar"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,216,7,50,14
+ PUSHBUTTON "Avbryt",IDCANCEL,216,24,50,14
+ EDITTEXT IDC_MESSAGE_TEXT,18,28,122,14,ES_AUTOHSCROLL
+ LTEXT "Anpassa text",IDC_STATIC,18,17,65,8
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_DESCRIPTION "3D Text skärmsläckare"
+END
#include "lang/pl-PL.rc"
#include "lang/ru-RU.rc"
#include "lang/sk-SK.rc"
+#include "lang/sv-SE.rc"
#include "lang/uk-UA.rc"
target_link_libraries(logon scrnsave)
add_importlibs(logon user32 gdi32 msvcrt kernel32)
-add_cab_target(logon 1)
+add_cd_file(TARGET logon DESTINATION reactos/system32 FOR all)
--- /dev/null
+/*
+ * PROJECT: ReactOS RAPPS
+ * FILE: \base\applications\screensavers\logon\lang\sv-SE.rc
+ * PURPOSE: Swedish resource file
+ * Translation: Jaix Bly
+ */
+LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_DESCRIPTION "Inloggingsskärmsläckare"
+ IDS_TEXT "Inga inställningar behövs."
+END
#include "lang/es-ES.rc"
#include "lang/eu-ES.rc"
#include "lang/fr-FR.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/ko-KR.rc"
#include "lang/lt-LT.rc"
#include "lang/nl-NL.rc"
#include "lang/no-NO.rc"
#include "lang/ro-RO.rc"
#include "lang/sk-SK.rc"
+#include "lang/sv-SE.rc"
#include "lang/uk-UA.rc"
#include "lang/ru-RU.rc"
set_module_type(shutdown win32cui)
add_importlibs(shutdown advapi32 user32 msvcrt kernel32)
-add_cab_target(shutdown 1)
+add_cd_file(TARGET shutdown DESTINATION reactos/system32 FOR all)
--- /dev/null
+/*
+ * PROJECT: ReactOS RAPPS
+ * FILE: \base\applications\shutdown\lang\sv-SE.rc
+ * PURPOSE: Swedish resource file
+ * Translation: Jaix Bly
+ */
+LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
+
+STRINGTABLE DISCARDABLE
+BEGIN
+
+IDS_USAGE, "SYNTAX: shutdown [-?] [-l | -s | -r] [-f]\n\n\
+ Ingen parameter eller -? Visar detta meddelandet.\n\
+ -l\t\tLogga ut\n\
+ -s\t\tStäng av datorn.\n\
+ -r\t\tStäng av och starta datorn.\n\
+ -f\t\tGör att program som körs avslutas utan att användare meddelas.\n\
+ \t\tOm du inte angav någon annan parameter till detta kommandot\n\
+ \t\tkommer användaren dessutom att loggas ut."
+END
#include "lang/pl-PL.rc"
#include "lang/ru-RU.rc"
#include "lang/sk-SK.rc"
+#include "lang/sv-SE.rc"
#include "lang/uk-UA.rc"
target_link_libraries(sndrec32 stlport)
set_module_type(sndrec32 win32gui)
add_importlibs(sndrec32 winmm user32 msacm32 comctl32 comdlg32 gdi32 msvcrt kernel32)
-add_cab_target(sndrec32 1)
+add_cd_file(TARGET sndrec32 DESTINATION reactos/system32 FOR all)
IDD_ABOUTBOX DIALOGEX 0, 0, 196, 75
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Information about reactOS_sndrec32"
+CAPTION "Information about ReactOS Sound Recorder"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
ICON 128,IDC_REACTOS_SNDREC32,19,14,21,20
- LTEXT "reactOS_sndrec32, version 1.0",IDC_STATIC,56,16,114,8,SS_NOPREFIX
+ LTEXT "ReactOS Sound Recorder, version 1.0",IDC_STATIC,56,16,114,8,SS_NOPREFIX
LTEXT "Copyright (C) 2009",IDC_STATIC,55,25,114,8
DEFPUSHBUTTON "OK",IDOK,139,54,50,14,WS_GROUP
END
--- /dev/null
+LANGUAGE LANG_FRENCH, SUBLANG_DEFAULT
+
+IDC_REACTOS_SNDREC32 ACCELERATORS
+BEGIN
+ "?", IDM_ABOUT, ASCII, ALT
+ "/", IDM_ABOUT, ASCII, ALT
+END
+
+IDD_ABOUTBOX DIALOGEX 0, 0, 196, 75
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Information à propos de l'Enregistreur de Son ReactOS"
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ ICON 128,IDC_REACTOS_SNDREC32,19,14,21,20
+ LTEXT "Enregistreur de Son ReactOS, version 1.0",IDC_STATIC,56,16,114,8,SS_NOPREFIX
+ LTEXT "Copyright (C) 2009",IDC_STATIC,55,25,114,8
+ DEFPUSHBUTTON "Accepter",IDOK,139,54,50,14,WS_GROUP
+END
+
+IDR_MENU1 MENU
+BEGIN
+ POPUP "Fichier"
+ BEGIN
+ MENUITEM "Nouveau", ID_NEW
+ MENUITEM "Ouvrir...", ID_FILE_OPEN
+ MENUITEM "Enregistrer", ID_FILE_SAVE, GRAYED
+ MENUITEM "Enregistrer sous...", ID_FILE_SAVEAS, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Sortir", ID_EXIT
+ END
+ MENUITEM "todo1", 0
+ MENUITEM "todo2", 0
+ POPUP "?"
+ BEGIN
+ MENUITEM "A propos...", ID__ABOUT
+ END
+END
+
+STRINGTABLE
+BEGIN
+ IDS_APP_TITLE "Enregistreur de son"
+ IDC_REACTOS_SNDREC32 "REACTOS_SNDREC32"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_STRPOS "Position: %.2f s"
+ IDS_STRDUR "Durée: %.2f s"
+ IDS_STRBUF "Buffer: %.2f kb"
+ IDS_STRFMT "%.1f kHz %u bits"
+ IDS_STRMONO "mono"
+ IDS_STRSTEREO "stéréo"
+ IDS_STRCHAN "%s"
+END
--- /dev/null
+/*
+ * PROJECT: ReactOS RAPPS
+ * FILE: \base\applications\sndrec32\lang\sv-SE.rc
+ * PURPOSE: Swedish resource file
+ * Translation: Jaix Bly
+ */
+LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
+
+IDC_REACTOS_SNDREC32 ACCELERATORS
+BEGIN
+ "?", IDM_ABOUT, ASCII, ALT
+ "/", IDM_ABOUT, ASCII, ALT
+END
+
+IDD_ABOUTBOX DIALOGEX 0, 0, 196, 75
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Information om ReactOS_sndrec32"
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ ICON 128,IDC_REACTOS_SNDREC32,19,14,21,20
+ LTEXT "ReactOS_sndrec32, version 1.0",IDC_STATIC,56,16,114,8,SS_NOPREFIX
+ LTEXT "Copyright (C) 2009",IDC_STATIC,55,25,114,8
+ DEFPUSHBUTTON "OK",IDOK,139,54,50,14,WS_GROUP
+END
+
+IDR_MENU1 MENU
+BEGIN
+ POPUP "Arkiv"
+ BEGIN
+ MENUITEM "Ny", ID_NEW
+ MENUITEM "Öppna...", ID_FILE_OPEN
+ MENUITEM "Spara", ID_FILE_SAVE, GRAYED
+ MENUITEM "Spara som...", ID_FILE_SAVEAS, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Avsluta", ID_EXIT
+ END
+ MENUITEM "todo1", 0
+ MENUITEM "todo2", 0
+ POPUP "Hjälp"
+ BEGIN
+ MENUITEM "Om...", ID__ABOUT
+ END
+END
+
+STRINGTABLE
+BEGIN
+ IDS_APP_TITLE "Ljudinspelaren"
+ IDC_REACTOS_SNDREC32 "REACTOS_SNDREC32"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_STRPOS "Position: %.2f s"
+ IDS_STRDUR "Längd: %.2f s"
+ IDS_STRBUF "Buffert: %.2f kb"
+ IDS_STRFMT "%.1f kHz %u bits"
+ IDS_STRMONO "mono"
+ IDS_STRSTEREO "stereo"
+ IDS_STRCHAN "%s"
+END
#include "lang/de-DE.rc"
#include "lang/en-US.rc"
#include "lang/es-ES.rc"
+#include "lang/fr-FR.rc"
#include "lang/it-IT.rc"
#include "lang/ja-JP.rc"
#include "lang/pl-PL.rc"
#include "lang/sk-SK.rc"
+#include "lang/sv-SE.rc"
#include "lang/uk-UA.rc"
set_module_type(sndvol32 win32gui)
add_importlibs(sndvol32 user32 advapi32 gdi32 comctl32 shell32 winmm msvcrt kernel32 ntdll)
-add_cab_target(sndvol32 1)
+add_cd_file(TARGET sndvol32 DESTINATION reactos/system32 FOR all)
/////////////////////////////////////////////////////////////////////////////
// Swedish (SE) resources
/*
- * Copyright 2005 David Nordenberg
+ * Copyright 2005 David Nordenberg
+ * completed and edited by Jaix Bly
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
PUSHBUTTON "&Inspelning", IDC_RECORDING, 13,61,47,8, BS_AUTORADIOBUTTON
PUSHBUTTON "&Andra:", IDC_OTHER, 13,80,42,8, BS_AUTORADIOBUTTON | WS_DISABLED
COMBOBOX IDC_LINE, 55,80,155,50, CBS_DROPDOWNLIST | WS_TABSTOP | WS_DISABLED
- LTEXT "Show the following volume controls:", IDC_LABELCONTROLS, 7, 109, 162, 8
+ LTEXT "Visa följander volymekontroller:", IDC_LABELCONTROLS, 7, 109, 162, 8
CONTROL "", IDC_CONTROLS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | WS_TABSTOP | WS_BORDER, 7, 122, 211, 96
PUSHBUTTON "OK", IDOK, 114,226,50,14
STYLE WS_POPUP | WS_BORDER
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Master", IDC_LINE_NAME, 4, 7, 100, 15
+ LTEXT "Huvud", IDC_LINE_NAME, 4, 7, 100, 15
CONTROL "", -1, "static", SS_ETCHEDHORZ | WS_CHILD | WS_VISIBLE, 4, 30, 82, 1
- LTEXT "Balance", -1, 4, 35, 80, 42
- LTEXT "Volume", -1, 4, 100, 77, 108
+ LTEXT "Balanse", -1, 4, 35, 80, 42
+ LTEXT "Volyme", -1, 4, 100, 77, 108
CONTROL "", IDC_LINE_SLIDER_HORZ, "msctls_trackbar32", TBS_HORZ | TBS_AUTOTICKS | TBS_BOTH | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 25, 55, 85, 30
CONTROL "", IDC_LINE_SLIDER_VERT, "msctls_trackbar32", TBS_VERT | TBS_AUTOTICKS | TBS_BOTH | TBS_DOWNISLEFT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 32, 115, 30, 70
- CHECKBOX "&Mute", IDC_LINE_SWITCH, 4, 190, 90, 12, BS_AUTOCHECKBOX
+ CHECKBOX "&Tyst", IDC_LINE_SWITCH, 4, 190, 90, 12, BS_AUTOCHECKBOX
CONTROL "", IDC_LINE_SEP, "static", SS_ETCHEDVERT | WS_CHILD | WS_VISIBLE, 130, 7, 1, 200
END
IDCANCEL);
break;
}
+
+ case WM_SYSCOLORCHANGE:
+ {
+ HWND hwndControls;
+
+ /* Forward WM_SYSCOLORCHANGE */
+ hwndControls = GetDlgItem(hwndDlg, IDC_CONTROLS);
+ SendMessage(hwndControls, WM_SYSCOLORCHANGE, 0, 0);
+ break;
+ }
}
return 0;
set_module_type(taskmgr win32gui)
add_importlibs(taskmgr advapi32 user32 gdi32 shell32 comctl32 msvcrt kernel32 ntdll)
-add_cab_target(taskmgr 1)
+add_cd_file(TARGET taskmgr DESTINATION reactos/system32 FOR all)
return;
}
- if (!TerminateProcess(hProcess, 0))
+ if (!TerminateProcess(hProcess, 1))
{
GetLastErrorText(strErrorText, 260);
LoadStringW(hInst, IDS_MSG_UNABLETERMINATEPRO, szTitle, 256);
BEGIN
CONTROL "List2",IDC_APPLIST,"SysListView32",LVS_REPORT |
LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,233,177
- PUSHBUTTON "&Nowe zadanie...",IDC_NEWTASK,187,189,53,14
- PUSHBUTTON "P&rze³¹cz na",IDC_SWITCHTO,131,189,53,14,WS_DISABLED
- PUSHBUTTON "&Zakoñcz zadanie",IDC_ENDTASK,75,189,53,14,WS_DISABLED
+ PUSHBUTTON "&Nowe zadanie...",IDC_NEWTASK,175,189,65,14
+ PUSHBUTTON "P&rze³¹cz na",IDC_SWITCHTO,107,189,65,14,WS_DISABLED
+ PUSHBUTTON "&Zakoñcz zadanie",IDC_ENDTASK,39,189,65,14,WS_DISABLED
END
IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210
LV_ITEM item;
LPPROCESS_PAGE_LIST_ITEM pData;
+ SendMessage(hProcessPageListCtrl, WM_SETREDRAW, FALSE, 0);
+
/* Remove old processes */
for (i = 0; i < ListView_GetItemCount(hProcessPageListCtrl); i++)
{
{
(void)ListView_SortItems(hProcessPageListCtrl, ProcessPageCompareFunc, NULL);
}
+
+ SendMessage(hProcessPageListCtrl, WM_SETREDRAW, TRUE, 0);
}
BOOL ProcessRunning(ULONG ProcessId)
case WM_MENUSELECT:
TaskManager_OnMenuSelect(hDlg, LOWORD(wParam), HIWORD(wParam), (HMENU)lParam);
break;
+ case WM_SYSCOLORCHANGE:
+ /* Forward WM_SYSCOLORCHANGE to common controls */
+ SendMessage(hApplicationPageListCtrl, WM_SYSCOLORCHANGE, 0, 0);
+ SendMessage(hProcessPageListCtrl, WM_SYSCOLORCHANGE, 0, 0);
+ SendMessage(hProcessPageHeaderCtrl, WM_SYSCOLORCHANGE, 0, 0);
+ break;
}
return 0;
target_link_libraries(winhlp32 wine)
add_importlibs(winhlp32 user32 gdi32 shell32 comctl32 comdlg32 msvcrt kernel32 ntdll)
-add_cab_target(winhlp32 4)
+add_cd_file(TARGET winhlp32 DESTINATION reactos FOR all)
add_executable(winver winver.c)
set_module_type(winver win32gui)
add_importlibs(winver shell32 msvcrt kernel32)
-add_cab_target(winver 1)
+add_cd_file(TARGET winver DESTINATION reactos/system32 FOR all)
target_link_libraries(wordpad wine uuid)
add_importlibs(wordpad comdlg32 ole32 shell32 user32 gdi32 advapi32 comctl32 msvcrt kernel32 ntdll)
-add_cab_target(wordpad 1)
+add_cd_file(TARGET wordpad DESTINATION reactos/system32 FOR all)
add_executable(write write.c rsrc.rc)
set_module_type(write win32gui)
add_importlibs(write user32 gdi32 msvcrt kernel32)
-add_cab_target(write 1)
+add_cd_file(TARGET write DESTINATION reactos/system32 FOR all)
set_module_type(audiosrv win32cui)
add_importlibs(audiosrv advapi32 user32 setupapi msvcrt kernel32)
-add_cab_target(audiosrv 1)
+add_cd_file(TARGET audiosrv DESTINATION reactos/system32 FOR all)
list(APPEND SOURCE
eventlog.c
+ eventsource.c
logport.c
eventlog.rc
rpc.c
set_module_type(eventlog win32cui)
add_importlibs(eventlog advapi32 rpcrt4 msvcrt kernel32 ntdll)
-add_cab_target(eventlog 1)
+add_cd_file(TARGET eventlog DESTINATION reactos/system32 FOR all)
{
DPRINT("Service started\n");
UpdateServiceStatus(SERVICE_RUNNING);
+
+ LogfReportEvent(EVENTLOG_INFORMATION_TYPE,
+ 0,
+ EVENT_EventlogStarted);
}
DPRINT("ServiceMain() done\n");
}
-BOOL LoadLogFile(HKEY hKey, WCHAR * LogName)
+PLOGFILE LoadLogFile(HKEY hKey, WCHAR * LogName)
{
DWORD MaxValueLen, ValueLen, Type, ExpandedLen;
WCHAR *Buf = NULL, *Expanded = NULL;
LONG Result;
- BOOL ret = TRUE;
PLOGFILE pLogf;
DPRINT("LoadLogFile: %S\n", LogName);
NULL, NULL, &MaxValueLen, NULL, NULL);
Buf = HeapAlloc(MyHeap, 0, MaxValueLen);
-
if (!Buf)
{
DPRINT1("Can't allocate heap!\n");
- return FALSE;
+ return NULL;
}
ValueLen = MaxValueLen;
&Type,
(LPBYTE) Buf,
&ValueLen);
-
if (Result != ERROR_SUCCESS)
{
DPRINT1("RegQueryValueEx failed: %d\n", GetLastError());
HeapFree(MyHeap, 0, Buf);
- return FALSE;
+ return NULL;
}
if (Type != REG_EXPAND_SZ && Type != REG_SZ)
{
DPRINT1("%S\\File - value of wrong type %x.\n", LogName, Type);
HeapFree(MyHeap, 0, Buf);
- return FALSE;
+ return NULL;
}
ExpandedLen = ExpandEnvironmentStrings(Buf, NULL, 0);
Expanded = HeapAlloc(MyHeap, 0, ExpandedLen * sizeof(WCHAR));
-
if (!Expanded)
{
DPRINT1("Can't allocate heap!\n");
HeapFree(MyHeap, 0, Buf);
- return FALSE;
+ return NULL;
}
ExpandEnvironmentStrings(Buf, Expanded, ExpandedLen);
if (pLogf == NULL)
{
DPRINT1("Failed to create %S!\n", Expanded);
- ret = FALSE;
}
HeapFree(MyHeap, 0, Buf);
HeapFree(MyHeap, 0, Expanded);
- return ret;
+ return pLogf;
}
BOOL LoadLogFiles(HKEY eventlogKey)
DWORD MaxLognameLen, LognameLen;
WCHAR *Buf = NULL;
INT i;
+ PLOGFILE pLogFile;
RegQueryInfoKey(eventlogKey,
NULL, NULL, NULL, NULL,
return FALSE;
}
- if (!LoadLogFile(SubKey, Buf))
- DPRINT1("Failed to load %S\n", Buf);
- else
+ pLogFile = LoadLogFile(SubKey, Buf);
+ if (pLogFile != NULL)
+ {
DPRINT("Loaded %S\n", Buf);
+ LoadEventSources(SubKey, pLogFile);
+ }
+ else
+ {
+ DPRINT1("Failed to load %S\n", Buf);
+ }
RegCloseKey(SubKey);
LognameLen = MaxLognameLen;
HKEY elogKey;
LogfListInitialize();
+ InitEventSourceList();
MyHeap = HeapCreate(0, 1024 * 256, 0);
#define WIN32_NO_STATUS
#include <windows.h>
+#include <netevent.h>
#include <lpctypes.h>
#include <lpcfuncs.h>
#include <rtlfuncs.h>
LIST_ENTRY ListEntry;
} LOGFILE, *PLOGFILE;
-#if 0
typedef struct _EVENTSOURCE
{
LIST_ENTRY EventSourceListEntry;
PLOGFILE LogFile;
- ULONG CurrentRecord;
WCHAR szName[1];
} EVENTSOURCE, *PEVENTSOURCE;
-#endif
typedef struct _LOGHANDLE
{
LIST_ENTRY LogHandleListEntry;
+ PEVENTSOURCE EventSource;
PLOGFILE LogFile;
ULONG CurrentRecord;
WCHAR szName[1];
DWORD dwDataSize,
LPVOID lpRawData);
+VOID
+LogfReportEvent(WORD wType,
+ WORD wCategory,
+ DWORD dwEventId);
+
/* eventlog.c */
extern HANDLE MyHeap;
VOID SystemTimeToEventTime(SYSTEMTIME * pSystemTime,
DWORD * pEventTime);
+/* eventsource.c */
+VOID InitEventSourceList(VOID);
+
+BOOL
+LoadEventSources(HKEY hKey,
+ PLOGFILE pLogFile);
+
+PEVENTSOURCE
+GetEventSourceByName(LPCWSTR Name);
+
+
/* logport.c */
NTSTATUS WINAPI PortThreadRoutine(PVOID Param);
--- /dev/null
+/*
+ * PROJECT: ReactOS kernel
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: base/services/eventlog/eventsource.c
+ * PURPOSE: Event logging service
+ * COPYRIGHT: Copyright 2011 Eric Kohl
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include "eventlog.h"
+
+static LIST_ENTRY EventSourceListHead;
+static CRITICAL_SECTION EventSourceListCs;
+
+/* FUNCTIONS ****************************************************************/
+
+VOID
+InitEventSourceList(VOID)
+{
+ InitializeCriticalSection(&EventSourceListCs);
+ InitializeListHead(&EventSourceListHead);
+}
+
+
+static VOID
+DumpEventSourceList(VOID)
+{
+ PLIST_ENTRY CurrentEntry;
+ PEVENTSOURCE EventSource;
+
+ DPRINT("DumpEventSourceList()\n");
+ EnterCriticalSection(&EventSourceListCs);
+
+ CurrentEntry = EventSourceListHead.Flink;
+ while (CurrentEntry != &EventSourceListHead)
+ {
+ EventSource = CONTAINING_RECORD(CurrentEntry,
+ EVENTSOURCE,
+ EventSourceListEntry);
+
+ DPRINT("EventSource->szName: %S\n", EventSource->szName);
+
+ CurrentEntry = CurrentEntry->Flink;
+ }
+
+ LeaveCriticalSection(&EventSourceListCs);
+
+ DPRINT("Done\n");
+}
+
+
+BOOL
+LoadEventSources(HKEY hKey,
+ PLOGFILE pLogFile)
+{
+ PEVENTSOURCE lpEventSource;
+ DWORD dwMaxSubKeyLength;
+ DWORD dwEventSourceNameLength;
+ DWORD dwIndex;
+ WCHAR *Buf = NULL;
+
+ DPRINT("LoadEventSources\n");
+
+ RegQueryInfoKeyW(hKey, NULL, NULL, NULL, NULL, &dwMaxSubKeyLength, NULL,
+ NULL, NULL, NULL, NULL, NULL);
+
+ DPRINT("dwMaxSubKeyLength: %lu\n", dwMaxSubKeyLength);
+
+ dwMaxSubKeyLength++;
+
+ Buf = HeapAlloc(MyHeap, 0, dwMaxSubKeyLength * sizeof(WCHAR));
+ if (!Buf)
+ {
+ DPRINT1("Error: can't allocate heap!\n");
+ return FALSE;
+ }
+
+ dwEventSourceNameLength = dwMaxSubKeyLength;
+
+ dwIndex = 0;
+ while (RegEnumKeyExW(hKey,
+ dwIndex,
+ Buf,
+ &dwEventSourceNameLength,
+ NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
+ {
+ DPRINT("Event Source: %S\n", Buf);
+
+ lpEventSource = HeapAlloc(MyHeap, 0, sizeof(EVENTSOURCE) + wcslen(Buf) * sizeof(WCHAR));
+ if (lpEventSource != NULL)
+ {
+ wcscpy(lpEventSource->szName, Buf);
+ lpEventSource->LogFile = pLogFile;
+
+ DPRINT("Insert event source: %S\n", lpEventSource->szName);
+
+
+ EnterCriticalSection(&EventSourceListCs);
+ InsertTailList(&EventSourceListHead,
+ &lpEventSource->EventSourceListEntry);
+ LeaveCriticalSection(&EventSourceListCs);
+ }
+
+ dwEventSourceNameLength = dwMaxSubKeyLength;
+ dwIndex++;
+ }
+
+ HeapFree(MyHeap, 0, Buf);
+
+ DumpEventSourceList();
+
+ return TRUE;
+}
+
+
+PEVENTSOURCE
+GetEventSourceByName(LPCWSTR Name)
+{
+ PLIST_ENTRY CurrentEntry;
+ PEVENTSOURCE Result = NULL;
+
+ DPRINT("GetEventSourceByName(%S)\n", Name);
+ EnterCriticalSection(&EventSourceListCs);
+
+ CurrentEntry = EventSourceListHead.Flink;
+ while (CurrentEntry != &EventSourceListHead)
+ {
+ PEVENTSOURCE Item = CONTAINING_RECORD(CurrentEntry,
+ EVENTSOURCE,
+ EventSourceListEntry);
+
+ DPRINT("Item->szName: %S\n", Item->szName);
+// if ((*(Item->szName) != 0) && !_wcsicmp(Item->szName, Name))
+ if (_wcsicmp(Item->szName, Name) == 0)
+ {
+ DPRINT("Found it\n");
+ Result = Item;
+ break;
+ }
+
+ CurrentEntry = CurrentEntry->Flink;
+ }
+
+ LeaveCriticalSection(&EventSourceListCs);
+
+ DPRINT("Done (Result: %p)\n", Result);
+
+ return Result;
+}
*lpRecSize = dwRecSize;
return Buffer;
}
+
+
+VOID
+LogfReportEvent(WORD wType,
+ WORD wCategory,
+ DWORD dwEventId)
+{
+ WCHAR szComputerName[MAX_COMPUTERNAME_LENGTH + 1];
+ DWORD dwComputerNameLength = MAX_COMPUTERNAME_LENGTH + 1;
+ PEVENTSOURCE pEventSource = NULL;
+ PBYTE logBuffer;
+ DWORD lastRec;
+ DWORD recSize;
+ DWORD dwError;
+
+ if (!GetComputerNameW(szComputerName, &dwComputerNameLength))
+ {
+ szComputerName[0] = 0;
+ }
+
+ pEventSource = GetEventSourceByName(L"EventLog");
+ if (pEventSource == NULL)
+ {
+ return;
+ }
+
+ lastRec = LogfGetCurrentRecord(pEventSource->LogFile);
+
+ logBuffer = LogfAllocAndBuildNewRecord(&recSize,
+ lastRec,
+ wType,
+ wCategory,
+ dwEventId,
+ pEventSource->szName,
+ (LPCWSTR)szComputerName,
+ 0,
+ NULL,
+ 0, //wNumStrings,
+ NULL, //lpStrings,
+ 0, //dwDataSize,
+ NULL); //lpRawData);
+
+ dwError = LogfWriteData(pEventSource->LogFile, recSize, logBuffer);
+ if (!dwError)
+ {
+ DPRINT1("ERROR WRITING TO EventLog %S\n", pEventSource->LogFile->FileName);
+ }
+
+ LogfFreeRecord(logBuffer);
+}
\ No newline at end of file
PLOGHANDLE lpLogHandle;
PLOGFILE currentLogFile = NULL;
INT i, LogsActive;
+ PEVENTSOURCE pEventSource;
+
+ DPRINT("ElfCreateEventLogHandle(Name: %S)\n", Name);
lpLogHandle = HeapAlloc(GetProcessHeap(), 0, sizeof(LOGHANDLE)
+ ((wcslen(Name) + 1) * sizeof(WCHAR)));
/* If Creating, default to the Application Log in case we fail, as documented on MSDN */
if (Create == TRUE)
- lpLogHandle->LogFile = LogfListItemByName(L"Application");
- else
- lpLogHandle->LogFile = NULL;
+ {
+ pEventSource = GetEventSourceByName(Name);
+ DPRINT("EventSource: %p\n", pEventSource);
+ if (pEventSource)
+ {
+ DPRINT("EventSource LogFile: %p\n", pEventSource->LogFile);
+ lpLogHandle->LogFile = pEventSource->LogFile;
+ }
+ else
+ {
+ DPRINT("EventSource LogFile: Application log file\n");
+ lpLogHandle->LogFile = LogfListItemByName(L"Application");
+ }
- for (i = 1; i <= LogsActive; i++)
+ DPRINT("LogHandle LogFile: %p\n", lpLogHandle->LogFile);
+ }
+ else
{
- currentLogFile = LogfListItemByIndex(i);
+ lpLogHandle->LogFile = NULL;
- if (_wcsicmp(Name, currentLogFile->LogName) == 0)
+ for (i = 1; i <= LogsActive; i++)
{
- lpLogHandle->LogFile = LogfListItemByIndex(i);
- lpLogHandle->CurrentRecord = LogfGetOldestRecord(lpLogHandle->LogFile);
- break;
+ currentLogFile = LogfListItemByIndex(i);
+
+ if (_wcsicmp(Name, currentLogFile->LogName) == 0)
+ {
+ lpLogHandle->LogFile = LogfListItemByIndex(i);
+ lpLogHandle->CurrentRecord = LogfGetOldestRecord(lpLogHandle->LogFile);
+ break;
+ }
}
}
DWORD MinorVersion,
IELF_HANDLE *LogHandle)
{
+ DPRINT1("ElfrRegisterEventSourceW()\n");
+
if ((MajorVersion != 1) || (MinorVersion != 1))
return STATUS_INVALID_PARAMETER;
if (RegModuleName->Length > 0)
return STATUS_INVALID_PARAMETER;
+ DPRINT1("ModuleName: %S\n", ModuleName->Buffer);
+
/*FIXME: UNCServerName must specify the server or empty for local */
/*FIXME: Must verify that caller has write access */
set_module_type(rpcss win32cui)
add_importlibs(rpcss advapi32 rpcrt4 msvcrt kernel32 ntdll)
-add_cab_target(rpcss 1)
+add_cd_file(TARGET rpcss DESTINATION reactos/system32 FOR all)
add_dependencies(rpcss winesdk)
set_module_type(spoolsv win32cui)
add_importlibs(spoolsv advapi32 msvcrt kernel32 ntdll)
-add_cab_target(spoolsv 1)
+add_cd_file(TARGET spoolsv DESTINATION reactos/system32 FOR all)
set_module_type(svchost win32cui)
add_importlibs(svchost advapi32 msvcrt kernel32 ntdll)
-add_cab_target(svchost 1)
+add_cd_file(TARGET svchost DESTINATION reactos/system32 FOR all)
add_importlibs(tcpsvcs ws2_32 advapi32 msvcrt kernel32 ntdll)
-add_cab_target(tcpsvcs 1)
-add_cab(${CMAKE_CURRENT_SOURCE_DIR}/quotes 5)
\ No newline at end of file
+add_cd_file(TARGET tcpsvcs DESTINATION reactos/system32 FOR all)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/quotes DESTINATION reactos/system32/drivers/etc FOR all)
\ No newline at end of file
set_module_type(telnetd win32cui)
add_importlibs(telnetd advapi32 ws2_32 msvcrt kernel32 ntdll)
-add_cab_target(telnetd 1)
+add_cd_file(TARGET telnetd DESTINATION reactos/system32 FOR all)
set_module_type(umpnpmgr win32cui)
add_importlibs(umpnpmgr advapi32 rpcrt4 userenv msvcrt kernel32 ntdll)
-add_cab_target(umpnpmgr 1)
+add_cd_file(TARGET umpnpmgr DESTINATION reactos/system32 FOR all)
set_module_type(wlansvc win32cui)
add_importlibs(wlansvc advapi32 rpcrt4 iphlpapi msvcrt kernel32 ntdll)
-add_cab_target(wlansvc 1)
+add_cd_file(TARGET wlansvc DESTINATION reactos/system32 FOR all)
set_module_type(reactos win32gui)
add_importlibs(reactos gdi32 user32 comctl32 setupapi msvcrt kernel32 ntdll)
-add_minicd_target(reactos reactos)
+add_cd_file(TARGET reactos DESTINATION reactos NO_CAB FOR bootcd)
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Witaj w Kreatorze instalacji ReactOS.", IDC_STARTTITLE, 115, 8, 195, 24
- LTEXT "Nie mo¿esz zainstalowaæ ReactOS bezpo\9crednio! Uruchom ponownie komputer z tej p³yty aby zainstalowaæ ReactOS.", IDC_STATIC, 115, 40, 195, 100
+ LTEXT "Nie mo¿esz zainstalowaæ ReactOS bezpo\9crednio! Uruchom ponownie komputer z tej p³yty, aby zainstalowaæ ReactOS.", IDC_STATIC, 115, 40, 195, 100
LTEXT "Naci\9cnij przycisk aby zakoñczyæ pracê Instalatora.", IDC_STATIC, 115, 169, 195, 17
END
CONTROL "", IDC_LANGUAGES, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 132, 107, 176, 142
CONTROL "Uk³ad klawiatury:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 142, 106, 11
CONTROL "", IDC_KEYLAYOUT, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 132, 141, 176, 81
- LTEXT "Naci\9cnij Dalej aby wybraæ rodzaj instalacji.", IDC_STATIC, 10, 180 ,297, 10
+ LTEXT "Naci\9cnij Dalej, aby wybraæ rodzaj instalacji.", IDC_STATIC, 10, 180 ,297, 10
END
IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193
CONTROL "Rodzaj instalacji", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172
CONTROL "Zainstaluj ReactOS", IDC_INSTALL, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 20, 15, 277, 10
CONTROL "Napraw lub zaktualizuj zainstalowany wcze\9cniej ReactOS", IDC_SETUP, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 20, 30, 277, 10
- LTEXT "Naci\9cnij Dalej aby zmieniæ ustawienia sprzêtu.", IDC_STATIC, 10, 180 ,297, 10
+ LTEXT "Naci\9cnij Dalej, aby zmieniæ ustawienia sprzêtu.", IDC_STATIC, 10, 180 ,297, 10
END
IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193
CONTROL "", IDC_DISPLAY, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 35, 150, 80
LTEXT "Klawiatura:", IDC_STATIC, 20,55, 80, 10
CONTROL "", IDC_KEYBOARD, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 55, 150, 80
- LTEXT "Naci\9cnij Dalej aby ustaliæ miejsce instalacji.", IDC_STATIC, 10, 180 ,277, 20
+ LTEXT "Naci\9cnij Dalej, aby ustaliæ miejsce instalacji.", IDC_STATIC, 10, 180 ,277, 20
END
IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193
PUSHBUTTON "&Usuñ", IDC_PARTDELETE, 76,155,50,15
PUSHBUTTON "s&terownik", IDC_DEVICEDRIVER, 162,155,50,15, WS_DISABLED
PUSHBUTTON "&Opcje zaawansowane...", IDC_PARTMOREOPTS, 218,155,80,15
- LTEXT "Naci\9cnij Dalej aby rozpocz¹æ proces instalacji.", IDC_STATIC, 10, 180 ,277, 20
+ LTEXT "Naci\9cnij Dalej, aby rozpocz¹æ proces instalacji.", IDC_STATIC, 10, 180 ,277, 20
END
IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "Podsumowanie instalacji", IDC_ACTION, "Button", BS_GROUPBOX, 10,0,297,172
- LTEXT "Kliknij Dalej aby rozpocz¹æ proces instalacji.", IDC_STATIC, 10, 180 ,277, 20
+ LTEXT "Kliknij Dalej, aby rozpocz¹æ proces instalacji.", IDC_STATIC, 10, 180 ,277, 20
END
IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193
LTEXT "Po klikniêciu Zakoñcz ten komputer zostanie uruchomiony ponownie.", IDC_STATIC, 20, 80, 277, 10
CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8
- LTEXT "Je\9cli w napêdzie jest p³yta CD, wyci¹gnij j¹. Nastêpnie naci\9cnij Zakoñcz aby uruchomiæ ponownie Twój komputer.", IDC_STATIC, 10, 180, 297, 20
+ LTEXT "Je\9cli w napêdzie jest p³yta CD, wyci¹gnij j¹. Nastêpnie naci\9cnij Zakoñcz, aby uruchomiæ ponownie Twój komputer.", IDC_STATIC, 10, 180, 297, 20
END
STRINGTABLE
IDS_PROCESSTITLE "Przygotuj partycjê, skopiuj pliki i zapisz ustawienia systemu"
IDS_PROCESSSUBTITLE "Przygotuj i sformatuj partycjê, skopiuj pliki, skopiuj i zainstaluj bootloader"
IDS_RESTARTTITLE "Pierwszy etap instalacji zakoñczony sukcesem"
- IDS_RESTARTSUBTITLE "Pierwszy etap instalacji zosta³ zakoñczony, uruchom ponownie komputer aby przej\9cæ do drugiego etapu"
+ IDS_RESTARTSUBTITLE "Pierwszy etap instalacji zosta³ zakoñczony, uruchom ponownie komputer, aby przej\9cæ do drugiego etapu"
IDS_SUMMARYTITLE "Podsumowanie instalacji"
IDS_SUMMARYSUBTITLE "Sprawd\9f ustawienia instalacji przed dokonaniem zmian na dysku"
IDS_ABORTSETUP "Instalacja ReactOS nie zosta³a ukoñczona na tym komputerze. Je\9cli teraz zakoñczysz instalacjê, bêdziesz musia³ uruchomiæ Instalator ponownie, aby zainstalowaæ Reactos. Na pewno zakoñczyæ?"
set_module_type(setup win32gui)
add_importlibs(setup userenv msvcrt kernel32 ntdll)
-add_cab_target(setup 1)
+add_cd_file(TARGET setup DESTINATION reactos/system32 FOR all)
set_module_type(usetup nativecui)
add_importlibs(usetup kernel32 ntdll)
-add_minicd_target(usetup reactos/system32 smss.exe)
+add_cd_file(TARGET usetup DESTINATION reactos/system32 NO_CAB NAME_ON_CD smss.exe FOR bootcd)
FILE_SEQUENTIAL_ONLY);
if(!NT_SUCCESS(Status))
{
- DPRINT1("NtOpenFile failed: %x\n", Status);
+ DPRINT1("NtOpenFile failed: %x, %wZ\n", Status, &FileName);
goto done;
}
#else
PWCHAR FileKeyValue;
PWCHAR DirKeyValue;
PWCHAR TargetFileName;
+ WCHAR CompleteOrigFileName[512];
if (SourceCabinet)
return AddSectionToCopyQueueCab(InfFile, L"SourceFiles", SourceCabinet, DestinationPath, Ir);
break;
}
+ wcscpy(CompleteOrigFileName, SourceRootDir.Buffer);
+ wcscat(CompleteOrigFileName, L"\\");
+ wcscat(CompleteOrigFileName, DirKeyValue);
+
if (!SetupQueueCopy(SetupFileQueue,
SourceCabinet,
SourceRootPath.Buffer,
- SourceRootDir.Buffer,
+ CompleteOrigFileName,
FileKeyName,
DirKeyValue,
TargetFileName))
{
8,
21,
- "\x07 Naci\98nij F3 aby wyj\98\86 bez instalacji systemu ReactOS.",
+ "\x07 Naci\98nij F3, aby wyj\98\86 bez instalacji systemu ReactOS.",
TEXT_STYLE_NORMAL
},
{
{
8,
23,
- "\x07 Naci\98nij ENTER aby zainstalowa\86 system ReactOS.",
+ "\x07 Naci\98nij ENTER, aby zainstalowa\86 system ReactOS.",
TEXT_STYLE_NORMAL
},
{
8,
25,
- "\x07 Naci\98nij F3 aby wyj\98\86 bez instalacji systemu ReactOS.",
+ "\x07 Naci\98nij F3, aby wyj\98\86 bez instalacji systemu ReactOS.",
TEXT_STYLE_NORMAL
},
{
{
6,
19,
- "Mo¾esz zmieni\86 poszczeg¢lne ustawienia za pomoc¥ klawiszy GàRA i Dà\9d",
+ "Mo¾esz zmieni\86 poszczeg¢lne ustawienia za pomoc¥ klawiszy GàRA i Dà\9d,",
TEXT_STYLE_NORMAL
},
{
6,
20,
- "aby wybra\86 kategori©. Potem naci\98nij ENTER by przej\98\86 do menu z ",
+ "aby wybra\86 kategori©. Potem naci\98nij ENTER, by przej\98\86 do menu z ",
TEXT_STYLE_NORMAL
},
{
{
8,
17,
- "\x07 Naci\98nij R by uruchomi\86 Konsol© Odtwarzania.",
+ "\x07 Naci\98nij R, by uruchomi\86 Konsol© Odtwarzania.",
TEXT_STYLE_NORMAL
},
{
8,
19,
- "\x07 Naci\98nij ESC by powr¢ci\86 do g\88¢wnego menu.",
+ "\x07 Naci\98nij ESC, by powr¢ci\86 do g\88¢wnego menu.",
TEXT_STYLE_NORMAL
},
{
8,
21,
- "\x07 Naci\98nij ENTER by zrestartowa\86 komputer.",
+ "\x07 Naci\98nij ENTER, by zrestartowa\86 komputer.",
TEXT_STYLE_NORMAL
},
{
{
8,
10,
- "\x07 Naci\98nij klawisz GàRA albo Dà\9d by wybra\86 odpowiedni typ komputera.",
+ "\x07 Naci\98nij klawisz GàRA albo Dà\9d, by wybra\86 odpowiedni typ komputera.",
TEXT_STYLE_NORMAL
},
{
{
8,
13,
- "\x07 Naci\98nij klawisz ESC aby powr¢ci\86 do poprzedniej strony bez zmiany",
+ "\x07 Naci\98nij klawisz ESC, aby powr¢ci\86 do poprzedniej strony bez zmiany",
TEXT_STYLE_NORMAL
},
{
{
10,
11,
- "Naci\98nij ENTER by zrestartowa\86 komputer.",
+ "Naci\98nij ENTER, by zrestartowa\86 komputer.",
TEXT_STYLE_NORMAL
},
{
},
{ 8,
10,
- "\x07 Naci\98nij klawisz GàRA albo Dà\9d by wybra\86 rozdzielczo\98\86 i liczb©",
+ "\x07 Naci\98nij klawisz GàRA albo Dà\9d, by wybra\86 rozdzielczo\98\86 i liczb©",
TEXT_STYLE_NORMAL
},
{
8,
11,
- " kolor¢w a nast©pnie naci\98nij ENTER.",
+ " kolor¢w, a nast©pnie naci\98nij ENTER.",
TEXT_STYLE_NORMAL
},
{
8,
13,
- "\x07 Naci\98nij ESC key aby powr¢ci\86 do poprzedniej strony bez zmiany",
+ "\x07 Naci\98nij ESC, aby powr¢ci\86 do poprzedniej strony bez zmiany",
TEXT_STYLE_NORMAL
},
{
{
10,
11,
- "Naci\98nij ENTER by zrestartowa\86 komputer.",
+ "Naci\98nij ENTER, by zrestartowa\86 komputer.",
TEXT_STYLE_NORMAL
},
{
{
8,
11,
- "\x07 Naci\98nij GàRA lub Dà\9d by wybra\86 pozycj© z listy.",
+ "\x07 Naci\98nij GàRA lub Dà\9d, by wybra\86 pozycj© z listy.",
TEXT_STYLE_NORMAL
},
{
8,
13,
- "\x07 Naci\98nij ENTER by zainstalowa\86 ReactOS na wybranej partycji.",
+ "\x07 Naci\98nij ENTER, by zainstalowa\86 ReactOS na wybranej partycji.",
TEXT_STYLE_NORMAL
},
{
8,
15,
- "\x07 Naci\98nij C by stworzy\86 now¥ partycj©.",
+ "\x07 Naci\98nij C, by stworzy\86 now¥ partycj©.",
TEXT_STYLE_NORMAL
},
{
8,
17,
- "\x07 Naci\98nij D by skasowa\86 istniej¥c¥ partycj©.",
+ "\x07 Naci\98nij D, by skasowa\86 istniej¥c¥ partycj©.",
TEXT_STYLE_NORMAL
},
{
{
6,
10,
- "Instalator sformatuje teraz partycj©. Naci\98nij ENTER aby kontynuowa\86.",
+ "Instalator sformatuje teraz partycj©. Naci\98nij ENTER, aby kontynuowa\86.",
TEXT_STYLE_NORMAL
},
{
{
6,
14,
- "Aby zmieni\86 domy\98lny katalog, u¾yj klawisza BACKSPACE by skasowa\86",
+ "Aby zmieni\86 domy\98lny katalog, u¾yj klawisza BACKSPACE, by skasowa\86",
TEXT_STYLE_NORMAL
},
{
{
8,
10,
- "\x07 Naci\98nij klawisz GàRA albo Dà\9d by wybra\86 odpowiedni typ klawiatury.",
+ "\x07 Naci\98nij klawisz GàRA albo Dà\9d, by wybra\86 odpowiedni typ klawiatury.",
TEXT_STYLE_NORMAL
},
{
{
8,
13,
- "\x07 Naci\98nij ESC key aby powr¢ci\86 do poprzedniej strony bez zmiany",
+ "\x07 Naci\98nij ESC, aby powr¢ci\86 do poprzedniej strony bez zmiany",
TEXT_STYLE_NORMAL
},
{
{
8,
10,
- "\x07 Naci\98nij klawisz GàRA albo Dà\9d by wybra\86 odpowiedni uk\88ad",
+ "\x07 Naci\98nij klawisz GàRA albo Dà\9d, by wybra\86 odpowiedni uk\88ad",
TEXT_STYLE_NORMAL
},
{
{
8,
13,
- "\x07 Naci\98nij ESC key aby powr¢ci\86 do poprzedniej strony bez zmiany",
+ "\x07 Naci\98nij ESC, aby powr¢ci\86 do poprzedniej strony bez zmiany",
TEXT_STYLE_NORMAL
},
{
{
8,
19,
- "\x07 Naci\98nij klawisz GàRA alub Dà\9d by wybra\86 system plik¢w.",
+ "\x07 Naci\98nij klawisz GàRA alub Dà\9d, by wybra\86 system plik¢w.",
0
},
{
8,
21,
- "\x07 Naci\98nij ENTER aby sformatowa\86 partycj©.",
+ "\x07 Naci\98nij ENTER, aby sformatowa\86 partycj©.",
0
},
{
8,
23,
- "\x07 Naci\98nij ESC aby wybra\86 inn¥ partycj©.",
+ "\x07 Naci\98nij ESC, aby wybra\86 inn¥ partycj©.",
0
},
{
{
8,
18,
- "\x07 Naci\98nij D by skasowa\86 partycj©.",
+ "\x07 Naci\98nij D, by skasowa\86 partycj©.",
TEXT_STYLE_NORMAL
},
{
{
8,
21,
- "\x07 Naci\98nij ESC aby anulowa\86.",
+ "\x07 Naci\98nij ESC, aby anulowa\86.",
TEXT_STYLE_NORMAL
},
{
//ERROR_NOT_INSTALLED
"ReactOS nie zosta\88 w pe\88ni zainstalowany na twoim\n"
"komputerze. Je\98li wyjdziesz teraz, trzeba b©dzie\n"
- "ponownie uruchomi\86 instalator by zainstalowa\86 ReactOS.\n"
+ "ponownie uruchomi\86 instalator, by zainstalowa\86 ReactOS.\n"
"\n"
- " \x07 Naci\98nij ENTER aby kontynuowa\86 instalacj©.\n"
- " \x07 Naci\98nij F3 aby wyj\98\86 z instalatora.",
+ " \x07 Naci\98nij ENTER, aby kontynuowa\86 instalacj©.\n"
+ " \x07 Naci\98nij F3, aby wyj\98\86 z instalatora.",
"F3= Wyj\98cie ENTER = Kontynuacja"
},
{
"\n"
"Tworzenie lub kasowanie partycji mo¾e zniszczy\86 ca\88¥ tablic© partycji.\n"
"\n"
- " \x07 Naci\98nij F3 aby wyj\98\86 z instalatora."
- " \x07 Naci\98nij ENTER aby kontynuowa\86.",
+ " \x07 Naci\98nij F3, aby wyj\98\86 z instalatora."
+ " \x07 Naci\98nij ENTER, aby kontynuowa\86.",
"F3= Wyj\98cie ENTER = Kontynuacja"
},
{
"Nie mo¾esz stworzy\86 nowej partycji w miejscu ju¾\n"
"istniej¥cej!\n"
"\n"
- " * Naci\98nij dowolny klawisz aby kontynuowa\86.",
+ " * Naci\98nij dowolny klawisz, aby kontynuowa\86.",
NULL
},
{
//ERROR_DELETE_SPACE,
"Nie mo¾esz skasowa\86 pustej przestrzeni, gdzie nie ma ¾adnej partycji!\n"
"\n"
- " * Naci\98nij dowolny klawisz aby kontynuowa\86.",
+ " * Naci\98nij dowolny klawisz, aby kontynuowa\86.",
NULL
},
{
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Brak wystarczaj¥cej wolnej przestrzeni w wybranej partycji.\n"
- " * Naci\98nij dowolny klawisz aby kontynuowa\86.",
+ " * Naci\98nij dowolny klawisz, aby kontynuowa\86.",
NULL
},
{
+/*
+ * PROJECT: ReactOS Setup
+ * FILE: \base\setup\usetup\lang\sv-SE.h
+ * PURPOSE: Swedish resource file
+ * Translation: Jaix Bly plus perhaps GreatLord if blame and translate.reactos.se is consulted.
+ */
#pragma once
MUI_LAYOUTS svSELayouts[] =
{
8,
11,
- " Then press ENTER.",
+ " Then Tryck ENTER.",
TEXT_STYLE_NORMAL
},
{
{
0,
0,
- " ENTER = Continue F3 = Quit",
+ " ENTER = Fortsätt F3 = Avsluta",
TEXT_TYPE_STATUS
},
{
{
6,
8,
- "The list below shows existing partitions and unused disk",
+ "Lista nedan visar befintliga partitioner och oanvändt",
TEXT_STYLE_NORMAL
},
{
6,
9,
- "space for new partitions.",
+ "diskutrymme för nya partitioner.",
TEXT_STYLE_NORMAL
},
{
8,
11,
- "\x07 Press UP or DOWN to select a list entry.",
+ "\x07 Tryck UPP eller NER tangenten för att välja i listan.",
TEXT_STYLE_NORMAL
},
{
8,
13,
- "\x07 Press ENTER to install ReactOS onto the selected partition.",
+ "\x07 Tryck ENTER för att installerara ReactOS till vald partition.",
TEXT_STYLE_NORMAL
},
{
8,
15,
- "\x07 Press C to create a new partition.",
+ "\x07 Tryck C för att skapa en ny partition.",
TEXT_STYLE_NORMAL
},
{
8,
17,
- "\x07 Press D to delete an existing partition.",
+ "\x07 Tryck D för att ta bort en befintlig partititon.",
TEXT_STYLE_NORMAL
},
{
0,
0,
- " Please wait...",
+ " Var Vänlig Vänta...",
TEXT_TYPE_STATUS
},
{
{
6,
8,
- "Format partition",
+ "Formatera partition",
TEXT_STYLE_NORMAL
},
{
6,
10,
- "Setup will now format the partition. Press ENTER to continue.",
+ "Partitionen kommer nu att formaters Tryck ENTER för att fortsätta.",
TEXT_STYLE_NORMAL
},
{
0,
0,
- " ENTER = Continue F3 = Quit",
+ " ENTER = Fortsätt F3 = Avsluta",
TEXT_TYPE_STATUS
},
{
{
6,
8,
- "Setup installs ReactOS files onto the selected partition. Choose a",
+ "ReactOS installeras till vald partition. Välj en",
TEXT_STYLE_NORMAL
},
{
6,
9,
- "directory where you want ReactOS to be installed:",
+ "mapp som du vill installera ReactOS till.:",
TEXT_STYLE_NORMAL
},
{
6,
14,
- "To change the suggested directory, press BACKSPACE to delete",
+ "För att ändra den föreslagna mappen, tryck BACKSTEG för att radera",
TEXT_STYLE_NORMAL
},
{
6,
15,
- "characters and then type the directory where you want ReactOS to",
+ "bokstäver och skriv sedan in mappen dit du vill att ReactOS ska bli",
TEXT_STYLE_NORMAL
},
{
6,
16,
- "be installed.",
+ "installerad.",
TEXT_STYLE_NORMAL
},
{
0,
0,
- " ENTER = Continue F3 = Quit",
+ " ENTER = Fortsätt F3 = Avsluta",
TEXT_TYPE_STATUS
},
{
{
11,
12,
- "Please wait while ReactOS Setup copies files to your ReactOS",
+ "Var vänlig vänta medans ReactOS Setup kopieras till din ReactOS.",
TEXT_STYLE_NORMAL
},
{
30,
13,
- "installation folder.",
+ "installationsmapp.",
TEXT_STYLE_NORMAL
},
{
20,
14,
- "This may take several minutes to complete.",
+ "Detta kan ta flera minuter att fullfölja.",
TEXT_STYLE_NORMAL
},
{
0,
0,
- " \xB3 Please wait... ",
+ " \xB3 Var Vänlig Vänta... ",
TEXT_TYPE_STATUS
},
{
{
6,
8,
- "Setup is installing the boot loader",
+ "Setup installerar boot-loadern",
TEXT_STYLE_NORMAL
},
{
8,
12,
- "Install bootloader on the harddisk (MBR and VBR).",
+ "Installera bootloadern till harddisken (MBR and VBR).",
TEXT_STYLE_NORMAL
},
{
8,
13,
- "Install bootloader on the harddisk (VBR only).",
+ "Installera bootloadern till hårddisken (VBR only).",
TEXT_STYLE_NORMAL
},
{
8,
14,
- "Install bootloader on a floppy disk.",
+ "Installera bootloadern till en diskett.",
TEXT_STYLE_NORMAL
},
{
8,
15,
- "Skip install bootloader.",
+ "Skippa installation av bootloader.",
TEXT_STYLE_NORMAL
},
{
0,
0,
- " ENTER = Continue F3 = Quit",
+ " ENTER = Fortsätt F3 = Avsluta",
TEXT_TYPE_STATUS
},
{
{
6,
8,
- "You want to change the type of keyboard to be installed.",
+ "Du vill ändra tangentbordstyp som ska intealleras.",
TEXT_STYLE_NORMAL
},
{
8,
10,
- "\x07 Press the UP or DOWN key to select the desired keyboard type.",
+ "\x07 Tryck UP eller NER tangenten för att välja önskat tangentbordstyp.",
TEXT_STYLE_NORMAL
},
{
8,
11,
- " Then press ENTER.",
+ " Tryck sedan ENTER.",
TEXT_STYLE_NORMAL
},
{
8,
13,
- "\x07 Press the ESC key to return to the previous page without changing",
+ "\x07 Tryck ESC tangenten för att återgå till förra sidan utan att ändra något.",
TEXT_STYLE_NORMAL
},
{
8,
14,
- " the keyboard type.",
+ " tangentbordstyp.",
TEXT_STYLE_NORMAL
},
{
0,
0,
- " ENTER = Continue ESC = Cancel F3 = Quit",
+ " ENTER = Fortsätt ESC = Avbryt F3 = Avsluta",
TEXT_TYPE_STATUS
},
{
{
6,
8,
- "Please select a layout to be installed by default.",
+ "Var vänlig och välj layout du vill installera som standard.",
TEXT_STYLE_NORMAL
},
{
8,
10,
- "\x07 Press the UP or DOWN key to select the desired keyboard",
+ "\x07 Tryck UPP eller NER tangenten för att välja önskad",
TEXT_STYLE_NORMAL
},
{
8,
11,
- " layout. Then press ENTER.",
+ " tangentbordslayout. Tryck sedan ENTER.",
TEXT_STYLE_NORMAL
},
{
8,
13,
- "\x07 Press the ESC key to return to the previous page without changing",
+ "\x07 Tryck ESC tangenten för att återgå till förra sidan utan att ändra",
TEXT_STYLE_NORMAL
},
{
8,
14,
- " the keyboard layout.",
+ " tangentbordslayout.",
TEXT_STYLE_NORMAL
},
{
0,
0,
- " ENTER = Continue ESC = Cancel F3 = Quit",
+ " ENTER = Fortsätt ESC = Avbryt F3 = Avsluta",
TEXT_TYPE_STATUS
},
{
{
6,
8,
- "Setup prepares your computer for copying the ReactOS files. ",
+ "Setup förbereder din dator för kopiering av ReactOS filer. ",
TEXT_STYLE_NORMAL
},
{
0,
0,
- " Building the file copy list...",
+ " Sammanställer filkopieringslistan...",
TEXT_TYPE_STATUS
},
{
{
6,
17,
- "Select a file system from the list below.",
+ "Välj ett filsystem i listan nedan.",
0
},
{
8,
19,
- "\x07 Press UP or DOWN to select a file system.",
+ "\x07 Tryck UPP or NER tangenten för att välja filsystem.",
0
},
{
8,
21,
- "\x07 Press ENTER to format the partition.",
+ "\x07 Tryck ENTER för att formatera partitionen.",
0
},
{
8,
23,
- "\x07 Press ESC to select another partition.",
+ "\x07 Tryck ESC för att välja en annan partition.",
0
},
{
0,
0,
- " ENTER = Continue ESC = Cancel F3 = Quit",
+ " ENTER = Fortsätt ESC = Avbryt F3 = Avsluta",
TEXT_TYPE_STATUS
},
{
6,
8,
- "You have chosen to delete the partition",
+ "Du har valt att ta bort partitionen",
TEXT_STYLE_NORMAL
},
{
8,
18,
- "\x07 Press D to delete the partition.",
+ "\x07 Tryck D för att ta bort partitionen.",
TEXT_STYLE_NORMAL
},
{
11,
19,
- "WARNING: All data on this partition will be lost!",
+ "VARNING: Alla data på denna partition kommer att förloras!",
TEXT_STYLE_NORMAL
},
{
8,
21,
- "\x07 Press ESC to cancel.",
+ "\x07 Tryck ESC för att avbryta.",
TEXT_STYLE_NORMAL
},
{
0,
0,
- " D = Delete Partition ESC = Cancel F3 = Quit",
+ " D = Tar bort Partitionen ESC = Avbryt F3 = Avsluta",
TEXT_TYPE_STATUS
},
{
{
6,
8,
- "Setup is updating the system configuration. ",
+ "Setup uppdaterar systemkonfigurationen. ",
TEXT_STYLE_NORMAL
},
{
0,
0,
- " Creating registry hives...",
+ " Skapar regististerdatafiler...",
TEXT_TYPE_STATUS
},
{
{
{
//ERROR_NOT_INSTALLED
- "ReactOS is not completely installed on your\n"
- "computer. If you quit Setup now, you will need to\n"
- "run Setup again to install ReactOS.\n"
+ "ReactOS installerades inte fullständigt på din\n"
+ "dator. Om du avslutar Setup nu, kommer du att behöva\n"
+ "köra Setup igen för att installera ReactOS.\n"
"\n"
- " \x07 Press ENTER to continue Setup.\n"
- " \x07 Press F3 to quit Setup.",
- "F3= Quit ENTER = Continue"
+ " \x07 Tryck ENTER för att fortsätta Setup.\n"
+ " \x07 Tryck F3 för att avsluta Setup.",
+ "F3= Avsluta ENTER = Fortsätta"
},
{
//ERROR_NO_HDD
- "Setup could not find a harddisk.\n",
- "ENTER = Reboot computer"
+ "Setup kunde inte hitta någon hårddisk.\n",
+ "ENTER = Starta om datorn"
},
{
//ERROR_NO_SOURCE_DRIVE
- "Setup could not find its source drive.\n",
- "ENTER = Reboot computer"
+ "Setup kunde inte hitta sin källdisk.\n",
+ "ENTER = Starta om datorn"
},
{
//ERROR_LOAD_TXTSETUPSIF
- "Setup failed to load the file TXTSETUP.SIF.\n",
- "ENTER = Reboot computer"
+ "Setup misslyckades att läsa in filen TXTSETUP.SIF.\n",
+ "ENTER = Starta om datorn"
},
{
//ERROR_CORRUPT_TXTSETUPSIF
- "Setup found a corrupt TXTSETUP.SIF.\n",
- "ENTER = Reboot computer"
+ "Setup fann en korrupt TXTSETUP.SIF.\n",
+ "ENTER = Starta om datorn"
},
{
//ERROR_SIGNATURE_TXTSETUPSIF,
- "Setup found an invalid signature in TXTSETUP.SIF.\n",
- "ENTER = Reboot computer"
+ "Setup hittade en ogiltig signatur i TXTSETUP.SIF.\n",
+ "ENTER = Starta om datorn"
},
{
//ERROR_DRIVE_INFORMATION
- "Setup could not retrieve system drive information.\n",
- "ENTER = Reboot computer"
+ "Setup kunde inte läsa in informationen om systemenheten.\n",
+ "ENTER = Starta om datorn"
},
{
//ERROR_WRITE_BOOT,
- "Setup failed to install FAT bootcode on the system partition.",
- "ENTER = Reboot computer"
+ "Setup misslyckades installera FAT bootkod på systempartitionen.",
+ "ENTER = Starta om datorn"
},
{
//ERROR_LOAD_COMPUTER,
- "Setup failed to load the computer type list.\n",
- "ENTER = Reboot computer"
+ "Setup misslyckades att läsa datortypslistan.\n",
+ "ENTER = Starta om datorn"
},
{
//ERROR_LOAD_DISPLAY,
- "Setup failed to load the display settings list.\n",
- "ENTER = Reboot computer"
+ "Setup misslyckades att läsa in skärminställningslistan.\n",
+ "ENTER = Starta om datorn"
},
{
//ERROR_LOAD_KEYBOARD,
- "Setup failed to load the keyboard type list.\n",
- "ENTER = Reboot computer"
+ "Setup misslyckades att läsa in tangentbordstypslistan.\n",
+ "ENTER = Starta om datorn"
},
{
//ERROR_LOAD_KBLAYOUT,
- "Setup failed to load the keyboard layout list.\n",
- "ENTER = Reboot computer"
+ "Setup misslyckades att läsa in tangentbordslayoutslistan.\n",
+ "ENTER = Starta om datorn"
},
{
//ERROR_WARN_PARTITION,
- "Setup found that at least one harddisk contains an incompatible\n"
- "partition table that can not be handled properly!\n"
+ "Setup fann att minst en hårdisk innehåller en partitionstabell\n"
+ "inte är kompatibel och inte kan hanteras korrekt!\n"
"\n"
- "Creating or deleting partitions can destroy the partiton table.\n"
+ "Skapa eller ta bort partitioner kan förstöra partitionstabellen.\n"
"\n"
- " \x07 Press F3 to quit Setup."
- " \x07 Press ENTER to continue.",
- "F3= Quit ENTER = Continue"
+ " \x07 Tryck F3 för att avsluta Setup."
+ " \x07 Tryck ENTER för att fortsätta.",
+ "F3= Avsluta ENTER = Fortsätt"
},
{
//ERROR_NEW_PARTITION,
- "You can not create a new Partition inside\n"
- "of an already existing Partition!\n"
+ "Du kan inte skapa en partition inuti\n"
+ "en redat befintlig partition!\n"
"\n"
- " * Press any key to continue.",
+ " * Tryck valfri tangent för att fortsätta.",
NULL
},
{
//ERROR_DELETE_SPACE,
- "You can not delete unpartitioned disk space!\n"
+ "Du kan inte ta bort opartitionerrat diskutrymme!\n"
"\n"
- " * Press any key to continue.",
+ " * Tryck valfri tangent för att fortsätta.",
NULL
},
{
//ERROR_INSTALL_BOOTCODE,
- "Setup failed to install the FAT bootcode on the system partition.",
- "ENTER = Reboot computer"
+ "Setup misslyckades att installera FAT bootkoden på systempartitionen.",
+ "ENTER = Starta om datorn"
},
{
//ERROR_NO_FLOPPY,
- "No disk in drive A:.",
- "ENTER = Continue"
+ "Ingen disk i enhet A:.",
+ "ENTER = Fortsätt"
},
{
//ERROR_UPDATE_KBSETTINGS,
- "Setup failed to update keyboard layout settings.",
- "ENTER = Reboot computer"
+ "Setup misslyckades att updatera inställninarna för tangentbordslayout.",
+ "ENTER = Starta om datorn"
},
{
//ERROR_UPDATE_DISPLAY_SETTINGS,
- "Setup failed to update display registry settings.",
- "ENTER = Reboot computer"
+ "Setup misslyckades att uppdatera skärmregisterinställningen.",
+ "ENTER = Starta om datorn"
},
{
//ERROR_IMPORT_HIVE,
- "Setup failed to import a hive file.",
- "ENTER = Reboot computer"
+ "Setup misslyckades att improterea en registerdatafil.",
+ "ENTER = Starta om datorn"
},
{
//ERROR_FIND_REGISTRY
- "Setup failed to find the registry data files.",
- "ENTER = Reboot computer"
+ "Setup misslyckades att hitta registerdatafilerna.",
+ "ENTER = Starta om datorn"
},
{
//ERROR_CREATE_HIVE,
- "Setup failed to create the registry hives.",
- "ENTER = Reboot computer"
+ "Setup misslyckades att skapa registerdatafilerna.",
+ "ENTER = Starta om datorn"
},
{
//ERROR_INITIALIZE_REGISTRY,
- "Setup failed to set the initialize the registry.",
- "ENTER = Reboot computer"
+ "Setup misslyckades att initialisera registret.",
+ "ENTER = Starta om datorn"
},
{
//ERROR_INVALID_CABINET_INF,
- "Cabinet has no valid inf file.\n",
- "ENTER = Reboot computer"
+ "Kabinettet has inen giltig inf fil.\n",
+ "ENTER = Starta om datorn"
},
{
//ERROR_CABINET_MISSING,
- "Cabinet not found.\n",
- "ENTER = Reboot computer"
+ "Kabinettet hittades inte.\n",
+ "ENTER = Starta om datorn"
},
{
//ERROR_CABINET_SCRIPT,
- "Cabinet has no setup script.\n",
- "ENTER = Reboot computer"
+ "Kabinettet har inget installationsskript.\n",
+ "ENTER = Starta om datorn"
},
{
//ERROR_COPY_QUEUE,
- "Setup failed to open the copy file queue.\n",
- "ENTER = Reboot computer"
+ "Setup misslyckades att öppna filkopierningskön.\n",
+ "ENTER = Starta om datorn"
},
{
//ERROR_CREATE_DIR,
- "Setup could not create install directories.",
- "ENTER = Reboot computer"
+ "Setup kunnde inte skapa installationsmapparna.",
+ "ENTER = Starta om datorn"
},
{
//ERROR_TXTSETUP_SECTION,
- "Setup failed to find the 'Directories' section\n"
- "in TXTSETUP.SIF.\n",
- "ENTER = Reboot computer"
+ "Setup misslyckades att hitta 'Directories' sektionen\n"
+ "i TXTSETUP.SIF.\n",
+ "ENTER = Starta om datorn"
},
{
//ERROR_CABINET_SECTION,
- "Setup failed to find the 'Directories' section\n"
- "in the cabinet.\n",
- "ENTER = Reboot computer"
+ "Setup misslyckades att hitta 'Directories' sektionen\n"
+ "i kabinettet.\n",
+ "ENTER = Starta om datorn"
},
{
//ERROR_CREATE_INSTALL_DIR
- "Setup could not create the install directory.",
- "ENTER = Reboot computer"
+ "Setup kunnde inte skapa installationsmappen.",
+ "ENTER = Starta om datorn"
},
{
//ERROR_FIND_SETUPDATA,
- "Setup failed to find the 'SetupData' section\n"
- "in TXTSETUP.SIF.\n",
- "ENTER = Reboot computer"
+ "Setup misslyckades att hitta 'SetupData' sektionen\n"
+ "i TXTSETUP.SIF.\n",
+ "ENTER = Starta om datorn"
},
{
//ERROR_WRITE_PTABLE,
- "Setup failed to write partition tables.\n"
- "ENTER = Reboot computer"
+ "Setup misslyckades att skriva partitionstabellen.\n"
+ "ENTER = Starta om datorn"
},
{
//ERROR_ADDING_CODEPAGE,
- "Setup failed to add codepage to registry.\n"
- "ENTER = Reboot computer"
+ "Setup misslyckades att lägga till vald codepage till registret.\n"
+ "ENTER = Starta om datorn"
},
{
//ERROR_UPDATE_LOCALESETTINGS,
- "Setup could not set the system locale.\n"
- "ENTER = Reboot computer"
+ "Setup kunnde inte ställa in 'system locale'.\n"
+ "ENTER = Starta om datorn"
},
{
//ERROR_ADDING_KBLAYOUTS,
- "Setup failed to add keyboard layouts to registry.\n"
- "ENTER = Reboot computer"
+ "Setup misslyckades att lägga till tangentbordslayouten till registret.\n"
+ "ENTER = Starta om datorn"
},
{
//ERROR_UPDATE_GEOID,
- "Setup could not set the geo id.\n"
- "ENTER = Reboot computer"
+ "Setup kunde inte stalla int 'geo id'.\n"
+ "ENTER = Starta om datorn"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
- "Not enough free space in the selected partition.\n"
- " * Press any key to continue.",
+ "Inte tillräckligt mycket fritt utrymme på den valda partitionen.\n"
+ " * Tryck valfri tangent för att fortsätta.",
NULL
},
{
MUI_STRING svSEStrings[] =
{
{STRING_PLEASEWAIT,
- " Please wait..."},
+ " Var vänlig vänta..."},
{STRING_INSTALLCREATEPARTITION,
- " ENTER = Install C = Create Partition F3 = Quit"},
+ " ENTER = Installera C = Skapa Partition F3 = Avsluta"},
{STRING_INSTALLDELETEPARTITION,
- " ENTER = Install D = Delete Partition F3 = Quit"},
+ " ENTER = Installera D = Ta bort Partition F3 = Avsluta"},
{STRING_PARTITIONSIZE,
- "Size of new partition:"},
+ "Storlek på den nya partitionen:"},
{STRING_CHOOSENEWPARTITION,
- "You have chosen to create a new partition on"},
+ "Du har valt att skapa en ny partiton på"},
{STRING_HDDSIZE,
- "Please enter the size of the new partition in megabytes."},
+ "Vänligen skriv in storleken av den nya partitionen i megabytes."},
{STRING_CREATEPARTITION,
- " ENTER = Create Partition ESC = Cancel F3 = Quit"},
+ " ENTER = Skapa Partition ESC = Avbryt F3 = Avsluta"},
{STRING_PARTFORMAT,
- "This Partition will be formatted next."},
+ "Denna Partition kommer att bli formaterad härnäst."},
{STRING_NONFORMATTEDPART,
- "You chose to install ReactOS on a new or unformatted Partition."},
+ "Du valde att installera ReactOS på en oformaterad partition."},
{STRING_INSTALLONPART,
- "Setup install ReactOS onto Partition"},
+ "Setup installerar ReactOS till Partitionen"},
{STRING_CHECKINGPART,
- "Setup is now checking the selected partition."},
+ "Setup undersöker nu den valda partitionen."},
{STRING_QUITCONTINUE,
- "F3= Quit ENTER = Continue"},
+ "F3= Avsluta ENTER = Fortsätt"},
{STRING_REBOOTCOMPUTER,
- "ENTER = Reboot computer"},
+ "ENTER = Starta om datorn"},
{STRING_TXTSETUPFAILED,
- "Setup failed to find the '%S' section\nin TXTSETUP.SIF.\n"},
+ "Setup misslyckades att hitta '%S' sektionen\ni TXTSETUP.SIF.\n"},
{STRING_COPYING,
- " Copying file: %S"},
+ " Kopierar fil: %S"},
{STRING_SETUPCOPYINGFILES,
- "Setup is copying files..."},
+ "Setup kopierar filer..."},
{STRING_REGHIVEUPDATE,
- " Updating registry hives..."},
+ " Uppdaterar registerdatafiler..."},
{STRING_IMPORTFILE,
- " Importing %S..."},
+ " Importerar %S..."},
{STRING_DISPLAYETTINGSUPDATE,
- " Updating display registry settings..."},
+ " Uppdaterar skärmregisterinställningar..."},
{STRING_LOCALESETTINGSUPDATE,
- " Updating locale settings..."},
+ " Uppdaterar lokala inställningar..."},
{STRING_KEYBOARDSETTINGSUPDATE,
- " Updating keyboard layout settings..."},
+ " Uppdaterar tangentbordslayoutinställningar..."},
{STRING_CODEPAGEINFOUPDATE,
- " Adding codepage information to registry..."},
+ " Lägger till information om codepage till registret..."},
{STRING_DONE,
- " Done..."},
+ " Färdigt..."},
{STRING_REBOOTCOMPUTER2,
- " ENTER = Reboot computer"},
+ " ENTER = Starta om datorn"},
{STRING_CONSOLEFAIL1,
- "Unable to open the console\n\n"},
+ "Det går inte öppna Konsollen\n\n"},
{STRING_CONSOLEFAIL2,
- "The most common cause of this is using an USB keyboard\n"},
+ "Den vanligaste orsaken till detta är att ett USB tangentbord används\n"},
{STRING_CONSOLEFAIL3,
- "USB keyboards are not fully supported yet\n"},
+ "USB tangentbord är itne helt stött än\n"},
{STRING_FORMATTINGDISK,
- "Setup is formatting your disk"},
+ "Setup formaterar din disk"},
{STRING_CHECKINGDISK,
- "Setup is checking your disk"},
+ "Setup underöker din disk"},
{STRING_FORMATDISK1,
- " Format partition as %S file system (quick format) "},
+ " Formaterar partition som %S filsystem (snabbformatering) "},
{STRING_FORMATDISK2,
- " Format partition as %S file system "},
+ " Formaterar partition som %S filsystem "},
{STRING_KEEPFORMAT,
- " Keep current file system (no changes) "},
+ " Behåll nuvarande filsystem (inga förändringar) "},
{STRING_HDINFOPARTCREATE,
- "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) on %wZ."},
+ "%I64u %s Hårddisk %lu (Port=%hu, Bus=%hu, Id=%hu) på %wZ."},
{STRING_HDDINFOUNK1,
- "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu)."},
+ "%I64u %s Hårddisk %lu (Port=%hu, Bus=%hu, Id=%hu)."},
{STRING_HDDINFOUNK2,
- " %c%c Type %lu %I64u %s"},
+ " %c%c Typ %lu %I64u %s"},
{STRING_HDINFOPARTDELETE,
- "on %I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) on %wZ."},
+ "on %I64u %s Hårddisk %lu (Port=%hu, Bus=%hu, Id=%hu) på %wZ."},
{STRING_HDDINFOUNK3,
- "on %I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu)."},
+ "on %I64u %s Hårddisk %lu (Port=%hu, Bus=%hu, Id=%hu)."},
{STRING_HDINFOPARTZEROED,
- "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."},
+ "Hårddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."},
{STRING_HDDINFOUNK4,
- "%c%c Type %lu %I64u %s"},
+ "%c%c Typ %lu %I64u %s"},
{STRING_HDINFOPARTEXISTS,
- "on Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."},
+ "på Hårddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."},
{STRING_HDDINFOUNK5,
- "%c%c Type %-3u %6lu %s"},
+ "%c%c Typ %-3u %6lu %s"},
{STRING_HDINFOPARTSELECT,
- "%6lu %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) on %S"},
+ "%6lu %s Hårddisk %lu (Port=%hu, Bus=%hu, Id=%hu) på %S"},
{STRING_HDDINFOUNK6,
- "%6lu %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu)"},
+ "%6lu %s Hårddisk %lu (Port=%hu, Bus=%hu, Id=%hu)"},
{STRING_NEWPARTITION,
- "Setup created a new partition on"},
+ "Setup skapade en ny partition på"},
{STRING_UNPSPACE,
- " Unpartitioned space %6lu %s"},
+ " Opartitionerat utrymme %6lu %s"},
{STRING_MAXSIZE,
"MB (max. %lu MB)"},
{STRING_UNFORMATTED,
- "New (Unformatted)"},
+ "Ny (Oformaterad)"},
{STRING_FORMATUNUSED,
- "Unused"},
+ "Oanvänt"},
{STRING_FORMATUNKNOWN,
- "Unknown"},
+ "Okänd"},
{STRING_KB,
"KB"},
{STRING_MB,
{STRING_GB,
"GB"},
{STRING_ADDKBLAYOUTS,
- "Adding keyboard layouts"},
+ "Lägger till tangentbordslayouter"},
{0, 0}
};
kernel32
ntdll)
-add_cab_target(vmwinst 1)
+add_cd_file(TARGET vmwinst DESTINATION reactos/system32 FOR all)
--- /dev/null
+/*
+ * PROJECT: ReactOS RAPPS
+ * FILE: \base\setup\vmwinst\lang\sv-SE.rc
+ * PURPOSE: Swedish resource file
+ * Translation: Jaix Bly
+ */
+LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
+
+IDD_WELCOMEPAGE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Installation av Videodrivrutiner"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ LTEXT "ReactOS Setup har upptäckt att du kör ReactOS i VMware(r).", -1, 117, 8, 140, 24
+ LTEXT "Om du vill installera VMware(r) SVGA drivrutin tryck 'Nästa', annars tryck 'Avbryt'.", -1, 117, 140, 140, 17
+END
+
+IDD_INSERT_VMWARE_TOOLS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Installation av Videodrivrutiner"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ LTEXT "ReactOS Setup kommer inte med VMware(r) SVGA drivrutiner.\n\nGå därför till 'VM' i din VMware(r) workstation menyrad och välj 'Installera VMware verktyg...'\n\n\nTryck 'Nästa' för att fortsätta eller 'Avbryt' för att hoppa över SVGA drivrutinsinstallation.",-1,25,25,225,85
+END
+
+IDD_INSTALLING_VMWARE_TOOLS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Installation av Videodrivrutiner"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ LTEXT "{STATUS}",IDC_INSTALLINGSTATUS,25,68,225,8
+ CONTROL "", IDC_INSTALLINGPROGRESS, "msctls_progress32", PBS_MARQUEE | WS_CHILD | WS_VISIBLE | WS_BORDER, 25, 80, 225, 8
+END
+
+IDD_CONFIG DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Installation av Videodrivrutiner"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ LTEXT "Installationen av VMware(r) SVGA drivrutin har lyckats. Vänligen välj önskad skärmupplösning:",-1,25,5,225,20
+ PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON
+ PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON
+ PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON
+ PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON
+ PUSHBUTTON "1280x960", 2240, 110, 30, 65, 15, BS_AUTORADIOBUTTON
+ PUSHBUTTON "1280x1024", 2304, 110, 45, 65, 15, BS_AUTORADIOBUTTON
+ PUSHBUTTON "1400x1050", 2450, 110, 60, 65, 15, BS_AUTORADIOBUTTON
+ PUSHBUTTON "1600x1200", 2800, 110, 75, 65, 15, BS_AUTORADIOBUTTON
+ PUSHBUTTON "1792x1344", 3136, 195, 30, 65, 15, BS_AUTORADIOBUTTON
+ PUSHBUTTON "1856x1392", 3248, 195, 45, 65, 15, BS_AUTORADIOBUTTON
+ PUSHBUTTON "1920x1440", 3360, 195, 60, 50, 15, BS_AUTORADIOBUTTON
+ LTEXT "Vänligen välj önskat färgdjup:", -1, 25, 93, 225, 12
+ COMBOBOX IDC_COLORQUALITY, 25, 105, 75, 80, CBS_DROPDOWNLIST | WS_TABSTOP
+END
+
+IDD_INSTALLATION_FAILED DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Installation av Videodrivrutiner"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ LTEXT "ReactOS Setup lyckades inte installera VMware(r) SVGA drivrutin.\n\n\nTryck 'Slutför' för att fortsätta installationsprosessen.",-1,25,25,225,85
+END
+
+IDD_CHOOSEACTION DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Installation av Videodrivrutiner"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ LTEXT "VMware(r) SVGA drivrutin är redan installerad.\n\nVänligen välj vad du vill göra:",-1,25,5,225,30
+ PUSHBUTTON "Konfigurera skärminställingar", IDC_CONFIGSETTINGS, 25, 40, 200, 15, BS_AUTORADIOBUTTON
+ PUSHBUTTON "Använd en annan grafikdrivrutin", IDC_USEOTHERDRIVER, 25, 55, 200, 15, BS_AUTORADIOBUTTON
+ PUSHBUTTON "Avinstallera VMware(r) SVGA drivrutin", IDC_UNINSTALL, 25, 70, 200, 15, BS_AUTORADIOBUTTON
+ LTEXT "Tryck 'Nästa' för att fortsätta eller 'Avbryt' för att avsluta guiden.", -1, 25, 93, 225, 12
+END
+
+IDD_SELECTDRIVER DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Installation av Videodrivrutiner"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ LTEXT "Vänligen välj Grafikdrivrutin som du vill använda:",-1,25,25,225,15
+ PUSHBUTTON "ReactOS VGA drivrutin", IDC_VGA, 25, 40, 225, 15, BS_AUTORADIOBUTTON
+ PUSHBUTTON "ReactOS VBE drivrutin (SVGA)", IDC_VBE, 25, 55, 225, 15, BS_AUTORADIOBUTTON
+ LTEXT "Tryck 'Slutför' för att avsluta eller 'Avbryt' för att avsluta installationen utan ändringar.", -1, 25, 93, 225, 20
+END
+
+IDD_DOUNINSTALL DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Installation av Videodrivrutiner"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ LTEXT "ReactOS Setup kommer att avinstallera din VMware(r) SVGA drivrutin!!!\n\n\nTryck 'Slutför' för att avinstallere drivrutinen eller 'Avbryt' for att lämna det som det är.",-1,25,25,225,85
+END
+
+STRINGTABLE
+BEGIN
+ IDS_WIZARD_NAME "VMware(r) upptäckt"
+ IDS_FAILEDTOLOCATEDRIVERS "ReactOS Setup kunde inte hitta installationsfilerna.\nVänligen försäkra dig om att VMware(r) verktygs CD-ROM är monterad."
+ IDS_FAILEDTOCOPYFILES "ReactOS Setup misslyckades att kopiere nödvändiga filer.\nVänligen försäkra dig om att VMware(r) verktygs CD-ROM är monterad.\n"
+ IDS_FAILEDTOACTIVATEDRIVER "Misslyckades att aktivera VMware(r) SVGA drivrutin!"
+ IDS_FAILEDTOSELVGADRIVER "Misslyckades att aktivera ReactOS VGA drivrutin!"
+ IDS_FAILEDTOSELVBEDRIVER "Misslyckades att aktivera ReactOS VBE drivrutin!"
+ IDS_UNINSTNOTICE "VMware(r) SVGA drivrutins filer har inte ännu blivit raderade.\nVänligen radera dem manuellt efter att systemet startat om."
+ IDS_FAILEDTOADDREGENTRIES "Misslyckes att skapa registerinställninar för VMware(r) SVGA drivrutin!"
+END
+
+STRINGTABLE
+BEGIN
+ 10001 "Lägsta (8BPP)"
+ 10002 "Medel (16BPP)"
+ 10003 "Högsta (32BPP)"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_SEARCHINGFORCDROM "Söker efter VMware(r) Vertygs CD-ROM..."
+ IDS_COPYINGFILES "Kopierar filer..."
+ IDS_ENABLINGDRIVER "Aktiverar VMware(r) SVGA drivrutiner..."
+END
+
+STRINGTABLE
+BEGIN
+ IDD_INSERT_VMWARE_TOOLSTITLE "Guide för installation av VMware (r) SVGA drivrutiner"
+ IDD_INSERT_VMWARE_TOOLSSUBTITLE "Vänligen sätt in VMware verktygs CD-Rom."
+ IDD_INSTALLING_VMWARE_TOOLSTITLE "Guide för installation av VMware (r) SVGA drivrutin"
+ IDD_INSTALLING_VMWARE_TOOLSSUBTITLE "Söker och kopierar VMware (r) SVGA drivrutin."
+ IDD_CONFIGTITLE "Guide för installation av VMware (r) SVGA drivrutin"
+ IDD_CONFIGSUBTITLE "Välj din favoritskärmsupplösning."
+ IDD_INSTALLATION_FAILEDTITLE "Guide för installation av VMware (r) SVGA drivrutin"
+ IDD_INSTALLATION_FAILEDSUBTITLE "VMware (r) SVGA drivrutinsinstallation misslyckades."
+ IDD_CHOOSEACTIONTITLE "Guide för installation av VMware (r) SVGA drivrutin"
+ IDD_CHOOSEACTIONSUBTITLE "Välj vad du vill göra."
+ IDD_SELECTDRIVERTITLE "Guide för installation av VMware (r) SVGA drivrutin"
+ IDD_SELECTDRIVERSUBTITLE "Välj en drivrutin."
+ IDD_DOUNINSTALLTITLE "Guide för installation av VMware (r) SVGA drivrutin"
+ IDD_DOUNINSTALLSUBTITLE "Avinstallerar drivrutinen."
+END
#include "lang/hu-HU.rc"
#include "lang/id-ID.rc"
#include "lang/it-IT.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/lt-LT.rc"
#include "lang/no-NO.rc"
#include "lang/pl-PL.rc"
#include "lang/ru-RU.rc"
+#include "lang/sv-SE.rc"
#include "lang/uk-UA.rc"
#include "lang/zh-CN.rc"
set_module_type(welcome win32gui)
add_importlibs(welcome gdi32 user32 msvcrt kernel32 ntdll)
-add_minicd_target(welcome reactos)
+add_cd_file(TARGET welcome DESTINATION reactos NO_CAB FOR bootcd)
#include "lang/hu-HU.rc"
#include "lang/id-ID.rc"
#include "lang/it-IT.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/lt-LT.rc"
#include "lang/no-NO.rc"
#include "lang/nl-NL.rc"
add_pch(cmd ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h SOURCE)
set_module_type(cmd win32cui)
add_importlibs(cmd advapi32 user32 msvcrt kernel32 ntdll)
-add_cab_target(cmd 1)
+add_cd_file(TARGET cmd DESTINATION reactos/system32 FOR all)
--- /dev/null
+LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
+STRINGTABLE DISCARDABLE
+BEGIN
+
+STRING_ASSOC_HELP, "Ändra assossierad filextention.\n\n\
+assoc [.ext[=[FileType]]]\n\
+\n\
+assoc (print all associations)\n\
+assoc .ext (print specific association)\n\
+assoc .ext= (remove specific association)\n\
+assoc .ext=FileType (add new association)\n"
+
+STRING_ATTRIB_HELP, "Visar eller ändrar filattributen.\n\n\
+ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] fil ...\n\
+ [/S [/D]]\n\n\
+ + Sätter ett attribut\n\
+ - Rensar ett attribut\n\
+ R Attribut: Skrivskyddad.\n\
+ A Attribut: Arkiverad.\n\
+ S Attribut: System.\n\
+ H Attribut: Dold.\n\
+ /S Behandlar matchande filer i den aktuella mappen\n\
+ och alla undermappar.\n\
+ /D Bearbetar även mappar.\n\n\
+Skriv ATTRIB utan parametrar för att visa attributten för alla filer.\n"
+
+STRING_ALIAS_HELP, "Sätter, tar bort eller visar alias.\n\n\
+ALIAS [alias=[Kommando]]\n\n\
+ alias Namn på ett alias.\n\
+ Kommando Text som skall erstättas av ett alias.\n\n\
+för att lista alla alias:\n\
+ ALIAS\n\n\
+För att sätta ett nytt eller ändra ett befintligt alias:\n\
+ ALIAS da=dir a:\n\n\
+För att ta bort ett alias från listan:\n\
+ kortnamn da="
+
+STRING_BEEP_HELP, "Skickar en ljudsignal genom högtalaren.\n\nPIP\n"
+
+STRING_CALL_HELP, "Kallar ett batchprogram från ett annat.\n\n\
+CALL [enhet:][mapp]filnamn [batch-parameter]\n\n\
+ batch-parameter Specificerar en kommandoradsinformation som batchprogrammet \n\
+ behöver."
+
+STRING_CD_HELP, "Visar namnet på, eller ändrar aktuell mapp\n\n\
+CHDIR [/D][enhet:][mapp]\n\
+CHDIR[..|.]\n\
+CD [/D][enhet:][mapp]\n\
+CD[..|.]\n\n\
+ .. överordnad mapp\n\
+ . aktuell mapp\n\
+ /D Vill ändra aktuell enhet och aktuell mapp.\n\n\
+Skriv CD enhet: för att visa aktuell mapp på specificerad enhet.\n\
+Skriv CD uten parametere för att visa aktuell enhet och mapp.\n"
+
+STRING_CHCP_HELP, "Visar eller väljer aktiv teckentabell.\n\n\
+CHCP [nnn]\n\n\
+ nnn Anger nummer på teckentabell.\n\n\
+Skriv CHCP utan parametrar för att visa aktiv teckentabellnummer.\n"
+
+STRING_CHOICE_HELP, "Väntar på att användaren skall ange ett av alternativen.\n\n\
+CHOICE [/C[:]val][/N][/S][/T[:]c,nn][text]\n\n\
+ /C[:]Val Anger lista med alternativ. Standard är JN.\n\
+ /N Visa inte alternativen och ? vid slutet av frågan.\n\
+ /S Behandle valgt alternativ med skiftlägeskänslighet.\n\
+ /T[:]c,nn Standardval sätts till c efter nn sekunder.\n\
+ text Textsträng som visas.\n\n\
+ERRORLEVEL sätts till nummer för knappen användaren väljer.\n"
+
+STRING_CLS_HELP, "Tömmer skärmen.\n\nCLS\n"
+
+STRING_CMD_HELP1, "\nInterna kommandon som är tillgängliga:\n"
+
+STRING_CMD_HELP2, "\nFunksjoner som är tillgängliga:"
+
+STRING_CMD_HELP3," [alias:er]"
+
+STRING_CMD_HELP4," [historik]"
+
+STRING_CMD_HELP5," [unix filnamnsavslutning]"
+
+STRING_CMD_HELP6," [mapplista]"
+
+STRING_CMD_HELP7," [omadressering och datakanaler]"
+
+STRING_CMD_HELP8, "Start ett ny instans av ReactOS kommandotolk.\n\n\
+CMD [/[C|K] kommando][/P][/Q][/T:bf]\n\n\
+ /C kommando Kör angivet kommando och avslutar.\n\
+ /K kommando Kör angivet kommando men avslutar inte.\n\
+ /P CMD körs permanent och starter autoexec.bat\n\
+ (kan inte avsluttes).\n\
+ /T:bf Ställer in bakgrunn/forgrunn färg (se COLOR kommando).\n"
+
+STRING_COLOR_HELP1, "Ställer in standard forgrunns- och bakgrunnsfarger.\n\n\
+COLOR [attr [/-F]] \n\n\
+ attr Anger fargeattributter for konsollteksten\n\
+ /-F Fyller inte blank plass med fargeattributter\n\n\
+Det finns tre sätt att ange färgerna:\n\
+1) [bright] namn på [bright] namn (bara de tre första bokstäverna krävs)\n\
+2) decimal på decimal\n\
+3) to hexadecimala siffror\n\n\
+Färgerna är:\n\
+dec hex namn dec hex namn\n\
+0 0 Svart 8 8 Grå(ljus Svart)\n\
+1 1 Blå 9 9 Ljus Blå\n\
+2 2 Grön 10 A Ljus Grönn\n\
+3 3 Cyan 11 B Ljus Cyan\n\
+4 4 Röd 12 C Ljus Röd\n\
+5 5 Magenta 13 D Ljus Magenta\n\
+6 6 Gul 14 E Ljus Gult\n\
+7 7 Vit 15 F Ljus Vit\n"
+
+STRING_COPY_HELP1, "Vill du erstätta %s (Ja/Nej/Alla)? "
+
+STRING_COPY_HELP2, "Kopierar en eller flera filer till annan plats.\n\n\
+COPY [/V][/Y|/-Y][/A|/B] källa [/A|/B]\n\
+ [+ källa [/A|/B] [+ ...]] [mål [/A|/B]]\n\n\
+ källa Anger filen eller filerna som kopieras.\n\
+ /A Anger att filen är en ASCII-textfil.\n\
+ /B Anger att filen är en binär-fil.\n\
+ mål Anger mappen och/eller filnamn för den nya filen/filerna.\n\
+ /V Kontrollera att nya filer är korrekt skrivna.\n\
+ /Y Undertrycker frågor om att godkänna om du önskar att skriva över\n\
+ befintlig destinationsfil.\n\
+ /-Y Frågar alltid om du vill skriva över\n\
+ befintlig destinationsfil.\n\n\
+Växeln /Y kan läggas in i COPYCMD miljövariabel.\n\
+...\n"
+
+STRING_DATE_HELP1, "\nSkriv in nytt datum (mm%cdd%cyyyy): "
+
+STRING_DATE_HELP2, "\nSkriv in nytt datum (dd%cmm%cyyyy): "
+
+STRING_DATE_HELP3, "\nSkriv in nytt datum (yyyy%cmm%cdd): "
+
+STRING_DATE_HELP4, "Visa eller ändra datumet.\n\n\
+DATE [/T][datum]\n\n\
+ /T Endast visa\n\n\
+Skriv DATE utan parametrar för att visa aktuella datum och\n\
+fråga om nytt datum. Tryck ENTER för att behålla samma datum.\n"
+
+STRING_DEL_HELP1, "Radera en eller flera filer.\n\n\
+DEL [/N /P /T /Q /S /W /Y /Z /A[[:]attribut]] fil ...\n\
+DELETE [/N /P /T /Q /S /W /Y /Z /A[[:]attribut]] fil ...\n\
+ERASE [/N /P /T /Q /S /W /Y /Z /A[[:]attribut]] fil ...\n\n\
+ fil Anger fil(er) for radering.\n\n\
+ /N Ingenting.\n\
+ /P Fråga innan varje fil raderas.\n\
+ /T Total. Visar totalt antal raderade filer och frigjort diskutrymme.\n\
+ /Q Tyst läge, tar bort filer utan att fråga.\n\
+ /W Säker borttagning. Skriv över fil med slumpmässig data före borttagning.\n\
+ /Y Ja. Radera även *.* utan att fråga.\n\
+ /F Framtvinga radering av dolda, skrivskyddade och systemfiler.\n\
+ /S Submappar, radera filer från alla undermappar\n\
+ /A Välj filer som skall raderas basert på filattribut.\n\
+ attributter\n\
+ R Skrivskyddade filer\n\
+ S System filer\n\
+ A Arkiv filer\n\
+ H Dolda filer\n\
+ - prefiks som betyder INTE. (f.eks -R)\n"
+
+STRING_DEL_HELP2, "Alla filer i mappen kommer att bli raderade!\nÄr du säker (J/N)?"
+STRING_DEL_HELP3, " %lu fil raderade\n"
+STRING_DEL_HELP4, " %lu filer raderade\n"
+
+STRING_DELAY_HELP, "paus i n sekunder eller mikrosekunder\n\
+DELAY [/m]n\n\n\
+ /m anger at n är mikrosekunder\n\
+ annars är n sekunder\n"
+
+STRING_DIR_HELP1, "DIR [enhet:][mapp][filnamn] [/A[[:]attribut]] [/B] [/C] [/D] [/L] [/N]\n\
+ [/O[[:]sortering]] [/P] [/Q] [/S] [/T[[:]tidsfält]] [/W] [/X] [/4]\n\n\
+ [enhet:][mapp][filnamn]\n\
+ Anger enhet, mapp, och/eller filer som skall listes.\n\n\
+ /A Vis filer ved att ange attributter.\n\
+ attribut D mappar R Skrivskyddade filer\n\
+ H Dolda filer A Filer klara för arkivering\n\
+ S System filer - Prefiks som betyder INTE\n\
+ /B Använder rent filnamnformat (utan överskrift och summering).\n\
+ /C Visar tusenavskiljare i filstorleken. Dette är standard-\n\
+ inställningen. Avnänd /-C för att deaktivera visning av skiljetecken.\n\
+ /D Samme som fullt listformat, men filer sorteras i kolumner.\n\
+ /L Använder små bokstäver.\n\
+ /N Långt listformat där filenamnen vises längst åt höger.\n\
+ /O Lista efter filer i sorterad ordning.\n\
+ sortering N Efter namn (alfabetisk) S Efter storlek (minst först)\n\
+ E Efter filändelse (alfabetisk) D Efter datum/tid (äldst först)\n\
+ G Gruppera mappar först - Prefix för omvänd ordning\n\
+ /P Pausa efter varje hel skärmbild.\n\
+ /Q Viser vem som äger filen.\n\
+ /S Viser alla filer i angiven mapp och alla undermappar.\n\
+ /T Kontrollerar vilket tidsfält som visas eller blir använt för sortering\n\
+ timefelt C Skapelse \n\
+ A Senast läst\n\
+ W Senast skriven\n\
+ /W Använd brett listformat.\n\
+ /X Visar kort namn (8+3) genererat för långa filnamn.\n\
+ Formatet är som för /N med det korta namnet\n\
+ före det långa namnet. Om det inte finns något kort namn blir tomt namn\n\
+ på den platsen.\n\
+ /4 Visar fyresiffriga årtal\n\n\
+Växlar kan ställas in på förhand i DIRCMD miljövariabel. Åtsidosätt\n\
+förinställda växlar med ett bindestreck (-) före, till exempel, /-W.\n"
+
+STRING_DIR_HELP2, " Volumen i enhet %c är %s\n"
+STRING_DIR_HELP3, " Volumet i enhet %c är utan namn.\n"
+STRING_DIR_HELP4, " Volymens serienummer är %04X-%04X\n"
+STRING_DIR_HELP5, "\n Totalt filer listet:\n%16i fil(är)% 14s byte\n"
+STRING_DIR_HELP6, "%16i mapp(ar)% 15s byte\n"
+STRING_DIR_HELP7, "\n mapp av %s\n\n"
+STRING_DIR_HELP8, "%16i fil(er)% 14s byte\n"
+
+STRING_DIRSTACK_HELP1, "Sparar aktuell mapp for användning av POPD kommandot, och\n\
+ändrar därefter till angiven mapp.\n\n\
+PUSHD [mapp | ..]\n\n\
+ mapp ange mapp det ändra till.\n"
+
+STRING_DIRSTACK_HELP2, "Ändra till mapp som lagrats med PUSHD kommandot.\n\nPOPD"
+
+STRING_DIRSTACK_HELP3, "Skriver ut innehållet av en mapplista.\n\nDIRS"
+
+STRING_DIRSTACK_HELP4, "mapplistan är tom"
+
+STRING_ECHO_HELP1, "Visar meddelanden utan enter och radsprång.\n\n\
+ ECHOS meddelande"
+
+STRING_ECHO_HELP2, "Visar ett meddelande skrivet till mottagare av felmeddelanden.\n\n\
+ ECHOERR meddelande\n\
+ ECHOERR. skriver en tom rad"
+
+STRING_ECHO_HELP3, "Skriver en meddelande till standardmottagaren av felmeddelanden utan enter och radsprång.\n\n\
+ ECHOSERR meddelande"
+
+STRING_ECHO_HELP4, "Visar ett meddelande eller växlar kommandot echo på eller av.\n\n\
+ ECHO [ON | OFF]\n\
+ ECHO [meddelande]\n\
+ ECHO. skriv en tom rad\n\n\
+Skriv ECHO utan parametar för att visa aktuell ECHO inställning."
+
+STRING_ECHO_HELP5, "ECHO är %s\n"
+
+STRING_EXIT_HELP, "Avsluta kommandotolken (cmd.exe).\n\nEXIT [/b] [ExitCode]\n\n\
+ /B Avslutt bara en batchfil. \n\
+ Om det körs utan en batch filkommer det avslutta cmd.exe\n\
+ ExitCode Detta värdet kommer att skickas till ERRORLEVEL vid avslutning\n"
+
+STRING_FOR_HELP1, "Kör ett angivet kommando för varje fil i en grupp med filer\n\n\
+FOR %variabel IN (grupp) DO kommando [parametrar]\n\n\
+ %variable Anger en utbytbar parameter (en enda bokstav).\n\
+ (grupp) Anger en grupp med en eller flera filer. Jokertecken kan användas.\n\
+ kommando Anger kommandot som skall användas för varje enskild fil.\n\
+ parametrar Anger parametrarna eller växlarna för angivet kommando.\n\n\
+för att bruke FOR kommando i en batchfil, ange %%variabel istället för\n\
+%variabel.\n"
+
+STRING_FREE_HELP1, "\nVolum i enhet %s är %-11s\n\
+ Serienummret är %s\n\
+ %16s byte total lagringsutrymme\n\
+ %16s byte använt\n\
+ %16s byte ledigt\n"
+
+STRING_FREE_HELP2, "Visa enhetsinformation.\n\nFREE [enhet: ...]\n"
+
+STRING_IF_HELP1, "Utför villkorsstyrd bearbetning i batchprogram.\n\n\
+ IF [NOT] ERRORLEVEL nummer kommando\n\
+ IF [NOT] sträng1==sträng2 kommando\n\
+ IF [NOT] EXIST filnamn kommando\n\
+ IF [NOT] DEFINED variabel kommando\n\n\
+NOT Anger att CMD skall fortsätta kommando bara om\n\
+ villkoret är falskt\n\
+ERRORLEVEL nummer Anger sant villkor om förra programkörningen returnerade\n\
+ en avslutningskod större än eller lika med nummret angivet.\n\
+kommando Anger vilket kommando som skall utföres då villkoret uppfylls.\n\
+sträng1==sträng2 Anger ett uppfyllt villkor om textsträngarna är lika\n\
+EXIST filnamn Anger ett uppfyllt villkor om angivet filnamn existerar.\n\
+DEFINED variabel Anger ett uppfyllt villkor om angiven variabel är\n\
+ definerad.\n"
+
+STRING_GOTO_HELP1, "Dirigerar CMD till en namngiven etikett i ett batchprogram.\n\n\
+GOTO etikett\n\n\
+ etikett Anger en text sträng använt i ett batchprogram.\n\n\
+En etikett skapas på en egen rad genom att skriva kolon följt av namn på etiketten."
+
+STRING_LABEL_HELP1, "Skapar, tar bort eller ändrar etikett på enhet.\n\nLABEL [enhet:][etikett]\n"
+
+STRING_LABEL_HELP2, "Volymen i enhet %c: är %s\n"
+STRING_LABEL_HELP3, "Volymen i enhet %c: är utan namn\n"
+STRING_LABEL_HELP4, "Volymens serienummer är %04X-%04X\n"
+STRING_LABEL_HELP5, "Volymnamn (11 tecken, Enter = inget namn)? "
+
+STRING_LOCALE_HELP1, "aktuell tid är"
+
+STRING_MKDIR_HELP, "Skapar en mapp.\n\n\
+MKDIR [enhet:]mapp\nMD [enhet:]mapp"
+
+STRING_MKLINK_HELP, "Skapar en filesystemslänk.\n\n\
+MKLINK [/D | /H | /J] linknamn mål\n\n\
+ /D Anger att länkens mål är en mapp.\n\
+ /H Skapar en hårdlänk i stället för en symbolisk länk.\n\
+ /J Skapar en knutpunkt för en mapp sk. junction.\n\n\
+Om varken /H eller /J är angivna kommer en symbolisk länk att skapas."
+
+STRING_MEMMORY_HELP1, "Visar mängd systemminne.\n\nMEMORY"
+
+STRING_MEMMORY_HELP2, "\n %12s%% använt minne.\n\n\
+ %13s byte totalt fysisk RAM-minne.\n\
+ %13s byte tillgängligt fysisk RAM-minne.\n\n\
+ %13s byte total sidväxlingsfil.\n\
+ %13s byte tillgänglig sidväxlingsfil.\n\n\
+ %13s byte totalt virtuell minne.\n\
+ %13s byte tilgängeligt virtuellt minne.\n"
+
+STRING_MISC_HELP1, "Tryck en knapp för att fortsätta...\n"
+
+STRING_MOVE_HELP1, "Skriv över %s (Ja/Nej/Alla)? "
+
+STRING_MOVE_HELP2, "Flyttar filer, och byter namn på filer och mappar.\n\n\
+för att flytte en eller flera filer:\n\
+MOVE [/N][enhet:][mapp]filnamn1[,...] destination\n\n\
+för att ändra namn på en mapp:\n\
+MOVE [/N][enhet:][mapp]mappnamn1 mappnamn2\n\n\
+ [enhet:][mapp]filnamn1 Anger placering och namn på fil\n\
+ eller filer du önsker att flytta.\n\
+ /N Ingenting. Gör allt utom att flytta filer eller mappar.\n\n\
+aktuell begränsningar:\n\
+ - Du kan inte flytta en fil eller mapp från en enhet till en annan.\n"
+
+STRING_MSGBOX_HELP, "vis en meldingsboks och returner brukers svar\n\n\
+MSGBOX type ['tittel'] melding\n\n\
+type knapp vises\n\
+ mulige verdier är: OK, OKCANCEL,\n\
+ YESNO, YESNOCANCEL\n\
+tittel tittel på meldingsboks\n\
+melding text som vises i meldingsboks\n\n\n\
+ERRORLEVEL settes avhengig av hvilken knapp som trykkes:\n\n\
+JA : 10 | NEI : 11\n\
+OK : 10 | AVBRYT : 12\n"
+
+STRING_PATH_HELP1, "Viser eller setter en søkesti for kjørbare filer.\n\n\
+PATH [[enhet:]mapp[;...]]\nPATH ;\n\n\
+Skriv PATH; för att tømme alle søkemappar inställninar och angi at kommandoskallet\n\
+kun skal søke aktuell mapp.\n\
+Skriv PATH uten parameter för att visa aktuell søkesti.\n"
+
+STRING_PROMPT_HELP1, "Ändra kommandoledetekst.\n\n\
+PROMPT [text]\n\n\
+ text Anger en nytt kommandoledetekst.\n\n\
+Ledeteksten kan bli satt sammen av normale tegn och følgende spesielle koder:\n\n\
+ $A & (och-tegnet)\n\
+ $B | (loddrett strek)\n\
+ $C ( (venstreparentes)\n\
+ $D aktuell dato\n\
+ $E Escape-kode (ASCII kode 27)\n\
+ $F ) (Høyreparentes)\n\
+ $G > (større-enn symbol)\n\
+ $H Tilbake (sletter forrige tegn)\n\
+ $L < (mindre-enn symbol)\n\
+ $N aktuell enhet\n\
+ $P aktuell enhet och mapp\n\
+ $Q = (likhetstegn)\n\
+ $T aktuell klokkeslett\n\
+ $V Versjonsnummer for ReactOS\n\
+ $_ Retur och linjeskift\n\
+ $$ $ (dollar tegn)\n"
+
+STRING_PAUSE_HELP1, "Stoppar eksekvering av satsvis fil och vis følgende melding:\n\
+'Tryck valfri tangent för att fortsette...' eller en användaren definert melding.\n\n\
+PAUSE [melding]"
+
+STRING_PROMPT_HELP2, " $+ Vis aktuell dybde av mappstakken"
+
+STRING_PROMPT_HELP3, "\nSkriv PROMPT uten parameter för att resette ledeteksten."
+
+STRING_REM_HELP, "Start en kommentarlinje i en satsvis fil.\n\nREM [Kommentar]"
+
+STRING_RMDIR_HELP, "Flytter en mapp.\n\n\
+RMDIR [enhet:]mapp\nRD [enhet:]mapp\n\
+/S Sletter alle filer och mappar innenfor målet\n\
+/Q Inte spør før sletting.\n"
+STRING_RMDIR_HELP2, "mappn är inte tom!\n"
+
+STRING_REN_HELP1, "Ändra namn på fil/mapp eller filer/mappar.\n\n\
+ENDRE NAVN [/E /N /P /Q /S /T] gammelt_namn ... nytt_namn\n\
+REN [/E /N /P /Q /S /T] gammelt_namn ... nytt_namn\n\n\
+ /E Ingen feilmeldinger.\n\
+ /N Ingenting.\n\
+ /P spørsmål om godkjenning før endring av namn på hver fil.\n\
+ (Inte implementert enda!)\n\
+ /Q Stille.\n\
+ /S Ändra namn på undermapp.\n\
+ /T Vis totalt antall endrede filer.\n\n\
+NB; du kan inte ange en ny destinasjon for filen/mappen. Bruk\n\
+MOVE kommando for det formålet.\n"
+
+STRING_REN_HELP2, " %lu fil endret namn\n"
+
+STRING_REN_HELP3, " %lu filer endret namn\n"
+
+STRING_REPLACE_HELP1, "Replaces files.\n\n\
+REPLACE [drive1:][path1]filename [drive2:][path2] [/A] [/P] [/R] [/W]\n\
+REPLACE [drive1:][path1]filename [drive2:][path2] [/P] [/R] [/S] [/W] [/U]\n\n\
+ [drive1:][path1]filename Specifies the source file or files.\n\
+ [drive2:][path2] Specifies the directory where files are to be\n\
+ replaced.\n\
+ /A Adds new files to destination directory. Cannot\n\
+ use with /S or /U switches.\n\
+ /P Prompts for confirmation before replacing a file or\n\
+ adding a source file.\n\
+ /R Replaces read-only files as well as unprotected\n\
+ files.\n\
+ /S Replaces files in all subdirectories of the\n\
+ destination directory. Cannot use with the /A\n\
+ switch.\n\
+ /W Waits for you to insert a disk before beginning.\n\
+ /U Replaces (updates) only files that are older than\n\
+ source files. Cannot use with the /A switch.\n"
+
+STRING_REPLACE_HELP2, "Source path required\n"
+
+STRING_REPLACE_HELP3, "No files replaced\n"
+
+STRING_REPLACE_HELP4, "%lu file(s) replaced\n"
+
+STRING_REPLACE_HELP5, "Replacing %s\n"
+
+STRING_REPLACE_HELP6, "Replace %s\n"
+
+STRING_REPLACE_HELP7, "No files added\n"
+
+STRING_REPLACE_HELP8, "%lu file(s) added\n"
+
+STRING_REPLACE_HELP9, "Add %s (Y/N) "
+
+STRING_REPLACE_HELP10, "Replace %s (Y/N) "
+
+STRING_REPLACE_HELP11, "Adding %s\n"
+
+
+STRING_SHIFT_HELP, "Ändra posisjon for erstattelig parameter i et satsvis fil.\n\n\
+SHIFT [NED]"
+
+STRING_SCREEN_HELP, "flytt markør och potensielt skriv ut text\n\n\
+SCREEN rad kol [text]\n\n\
+ rad rad markør flyttes til\n\
+ kol kolonne markør flyttes til"
+
+STRING_SET_HELP, "Vis, sett, eller fjern miljøvariabel.\n\n\
+SET [variabel[=][streng]]\n\n\
+ variabel Anger miljøvariabel namn.\n\
+ string Anger en serie av tegn til bestemme variabel.\n\n\
+Skriv SET uten parameter för att visa aktuell miljøvariabler.\n"
+
+STRING_START_HELP1, "Start en kommando.\n\n\
+START kommando\n\n\
+ kommando Anger kommando för att kjøre.\n\n\
+NB; for øyeblikket blir alle kommandoer startet asynkront.\n"
+
+STRING_TITLE_HELP, "Velg vindustittel for kommandotolkvindu.\n\n\
+TITLE [streng]\n\n\
+streng Anger tittel for kommandotolkvindu.\n"
+
+STRING_TIME_HELP1, "Vis eller sett system tid.\n\n\
+TIME [/T][tid]\n\n\
+ /T vis bare\n\n\
+Skriv TIME uten parametere för att visa aktuell tidsinställninar och et\n\
+spørsmål om en ny en. Tryck ENTER för att beholde samme tid.\n"
+
+STRING_TIME_HELP2, "Velg ny tid: "
+
+STRING_TIMER_HELP1, "Forløpt %d msecs\n"
+
+STRING_TIMER_HELP2, "Forløpt %02d%c%02d%c%02d%c%02d\n"
+
+STRING_TIMER_HELP3, "Tillater bruk av inntil ti stoppeklokker.\n\n\
+TIMER [ON|OFF] [/S] [/n] [/Fn]\n\n\
+ ON start stoppeklokke\n\
+ OFF Stoppar stoppeklokke\n\
+ /S Del tiden. Retur stoppeklokke\n\
+ tid uten att ändra dens verdi\n\
+ /n Anger stoppeklokke nummer.\n\
+ Stoppeklokke är tilgjengelig fra 0 til 9\n\
+ Hvis inte det är spesifisert är standard lik 1\n\
+ /Fn Format for utgående\n\
+ n kan bli:\n\
+ 0 mikrosekunder\n\
+ 1 hh%cmm%css%cdd\n\n\
+hvis hverken ON, OFF eller /S är spesifisert\n\
+vil status for stoppeklokken veksles.\n\n"
+
+STRING_TYPE_HELP1, "Vis innholdet av tekstfiler.\n\nSkriv [enhet:][mapp]filnamn \n\
+ /P Vis en full skjerm om gangen.\n"
+
+STRING_VERIFY_HELP1, "Denne kommandoen är bare en etterlikning!!\n\
+Anger om det skal bekreftes at dine filer är skrevet korrekt til disk \n\n\
+VERIFY [ON | OFF]\n\n\
+Skriv VERIFY uten parametre för att visa aktuell VERIFY inställninar.\n"
+
+STRING_VERIFY_HELP2, "VERIFY är %s.\n"
+
+STRING_VERIFY_HELP3, "Må ange ON eller OFF."
+
+STRING_VERSION_HELP1, "Vis Reactos versjonen\n\n\
+VER [/C][/R][/W]\n\n\
+ /C Vis anerkjennelse.\n\
+ /R Vis videreformidlingsinformasjon.\n\
+ /W Vis garantiinformasjon."
+
+STRING_VERSION_HELP2, " kommer med ABSOLUTT INGEN GARANTI; for detaljer\n\
+Skriv: `ver /w'. Dette är gratis programvare, och du är velkommen til videreformidle\n\
+det under gitte betingelser; Skriv `ver /r' for detaljer. Skriv `ver /c' for en\n\
+liste av anerkjennelser."
+
+STRING_VERSION_HELP3, "\n Dette programet är fordelt i håpet som det vil bli brukbar,\n\
+ men UTEN NOEN GARANTI; uten engang antydet garantid for \n\
+ SALGBARHET eller BRUKBARHET FOR NOE MÅL. Se \n\
+ GNU Generell Publikum Lisens for flere detaljer."
+
+STRING_VERSION_HELP4, "\n Dette programmet är gratis programvare; du kan videre-\n\
+ formidle det och/eller modifisere det under betingelser av Generell Publikum \n\
+ Lisens som utgivelses av Free Software Foundation; enten version 2 av \n\
+ Lisens, eller (ved din mulighet) andre nyere version.\n"
+
+STRING_VERSION_HELP5, "\nSend bug rapporter til <ros-dev@reactos.org>.\n\
+oppdateringer är tilgjengelig her: http://www.reactos.org"
+
+STRING_VERSION_HELP6, "\nFreeDOS version skrevet av:\n"
+
+STRING_VERSION_HELP7, "\nReactOS version skrevet av:\n"
+
+STRING_VOL_HELP1, " Volumet i enhet %c är %s\n"
+STRING_VOL_HELP2, " Volumet i enhet %c har ingen namn.\n"
+STRING_VOL_HELP3, " Volumet Serie nummer är %04X-%04X\n"
+STRING_VOL_HELP4, "Vis disk volumet merke och serie nummer, hvis det eksisterer.\n\nVOL [enhet:]"
+
+STRING_WINDOW_HELP1, "ändra konsoll vindu aspekt\n\n\
+WINDOW [/POS[=]venstre,topp,bredde,høyde]\n\
+ [MINI|MAKS|GJENOPPRETT] ['tittel']\n\n\
+/POS ange vindusposisjon och størrelse\n\
+MINI minimer vinduet\n\
+MAKS maksimer vinduet\n\
+GJENOPPRETT gjenopprett vinduet"
+
+STRING_WINDOW_HELP2, "ändra konsoll vindu aspekt\n\n\
+ACTIVATE 'window' [/POS[=]venstre,topp,bredde,høyde]\n\
+ [MINI|MAKS|GJENOPPRETT] ['tittel']\n\n\
+vindu tittel av vindu på stad fullføre handlinger\n\
+/POS ange vindu plass och størrelse\n\
+MIN minimer vinduet\n\
+MAX maksimer vinduet\n\
+RESTORE gjenopprett vinduet\n\
+tittel ny tittel\n"
+
+
+STRING_HELP1, "Liste av alle tilgjengelige kommandoer (+ beskrivelse)\n\n\
+kommando /? For mer informasjon om en bestemt kommando\n\n\
+? Lister alle tilgjengelige kommando uten beskrivelse).\n\
+ALIAS Sett, fjern eller vis alias.\n\
+ATTRIB Viser eller ändra fil attributter.\n\
+BEEP Piper i høyttaleren.\n\
+CALL Starte et satsvis program fra et annet.\n\
+CD Vis namnet på eller endrer aktuell mapp.\n\
+CHCP Viser eller anger nummer på aktiv tegntabell.\n\
+CHOICE Venter til bruken väljer en av et sett av val.\n\
+CLS Tømmer skjermen.\n\
+CMD Start en ny forekomst av ReactOS kommandotolk.\n\
+COLOR Anger standard forgrunn- och bakgrunnsfargr for konsollen.\n\
+COPY Kopierer en eller flere filer til en annen plassering.\n\
+DATE Viser eller anger datoen.\n\
+DELETE Sletter en eller flere filer.\n\
+DIR Viser en liste over filer och undermappar i en mapp.\n\
+ECHO Viser meldinger, eller slår kommandoecho på eller av.\n\
+ERASE Sletter en eller flere filer.\n\
+EXIT Avslutter programmet CMD.EXE program (kommandotolken).\n\
+FOR Kjør en bestemt kommando for hver fil i et sett av filer.\n\
+FREE Viser ledig diskplass.\n\
+GOTO Leder ReactOS kommandotolk til en merket linje i\n\
+ et satsvis program.\n\
+HELP Viser hjelpeinformasjon for ReactOS-kommandoer.\n\
+HISTORY Lister alle kommandoer som har blitt brukt\n\
+IF Utføre betinget behandling i satsvise programmer.\n\
+LABEL Oppretter, endrer, eller sletter volumnamnet på en disk.\n\
+MD Oppretter en mapp.\n\
+MKDIR Oppretter en mapp.\n\
+MKLINK Creates a filesystem link object.\n\
+MOVE Flytter en eller flere filer fra en mapp til en annen.\n\
+PATH Vis eller sett en søkesti for kjørbare filer.\n\
+PAUSE Avbryter behandling av en satsvis fil, och viser en melding.\n\
+POPD Fjenoppretter den forige verdien av aktuell mapp, lagret av\n\
+ PUSHD.\n\
+PROMPT Ändra kommandoledeteksten.\n\
+PUSHD Lagre aktuell mapp och endrer den etterpå.\n\
+RD Fjerner en mapp.\n\
+REM Anger kommentarer i satsvise filer.\n\
+REN Gir nytt namn til en eller flere filer.\n\
+RENAME Gir nytt namn til en eller flere filer.\n\
+RMDIR Fjerner en mapp.\n\
+SCREEN Flytter markør.\n\
+SET Vis, sett, eller fjern ReactOS miljøvariabel.\n\
+SHIFT Shift plass for erstattelige parameter i satsvise filer.\n"
+STRING_HELP2, "START Start et separat vindu til att kjøre et spesifisert program eller kommando.\n\
+ Utfører kommando.\n\
+TIME Vis eller sett system tid.\n\
+TIMER Håndtere stoppeklokker (maks 10 stk).\n\
+TITLE Sett vindustittel for CMD.EXE sesjon.\n\
+TYPE Vis innholdet i en text fil.\n\
+VER Viser ReactOS version.\n\
+VERIFY Forteller ReactOS om att bekrefte om dine filer är skrevet\n\
+ riktig til disk.\n\
+VOL Vis et volums namn och serienummer.\n"
+
+
+STRING_CHOICE_OPTION, "YN"
+STRING_COPY_OPTION, "YNA"
+
+STRING_ASSOC_ERROR, "Fil association ble inte funnet for utvidelsen %s\n"
+STRING_ALIAS_ERROR, "Kommando linje for lang etter alias utvidelse!\n"
+STRING_BATCH_ERROR, "Feil ved åpning av satsvis fil\n"
+STRING_CHCP_ERROR1, "Aktiv tegntabell: %u\n"
+STRING_CHCP_ERROR4, "Ugyldig tegntabell\n"
+STRING_CHOICE_ERROR, "Ugyldig val. Forventet format: /C[:]val"
+STRING_CHOICE_ERROR_TXT, "Ugyldig val. Forventet format: /T[:]c,nn"
+STRING_CHOICE_ERROR_OPTION, "Ulovlig operasjon: %s"
+STRING_MD_ERROR, "En undermapp eller fil finnes allerede.\n"
+STRING_MD_ERROR2, "Stien til den nye mappen eksisterer inte.\n"
+STRING_CMD_ERROR1, "Kan inte videreføre inndata fra fil %s\n"
+STRING_CMD_ERROR2, "Feil under oppretting av temporær fil for datakanal\n"
+STRING_CMD_ERROR3, "Kan inte videreføre til fil %s\n"
+STRING_CMD_ERROR4, "Kör %s...\n"
+STRING_CMD_ERROR5, "Kör cmdexit.bat...\n"
+STRING_COLOR_ERROR1, "Samme farge feil! (Bakgrunn och forgrunn kan inte ha samme farge)"
+STRING_COLOR_ERROR2, "feil i farge spesifikasjon"
+STRING_COLOR_ERROR3, "Farge %x\n"
+STRING_COLOR_ERROR4, "samme farge feil!"
+STRING_CONSOLE_ERROR, "Ukjent feil: %d\n"
+STRING_COPY_ERROR1, "Feil: kan inte åpne kilden - %s!\n"
+STRING_COPY_ERROR2, "Feil: kan inte kopiere til seg selv!\n"
+STRING_COPY_ERROR3, "Feil ved skriving til destinasjon!\n"
+STRING_COPY_ERROR4, "Feil: Inte implementert enda!\n"
+STRING_DATE_ERROR, "Ugyldig dato."
+STRING_DEL_ERROR5, "Filen %s vil bli slettet! "
+STRING_DEL_ERROR6, "Er du sikker (J/N)?"
+STRING_DEL_ERROR7, "Sletter: %s\n"
+STRING_ERROR_ERROR1, "Ukjent feil! Feilkode: 0x%lx\n"
+STRING_ERROR_ERROR2, "Syntaks feil"
+STRING_FOR_ERROR1, "'in' tapt i FOR kommando."
+STRING_FOR_ERROR2, "ingen brakett funnet."
+STRING_FOR_ERROR3, "'gjøre' tapt."
+STRING_FOR_ERROR4, "ingen kommando etter 'gjøre'."
+STRING_FREE_ERROR1, "Ugyldig driver"
+STRING_FREE_ERROR2, "utmerket"
+STRING_GOTO_ERROR1, "Ingen merke spesifisert for GÅTIL"
+STRING_GOTO_ERROR2, "merke '%s' inte funnet\n"
+
+STRING_MOVE_ERROR1, "[OK]\n"
+STRING_MOVE_ERROR2, "[Feil]\n"
+
+STRING_REN_ERROR1, "MoveFile() mislykkes. Feil: %lu\n"
+
+STRING_START_ERROR1, "Ingen satsvis støtte for øyeblikket!"
+
+STRING_TIME_ERROR1, "Ugyldig tid."
+
+STRING_TYPE_ERROR1, "Ugyldig alternativ '/%s'\n"
+
+STRING_WINDOW_ERROR1, "vinduet ble inte funnet"
+
+
+STRING_ERROR_PARAMETERF_ERROR, "Parameter format inte riktig - %c\n"
+STRING_ERROR_INVALID_SWITCH, "Ugyldig bryter - /%c\n"
+STRING_ERROR_TOO_MANY_PARAMETERS, "For mange parametere - %s\n"
+STRING_ERROR_PATH_NOT_FOUND, "Stien ble inte funnet\n"
+STRING_ERROR_FILE_NOT_FOUND, "Filen ble inte funnet\n"
+STRING_ERROR_REQ_PARAM_MISSING, "Obligatorisk parameter mangler\n"
+STRING_ERROR_INVALID_DRIVE, "Ugyldig enhet angitt\n"
+STRING_ERROR_INVALID_PARAM_FORMAT, "Ugyldig parameter format - %s\n"
+STRING_ERROR_BADCOMMAND, "Feil kommando eller filnamn - %s\n"
+STRING_ERROR_OUT_OF_MEMORY, "Feil: Minne fullt.\n"
+STRING_ERROR_CANNOTPIPE, "Feil! Kan inte bruke datakanal! Kan inte åpne midlertidig fil!\n"
+STRING_ERROR_D_PAUSEMSG, "Tryck valfri tangent för att fortsette . . ."
+STRING_ERROR_DRIVER_NOT_READY, "enheten är inte klar"
+
+STRING_PATH_ERROR, "CMD: Inte i miljøet '%s'\n"
+
+STRING_REPLACE_ERROR1, "Invalid switch - %s\n"
+STRING_REPLACE_ERROR2, "Mappen ble inte funnet - %s\n"
+STRING_REPLACE_ERROR3, "The filename, directory name, or volume label syntax is incorrect.\n"
+STRING_REPLACE_ERROR4, "Invalid parameter combination\n"
+STRING_REPLACE_ERROR5, "Tilgang nektet - %s\n"
+STRING_REPLACE_ERROR6, "Ingen filer ble funnet - %s\n"
+STRING_REPLACE_ERROR7, "Extended Error 32\n"
+
+STRING_REACTOS_VERSION, "ReactOS Operativsystem [Versjon %s-%s]\n"
+STRING_CMD_SHELLINFO, "\nReactOS Kommandotolk\nVersjon %s %s"
+STRING_VERSION_RUNVER, " körs på %s"
+STRING_COPY_FILE , " %d file(r) kopiert\n"
+STRING_DELETE_WIPE, "slettet"
+STRING_FOR_ERROR, "ugyldig variabel spesifikasjon."
+STRING_SCREEN_COL, "ugyldig verdi for kolonne"
+STRING_SCREEN_ROW, "ugyldig verdi for rad"
+STRING_TIMER_TIME "Stoppeklokke %d är %s: "
+STRING_MKLINK_CREATED_SYMBOLIC, "Symbolic link created for %s <<===>> %s\n"
+STRING_MKLINK_CREATED_HARD, "Hard link created for %s <<===>> %s\n"
+STRING_MKLINK_CREATED_JUNCTION, "Junction created for %s <<===>> %s\n"
+STRING_MORE, "More? "
+STRING_CANCEL_BATCH_FILE, "\r\nCtrl-Break trykket. Avbryt batch filen? (Ja/Nei/Alt) "
+
+STRING_INVALID_OPERAND, "Ugyldig operand."
+STRING_EXPECTED_CLOSE_PAREN, "Forventet ')'."
+STRING_EXPECTED_NUMBER_OR_VARIABLE,"Forventet nummer eller variabel namn."
+STRING_SYNTAX_COMMAND_INCORRECT, "Syntaks for kommandoen är feil."
+
+END
kernel32
ntdll)
-add_cab_target(explorer_new 4)
+add_cd_file(TARGET explorer_new DESTINATION reactos FOR all)
set_image_base(explorer 0x00400000)
add_dependencies(explorer psdk)
-add_cab_target(explorer 4)
-add_cab(${CMAKE_CURRENT_SOURCE_DIR}/explorer-cfg-template.xml 4)
+add_cd_file(TARGET explorer DESTINATION reactos FOR all)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/explorer-cfg-template.xml DESTINATION reactos FOR all)
goto def;
case WM_SYSCOLORCHANGE:
- // redraw background window
- InvalidateRect(g_Globals._hwndShellView, NULL, TRUE);
+ // redraw background window - it's done by system
+ //InvalidateRect(g_Globals._hwndShellView, NULL, TRUE);
- // forward message to shell view window to redraw icon backgrounds
- SendMessage(g_Globals._hwndShellView, WM_SYSCOLORCHANGE, wparam, lparam);
+ // forward message to common controls
+ SendMessage(g_Globals._hwndShellView, WM_SYSCOLORCHANGE, 0, 0);
+ SendMessage(_desktopBar, WM_SYSCOLORCHANGE, 0, 0);OutputDebugStringA("WM_SYSCOLORCHANGE desktop\n");
break;
default: def:
}
#endif
- return Window::MessageLoop();
+ Window::MessageLoop();
+
+ return 1;
}
add_importlibs(notifyhook user32 msvcrt kernel32)
add_importlib_target(notifyhook.spec)
-add_cab_target(notifyhook 1)
+add_cd_file(TARGET notifyhook DESTINATION reactos/system32 FOR all)
SendMessage(_hstatusbar, SB_SETTEXT, 0, lparam);
break;
+ case WM_SYSCOLORCHANGE:
+ SendMessage(_hwndrebar, WM_SYSCOLORCHANGE, 0, 0);
+ SendMessage(_htoolbar, WM_SYSCOLORCHANGE, 0, 0);
+ break;
+
default:
return false;
}
}
return TRUE;} // success
+ case WM_SYSCOLORCHANGE: {
+ LRESULT res;
+ HWND hChild;
+
+ /* Forward WM_SYSCOLORCHANGE to common controls */
+ SendMessage(_hextrabar, WM_SYSCOLORCHANGE, 0, 0);
+ SendMessage(_hdrivebar, WM_SYSCOLORCHANGE, 0, 0);
+
+ for(hChild = GetNextWindow(_hmdiclient,GW_CHILD); hChild; hChild = GetNextWindow(hChild, GW_HWNDNEXT))
+ SendMessage(hChild, WM_SYSCOLORCHANGE, 0, 0);
+
+ super::ProcessMessage(nmsg, wparam, lparam, &res);
+ break; }
+
default: {
LRESULT res;
}
return TRUE;}
+ case WM_SYSCOLORCHANGE:
+ /* Forward WM_SYSCOLORCHANGE to common controls */
+ SendMessage(_left_hwnd, WM_SYSCOLORCHANGE, 0, 0);
+ SendMessage(_right_hwnd, WM_SYSCOLORCHANGE, 0, 0);
+ break;
+
default:
return super::WndProc(nmsg, wparam, lparam);
}
case PM_GET_NOTIFYAREA:
return (LRESULT)(HWND)_hwndNotify;
+ case WM_SYSCOLORCHANGE:OutputDebugStringA("WM_SYSCOLORCHANGE desktopbar\n");
+ /* Forward WM_SYSCOLORCHANGE to common controls */
+#ifndef _NO_REBAR
+ SendMessage(_hwndrebar, WM_SYSCOLORCHANGE, 0, 0);
+#endif
+ SendMessage(_hwndQuickLaunch, WM_SYSCOLORCHANGE, 0, 0);
+ SendMessage(_hwndTaskBar, WM_SYSCOLORCHANGE, 0, 0);
+ break;
+
default: def:
return super::WndProc(nmsg, wparam, lparam);
}
case PM_GET_LAST_ACTIVE:
return (LRESULT)(HWND)_last_foreground_wnd;
+ case WM_SYSCOLORCHANGE:
+ SendMessage(_htoolbar, WM_SYSCOLORCHANGE, 0, 0);
+ break;
+
default: def:
if (nmsg == WM_SHELLHOOK) {
switch(wparam) {
target_link_libraries(autochk mingw_common nt)
add_importlibs(autochk kernel32 ntdll)
-add_cab_target(autochk 1)
+add_cd_file(TARGET autochk DESTINATION reactos/system32 FOR all)
set_module_type(bootok win32cui)
add_importlibs(bootok advapi32 msvcrt kernel32 ntdll)
-add_cab_target(bootok 1)
+add_cd_file(TARGET bootok DESTINATION reactos/system32 FOR all)
set_module_type(expand win32cui)
add_importlibs(expand lz32 setupapi user32 msvcrt kernel32 ntdll)
-add_cab_target(expand 1)
+add_cd_file(TARGET expand DESTINATION reactos/system32 FOR all)
set_module_type(format win32cui)
add_importlibs(format user32 fmifs msvcrt kernel32 ntdll)
-add_cab_target(format 1)
+add_cd_file(TARGET format DESTINATION reactos/system32 FOR all)
set_module_type(lsass win32gui)
add_importlibs(lsass advapi32 lsasrv msvcrt kernel32 ntdll)
-add_cab_target(lsass 1)
+add_cd_file(TARGET lsass DESTINATION reactos/system32 FOR all)
target_link_libraries(msiexec uuid wine)
add_importlibs(msiexec user32 advapi32 ole32 msi msvcrt kernel32 ntdll)
-add_cab_target(msiexec 1)
+add_cd_file(TARGET msiexec DESTINATION reactos/system32 FOR all)
set_module_type(regsvr32 win32gui)
add_importlibs(regsvr32 user32 shell32 ole32 msvcrt kernel32 ntdll)
-add_cab_target(regsvr32 1)
+add_cd_file(TARGET regsvr32 DESTINATION reactos/system32 FOR all)
set_module_type(rundll32 win32gui)
add_importlibs(rundll32 user32 msvcrt kernel32 ntdll)
-add_cab_target(rundll32 1)
+add_cd_file(TARGET rundll32 DESTINATION reactos/system32 FOR all)
set_module_type(runonce win32gui)
add_importlibs(runonce advapi32 user32 msvcrt kernel32 ntdll)
-add_cab_target(runonce 1)
+add_cd_file(TARGET runonce DESTINATION reactos/system32 FOR all)
set_module_type(services win32cui)
add_importlibs(services user32 advapi32 rpcrt4 msvcrt kernel32 ntdll)
-add_cab_target(services 1)
+add_cd_file(TARGET services DESTINATION reactos/system32 FOR all)
set_module_type(smss nativecui)
add_importlibs(smss ntdll)
-add_cab_target(smss 1)
+add_cd_file(TARGET smss DESTINATION reactos/system32 FOR all)
{TRUE, SmInitDosDevices, "create dos device links"},
{TRUE, SmRunBootApplications, "run boot applications"},
{TRUE, SmProcessFileRenameList, "process the file rename list"},
+ {FALSE, SmUpdateEnvironment, "update environment variables"},
{FALSE, SmLoadKnownDlls, "preload system DLLs"},
{TRUE, SmCreatePagingFiles, "create paging files"},
{TRUE, SmInitializeRegistry, "initialize the registry"},
- {FALSE, SmUpdateEnvironment, "update environment variables"},
{TRUE, SmInitializeClientManagement, "initialize client management"},
{TRUE, SmLoadSubsystems, "load subsystems"}
};
goto done;
}
-done:
- NtClose(EnvironmentKey);
-
-
/* Set the 'PROCESSOR_IDENTIFIER' system environment variable */
RtlInitUnicodeString(&Identifier, NULL);
RtlInitUnicodeString(&VendorIdentifier, NULL);
QueryTable,
NULL,
NULL);
- if (NT_SUCCESS(Status))
+ if (!NT_SUCCESS(Status))
{
- DPRINT("SM: szIdentifier: %wZ\n", &Identifier);
- DPRINT("SM: szVendorIdentifier: %wZ\n", &VendorIdentifier);
+ DPRINT1("SM: Failed to retrieve processor Identifier and/or VendorIdentifier (Status %08lx)", Status);
+ goto done;
+ }
- swprintf(Buffer, L"%wZ, %wZ", &Identifier, &VendorIdentifier);
+ DPRINT("SM: szIdentifier: %wZ\n" , &Identifier);
+ DPRINT("SM: szVendorIdentifier: %wZ\n", &VendorIdentifier);
- RtlWriteRegistryValue(RTL_REGISTRY_CONTROL,
- L"Session Manager\\Environment",
- L"PROCESSOR_IDENTIFIER",
- REG_SZ,
- Buffer,
- (wcslen(Buffer) + 1) * sizeof(WCHAR));
+ RtlInitUnicodeString(&VariableName, L"PROCESSOR_IDENTIFIER");
+ swprintf(Buffer, L"%wZ, %wZ", &Identifier, &VendorIdentifier);
+ RtlFreeUnicodeString(&VendorIdentifier);
+ RtlFreeUnicodeString(&Identifier);
+
+ Status = NtSetValueKey(EnvironmentKey,
+ &VariableName,
+ 0,
+ REG_SZ,
+ Buffer,
+ (wcslen(Buffer) + 1) * sizeof(WCHAR));
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("SM: Failed to set the PROCESSOR_IDENTIFIER environment variable (Status %08lx)", Status);
+ goto done;
}
- RtlFreeUnicodeString(&Identifier);
- RtlFreeUnicodeString(&VendorIdentifier);
+done:
+ /* Close the handle */
+ NtClose(EnvironmentKey);
- return STATUS_SUCCESS;
+ return Status;
}
RTL_QUERY_REGISTRY_TABLE QueryTable[2];
WCHAR ValueBuffer[MAX_PATH];
NTSTATUS Status;
+#ifndef NDEBUG
+ ULONG ii;
+ PWSTR envp;
+#endif
/*
* The following environment variables must be set prior to reading
&SmSystemEnvironment,
SmSystemEnvironment);
+#ifndef NDEBUG
+ /* Print all environment varaibles */
+ ii = 0;
+ envp = SmSystemEnvironment;
+ DbgPrint("SmUpdateEnvironment:\n");
+ while (*envp)
+ {
+ DbgPrint(" %u: %S\n", ii++, envp);
+ envp += wcslen(envp) + 1;
+ }
+#endif
+
return Status;
}
+include_directories(.)
+set_rc_compiler()
+
add_definitions(-D_DLL -D__USE_CRTIMP)
add_executable(subst subst.c subst.rc)
set_module_type(subst win32cui)
-add_importlibs(subst msvcrt kernel32 ntdll)
-add_cab_target(subst 1)
+add_importlibs(subst msvcrt kernel32 user32 ntdll)
+add_cd_file(TARGET subst DESTINATION reactos/system32 FOR all)
--- /dev/null
+#include "resource.h"
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+STRINGTABLE
+BEGIN
+ IDS_INCORRECT_PARAMETER_COUNT "Incorrect number of parameters - %s\n"
+ IDS_INVALID_PARAMETER "Incorrect number of parameters - %s\n"
+ IDS_INVALID_PARAMETER2 "Invalid parameter - %s\n"
+ IDS_DRIVE_ALREAD_SUBSTED "Drive already SUBSTed\n"
+ IDS_FAILED_WITH_ERROCODE "Failed with error code 0x%x: %s\n"
+ IDS_USAGE "Associates a path with a drive letter.\n\nSUBST [drive1: [drive2:]path]\nSUBST drive1: /D\n\n drive1: \
+ Specifies a virtual drive to which you want to assign a path.\n \
+ [drive2:]path Specifies a physical drive and path you want to assign to\n \
+ a virtual drive.\n /D \
+ Deletes a substituted (virtual) drive.\n\nType SUBST with no parameters to display a list of current virtual drives.\n"
+END
--- /dev/null
+#include "resource.h"
+LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
+
+STRINGTABLE
+BEGIN
+ IDS_INCORRECT_PARAMETER_COUNT "Cantidad de parámetros incorrecta - %s\n"
+ IDS_INVALID_PARAMETER "Cantidad de parámetros incorrecta - %s\n"
+ IDS_INVALID_PARAMETER2 "Parámetro incorrecto - %s\n"
+ IDS_DRIVE_ALREAD_SUBSTED "Unidad ya sustituida\n"
+ IDS_FAILED_WITH_ERROCODE "Falla con código de error 0x%x: %s\n"
+ IDS_USAGE "Asocia una ruta con una letra de unidad.\n\nSUBST [unidad1: [unidad2:]ruta]\nSUBST unidad1: /D\n\n unidad1: \
+ Especifica una unidad virtual a la cual se quiere asignar una ruta.\n \
+ [unidad2:]ruta Especifica una unidad física y una ruta a la cual asignar\n \
+ una unidad virtual.\n /D \
+ Elimina una unidad (virtual) substituida.\n\nEscribir SUBST sin parámetros para mostrar una lista de las unidades virtuales actuales.\n"
+END
--- /dev/null
+#include "resource.h"
+LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
+
+STRINGTABLE
+BEGIN
+ IDS_INCORRECT_PARAMETER_COUNT "Numero di parametri errato - %s\n"
+ IDS_INVALID_PARAMETER "Numero di parametri errato - %s\n"
+ IDS_INVALID_PARAMETER2 "Parametro errato - %s\n"
+ IDS_DRIVE_ALREAD_SUBSTED "Unità già sostituita\n"
+ IDS_FAILED_WITH_ERROCODE "Interruzione con codice di errore 0x%x: %s\n"
+ IDS_USAGE "Associa un percorso ad una lettera di unità.\n\nSUBST [unità1: [unità2:]percorso]\nSUBST unità1: /D\n\n unità1: \
+ Specifica un'unità virtuale alla quale assegnare un percorso.\n \
+ [unità2:]percorso Specifica un'unità fisica e un percorso da assegnare ad una\n \
+ unità virtuale.\n /D \
+ Elimina un'unità (virtuale) sostituita.\n\nDigitare SUBST senza parametri per mostrare un elenco delle unità virtuali attuali.\n"
+END
--- /dev/null
+#define RC_STRING_MAX_SIZE 2048
+
+/* Strings */
+#define IDS_FAILED_WITH_ERROCODE 1001
+#define IDS_USAGE 1002
+#define IDS_INCORRECT_PARAMETER_COUNT 1003
+#define IDS_INVALID_PARAMETER 1004
+#define IDS_INVALID_PARAMETER2 1005
+#define IDS_DRIVE_ALREAD_SUBSTED 1006
+
+/* EOF */
--- /dev/null
+#include <windows.h>
+#include "resource.h"
+
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+
+#include "lang/en-US.rc"
+#include "lang/es-ES.rc"
+#include "lang/it-IT.rc"
#include <tchar.h>
#define NDEBUG
#include <debug.h>
+#include "resource.h"
/* FUNCTIONS ****************************************************************/
void PrintError(DWORD ErrCode)
{
+ TCHAR szFmtString[RC_STRING_MAX_SIZE] = {0};
TCHAR *buffer = (TCHAR*) calloc(2048,
sizeof(TCHAR));
TCHAR *msg = NULL;
(TCHAR*)&msg,
0,
NULL);
+ LoadString(GetModuleHandle(NULL),
+ IDS_FAILED_WITH_ERROCODE,
+ szFmtString,
+ sizeof(szFmtString) / sizeof(szFmtString[0]));
_sntprintf(buffer,
2048,
- _T("Failed with error code 0x%x: %s\n"),
+ szFmtString,
ErrCode,
msg);
_tprintf(_T("%s"),
}
}
-void DisplaySubstUsage()
+void DisplaySubstUsage(void)
{
- _tprintf(_T("Associates a path with a drive letter.\n\n"));
- _tprintf(_T("SUBST [drive1: [drive2:]path]\n"));
- _tprintf(_T("SUBST drive1: /D\n\n"));
- _tprintf(_T(" drive1: Specifies a virtual drive to which you want to assign a path.\n"));
- _tprintf(_T(" [drive2:]path Specifies a physical drive and path you want to assign to\n"));
- _tprintf(_T(" a virtual drive.\n"));
- _tprintf(_T(" /D Deletes a substituted (virtual) drive.\n\n"));
- _tprintf(_T("Type SUBST with no parameters to display a list of current virtual drives.\n"));
+ TCHAR szHelp[RC_STRING_MAX_SIZE] = {0};
+
+ LoadString(GetModuleHandle(NULL),
+ IDS_USAGE,
+ szHelp,
+ sizeof(szHelp) / sizeof(szHelp[0]));
+ _tprintf(_T("%s"), szHelp);
}
BOOLEAN IsSubstedDrive(TCHAR *Drive)
return Result;
}
-void DumpSubstedDrives()
+void DumpSubstedDrives(void)
{
TCHAR Drive[3] = _T("A:");
LPTSTR lpTargetPath = NULL;
int DeleteSubst(TCHAR* Drive)
{
BOOL Result;
+ TCHAR szFmtString[RC_STRING_MAX_SIZE] = {0};
+
+ LoadString(GetModuleHandle(NULL),
+ IDS_INVALID_PARAMETER2,
+ szFmtString,
+ sizeof(szFmtString) / sizeof(szFmtString[0]));
if (_tcslen(Drive) > 2)
{
- _tprintf(_T("Invalid parameter - %s\n"),
+ _tprintf(szFmtString,
Drive);
return 1;
}
if (! IsSubstedDrive(Drive))
{
- _tprintf(_T("Invalid Parameter - %s\n"),
+ _tprintf(szFmtString,
Drive);
return 1;
}
int AddSubst(TCHAR* Drive, TCHAR *Path)
{
BOOL Result;
+ TCHAR szFmtString[RC_STRING_MAX_SIZE] = {0};
- if (_tcslen(Drive) > 2)
+ LoadString(GetModuleHandle(NULL),
+ IDS_INVALID_PARAMETER2,
+ szFmtString,
+ sizeof(szFmtString) / sizeof(szFmtString[0]));
+ if (_tcslen(Drive) != 2)
+ {
+ _tprintf(szFmtString,
+ Drive);
+ return 1;
+ }
+
+ if (Drive[1] != _T(':'))
{
- _tprintf(_T("Invalid parameter - %s\n"),
+ _tprintf(szFmtString,
Drive);
return 1;
}
if (IsSubstedDrive(Drive))
{
- _tprintf(_T("Drive already SUBSTed\n"));
+ LoadString(GetModuleHandle(NULL),
+ IDS_DRIVE_ALREAD_SUBSTED,
+ szFmtString,
+ sizeof(szFmtString) / sizeof(szFmtString[0]));
+ _tprintf(szFmtString);
return 1;
}
int _tmain(int argc, TCHAR* argv[])
{
INT i;
+ TCHAR szFmtString[RC_STRING_MAX_SIZE] = {0};
for (i = 0; i < argc; i++)
{
{
if (argc >= 2)
{
- _tprintf(_T("Invalid parameter - %s\n"),
+ LoadString(GetModuleHandle(NULL),
+ IDS_INVALID_PARAMETER,
+ szFmtString,
+ sizeof(szFmtString) / sizeof(szFmtString[0]));
+ _tprintf(szFmtString,
argv[1]);
return 1;
}
if (argc > 3)
{
- _tprintf(_T("Incorrect number of parameters - %s\n"),
+ LoadString(GetModuleHandle(NULL),
+ IDS_INCORRECT_PARAMETER_COUNT,
+ szFmtString,
+ sizeof(szFmtString) / sizeof(szFmtString[0]));
+ _tprintf(szFmtString,
argv[3]);
return 1;
}
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
-<module name="subst" type="win32cui" installbase="system32" installname="subst.exe" >
+<module name="subst" type="win32cui" installbase="system32" installname="subst.exe" unicode="yes">
<include base="ReactOS">include/reactos/wine</include>
<include base="subst">.</include>
<library>kernel32</library>
+ <library>user32</library>
<file>subst.c</file>
<file>subst.rc</file>
</module>
#define REACTOS_STR_INTERNAL_NAME "subst\0"
#define REACTOS_STR_ORIGINAL_FILENAME "subst.exe\0"
#include <reactos/version.rc>
+
+#include "rsrc.rc"
set_module_type(userinit win32gui)
add_importlibs(userinit user32 gdi32 advapi32 shell32 shlwapi msvcrt kernel32 ntdll)
-add_cab_target(userinit 1)
+add_cd_file(TARGET userinit DESTINATION reactos/system32 FOR all)
set_module_type(winlogon win32gui)
add_importlibs(winlogon user32 advapi32 userenv secur32 msvcrt kernel32 ntdll)
-add_cab_target(winlogon 1)
+add_cd_file(TARGET winlogon DESTINATION reactos/system32 FOR all)
#include "lang/hu-HU.rc"
#include "lang/id-ID.rc"
#include "lang/it-IT.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/lt-LT.rc"
#include "lang/no-NO.rc"
#include "lang/nl-NL.rc"
return ret;
}
+static BOOL
+StartUserShell(
+ IN OUT PWLSESSION Session)
+{
+ LPVOID lpEnvironment = NULL;
+ BOOLEAN Old;
+ BOOL ret;
+
+ /* Create environment block for the user */
+ if (!CreateEnvironmentBlock(&lpEnvironment, Session->UserToken, TRUE))
+ {
+ WARN("WL: CreateEnvironmentBlock() failed\n");
+ return FALSE;
+ }
+
+ /* Get privilege */
+ /* FIXME: who should do it? winlogon or gina? */
+ /* FIXME: reverting to lower privileges after creating user shell? */
+ RtlAdjustPrivilege(SE_ASSIGNPRIMARYTOKEN_PRIVILEGE, TRUE, FALSE, &Old);
+
+ ret = Session->Gina.Functions.WlxActivateUserShell(
+ Session->Gina.Context,
+ L"Default",
+ NULL, /* FIXME */
+ lpEnvironment);
+
+ DestroyEnvironmentBlock(lpEnvironment);
+ return ret;
+}
+
+
BOOL
SetDefaultLanguage(
IN BOOL UserProfile)
IN OUT PWLSESSION Session)
{
PROFILEINFOW ProfileInfo;
- LPVOID lpEnvironment = NULL;
- BOOLEAN Old;
BOOL ret = FALSE;
/* Loading personal settings */
goto cleanup;
}
- /* Create environment block for the user */
- if (!CreateEnvironmentBlock(&lpEnvironment, Session->UserToken, TRUE))
- {
- WARN("WL: CreateEnvironmentBlock() failed\n");
- goto cleanup;
- }
-
DisplayStatusMessage(Session, Session->WinlogonDesktop, IDS_APPLYINGYOURPERSONALSETTINGS);
UpdatePerUserSystemParameters(0, TRUE);
goto cleanup;
}
- /* Get privilege */
- /* FIXME: who should do it? winlogon or gina? */
- /* FIXME: reverting to lower privileges after creating user shell? */
- RtlAdjustPrivilege(SE_ASSIGNPRIMARYTOKEN_PRIVILEGE, TRUE, FALSE, &Old);
-
- if (!Session->Gina.Functions.WlxActivateUserShell(
- Session->Gina.Context,
- L"Default",
- NULL, /* FIXME */
- lpEnvironment))
+ if (!StartUserShell(Session))
{
//WCHAR StatusMsg[256];
WARN("WL: WlxActivateUserShell() failed\n");
{
UnloadUserProfile(WLSession->UserToken, ProfileInfo.hProfile);
}
- if (lpEnvironment)
- DestroyEnvironmentBlock(lpEnvironment);
RemoveStatusMessage(Session);
if (!ret)
{
{
return HandleMessageBeep(lParam);
}
+ case LN_SHELL_EXITED:
+ {
+ /* lParam is the exit code */
+ if(lParam != 1)
+ {
+ SetTimer(hwndDlg, 1, 1000, NULL);
+ }
+ break;
+ }
default:
{
ERR("WM_LOGONNOTIFY case %d is unimplemented\n", wParam);
}
}
return 0;
+ }
+ case WM_TIMER:
+ {
+ if (wParam == 1)
+ {
+ KillTimer(hwndDlg, 1);
+ StartUserShell(Session);
+ }
+ break;
}
case WLX_WM_SAS:
{
+##bootcd
+#clear it out
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/bootcd.cmake
+ "file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bootcd)\n")
-add_subdirectory(freeldr)
-
-add_minicd(${CMAKE_CURRENT_SOURCE_DIR}/bootdata/txtsetup.sif reactos txtsetup.sif)
-add_minicd(${CMAKE_CURRENT_SOURCE_DIR}/bootdata/bootcd.ini "" freeldr.ini)
-add_minicd(${CMAKE_CURRENT_SOURCE_DIR}/bootdata/hivecls_${ARCH}.inf reactos hivecls.inf)
-add_minicd(${CMAKE_CURRENT_SOURCE_DIR}/bootdata/hivedef_${ARCH}.inf reactos hivedef.inf)
-add_minicd(${CMAKE_CURRENT_SOURCE_DIR}/bootdata/hivesft_${ARCH}.inf reactos hivesft.inf)
-add_minicd(${CMAKE_CURRENT_SOURCE_DIR}/bootdata/hivesys_${ARCH}.inf reactos hivesys.inf)
-add_minicd(${CMAKE_CURRENT_SOURCE_DIR}/bootdata/autorun.inf "" autorun.inf)
-add_minicd(${CMAKE_CURRENT_SOURCE_DIR}/bootdata/icon.ico "" icon.ico)
-add_minicd(${CMAKE_CURRENT_SOURCE_DIR}/bootdata/readme.txt "" readme.txt)
-# Livecd files
-list(APPEND LIVECD_HIVES
- ${CMAKE_CURRENT_SOURCE_DIR}/bootdata/livecd.inf
- ${CMAKE_CURRENT_SOURCE_DIR}/bootdata/hiveinst_${ARCH}.inf)
-
-add_custom_command(
- OUTPUT ${LIVECD_DIR}/reactos/system32/config/sam
- COMMAND native-mkhive ${CMAKE_CURRENT_SOURCE_DIR}/bootdata ${LIVECD_DIR}/reactos/system32/config ${ARCH} ${LIVECD_HIVES}
- DEPENDS native-mkhive)
+add_custom_target(bootcd
+ ${CMAKE_COMMAND} -D CD_DIR=${CMAKE_CURRENT_BINARY_DIR}/bootcd
+ -P ${CMAKE_CURRENT_BINARY_DIR}/bootcd.cmake
+ COMMAND native-cdmake -v -j -m -b ${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/isoboot.bin ${CMAKE_CURRENT_BINARY_DIR}/bootcd REACTOS ${REACTOS_BINARY_DIR}/bootcd.iso
+ VERBATIM)
+
+##livecd
+#clear it out
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake
+ "file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/livecd)\n")
+#create profiles directories too
+file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake
+ "file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/livecd/Profiles)\n")
+file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake
+ "file(MAKE_DIRECTORY \"${CMAKE_CURRENT_BINARY_DIR}/livecd/Profiles/All Users\")\n")
+file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake
+ "file(MAKE_DIRECTORY \"${CMAKE_CURRENT_BINARY_DIR}/livecd/Profiles/All Users/Desktop\")\n")
+file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake
+ "file(MAKE_DIRECTORY \"${CMAKE_CURRENT_BINARY_DIR}/livecd/Profiles/Default User\")\n")
+file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake
+ "file(MAKE_DIRECTORY \"${CMAKE_CURRENT_BINARY_DIR}/livecd/Profiles/Default User/Desktop\")\n")
+file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake
+ "file(MAKE_DIRECTORY \"${CMAKE_CURRENT_BINARY_DIR}/livecd/Profiles/Default User/My Documents\")\n")
-add_custom_target(livecd_hives DEPENDS ${LIVECD_DIR}/reactos/system32/config/sam)
+add_custom_target(livecd
+ ${CMAKE_COMMAND} -D CD_DIR=${CMAKE_CURRENT_BINARY_DIR}/livecd
+ -P ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake
+ COMMAND native-cdmake -v -j -m -b ${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/isoboot.bin ${CMAKE_CURRENT_BINARY_DIR}/livecd REACTOS ${REACTOS_BINARY_DIR}/livecd.iso
+ VERBATIM)
-add_livecd(${REACTOS_SOURCE_DIR}/boot/bootdata/livecd.ini "" freeldr.ini)
-
-#regtest
-add_cab(${REACTOS_SOURCE_DIR}/boot/bootdata/bootcdregtest/regtest.cmd 7)
+add_subdirectory(freeldr)
+add_subdirectory(bootdata)
--- /dev/null
+
+add_subdirectory(packages)
+
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/txtsetup.sif DESTINATION reactos NO_CAB FOR bootcd)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/hivecls_${ARCH}.inf DESTINATION reactos NO_CAB NAME_ON_CD hivecls.inf FOR bootcd)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/hivedef_${ARCH}.inf DESTINATION reactos NO_CAB NAME_ON_CD hivedef.inf FOR bootcd)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/hivesft_${ARCH}.inf DESTINATION reactos NO_CAB NAME_ON_CD hivesft.inf FOR bootcd)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/hivesys_${ARCH}.inf DESTINATION reactos NO_CAB NAME_ON_CD hivesys.inf FOR bootcd)
+
+# livecd hives
+list(APPEND CD_HIVES
+ ${CMAKE_CURRENT_SOURCE_DIR}/livecd.inf
+ ${CMAKE_CURRENT_SOURCE_DIR}/hiveinst_${ARCH}.inf)
+
+add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sam
+ ${CMAKE_CURRENT_BINARY_DIR}/default
+ ${CMAKE_CURRENT_BINARY_DIR}/security
+ ${CMAKE_CURRENT_BINARY_DIR}/software
+ ${CMAKE_CURRENT_BINARY_DIR}/system
+ COMMAND native-mkhive ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${ARCH} ${CD_HIVES}
+ DEPENDS native-mkhive ${CD_HIVES})
+
+add_custom_target(livecd_hives
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/sam
+ ${CMAKE_CURRENT_BINARY_DIR}/default
+ ${CMAKE_CURRENT_BINARY_DIR}/security
+ ${CMAKE_CURRENT_BINARY_DIR}/software
+ ${CMAKE_CURRENT_BINARY_DIR}/system)
+
+add_cd_file(
+ FILE ${CMAKE_CURRENT_BINARY_DIR}/sam
+ ${CMAKE_CURRENT_BINARY_DIR}/default
+ ${CMAKE_CURRENT_BINARY_DIR}/security
+ ${CMAKE_CURRENT_BINARY_DIR}/software
+ ${CMAKE_CURRENT_BINARY_DIR}/system
+ TARGET livecd_hives
+ DESTINATION reactos/system32/config
+ FOR livecd)
+
+#regtest
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcdregtest/regtest.cmd DESTINATION reactos/bin FOR all)
+
+#freeldr.ini
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcd.ini DESTINATION root NO_CAB NAME_ON_CD freeldr.ini FOR bootcd)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/livecd.ini DESTINATION root NAME_ON_CD freeldr.ini FOR livecd)
+
HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\Application",,0x00000010
HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\Application","File",0x00020000,"%SystemRoot%\system32\config\AppEvent.Evt"
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\Application\Service Control Manager","EventMessageFile",0x00020000,"%SystemRoot%\system32\netevent.dll"
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\Application\Service Control Manager","TypesSupported",0x00010001,0x00000007
HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\Security",,0x00000010
HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\Security","File",0x00020000,"%SystemRoot%\system32\config\SecEvent.Evt"
HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\System",,0x00000010
HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\System","File",0x00020000,"%SystemRoot%\system32\config\SysEvent.Evt"
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\System\EventLog","EventMessageFile",0x00020000,"%SystemRoot%\system32\netevent.dll"
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\System\EventLog","TypesSupported",0x00010001,0x00000007
; Floppy driver
HKLM,"SYSTEM\CurrentControlSet\Services\Floppy","ErrorControl",0x00010001,0x00000000
--- /dev/null
+#reactos.dff
+
+# reactos.dff is the concatenation of two files :
+# - reactos.dff.in, which is a static one and can be altered to
+# add custom modules/files to reactos.cab
+# - reactos.dff.dyn (dyn as dynamic) which is generated at configure time by our cmake scripts
+# If you want to slip-stream anything into the bootcd, then you want to alter reactos.dff.in
+
+# Idea taken from there : http://www.cmake.org/pipermail/cmake/2010-July/038028.html
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/concat.cmake "
+ file(READ \${SRC1} S1)
+ file(READ \${SRC2} S2)
+ file(WRITE \${DST} \"\${S1}\${S2}\")
+")
+
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff.dyn "")
+
+add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff
+ COMMAND ${CMAKE_COMMAND} -D SRC1=${CMAKE_CURRENT_SOURCE_DIR}/reactos.dff.in
+ -D SRC2=${CMAKE_CURRENT_BINARY_DIR}/reactos.dff.dyn
+ -D DST=${CMAKE_CURRENT_BINARY_DIR}/reactos.dff
+ -P ${CMAKE_CURRENT_BINARY_DIR}/concat.cmake
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/reactos.dff.in
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff.dyn
+)
+
+# And now we build reactos.cab
+add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf
+ COMMAND native-cabman -C ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff -L ${CMAKE_CURRENT_BINARY_DIR} -I -P ${REACTOS_SOURCE_DIR}
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff
+)
+# add_custom_command(
+ # OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/reactos.cab
+ # COMMAND native-cabman -C ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff -RC ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf -L ${CMAKE_CURRENT_BINARY_DIR} -N -P ${REACTOS_SOURCE_DIR}
+ # DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf
+# )
+
+add_custom_target(reactos_cab
+ native-cabman -C ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff -RC ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf -L ${CMAKE_CURRENT_BINARY_DIR} -N -P ${REACTOS_SOURCE_DIR}
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf
+ VERBATIM)
+
+add_cd_file(TARGET reactos_cab FILE ${CMAKE_CURRENT_BINARY_DIR}/reactos.cab ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf DESTINATION reactos NO_CAB FOR bootcd)
+
; Main ReactOS package
.Set DiskLabelTemplate="ReactOS" ; Label of disk
scsiport.sys=,,,,,,x,,,,,,4
fastfat.sys=,,,,,,x,,,,,,4
ramdisk.sys=,,,,,,x,,,,,,4
-ext2.sys=,,,,,,x,,,,,,4
+ext2fs.sys=,,,,,,x,,,,,,4
+vgafonts.cab=,,,,,,,,,,,,1
+classpnp.sys=,,,,,,,,,,,,4
+pcix.sys=,,,,,,,,,,,,4
+pcmcia.sys=,,,,,,,,,,,,4
+swenum.sys=,,,,,,,,,,,,4
+ntdll.dll=,,,,,,,,,,,,2
[HardwareIdsDatabase]
;*PNP0A00 = isapnp
CreateBootSectorTarget(fat32 ${CMAKE_CURRENT_SOURCE_DIR}/fat32.asm ${CMAKE_CURRENT_BINARY_DIR}/fat32.bin)
CreateBootSectorTarget(fat ${CMAKE_CURRENT_SOURCE_DIR}/fat.asm ${CMAKE_CURRENT_BINARY_DIR}/fat.bin)
CreateBootSectorTarget(isoboot ${CMAKE_CURRENT_SOURCE_DIR}/isoboot.asm ${CMAKE_CURRENT_BINARY_DIR}/isoboot.bin)
-CreateBootSectorTarget(isobtrt ${CMAKE_CURRENT_SOURCE_DIR}/isobtrt.asm ${CMAKE_CURRENT_BINARY_DIR}/isobtrt.bin)
\ No newline at end of file
+CreateBootSectorTarget(isobtrt ${CMAKE_CURRENT_SOURCE_DIR}/isobtrt.asm ${CMAKE_CURRENT_BINARY_DIR}/isobtrt.bin)
+
+add_cd_file(TARGET dosmbr DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/dosmbr.bin FOR all)
+add_cd_file(TARGET ext2 DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/ext2.bin FOR all)
+add_cd_file(TARGET fat32 DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/fat32.bin FOR all)
+add_cd_file(TARGET fat DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/fat.bin FOR all)
+add_cd_file(TARGET isoboot DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/isoboot.bin FOR all)
+add_cd_file(TARGET isobtrt DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/isobtrt.bin FOR all)
\ No newline at end of file
arch/i386/i386cpu.S
arch/i386/i386idt.S
arch/i386/i386pnp.S
+ arch/i386/i386pxe.S
arch/i386/i386trap.S
arch/i386/int386.S
arch/i386/linux.S
fs/fs.c
fs/iso.c
fs/ntfs.c
+ fs/pxe.c
inifile/ini_init.c
inifile/inifile.c
inifile/parse.c
set_source_files_properties(${FREELDR_ARCH_SOURCE} PROPERTIES COMPILE_DEFINITIONS "_NTHAL_;_BLDR_;_NTSYSTEM_")
add_library(freeldr_arch ${FREELDR_ARCH_SOURCE})
+add_dependencies(freeldr_arch bugcodes)
list(APPEND FREELDR_SOURCE
bootmgr.c
add_pch(freeldr ${CMAKE_CURRENT_SOURCE_DIR}/include/freeldr.h ${FREELDR_SOURCE})
add_dependencies(freeldr asm)
+add_cd_file(TARGET freeldr DESTINATION loader NO_CAB FOR all)
+
list(APPEND SETUPLDR_MAIN_SOURCE
bootmgr.c
inffile/inffile.c
add_dependencies(setupldr asm)
-# Bootcd files
-add_minicd_target(setupldr loader setupldr.sys)
-add_minicd_target(freeldr loader freeldr.sys)
-add_livecd_target(setupldr loader)
+add_cd_file(TARGET setupldr DESTINATION loader NO_CAB FOR all)
+
--- /dev/null
+/*
+ * FreeLoader
+ * Copyright (C) 2011 Hervé Poussineau
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+ .text
+ .code16
+
+#define ASM
+
+#include <arch.h>
+
+/*
+ * U16 PxeCallApi(U16 Segment, U16 Offset, U16 Service, VOID *Parameter);
+ *
+ * RETURNS:
+ */
+_pxe_function:
+ .word 0
+_pxe_entry_point:
+ .long 0
+_pxe_buffer_segment:
+ .word 0
+_pxe_buffer_offset:
+ .word 0
+_pxe_result:
+ .word 0
+
+EXTERN(_PxeCallApi)
+ .code32
+ pushl %ebp
+ movl %esp,%ebp
+
+ pushal
+ push %es
+
+ /* copy entry point */
+ movl 0x08(%ebp),%eax
+ shll $16,%eax
+ movw 0x0C(%ebp),%ax
+ movl %eax,_pxe_entry_point
+
+ /* copy function */
+ movw 0x10(%ebp),%ax
+ movw %ax,_pxe_function
+
+ /* convert pointer to data buffer to segment/offset */
+ movl 0x14(%ebp),%eax
+ shrl $4,%eax
+ andl $0xf000,%eax
+ movw %ax,_pxe_buffer_segment
+ movl 0x14(%ebp),%eax
+ andl $0xffff,%eax
+ movw %ax,_pxe_buffer_offset
+
+ call switch_to_real
+ .code16
+
+ movw _pxe_buffer_segment,%ax
+ push %ax
+ movw _pxe_buffer_offset,%ax
+ push %ax
+ movw _pxe_function,%ax
+ push %ax
+ lcall *_pxe_entry_point
+ addw $6,%sp
+ movw %ax,_pxe_result
+
+ call switch_to_prot
+ .code32
+
+ pop %es
+ popal
+
+ movl %ebp,%esp
+ popl %ebp
+
+ movw _pxe_result,%ax
+
+ ret
+
+/* EOF */
+
MachVtbl.Beep = PcBeep;
MachVtbl.PrepareForReactOS = PcPrepareForReactOS;
MachVtbl.GetMemoryMap = PcMemGetMemoryMap;
- MachVtbl.DiskGetBootPath = DiskGetBootPath;
+ MachVtbl.DiskGetBootPath = PcDiskGetBootPath;
MachVtbl.DiskReadLogicalSectors = PcDiskReadLogicalSectors;
MachVtbl.DiskGetDriveGeometry = PcDiskGetDriveGeometry;
MachVtbl.DiskGetCacheableBlockCount = PcDiskGetCacheableBlockCount;
}
}
+BOOLEAN
+PcDiskGetBootPath(char *BootPath, unsigned Size)
+{
+ if (PxeInit())
+ {
+ strcpy(BootPath, "net(0)");
+ return 0;
+ }
+ return DiskGetBootPath(BootPath, Size);
+}
+
/* EOF */
// Allocate memory for it
//
ChunkSize = 8 * 1024 * 1024;
- Percent = PercentPerChunk = 100 / (gRamDiskSize / ChunkSize);
- gRamDiskBase = MmAllocateMemory(gRamDiskSize);
+ if (gRamDiskSize < ChunkSize)
+ Percent = PercentPerChunk = 0;
+ else
+ Percent = PercentPerChunk = 100 / (gRamDiskSize / ChunkSize);
+ gRamDiskBase = MmAllocateMemoryWithType(gRamDiskSize, LoaderXIPRom);
if (!gRamDiskBase)
{
UiMessageBox("Failed to allocate memory for RAM disk\n");
FileData[DeviceId].FileFuncTable = NtfsMount(DeviceId);
if (!FileData[DeviceId].FileFuncTable)
FileData[DeviceId].FileFuncTable = Ext2Mount(DeviceId);
+#endif
+#ifdef _M_IX86
+ if (!FileData[DeviceId].FileFuncTable)
+ FileData[DeviceId].FileFuncTable = PxeMount(DeviceId);
#endif
if (!FileData[DeviceId].FileFuncTable)
{
--- /dev/null
+/*
+ * FreeLoader
+ * Copyright (C) 2011 Hervé Poussineau
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <freeldr.h>
+
+#define NDEBUG
+#include <debug.h>
+
+#define NO_FILE ((ULONG)-1)
+
+static IP4 _ServerIP = { 0, };
+static ULONG _OpenFile = NO_FILE;
+static ULONG _FileSize = 0;
+static ULONG _FilePosition = 0;
+static ULONG _PacketPosition = 0;
+static UCHAR _Packet[4096];
+static UCHAR* _CachedFile = NULL;
+static ULONG _CachedLength = 0;
+
+static PPXE
+FindPxeStructure(VOID)
+{
+ PPXE Ptr;
+ UCHAR Checksum;
+ UCHAR i;
+
+ /* Find the '!PXE' structure */
+ Ptr = (PPXE)0xA0000;
+ while ((ULONG)Ptr > 0x10000)
+ {
+ Ptr = (PPXE)((ULONG)Ptr - 0x10);
+
+ /* Look for signature */
+ if (memcmp(Ptr, "!PXE", 4) != 0)
+ continue;
+
+ /* Check size */
+ if (Ptr->StructLength != sizeof(PXE))
+ continue;
+
+ /* Check checksum */
+ Checksum = 0;
+ for (i = 0; i < Ptr->StructLength; i++)
+ Checksum += *((PUCHAR)Ptr + i);
+ if (Checksum != 0)
+ continue;
+
+ DPRINTM(DPRINT_FILESYSTEM, "!PXE structure found at %p\n", Ptr);
+ return Ptr;
+ }
+
+ return NULL;
+}
+
+static PPXE GetPxeStructure(VOID)
+{
+ static PPXE pPxe = NULL;
+ static BOOLEAN bPxeSearched = FALSE;
+ if (!bPxeSearched)
+ {
+ pPxe = FindPxeStructure();
+ bPxeSearched = TRUE;
+ }
+ return pPxe;
+}
+
+extern PXENV_EXIT PxeCallApi(UINT16 Segment, UINT16 Offset, UINT16 Service, VOID *Parameter);
+BOOLEAN CallPxe(UINT16 Service, PVOID Parameter)
+{
+ PPXE pxe;
+ PXENV_EXIT exit;
+
+ pxe = GetPxeStructure();
+ if (!pxe)
+ return FALSE;
+
+ if (Service != PXENV_TFTP_READ)
+ {
+ // HACK: this delay shouldn't be necessary
+ KeStallExecutionProcessor(100 * 1000); // 100 ms
+ DPRINTM(DPRINT_FILESYSTEM, "PxeCall(0x%x, %p)\n", Service, Parameter);
+ }
+
+ exit = PxeCallApi(pxe->EntryPointSP.segment, pxe->EntryPointSP.offset, Service, Parameter);
+ if (exit != PXENV_EXIT_SUCCESS)
+ {
+ DPRINTM(DPRINT_FILESYSTEM, "PxeCall(0x%x, %p) failed with exit=%d status=0x%x\n",
+ Service, Parameter, exit, *(PXENV_STATUS*)Parameter);
+ return FALSE;
+ }
+ if (*(PXENV_STATUS*)Parameter != PXENV_STATUS_SUCCESS)
+ {
+ DPRINTM(DPRINT_FILESYSTEM, "PxeCall(0x%x, %p) succeeded, but returned error status 0x%x\n",
+ Service, Parameter, *(PXENV_STATUS*)Parameter);
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static LONG PxeClose(ULONG FileId)
+{
+ t_PXENV_TFTP_CLOSE closeData;
+
+ if (_OpenFile == NO_FILE || FileId != _OpenFile)
+ return EBADF;
+
+ RtlZeroMemory(&closeData, sizeof(closeData));
+ if (!CallPxe(PXENV_TFTP_CLOSE, &closeData))
+ return EIO;
+
+ _OpenFile = NO_FILE;
+ if (_CachedFile)
+ {
+ MmHeapFree(_CachedFile);
+ _CachedFile = NULL;
+ }
+ return ESUCCESS;
+}
+
+static LONG PxeGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
+{
+ if (_OpenFile == NO_FILE || FileId != _OpenFile)
+ return EBADF;
+
+ RtlZeroMemory(Information, sizeof(FILEINFORMATION));
+ Information->EndingAddress.LowPart = _FileSize;
+ Information->CurrentAddress.LowPart = _FilePosition;
+
+ return ESUCCESS;
+}
+
+static LONG PxeOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
+{
+ t_PXENV_TFTP_GET_FSIZE sizeData;
+ t_PXENV_TFTP_OPEN openData;
+
+ if (_OpenFile != NO_FILE)
+ return EIO;
+ if (OpenMode != OpenReadOnly)
+ return EACCES;
+
+ RtlZeroMemory(&sizeData, sizeof(sizeData));
+ sizeData.ServerIPAddress = _ServerIP;
+ strncpy((CHAR*)sizeData.FileName, Path, sizeof(sizeData.FileName));
+ if (!CallPxe(PXENV_TFTP_GET_FSIZE, &sizeData))
+ return EIO;
+ _FileSize = sizeData.FileSize;
+ if (_FileSize < 1024 * 1024)
+ {
+ _CachedFile = MmHeapAlloc(_FileSize);
+ // Don't check for allocation failure, we support _CachedFile = NULL
+ }
+ _CachedLength = 0;
+
+ RtlZeroMemory(&openData, sizeof(openData));
+ openData.ServerIPAddress = _ServerIP;
+ strncpy((CHAR*)openData.FileName, Path, sizeof(openData.FileName));
+ openData.PacketSize = sizeof(_Packet);
+
+ if (!CallPxe(PXENV_TFTP_OPEN, &openData))
+ {
+ if (_CachedFile)
+ {
+ MmHeapFree(_CachedFile);
+ _CachedFile = NULL;
+ }
+ return ENOENT;
+ }
+
+ _FilePosition = 0;
+ _PacketPosition = 0;
+
+ _OpenFile = *FileId;
+ return ESUCCESS;
+}
+
+static LONG PxeRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
+{
+ t_PXENV_TFTP_READ readData;
+ ULONG i;
+
+ *Count = 0;
+
+ if (_OpenFile == NO_FILE || FileId != _OpenFile)
+ return EBADF;
+
+ RtlZeroMemory(&readData, sizeof(readData));
+ readData.Buffer.segment = ((UINT32)_Packet & 0xf0000) / 16;
+ readData.Buffer.offset = (UINT32)_Packet & 0xffff;
+
+ // Get new packets as required
+ while (N > 0)
+ {
+ if (N < _CachedLength - _FilePosition)
+ i = N;
+ else
+ i = _CachedLength - _FilePosition;
+ if (_CachedFile)
+ RtlCopyMemory(Buffer, _CachedFile + _FilePosition, i);
+ else
+ RtlCopyMemory(Buffer, _Packet + _FilePosition - _PacketPosition, i);
+ _FilePosition += i;
+ Buffer = (UCHAR*)Buffer + i;
+ *Count += i;
+ N -= i;
+ if (N == 0)
+ break;
+
+ if (!CallPxe(PXENV_TFTP_READ, &readData))
+ return EIO;
+ if (_CachedFile)
+ RtlCopyMemory(_CachedFile + _CachedLength, _Packet, readData.BufferSize);
+ _PacketPosition = _CachedLength;
+ _CachedLength += readData.BufferSize;
+ }
+
+ return ESUCCESS;
+}
+
+static LONG PxeSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
+{
+ t_PXENV_TFTP_READ readData;
+
+ if (_OpenFile == NO_FILE || FileId != _OpenFile)
+ return EBADF;
+
+ if (Position->HighPart != 0 || SeekMode != SeekAbsolute)
+ return EINVAL;
+
+ if (!_CachedFile && Position->LowPart < _FilePosition)
+ // We don't support backward seek without caching
+ return EINVAL;
+
+ RtlZeroMemory(&readData, sizeof(readData));
+ readData.Buffer.segment = ((UINT32)_Packet & 0xf0000) / 16;
+ readData.Buffer.offset = (UINT32)_Packet & 0xffff;
+
+ // Get new packets as required
+ while (Position->LowPart > _CachedLength)
+ {
+ if (!CallPxe(PXENV_TFTP_READ, &readData))
+ return EIO;
+ if (_CachedFile)
+ {
+ RtlCopyMemory(_CachedFile + _CachedLength, _Packet, readData.BufferSize);
+ }
+ _PacketPosition = _CachedLength;
+ _CachedLength += readData.BufferSize;
+ }
+
+ _FilePosition = Position->LowPart;
+ return ESUCCESS;
+}
+
+static const DEVVTBL PxeVtbl = {
+ PxeClose,
+ PxeGetFileInformation,
+ PxeOpen,
+ PxeRead,
+ PxeSeek,
+};
+
+const DEVVTBL* PxeMount(ULONG DeviceId)
+{
+ if (GetPxeStructure() == NULL)
+ return NULL;
+ return &PxeVtbl;
+}
+
+static LONG PxeDiskClose(ULONG FileId)
+{
+ // Nothing to do
+ return ESUCCESS;
+}
+
+static LONG PxeDiskGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
+{
+ // Not implemented
+ return EINVAL;
+}
+
+static LONG PxeDiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
+{
+ // Nothing to do
+ return ESUCCESS;
+}
+
+static LONG PxeDiskRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
+{
+ // Not implemented
+ return EINVAL;
+}
+
+static LONG PxeDiskSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
+{
+ // Not implemented
+ return EINVAL;
+}
+
+static const DEVVTBL PxeDiskVtbl = {
+ PxeDiskClose,
+ PxeDiskGetFileInformation,
+ PxeDiskOpen,
+ PxeDiskRead,
+ PxeDiskSeek,
+};
+
+static BOOLEAN GetCachedInfo(VOID)
+{
+ t_PXENV_GET_CACHED_INFO Data;
+ BOOLEAN res;
+ UCHAR* Packet;
+
+ RtlZeroMemory(&Data, sizeof(Data));
+ Data.PacketType = PXENV_PACKET_TYPE_CACHED_REPLY;
+
+ res = CallPxe(PXENV_GET_CACHED_INFO, &Data);
+ if (!res)
+ return FALSE;
+ if (Data.BufferSize < 36)
+ return FALSE;
+ Packet = (UCHAR*)((UINT32)(Data.Buffer.segment << 4) + Data.Buffer.offset);
+ RtlCopyMemory(&_ServerIP, Packet + 20, sizeof(IP4));
+ return TRUE;
+}
+
+BOOLEAN PxeInit(VOID)
+{
+ static BOOLEAN Initialized = FALSE;
+ static BOOLEAN Status = FALSE;
+
+ // Do initialization only once
+ if (Initialized)
+ return Status;
+ Initialized = TRUE;
+
+ // Check if PXE is available
+ if (GetPxeStructure() && GetCachedInfo())
+ {
+ FsRegisterDevice("net(0)", &PxeDiskVtbl);
+ Status = TRUE;
+ }
+
+ return Status;
+}
+
ULONG PnpBiosGetDeviceNode(UCHAR *NodeId,
UCHAR *NodeBuffer);
+/* i386pxe.S */
+USHORT PxeCallApi(USHORT Segment, USHORT Offset, USHORT Service, VOID* Parameter);
+
/* EOF */
ULONG PcMemGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize);
+BOOLEAN PcDiskGetBootPath(char *BootPath, unsigned Size);
BOOLEAN PcDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer);
BOOLEAN PcDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry);
BOOLEAN PcDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry);
--- /dev/null
+#ifndef _PXE_
+#define _PXE_
+
+/* Basic types */
+
+typedef UINT16 OFF16;
+typedef UINT16 PXENV_EXIT;
+typedef UINT16 PXENV_STATUS;
+typedef UINT16 SEGSEL;
+typedef UINT16 UDP_PORT;
+typedef UINT32 ADDR32;
+
+#include <pshpack1.h>
+
+#define IP_ADDR_LEN 4
+typedef union
+{
+ UINT32 num;
+ UINT8 array[IP_ADDR_LEN];
+} IP4;
+
+#define MAC_ADDR_LEN 16
+typedef UINT8 MAC_ADDR[MAC_ADDR_LEN];
+
+typedef struct s_SEGDESC
+{
+ UINT16 segment_address;
+ UINT32 physical_address;
+ UINT16 seg_size;
+} SEGDESC;
+
+typedef struct s_SEGOFF16
+{
+ OFF16 offset;
+ SEGSEL segment;
+} SEGOFF16;
+
+typedef struct s_PXE
+{
+ UINT8 Signature[4];
+ UINT8 StructLength;
+ UINT8 StructCksum;
+ UINT8 StructRev;
+ UINT8 reserved1;
+ SEGOFF16 UNDIROMID;
+ SEGOFF16 BaseROMID;
+ SEGOFF16 EntryPointSP;
+ SEGOFF16 EntryPointESP;
+ SEGOFF16 StatusCallout;
+ UINT8 reserved2;
+ UINT8 SegDescCnt;
+ SEGSEL FirstSelector;
+ SEGDESC Stack;
+ SEGDESC UNDIData;
+ SEGDESC UNDICode;
+ SEGDESC UNDICodeWrite;
+ SEGDESC BC_Data;
+ SEGDESC BC_Code;
+ SEGDESC BC_CodeWrite;
+} PXE, *PPXE;
+
+/* PXENV structures */
+
+typedef struct s_PXENV_START_UNDI
+{
+ PXENV_STATUS Status;
+ UINT16 AX;
+ UINT16 BX;
+ UINT16 DX;
+ UINT16 DI;
+ UINT16 ES;
+} t_PXENV_START_UNDI;
+
+typedef struct s_PXENV_UNDI_STARTUP
+{
+ PXENV_STATUS Status;
+} t_PXENV_UNDI_STARTUP;
+
+typedef struct s_PXENV_UNDI_CLEANUP
+{
+ PXENV_STATUS Status;
+} t_PXENV_UNDI_CLEANUP;
+
+typedef struct s_PXENV_UNDI_INITIALIZE
+{
+ PXENV_STATUS Status;
+ ADDR32 ProtocolIni;
+ UINT8 reserved[8];
+} t_PXENV_UNDI_INITIALIZE;
+
+#define MAXNUM_MCADDR 8
+typedef struct s_PXENV_UNDI_MCAST_ADDRESS
+{
+ UINT16 MCastAddrCount;
+ MAC_ADDR McastAddr[MAXNUM_MCADDR];
+} t_PXENV_UNDI_MCAST_ADDRESS;
+
+typedef struct s_PXENV_UNDI_RESET
+{
+ PXENV_STATUS Status;
+ t_PXENV_UNDI_MCAST_ADDRESS R_Mcast_Buf;
+} t_PXENV_UNDI_RESET;
+
+typedef struct s_PXENV_UNDI_SHUTDOWN
+{
+ PXENV_STATUS Status;
+} t_PXENV_UNDI_SHUTDOWN;
+
+typedef struct s_PXENV_UNDI_OPEN
+{
+ PXENV_STATUS Status;
+ UINT16 OpenFlag;
+ UINT16 PktFilter;
+#define FLTR_DIRECTED 0x01
+#define FLTR_BRDCST 0x02
+#define FLTR_PRMSCS 0x04
+#define FLTR_SRC_RTG 0x08
+
+ t_PXENV_UNDI_MCAST_ADDRESS R_Mcast_Buf;
+} t_PXENV_UNDI_OPEN;
+
+typedef struct s_PXENV_UNDI_CLOSE
+{
+ PXENV_STATUS Status;
+} t_PXENV_UNDI_CLOSE;
+
+typedef struct s_PXENV_UNDI_TRANSMIT
+{
+ PXENV_STATUS Status;
+ UINT8 Protocol;
+#define P_UNKNOWN 0
+#define P_IP 1
+#define P_ARP 2
+#define P_RARP 3
+
+ UINT8 XmitFlag;
+#define XMT_DESTADDR 0x00
+#define XMT_BROADCAST 0x01
+
+ SEGOFF16 DestAddr;
+ SEGOFF16 TBD;
+ UINT32 Reserved[2];
+} t_PXENV_UNDI_TRANSMIT;
+
+#define MAX_DATA_BLKS 8
+typedef struct s_PXENV_UNDI_TBD
+{
+ UINT16 ImmedLength;
+ SEGOFF16 Xmit;
+ UINT16 DataBlkCount;
+ struct DataBlk
+ {
+ UINT8 TDPtrType;
+ UINT8 TDRsvdByte;
+ UINT8 TDDataLen;
+ SEGOFF16 TDDataPtr;
+ } DataBlock[MAX_DATA_BLKS];
+} t_PXENV_UNDI_TBD;
+
+typedef struct s_PXENV_UNDI_SET_MCAST_ADDRESS
+{
+ PXENV_STATUS Status;
+ t_PXENV_UNDI_MCAST_ADDRESS R_Mcast_Buf;
+} t_PXENV_UNDI_SET_MCAST_ADDRESS;
+
+typedef struct s_PXENV_UNDI_SET_STATION_ADDRESS
+{
+ PXENV_STATUS Status;
+ MAC_ADDR StationAddress;
+} t_PXENV_UNDI_SET_STATION_ADDRESS;
+
+typedef struct s_PXENV_UNDI_SET_PACKET_FILTER
+{
+ PXENV_STATUS Status;
+ UINT8 filter;
+} t_PXENV_UNDI_SET_PACKET_FILTER;
+
+typedef struct s_PXENV_UNDI_GET_INFORMATION
+{
+ PXENV_STATUS Status;
+ UINT16 BaseIo;
+ UINT16 IntNumber;
+ UINT16 MaxTranUnit;
+ UINT16 HwType;
+#define ETHER_TYPE 1
+#define EXP_ETHER_TYPE 2
+#define IEEE_TYPE 3
+#define ARCNET_TYPE 4
+
+ UINT16 HwAddrLen;
+ MAC_ADDR CurrentNodeAddress;
+ MAC_ADDR PermNodeAddress;
+ SEGSEL ROMAddress;
+ UINT16 RxBufCt;
+ UINT16 TxBufCt;
+} t_PXENV_UNDI_GET_INFORMATION;
+
+typedef struct s_PXENV_UNDI_GET_STATISTICS
+{
+ PXENV_STATUS Status;
+ UINT32 XmtGoodFrames;
+ UINT32 RcvGoodFrames;
+ UINT32 RcvCRCErrors;
+ UINT32 RcvResourceErrors;
+} t_PXENV_UNDI_GET_STATISTICS;
+
+typedef struct s_PXENV_UNDI_CLEAR_STATISTICS
+{
+ PXENV_STATUS Status;
+} t_PXENV_UNDI_CLEAR_STATISTICS;
+
+typedef struct s_PXENV_UNDI_INITIATE_DIAGS
+{
+ PXENV_STATUS Status;
+} t_PXENV_UNDI_INITIATE_DIAGS;
+
+typedef struct s_PXENV_UNDI_FORCE_INTERRUPT
+{
+ PXENV_STATUS Status;
+} t_PXENV_UNDI_FORCE_INTERRUPT;
+
+typedef struct s_PXENV_UNDI_GET_MCAST_ADDRESS
+{
+ PXENV_STATUS Status;
+ IP4 InetAddr;
+ MAC_ADDR MediaAddr;
+} t_PXENV_UNDI_GET_MCAST_ADDRESS;
+
+typedef struct s_PXENV_UNDI_GET_NIC_TYPE
+{
+ PXENV_STATUS Status;
+ UINT8 NicType;
+#define PCI_NIC 2
+#define PnP_NIC 3
+#define CardBus_NIC 4
+
+ union
+ {
+ struct
+ {
+ UINT16 Vendor_ID;
+ UINT16 Dev_ID;
+ UINT8 Base_Class;
+ UINT8 Sub_Class;
+ UINT8 Prog_Intf;
+ UINT8 Rev;
+ UINT16 BusDevFunc;
+ UINT16 SubVendor_ID;
+ UINT16 SubDevice_ID;
+ } pci, cardbus;
+ struct
+ {
+ UINT32 EISA_Dev_ID;
+ UINT8 Base_Class;
+ UINT8 Sub_Class;
+ UINT8 Prog_Intf;
+ UINT16 CardSelNum;
+ } pnp;
+ } info;
+} t_PXENV_UNDI_GET_NIC_TYPE;
+
+typedef struct s_PXENV_UNDI_GET_IFACE_INFO
+{
+ PXENV_STATUS Status;
+ UINT8 IfaceType[16];
+ UINT32 LinkSpeed;
+ UINT32 ServiceFlags;
+ UINT32 Reserved[4];
+} t_PXENV_UNDI_GET_IFACE_INFO;
+
+typedef struct s_PXENV_UNDI_ISR
+{
+ PXENV_STATUS Status;
+ UINT16 FuncFlag;
+ UINT16 BufferLength;
+ UINT16 FrameLength;
+ UINT16 FrameHeaderLength;
+ SEGOFF16 Frame;
+ UINT8 ProtType;
+ UINT8 PktType;
+} t_PXENV_UNDI_ISR;
+
+#define PXENV_UNDI_ISR_IN_START 1
+#define PXENV_UNDI_ISR_IN_PROCESS 2
+#define PXENV_UNDI_ISR_IN_GET_NEXT 3
+
+/* One of these will be returned for PXENV_UNDI_ISR_IN_START */
+#define PXENV_UNDI_ISR_OUT_OURS 0
+#define PXENV_UNDI_ISR_OUT_NOT_OURS 1
+
+/* One of these will be returned for PXENV_UNDI_ISR_IN_PROCESS and PXENV_UNDI_ISR_IN_GET_NEXT */
+#define PXENV_UNDI_ISR_OUT_DONE 0
+#define PXENV_UNDI_ISR_OUT_TRANSMIT 2
+#define PXENV_UNDI_ISR_OUT_RECEIVE 3
+#define PXENV_UNDI_ISR_OUT_BUSY 4
+
+typedef struct s_PXENV_UNDI_GET_STATE
+{
+ PXENV_STATUS Status;
+#define PXE_UNDI_GET_STATE_STARTED 1
+#define PXE_UNDI_GET_STATE_INITIALIZED 2
+#define PXE_UNDI_GET_STATE_OPENED 3
+ UINT8 UNDIState;
+} t_PXENV_UNDI_GET_STATE;
+
+typedef struct s_PXENV_STOP_UNDI
+{
+ PXENV_STATUS Status;
+} t_PXENV_STOP_UNDI;
+
+typedef struct s_PXENV_TFTP_OPEN
+{
+ PXENV_STATUS Status;
+ IP4 ServerIPAddress;
+ IP4 GatewayIPAddress;
+ UINT8 FileName[128];
+ UDP_PORT TFTPPort;
+ UINT16 PacketSize;
+} t_PXENV_TFTP_OPEN;
+
+typedef struct s_PXENV_TFTP_CLOSE
+{
+ PXENV_STATUS Status;
+} t_PXENV_TFTP_CLOSE;
+
+typedef struct s_PXENV_TFTP_READ
+{
+ PXENV_STATUS Status;
+ UINT16 PacketNumber;
+ UINT16 BufferSize;
+ SEGOFF16 Buffer;
+} t_PXENV_TFTP_READ;
+
+typedef struct s_PXENV_TFTP_READ_FILE
+{
+ PXENV_STATUS Status;
+ UINT8 FileName[128];
+ UINT32 BufferSize;
+ ADDR32 Buffer;
+ IP4 ServerIPAddress;
+ IP4 GatewayIPAddress;
+ IP4 McastIPAddress;
+ UDP_PORT TFTPClntPort;
+ UDP_PORT TFTPSvrPort;
+ UINT16 TFTPOpenTimeOut;
+ UINT16 TFTPReopenDelay;
+} t_PXENV_TFTP_READ_FILE;
+
+typedef struct s_PXENV_TFTP_GET_FSIZE
+{
+ PXENV_STATUS Status;
+ IP4 ServerIPAddress;
+ IP4 GatewayIPAddress;
+ UINT8 FileName[128];
+ UINT32 FileSize;
+} t_PXENV_TFTP_GET_FSIZE;
+
+typedef struct s_PXENV_UDP_OPEN
+{
+ PXENV_STATUS Status;
+ IP4 src_ip;
+} t_PXENV_UDP_OPEN;
+
+typedef struct s_PXENV_UDP_CLOSE
+{
+ PXENV_STATUS Status;
+} t_PXENV_UDP_CLOSE;
+
+typedef struct s_PXENV_UDP_READ
+{
+ PXENV_STATUS Status;
+ IP4 ip;
+ IP4 dest_ip;
+ UDP_PORT s_port;
+ UDP_PORT d_port;
+ UINT16 buffer_size;
+ SEGOFF16 buffer;
+} t_PXENV_UDP_READ;
+
+typedef struct s_PXENV_UDP_WRITE
+{
+ PXENV_STATUS Status;
+ IP4 ip;
+ IP4 gw;
+ UDP_PORT src_port;
+ UDP_PORT dst_port;
+ UINT16 buffer_size;
+ SEGOFF16 buffer;
+} t_PXENV_UDP_WRITE;
+
+typedef struct s_PXENV_UNLOAD_STACK
+{
+ PXENV_STATUS Status;
+ UINT8 reserved[10];
+} t_PXENV_UNLOAD_STACK;
+
+typedef struct s_PXENV_GET_CACHED_INFO
+{
+ PXENV_STATUS Status;
+ UINT16 PacketType;
+#define PXENV_PACKET_TYPE_DHCP_DISCOVER 1
+#define PXENV_PACKET_TYPE_DHCP_ACK 2
+#define PXENV_PACKET_TYPE_CACHED_REPLY 3
+ UINT16 BufferSize;
+ SEGOFF16 Buffer;
+ UINT16 BufferLimit;
+} t_PXENV_GET_CACHED_INFO;
+
+typedef struct s_PXENV_START_BASE
+{
+ PXENV_STATUS Status;
+} t_PXENV_START_BASE;
+
+typedef struct s_PXENV_STOP_BASE
+{
+ PXENV_STATUS Status;
+} t_PXENV_STOP_BASE;
+
+typedef struct bootph
+{
+ UINT8 opcode;
+#define BOOTP_REQ 1
+#define BOOTP_REP 2
+
+ UINT8 Hardware;
+ UINT8 Hardlen;
+ UINT8 Gatehops;
+ UINT32 ident;
+ UINT16 seconds;
+ UINT16 Flags;
+#define BOOTP_BCAST 0x8000
+
+ IP4 cip;
+ IP4 yip;
+ IP4 sip;
+ IP4 gip;
+ MAC_ADDR CAddr;
+ UINT8 Sname[64];
+ UINT8 bootfile[128];
+ union
+ {
+#define BOOTP_DHCPVEND 1024 /* DHCP extended vendor field size */
+ UINT8 d[BOOTP_DHCPVEND];
+ struct
+ {
+ UINT8 magic[4];
+#define VM_RFC1048 0x63825363
+ UINT32 flags;
+ UINT8 pad[56];
+ } v;
+ } vendor;
+} BOOTPLAYER;
+
+#include <poppack.h>
+
+/* Exit codes returned in AX by a PXENV API service */
+#define PXENV_EXIT_SUCCESS 0x0000
+#define PXENV_EXIT_FAILURE 0x0001
+
+/* Generic API status & error codes that are reported by the loader */
+#define PXENV_STATUS_SUCCESS 0x00
+#define PXENV_STATUS_FAILURE 0x01 /* General failure */
+#define PXENV_STATUS_BAD_FUNC 0x02 /* Invalid function number */
+#define PXENV_STATUS_UNSUPPORTED 0x03 /* Function is not yet supported */
+#define PXENV_STATUS_KEEP_UNDI 0x04 /* UNDI must not be unloaded from base memory */
+#define PXENV_STATUS_KEEP_ALL 0x05
+#define PXENV_STATUS_OUT_OF_RESOURCES 0x06 /* Base code and UNDI must not be unloaded from base memory */
+
+/* ARP errors (0x10 to 0x1f) */
+#define PXENV_STATUS_ARP_TIMEOUT 0x11
+
+/* Base code state errors */
+#define PXENV_STATUS_UDP_CLOSED 0x18
+#define PXENV_STATUS_UDP_OPEN 0x19
+#define PXENV_STATUS_TFTP_CLOSED 0x1a
+#define PXENV_STATUS_TFTP_OPEN 0x1b
+
+/* BIOS/system errors (0x20 to 0x2f) */
+#define PXENV_STATUS_MCOPY_PROBLEM 0x20
+#define PXENV_STATUS_BIS_INTEGRITY_FAILURE 0x21
+#define PXENV_STATUS_BIS_VALIDATE_FAILURE 0x22
+#define PXENV_STATUS_BIS_INIT_FAILURE 0x23
+#define PXENV_STATUS_BIS_SHUTDOWN_FAILURE 0x24
+#define PXENV_STATUS_BIS_GBOA_FAILURE 0x25
+#define PXENV_STATUS_BIS_FREE_FAILURE 0x26
+#define PXENV_STATUS_BIS_GSI_FAILURE 0x27
+#define PXENV_STATUS_BIS_BAD_CKSUM 0x28
+
+/* TFTP/MTFTP errors (0x30 to 0x3f) */
+#define PXENV_STATUS_TFTP_CANNOT_ARP_ADDRESS 0x30
+#define PXENV_STATUS_TFTP_OPEN_TIMEOUT 0x32
+#define PXENV_STATUS_TFTP_UNKNOWN_OPCODE 0x33
+#define PXENV_STATUS_TFTP_READ_TIMEOUT 0x35
+#define PXENV_STATUS_TFTP_ERROR_OPCODE 0x36
+#define PXENV_STATUS_TFTP_CANNOT_OPEN_CONNECTION 0x38
+#define PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION 0x39
+#define PXENV_STATUS_TFTP_TOO_MANY_PACKAGES 0x3a
+#define PXENV_STATUS_TFTP_FILE_NOT_FOUND 0x3b
+#define PXENV_STATUS_TFTP_ACCESS_VIOLATION 0x3c
+#define PXENV_STATUS_TFTP_NO_MCAST_ADDRESS 0x3d
+#define PXENV_STATUS_TFTP_NO_FILESIZE 0x3e
+#define PXENV_STATUS_TFTP_INVALID_PACKET_SIZE 0x3f
+
+/* Reserved errors (0x40 to 0x4f) */
+
+/* DHCP/BOOTP errors (0x50 to 0x5f) */
+#define PXENV_STATUS_DHCP_TIMEOUT 0x51
+#define PXENV_STATUS_DHCP_NO_IP_ADDRESS 0x52
+#define PXENV_STATUS_DHCP_NO_BOOTFILE_NAME 0x53
+#define PXENV_STATUS_DHCP_BAD_IP_ADDRESS 0x54
+
+/* Driver errors (0x60 to 0x6f) */
+/* These errors are for UNDI compatible NIC drivers */
+#define PXENV_STATUS_UNDI_INVALID_FUNCTION 0x60
+#define PXENV_STATUS_UNDI_MEDIATEST_FAILED 0x61
+#define PXENV_STATUS_UNDI_CANNOT_INIT_NIC_FOR_MCAST 0x62
+#define PXENV_STATUS_UNDI_CANNOT_INITIALIZE_NIC 0x63
+#define PXENV_STATUS_UNDI_CANNOT_INITIALIZE_PHY 0x64
+#define PXENV_STATUS_UNDI_CANNOT_READ_CONFIG_DATA 0x65
+#define PXENV_STATUS_UNDI_CANNOT_READ_INIT_DATA 0x66
+#define PXENV_STATUS_UNDI_BAD_MAC_ADDRESS 0x67
+#define PXENV_STATUS_UNDI_BAD_EEPROM_CHECKSUM 0x68
+#define PXENV_STATUS_UNDI_ERROR_SETTING_ISR 0x69
+#define PXENV_STATUS_UNDI_INVALID_STATE 0x6a
+#define PXENV_STATUS_UNDI_TRANSMIT_ERROR 0x6b
+#define PXENV_STATUS_UNDI_INVALID_PARAMETER 0x6c
+
+/* ROM and NBP bootstrap errors (0x70 to 0x7f) */
+#define PXENV_STATUS_BSTRAP_PROMPT_MENU 0x74
+#define PXENV_STATUS_BSTRAP_MCAST_ADDR 0x76
+#define PXENV_STATUS_BSTRAP_MISSING_LIST 0x77
+#define PXENV_STATUS_BSTRAP_NO_RESPONSE 0x78
+#define PXENV_STATUS_BSTRAP_FILE_TOO_BIG 0x79
+
+/* Environment NBP errors (0x80 to 0x8f) */
+
+/* Reserved errors (0x90 to 0x9f) */
+
+/* Misc. errors (0xa0 to 0xaf) */
+#define PXENV_STATUS_BINL_CANCELED_BY_KEYSTROKE 0xa0
+#define PXENV_STATUS_BINL_NO_PXE_SERVER 0xa1
+#define PXENV_STATUS_NOT_AVAILABLE_IN_PMODE 0xa2
+#define PXENV_STATUS_NOT_AVAILABLE_IN_RMODE 0xa3
+
+/* BUSD errors (0xb0 to 0xbf) */
+#define PXENV_STATUS_BUSD_DEVICE_NOT_SUPPORTED 0xb0
+
+/* Loader errors (0xc0 to 0xcf) */
+#define PXENV_STATUS_LOADER_NO_FREE_BASE_MEMORY 0xc0
+#define PXENV_STATUS_LOADER_NO_BC_ROMID 0xc1
+#define PXENV_STATUS_LOADER_BAD_BC_ROMID 0xc2
+#define PXENV_STATUS_LOADER_BAD_BC_RUNTIME_IMAGE 0xc3
+#define PXENV_STATUS_LOADER_NO_UNDI_ROMID 0xc4
+#define PXENV_STATUS_LOADER_BAD_UNDI_ROMID 0xc5
+#define PXENV_STATUS_LOADER_BAD_UNDI_DRIVER_IMAGE 0xc6
+#define PXENV_STATUS_LOADER_NO_PXE_STRUCT 0xc8
+#define PXENV_STATUS_LOADER_NO_PXENV_STRUCT 0xc9
+#define PXENV_STATUS_LOADER_UNDI_START 0xca
+#define PXENV_STATUS_LOADER_BC_START 0xcb
+
+/* Vendor errors (0xd0 to 0xff) */
+
+/* PXENV API services */
+#define PXENV_START_UNDI 0x00
+#define PXENV_UNDI_STARTUP 0x01
+#define PXENV_UNDI_CLEANUP 0x02
+#define PXENV_UNDI_INITIALIZE 0x03
+#define PXENV_UNDI_RESET_ADAPTER 0x04
+#define PXENV_UNDI_SHUTDOWN 0x05
+#define PXENV_UNDI_OPEN 0x06
+#define PXENV_UNDI_CLOSE 0x07
+#define PXENV_UNDI_TRANSMIT 0x08
+#define PXENV_UNDI_SET_MCAST_ADDRESS 0x09
+#define PXENV_UNDI_SET_STATION_ADDRESS 0x0a
+#define PXENV_UNDI_SET_PACKET_FILTER 0x0b
+#define PXENV_UNDI_GET_INFORMATION 0x0c
+#define PXENV_UNDI_GET_STATISTICS 0x0d
+#define PXENV_UNDI_CLEAR_STATISTICS 0x0e
+#define PXENV_UNDI_INITIATE_DIAGS 0x0f
+#define PXENV_UNDI_FORCE_INTERRUPT 0x10
+#define PXENV_UNDI_GET_MCAST_ADDRESS 0x11
+#define PXENV_UNDI_GET_NIC_TYPE 0x12
+#define PXENV_UNDI_GET_IFACE_INFO 0x13
+#define PXENV_UNDI_ISR 0x14
+#define PXENV_UNDI_GET_STATE 0x15
+#define PXENV_STOP_UNDI 0x15
+#define PXENV_TFTP_OPEN 0x20
+#define PXENV_TFTP_CLOSE 0x21
+#define PXENV_TFTP_READ 0x22
+#define PXENV_TFTP_READ_FILE 0x23
+#define PXENV_TFTP_GET_FSIZE 0x25
+#define PXENV_UDP_OPEN 0x30
+#define PXENV_UDP_CLOSE 0x31
+#define PXENV_UDP_READ 0x32
+#define PXENV_UDP_WRITE 0x33
+#define PXENV_UNLOAD_STACK 0x70
+#define PXENV_GET_CACHED_INFO 0x71
+#define PXENV_RESTART_TFTP 0x73
+#define PXENV_START_BASE 0x75
+#define PXENV_STOP_BASE 0x76
+
+#endif
#include <fs/fat.h>
#include <fs/ntfs.h>
#include <fs/iso.h>
+#include <fs/pxe.h>
/* ui support */
#include <ui/gui.h>
#include <ui/minitui.h>
#include <arch/i386/machpc.h>
#include <arch/i386/machxbox.h>
#include <arch/i386/miscboot.h>
+#include <arch/i386/pxe.h>
#include <internal/i386/intrin_i.h>
#elif defined(_M_PPC)
#include <arch/powerpc/hardware.h>
--- /dev/null
+/*
+ * FreeLoader PXE support
+ * Copyright (C) 2011 Hervé Poussineau
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __PXE_H
+#define __PXE_H
+
+const DEVVTBL* PxeMount(ULONG DeviceId);
+
+BOOLEAN PxeInit(VOID);
+
+#endif /* #defined __PXE_H */
VOID
SetupLdrScanBootDrivers(PLOADER_PARAMETER_BLOCK LoaderBlock, HINF InfHandle, LPCSTR SearchPath)
{
- INFCONTEXT InfContext;
+ INFCONTEXT InfContext, dirContext;
BOOLEAN Status;
- LPCSTR Media, DriverName;
+ LPCSTR Media, DriverName, dirIndex, ImagePath;
WCHAR ServiceName[256];
- WCHAR ImagePath[256];
+ WCHAR ImagePathW[256];
/* Open inf section */
if (!InfFindFirstLine(InfHandle, "SourceDisksFiles", NULL, &InfContext))
do
{
if (InfGetDataField(&InfContext, 7, &Media) &&
- InfGetDataField(&InfContext, 0, &DriverName))
+ InfGetDataField(&InfContext, 0, &DriverName) &&
+ InfGetDataField(&InfContext, 13, &dirIndex))
{
- if (strcmp(Media, "x") == 0)
+ if ((strcmp(Media, "x") == 0) &&
+ InfFindFirstLine(InfHandle, "Directories", dirIndex, &dirContext) &&
+ InfGetDataField(&dirContext, 1, &ImagePath))
{
/* Convert name to widechar */
swprintf(ServiceName, L"%S", DriverName);
+ /* Prepare image path */
+ swprintf(ImagePathW, L"%S", ImagePath);
+ wcscat(ImagePathW, L"\\");
+ wcscat(ImagePathW, ServiceName);
+
/* Remove .sys extension */
ServiceName[wcslen(ServiceName) - 4] = 0;
- /* Prepare image path */
- swprintf(ImagePath, L"%S", DriverName);
-
/* Add it to the list */
Status = WinLdrAddDriverToList(&LoaderBlock->BootDriverListHead,
L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\",
- ImagePath,
+ ImagePathW,
ServiceName);
if (!Status)
/* Load kernel */
strcpy(FileName+strlen("\\ArcName\\"), BootPath);
- strcat(FileName, "NTOSKRNL.EXE");
+ strcat(FileName, "SYSTEM32\\NTOSKRNL.EXE");
Status = WinLdrLoadImage(FileName+strlen("\\ArcName\\"), LoaderSystemCode, &NtosBase);
DPRINTM(DPRINT_WINDOWS, "Ntos loaded with status %d at %p\n", Status, NtosBase);
- WinLdrAllocateDataTableEntry(LoaderBlock, "ntoskrnl.exe",
+ Status = WinLdrAllocateDataTableEntry(LoaderBlock, "ntoskrnl.exe",
FileName, NtosBase, &KernelDTE);
+ DPRINTM(DPRINT_WINDOWS, "Ntos Data Table Entry allocated with status %d at %p\n", Status, KernelDTE);
/* Load HAL */
strcpy(FileName+strlen("\\ArcName\\"), BootPath);
- strcat(FileName, "HAL.DLL");
+ strcat(FileName, "SYSTEM32\\HAL.DLL");
Status = WinLdrLoadImage(FileName+strlen("\\ArcName\\"), LoaderHalCode, &HalBase);
DPRINTM(DPRINT_WINDOWS, "HAL loaded with status %d at %p\n", Status, HalBase);
- WinLdrAllocateDataTableEntry(LoaderBlock, "hal.dll",
+ Status = WinLdrAllocateDataTableEntry(LoaderBlock, "hal.dll",
FileName, HalBase, &HalDTE);
+ DPRINTM(DPRINT_WINDOWS, "HAL Data Table Entry allocated with status %d at %p\n", Status, HalDTE);
/* Load kernel-debugger support dll */
strcpy(FileName+strlen("\\ArcName\\"), BootPath);
- strcat(FileName, "KDCOM.DLL");
+ strcat(FileName, "SYSTEM32\\KDCOM.DLL");
Status = WinLdrLoadImage(FileName+strlen("\\ArcName\\"), LoaderBootDriver, &KdComBase);
DPRINTM(DPRINT_WINDOWS, "KdCom loaded with status %d at %p\n", Status, KdComBase);
- WinLdrAllocateDataTableEntry(LoaderBlock, "kdcom.dll",
+ Status = WinLdrAllocateDataTableEntry(LoaderBlock, "kdcom.dll",
FileName, KdComBase, &KdComDTE);
+ DPRINTM(DPRINT_WINDOWS, "KdCom Data Table Entry allocated with status %d at %p\n", Status, HalDTE);
/* Load all referenced DLLs for kernel, HAL and kdcom.dll */
strcpy(SearchPath, BootPath);
WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, KernelDTE);
WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, HalDTE);
+ if (KdComDTE)
+ WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, KdComDTE);
+ /* In system32 too */
+ strcpy(SearchPath + strlen(BootPath), "system32\\");
+ WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, KernelDTE);
+ WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, HalDTE);
if (KdComDTE)
WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, KdComDTE);
- /* Load NLS data */
- SetupLdrLoadNlsData(LoaderBlock, InfHandle, BootPath);
+ /* Load NLS data, they are in system32 */
+ SetupLdrLoadNlsData(LoaderBlock, InfHandle, SearchPath);
/* Get a list of boot drivers */
SetupLdrScanBootDrivers(LoaderBlock, InfHandle, BootPath);
--- /dev/null
+# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords> <multi_value_keywords> args...)
+#
+# CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions for
+# parsing the arguments given to that macro or function.
+# It processes the arguments and defines a set of variables which hold the
+# values of the respective options.
+#
+# The <options> argument contains all options for the respective macro,
+# i.e. keywords which can be used when calling the macro without any value
+# following, like e.g. the OPTIONAL keyword of the install() command.
+#
+# The <one_value_keywords> argument contains all keywords for this macro
+# which are followed by one value, like e.g. DESTINATION keyword of the
+# install() command.
+#
+# The <multi_value_keywords> argument contains all keywords for this macro
+# which can be followed by more than one value, like e.g. the TARGETS or
+# FILES keywords of the install() command.
+#
+# When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the
+# keywords listed in <options>, <one_value_keywords> and
+# <multi_value_keywords> a variable composed of the given <prefix>
+# followed by "_" and the name of the respective keyword.
+# These variables will then hold the respective value from the argument list.
+# For the <options> keywords this will be TRUE or FALSE.
+#
+# All remaining arguments are collected in a variable
+# <prefix>_UNPARSED_ARGUMENTS, this can be checked afterwards to see whether
+# your macro was called with unrecognized parameters.
+#
+# As an example here a my_install() macro, which takes similar arguments as the
+# real install() command:
+#
+# function(MY_INSTALL)
+# set(options OPTIONAL FAST)
+# set(oneValueArgs DESTINATION RENAME)
+# set(multiValueArgs TARGETS CONFIGURATIONS)
+# cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
+# ...
+#
+# Assume my_install() has been called like this:
+# my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub)
+#
+# After the cmake_parse_arguments() call the macro will have set the following
+# variables:
+# MY_INSTALL_OPTIONAL = TRUE
+# MY_INSTALL_FAST = FALSE (this option was not used when calling my_install()
+# MY_INSTALL_DESTINATION = "bin"
+# MY_INSTALL_RENAME = "" (was not used)
+# MY_INSTALL_TARGETS = "foo;bar"
+# MY_INSTALL_CONFIGURATIONS = "" (was not used)
+# MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL"
+#
+# You can the continue and process these variables.
+#
+# Keywords terminate lists of values, e.g. if directly after a one_value_keyword
+# another recognized keyword follows, this is interpreted as the beginning of
+# the new option.
+# E.g. my_install(TARGETS foo DESTINATION OPTIONAL) would result in
+# MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION would
+# be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor.
+
+#=============================================================================
+# Copyright 2010 Alexander Neundorf <neundorf@kde.org>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+
+if(__CMAKE_PARSE_ARGUMENTS_INCLUDED)
+ return()
+endif()
+set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE)
+
+
+function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgNames)
+ # first set all result variables to empty/FALSE
+ foreach(arg_name ${_singleArgNames} ${_multiArgNames})
+ set(${prefix}_${arg_name})
+ endforeach(arg_name)
+
+ foreach(option ${_optionNames})
+ set(${prefix}_${option} FALSE)
+ endforeach(option)
+
+ set(${prefix}_UNPARSED_ARGUMENTS)
+
+ set(insideValues FALSE)
+ set(currentArgName)
+
+ # now iterate over all arguments and fill the result variables
+ foreach(currentArg ${ARGN})
+ list(FIND _optionNames "${currentArg}" optionIndex) # ... then this marks the end of the arguments belonging to this keyword
+ list(FIND _singleArgNames "${currentArg}" singleArgIndex) # ... then this marks the end of the arguments belonging to this keyword
+ list(FIND _multiArgNames "${currentArg}" multiArgIndex) # ... then this marks the end of the arguments belonging to this keyword
+
+ if(${optionIndex} EQUAL -1 AND ${singleArgIndex} EQUAL -1 AND ${multiArgIndex} EQUAL -1)
+ if(insideValues)
+ if("${insideValues}" STREQUAL "SINGLE")
+ set(${prefix}_${currentArgName} ${currentArg})
+ set(insideValues FALSE)
+ elseif("${insideValues}" STREQUAL "MULTI")
+ list(APPEND ${prefix}_${currentArgName} ${currentArg})
+ endif()
+ else(insideValues)
+ list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg})
+ endif(insideValues)
+ else()
+ if(NOT ${optionIndex} EQUAL -1)
+ set(${prefix}_${currentArg} TRUE)
+ set(insideValues FALSE)
+ elseif(NOT ${singleArgIndex} EQUAL -1)
+ set(currentArgName ${currentArg})
+ set(${prefix}_${currentArgName})
+ set(insideValues "SINGLE")
+ elseif(NOT ${multiArgIndex} EQUAL -1)
+ set(currentArgName ${currentArg})
+ set(${prefix}_${currentArgName})
+ set(insideValues "MULTI")
+ endif()
+ endif()
+
+ endforeach(currentArg)
+
+ # propagate the result variables to the caller:
+ foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames})
+ set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE)
+ endforeach(arg_name)
+ set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE)
+
+endfunction(CMAKE_PARSE_ARGUMENTS _options _singleArgs _multiArgs)
if(MSVC)
set(IDL_COMPILER midl)
set(IDL_HEADER_ARG /h) #.h
- set(IDL_HEADER_ARG2 /h) #.h
+ set(IDL_HEADER_ARG2 /header) #.h
set(IDL_TYPELIB_ARG /tlb) #.tlb
set(IDL_SERVER_ARG /sstub) #.c for stub server library
set(IDL_CLIENT_ARG /cstub) #.c for stub client library
set(IDL_HEADER_ARG -h -o) #.h
set(IDL_HEADER_ARG2 -h -H) #.h
set(IDL_TYPELIB_ARG -t -o) #.tlb
- set(IDL_SERVER_ARG -s -S) #.c for server library
- set(IDL_CLIENT_ARG -c -C) #.c for stub client library
- set(IDL_PROXY_ARG -p -P)
+ set(IDL_SERVER_ARG -s -o) #.c for server library
+ set(IDL_CLIENT_ARG -c -o) #.c for stub client library
+ set(IDL_PROXY_ARG -p -o)
set(IDL_INTERFACE_ARG -u -o)
if(ARCH MATCHES i386)
set(IDL_FLAGS -m32 --win32)
add_custom_target(${TARGET} ALL DEPENDS ${HEADERS})
endmacro()
-macro(add_rpcproxy_library TARGET)
+macro(add_rpcproxy_files)
get_includes(INCLUDES)
get_defines(DEFINES)
+
+ if(MSVC)
+ set(DLLDATA_ARG /dlldata ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c)
+ endif()
foreach(FILE ${ARGN})
get_filename_component(NAME ${FILE} NAME_WE)
- if(MSVC)
- set(IDL_DLLDATA_ARG /dlldata ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c)
- else()
- set(IDL_DLLDATA_ARG "")
+ if(NOT MSVC)
+ list(APPEND IDLS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE})
endif()
add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.h ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.c
- COMMAND ${IDL_COMPILER} ${INCLUDES} ${DEFINES} ${IDL_FLAGS} ${IDL_HEADER_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.h ${IDL_PROXY_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.c ${IDL_DLLDATA_ARG} ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.c
+ COMMAND ${IDL_COMPILER} ${INCLUDES} ${DEFINES} ${IDL_FLAGS} ${IDL_PROXY_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.c ${IDL_HEADER_ARG2} ${NAME}_p.h ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} ${DLLDATA_ARG}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE})
- set_source_files_properties(
- ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.h ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.c
- PROPERTIES GENERATED TRUE)
- list(APPEND rpcproxy_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.c)
- list(APPEND IDLS ${CMAKE_CURRENT_SOURCE_DIR}/${NAME}.idl)
endforeach()
- if(NOT MSVC)
- # Extra pass to generate dlldata for widl
+ # Extra pass to generate dlldata
+ if(MSVC)
+ #nobody told how to generate it, so mark it as generated
+ set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c PROPERTIES GENERATED TRUE)
+ else()
add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c
- COMMAND ${IDL_COMPILER} ${INCLUDES} ${DEFINES} ${IDL_FLAGS} --dlldata-only -o ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c ${IDLS}
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
+ COMMAND ${IDL_COMPILER} ${INCLUDES} ${DEFINES} ${IDL_FLAGS} --dlldata-only -o ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c ${IDLS}
DEPENDS ${IDLS})
endif()
- set_source_files_properties(
- ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c
- PROPERTIES GENERATED TRUE)
- add_library(${TARGET} ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c ${rpcproxy_SOURCES})
endmacro()
macro(add_rpc_library TARGET)
foreach(FILE ${ARGN})
get_filename_component(NAME ${FILE} NAME_WE)
add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.h ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.c
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.c
COMMAND ${IDL_COMPILER} ${INCLUDES} ${DEFINES} ${IDL_FLAGS} ${IDL_HEADER_ARG2} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.h ${IDL_SERVER_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE})
- set_source_files_properties(
- ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.h ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.c
- PROPERTIES GENERATED TRUE)
list(APPEND server_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.c)
add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.h ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.c
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.c
COMMAND ${IDL_COMPILER} ${INCLUDES} ${DEFINES} ${IDL_FLAGS} ${IDL_HEADER_ARG2} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.h ${IDL_CLIENT_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE})
- set_source_files_properties(
- ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.h ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.c
- PROPERTIES GENERATED TRUE)
list(APPEND client_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.c)
endforeach()
add_library(${TARGET} ${server_SOURCES} ${client_SOURCES})
--- /dev/null
+#!/bin/bash
+if [ "x$ROS_ARCH" == "x" ]
+then
+ echo Could not detect RosBE.
+ exit 1
+fi
+
+BUILD_ENVIRONMENT=MinGW
+ARCH=$ROS_ARCH
+REACTOS_SOURCE_DIR=$(cd `dirname $0` && pwd)
+REACTOS_OUTPUT_PATH=output-$BUILD_ENVIRONMENT-$ARCH
+
+if [ "$REACTOS_SOURCE_DIR" == "$PWD" ]
+then
+ echo Creating directories in $REACTOS_OUTPUT_PATH
+ mkdir -p $REACTOS_OUTPUT_PATH
+ cd "$REACTOS_OUTPUT_PATH"
+fi
+
+mkdir -p host-tools
+mkdir -p reactos
+
+echo Preparing host tools...
+cd host-tools
+if [ -f CMakeCache.txt ]
+then
+ rm -f CMakeCache.txt
+fi
+
+REACTOS_BUILD_TOOLS_DIR="$PWD"
+cmake -G "Unix Makefiles" -DARCH=$ARCH "$REACTOS_SOURCE_DIR"
+
+cd ../reactos
+cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-mingw32.cmake -DARCH=$ARCH -DREACTOS_BUILD_TOOLS_DIR="$REACTOS_BUILD_TOOLS_DIR" "$REACTOS_SOURCE_DIR"
+
+echo Configure script complete! Enter directories and execute appropriate build commands\(ex: make, makex, etc...\).
+
add_dependencies(dxtn psdk)
-add_cab_target(dxtn 1)
+add_cd_file(TARGET dxtn DESTINATION reactos/system32 FOR all)
add_dependencies(libjpeg psdk)
-add_cab_target(libjpeg 1)
+add_cd_file(TARGET libjpeg DESTINATION reactos/system32 FOR all)
add_dependencies(libpng psdk)
-add_cab_target(libpng 1)
+add_cd_file(TARGET libpng DESTINATION reactos/system32 FOR all)
add_dependencies(libtiff psdk)
-add_cab_target(libtiff 1)
+add_cd_file(TARGET libtiff DESTINATION reactos/system32 FOR all)
add_dependencies(libxslt psdk)
-add_cab_target(libxslt 1)
+add_cd_file(TARGET libxslt DESTINATION reactos/system32 FOR all)
add_dependencies(mesa32 psdk)
-add_cab_target(mesa32 1)
+add_cd_file(TARGET mesa32 DESTINATION reactos/system32 FOR all)
comctl32
kernel32)
-add_cab_target(access 1)
+add_cd_file(TARGET access DESTINATION reactos/system32 FOR all)
shell32
kernel32)
-add_cab_target(appwiz 1)
+add_cd_file(TARGET appwiz DESTINATION reactos/system32 FOR all)
kernel32)
add_pch(console ${CMAKE_CURRENT_SOURCE_DIR}/console.h ${SOURCE})
-add_cab_target(console 1)
+add_cd_file(TARGET console DESTINATION reactos/system32 FOR all)
kernel32
ntdll)
-add_cab_target(desk 1)
+add_cd_file(TARGET desk DESTINATION reactos/system32 FOR all)
hwndDlg, AdvAppearanceDlgProc, (LPARAM)g) == IDOK)
{
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
- g->Theme = g->ThemeAdv;
- g_GlobalData.desktop_color = g->Theme.crColor[COLOR_DESKTOP];
g->bHasChanged = TRUE;
+ g->Theme = g->ThemeAdv;
g->ThemeId = -1; /* Customized */
+ g_GlobalData.desktop_color = g->Theme.crColor[COLOR_DESKTOP];
+
SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_SETCURSEL, (WPARAM)-1, 0);
SetDlgItemText(hwndDlg, IDC_APPEARANCE_COLORSCHEME, TEXT(""));
+
SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_UPDATETHEME, 0, (LPARAM)&g->Theme);
}
break;
{
g->Theme = Theme;
g->ThemeId = ThemeId;
+ g_GlobalData.desktop_color = g->Theme.crColor[COLOR_DESKTOP];
SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_UPDATETHEME, 0, (LPARAM)&Theme);
}
}
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
END
-IDD_SCREENSAVER DIALOGEX 0, 0, 246, 204
+IDD_SCREENSAVER DIALOGEX 0, 0, 246, 212
STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Écran de veille"
FONT 8, "MS Shell Dlg", 0, 0
LTEXT "minutes", IDC_MINTEXT, 70, 125, 26, 9
CONTROL "À la reprise, demander un mot de &passe.",IDC_SCREENS_USEPASSCHK,"button",
BS_AUTOCHECKBOX | WS_TABSTOP, 97, 120, 138, 19
- GROUPBOX "G&estion de l'alimentation du moniteur", IDC_SCREENS_DUMMY2, 6, 155, 232, 41
+ GROUPBOX "G&estion de l'alimentation du moniteur", IDC_SCREENS_DUMMY2, 6, 155, 232, 43
LTEXT "Pour modifier les paramètres de l'alimentation du moniteur, cliquez sur Gestion de l'alimentation.",
- IDC_STATIC, 14, 166, 140, 20
+ IDC_STATIC, 14, 166, 140, 25
PUSHBUTTON "&Gestion de l'alimentation...", IDC_SCREENS_POWER_BUTTON, 140, 171, 93, 13
END
DEFPUSHBUTTON "OK", IDOK, 137, 220, 50, 14
END
-IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185
+IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 340, 185
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Effects"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "&Use the following transition effect for menus and tooltips:",IDC_EFFAPPEARANCE_ANIMATION,"button",
- BS_AUTOCHECKBOX | WS_TABSTOP, 10, 5, 285, 19
+ CONTROL "&Utilisez l'effet de transition suivant pour les menus et les bulles d'aides:",IDC_EFFAPPEARANCE_ANIMATION,"button",
+ BS_AUTOCHECKBOX | WS_TABSTOP, 10, 5, 330, 19
COMBOBOX IDC_EFFAPPEARANCE_ANIMATIONTYPE, 20, 25, 80, 19 , CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_CHILD | WS_VSCROLL | WS_TABSTOP
- CONTROL "U&se the following method to smooth edges of screen fonts:",IDC_EFFAPPEARANCE_SMOOTHING,"button",
- BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED, 10, 42, 285, 19
+ CONTROL "U&tilisez la méthode suivante pour aplanir les bords des polices d'écran:",IDC_EFFAPPEARANCE_SMOOTHING,"button",
+ BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED, 10, 42, 330, 19
COMBOBOX IDC_EFFAPPEARANCE_SMOOTHINGTYPE, 20, 62, 80, 19 , CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
- CONTROL "Us&e large icons",IDC_EFFAPPEARANCE_LARGEICONS,"button",
- BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED, 10, 80, 285, 19
- CONTROL "Show sh&adows under menus",IDC_EFFAPPEARANCE_SETDROPSHADOW,"button",
- BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED, 10, 95, 285, 19
- CONTROL "Show &window contents while dragging",IDC_EFFAPPEARANCE_DRAGFULLWINDOWS,"button",
- BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 285, 19
- CONTROL "&Hide underlined letters for keyboard navigation until I press the Alt key",IDC_EFFAPPEARANCE_KEYBOARDCUES,"button",
- BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 285, 19
- PUSHBUTTON "Cancel", IDCANCEL, 226, 165, 50, 14
- DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14
+ CONTROL "Uti&liser de grandes icones",IDC_EFFAPPEARANCE_LARGEICONS,"button",
+ BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED, 10, 80, 330, 19
+ CONTROL "&Montrer ombrage sous les menus",IDC_EFFAPPEARANCE_SETDROPSHADOW,"button",
+ BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED, 10, 95, 330, 19
+ CONTROL "Montrer contenu des fenêtres lorsqu'elles sont bougés",IDC_EFFAPPEARANCE_DRAGFULLWINDOWS,"button",
+ BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 330, 19
+ CONTROL "&Cacher les lettres soulignées pour la navigation du clavier jusqu'à ce que j'appuie sur la touche Alt",IDC_EFFAPPEARANCE_KEYBOARDCUES,"button",
+ BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 330, 19
+ PUSHBUTTON "Annuler", IDCANCEL, 281, 165, 50, 14
+ DEFPUSHBUTTON "Accepter", IDOK, 227, 165, 50, 14
END
-IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 188
+IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 207
STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Paramètres"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Déplacez les icônes de moniteur pour qu'elles correspondent à l'arragement physique de vos moniteurs.",-1,3,3,240,10
- CONTROL "",IDC_SETTINGS_MONSEL,"MONITORSELWNDCLASS",WS_CHILD|WS_VISIBLE|WS_TABSTOP,3,16,240,82,WS_EX_CLIENTEDGE
- LTEXT "&Affichage :",1820,3,100,30,8
- LTEXT "<aucun>",IDC_SETTINGS_DEVICE,9,109,224,8
- GROUPBOX "&Résolution de l'affichage",1818,3,120,115,43
+ LTEXT "Déplacez les icônes de moniteur pour qu'elles correspondent à l'arragement physique de vos moniteurs.",-1,3,3,240,16
+ CONTROL "",IDC_SETTINGS_MONSEL,"MONITORSELWNDCLASS",WS_CHILD|WS_VISIBLE|WS_TABSTOP,3,26,240,82,WS_EX_CLIENTEDGE
+ LTEXT "&Affichage :",1820,3,110,30,8
+ LTEXT "<aucun>",IDC_SETTINGS_DEVICE,9,119,224,8
+ GROUPBOX "&Résolution de l'affichage",1818,3,130,115,43
CONTROL "",IDC_SETTINGS_RESOLUTION,"msctls_trackbar32",
- TBS_AUTOTICKS | WS_TABSTOP, 30, 130, 58, 17
- LTEXT "Moins",1815,9,130,15,8,NOT WS_GROUP
- LTEXT "Plus",1816,93,130,21,8,NOT WS_GROUP
+ TBS_AUTOTICKS | WS_TABSTOP, 30, 140, 58, 17
+ LTEXT "Moins",1815,9,140,15,8,NOT WS_GROUP
+ LTEXT "Plus",1816,93,140,21,8,NOT WS_GROUP
LTEXT "",IDC_SETTINGS_RESOLUTION_TEXT,10,150,100,10,NOT WS_GROUP | SS_CENTER
- GROUPBOX "&Couleurs",1817,125,120,115,43
- COMBOBOX IDC_SETTINGS_BPP,131,130,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
+ GROUPBOX "&Couleurs",1817,125,130,115,43
+ COMBOBOX IDC_SETTINGS_BPP,131,140,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
WS_VSCROLL | WS_TABSTOP
- CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW | SS_SUNKEN,131,148,103,9
- PUSHBUTTON "A&vancé...",IDC_SETTINGS_ADVANCED,170,165,70,14
+ CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW | SS_SUNKEN,131,158,103,9
+ PUSHBUTTON "A&vancé...",IDC_SETTINGS_ADVANCED,170,175,70,14
END
-IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204
+IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 299, 204
STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Général"
FONT 8, "MS Shell Dlg"
BEGIN
- GROUPBOX "Affichage", -1, 7, 6, 237, 56, WS_GROUP
+ GROUPBOX "Affichage", -1, 7, 6, 284, 56, WS_GROUP
LTEXT "Taille de la police :", -1, 14, 20, 222, 8
COMBOBOX IDC_FONTSIZE_COMBO, 14, 30, 223, 80, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "", IDC_FONTSIZE_COSTOM, 14, 46, 223, 12
- GROUPBOX "Compatibilité", -1, 7, 67, 237, 97
- LTEXT "Quelques programmes peuvent mal fonctionner si vous ne redémarrez pas votre ordinateur après que vous ayiez changé les paramètres des couleurs.\r\n\nAprès que j'ai changé les paramètres des couleurs :", -1, 12, 78, 228, 34
- AUTORADIOBUTTON "&Redémarrer l'ordinateur avant d'appliquer les nouveaux paramètres des couleurs.", IDC_RESTART_RB, 14, 116, 224, 10
- AUTORADIOBUTTON "Appliquer les nouveaux paramètres des couleurs sans redémarrer.", IDC_WITHOUTREBOOT_RB, 14, 131, 224, 10
- AUTORADIOBUTTON "Me demander avant d'appliquer les nouveaux paramètres des couleurs.", IDC_ASKME_RB, 14, 146, 224, 10
+ GROUPBOX "Compatibilité", -1, 7, 67, 284, 97
+ LTEXT "Quelques programmes peuvent mal fonctionner si vous ne redémarrez pas votre ordinateur après que vous ayiez changé les paramètres des couleurs.\r\n\nAprès que j'ai changé les paramètres des couleurs :", -1, 12, 78, 274, 34
+ AUTORADIOBUTTON "&Redémarrer l'ordinateur avant d'appliquer les nouveaux paramètres des couleurs.", IDC_RESTART_RB, 14, 116, 274, 10
+ AUTORADIOBUTTON "Appliquer les nouveaux paramètres des couleurs sans redémarrer.", IDC_WITHOUTREBOOT_RB, 14, 131, 274, 10
+ AUTORADIOBUTTON "Me demander avant d'appliquer les nouveaux paramètres des couleurs.", IDC_ASKME_RB, 14, 146, 274, 10
END
IDR_PREVIEW_MENU MENU
#include "lang/hu-HU.rc"
#include "lang/id-ID.rc"
#include "lang/it-IT.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/nl-NL.rc"
#include "lang/no-NO.rc"
#include "lang/pl-PL.rc"
kernel32
ntdll)
-add_cab_target(hdwwiz 1)
+add_cd_file(TARGET hdwwiz DESTINATION reactos/system32 FOR all)
gdi32
kernel32)
-add_cab_target(input 1)
+add_cd_file(TARGET input DESTINATION reactos/system32 FOR all)
shell32
kernel32)
-add_cab_target(intl 1)
+add_cd_file(TARGET intl DESTINATION reactos/system32 FOR all)
kernel32
ntdll)
-add_cab_target(joy 1)
+add_cd_file(TARGET joy DESTINATION reactos/system32 FOR all)
gdi32
kernel32)
-add_cab_target(main 1)
+add_cd_file(TARGET main DESTINATION reactos/system32 FOR all)
ntdll
kernel32)
-add_cab_target(mmsys 1)
+add_cd_file(TARGET mmsys DESTINATION reactos/system32 FOR all)
shell32
kernel32)
-add_cab_target(ncpa 1)
+add_cd_file(TARGET ncpa DESTINATION reactos/system32 FOR all)
set_module_type(odbccp32i cpl)
add_importlibs(odbccp32i user32 comctl32 msvcrt kernel32)
-add_cab_target(odbccp32i 1)
+add_cd_file(TARGET odbccp32i DESTINATION reactos/system32 FOR all)
kernel32
ntdll)
-add_cab_target(powercfg 1)
+add_cd_file(TARGET powercfg DESTINATION reactos/system32 FOR all)
#include "lang/fr-FR.rc"
#include "lang/id-ID.rc"
#include "lang/it-IT.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/nl-NL.rc"
#include "lang/no-NO.rc"
#include "lang/pl-PL.rc"
ntdll)
add_pch(sysdm ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
-add_cab_target(sysdm 1)
+add_cd_file(TARGET sysdm DESTINATION reactos/system32 FOR all)
#include "lang/fr-FR.rc"
#include "lang/id-ID.rc"
#include "lang/it-IT.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/no-NO.rc"
#include "lang/pl-PL.rc"
#include "lang/ro-RO.rc"
msvcrt
kernel32)
-add_cab_target(telephon 1)
+add_cd_file(TARGET telephon DESTINATION reactos/system32 FOR all)
msvcrt
kernel32)
-add_cab_target(timedate 1)
+add_cd_file(TARGET timedate DESTINATION reactos/system32 FOR all)
ntdll)
-add_cab_target(usrmgr 1)
+add_cd_file(TARGET usrmgr DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(amstream dxsdk)
-add_cab_target(amstream 1)
+add_cd_file(TARGET amstream DESTINATION reactos/system32 FOR all)
add_dependencies(d3d8thk psdk)
-add_cab_target(d3d8thk 1)
+add_cd_file(TARGET d3d8thk DESTINATION reactos/system32 FOR all)
kernel32
ntdll)
-add_cab_target(devenum 1)
+add_cd_file(TARGET devenum DESTINATION reactos/system32 FOR all)
kernel32
ntdll)
-add_cab_target(dinput 1)
+add_cd_file(TARGET dinput DESTINATION reactos/system32 FOR all)
add_importlib_target(dinput.spec)
add_dependencies(dinput8 psdk)
-add_cab_target(dinput8 1)
+add_cd_file(TARGET dinput8 DESTINATION reactos/system32 FOR all)
add_importlib_target(dinput8.spec)
add_dependencies(dmusic psdk)
-add_cab_target(dmusic 1)
+add_cd_file(TARGET dmusic DESTINATION reactos/system32 FOR all)
add_dependencies(dplay psdk)
-add_cab_target(dplay 1)
+add_cd_file(TARGET dplay DESTINATION reactos/system32 FOR all)
add_importlib_target(dplay.spec libdplayx)
kernel32
ntdll)
-add_cab_target(dplayx 1)
+add_cd_file(TARGET dplayx DESTINATION reactos/system32 FOR all)
add_importlib_target(dplayx.spec)
kernel32
ntdll)
-add_cab_target(dsound 1)
+add_cd_file(TARGET dsound DESTINATION reactos/system32 FOR all)
add_importlib_target(dsound.spec)
kernel32
ntdll)
-add_cab_target(dxdiagn 1)
+add_cd_file(TARGET dxdiagn DESTINATION reactos/system32 FOR all)
add_dependencies(ksproxy psdk)
-add_cab_target(ksproxy 1)
+add_cd_file(TARGET ksproxy DESTINATION reactos/system32 FOR all)
add_importlibs(ksuser advapi32 msvcrt kernel32 ntdll)
add_dependencies(ksuser psdk bugcodes)
-add_cab_target(ksuser 1)
+add_cd_file(TARGET ksuser DESTINATION reactos/system32 FOR all)
add_importlib_target(ksuser.spec)
add_dependencies(msdmo dxsdk psdk)
-add_cab_target(msdmo 1)
+add_cd_file(TARGET msdmo DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(qedit dxsdk)
-add_cab_target(qedit 1)
+add_cd_file(TARGET qedit DESTINATION reactos/system32 FOR all)
spec2def(quartz.dll quartz.spec)
-add_rpcproxy_library(quartzproxy quartz_strmif.idl)
+add_rpcproxy_files(quartz_strmif.idl)
list(APPEND SOURCE
avidec.c
control.c
avisplit.c
version.rc
+ ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
+ ${CMAKE_CURRENT_BINARY_DIR}/quartz_strmif_p.c
${CMAKE_CURRENT_BINARY_DIR}/quartz.def)
add_library(quartz SHARED ${SOURCE})
set_module_type(quartz win32dll)
target_link_libraries(quartz
- quartzproxy
strmiids
uuid
wine
kernel32
ntdll)
-add_cab_target(quartz 1)
+add_cd_file(TARGET quartz DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(d3d8 wineheaders)
-add_cab_target(d3d8 1)
+add_cd_file(TARGET d3d8 DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(d3d9 wineheaders)
-add_cab_target(d3d9 1)
+add_cd_file(TARGET d3d9 DESTINATION reactos/system32 FOR all)
add_importlib_target(d3d9.spec)
ntdll)
add_dependencies(d3dx9_24 wineheaders)
-add_cab_target(d3dx9_24 1)
+add_cd_file(TARGET d3dx9_24 DESTINATION reactos/system32 FOR all)
add_importlib_target(d3dx9_24.spec libd3dx9_36)
ntdll)
add_dependencies(d3dx9_25 wineheaders)
-add_cab_target(d3dx9_25 1)
+add_cd_file(TARGET d3dx9_25 DESTINATION reactos/system32 FOR all)
add_importlib_target(d3dx9_25.spec libd3dx9_24 libd3dx9_36)
ntdll)
add_dependencies(d3dx9_26 wineheaders)
-add_cab_target(d3dx9_26 1)
+add_cd_file(TARGET d3dx9_26 DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(d3dx9_27 wineheaders)
-add_cab_target(d3dx9_27 1)
+add_cd_file(TARGET d3dx9_27 DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(d3dx9_28 wineheaders)
-add_cab_target(d3dx9_28 1)
+add_cd_file(TARGET d3dx9_28 DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(d3dx9_29 wineheaders)
-add_cab_target(d3dx9_29 1)
+add_cd_file(TARGET d3dx9_29 DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(d3dx9_30 wineheaders)
-add_cab_target(d3dx9_30 1)
+add_cd_file(TARGET d3dx9_30 DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(d3dx9_31 wineheaders)
-add_cab_target(d3dx9_31 1)
+add_cd_file(TARGET d3dx9_31 DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(d3dx9_32 wineheaders)
-add_cab_target(d3dx9_32 1)
+add_cd_file(TARGET d3dx9_32 DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(d3dx9_33 wineheaders)
-add_cab_target(d3dx9_33 1)
+add_cd_file(TARGET d3dx9_33 DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(d3dx9_34 wineheaders)
-add_cab_target(d3dx9_34 1)
+add_cd_file(TARGET d3dx9_34 DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(d3dx9_35 wineheaders)
-add_cab_target(d3dx9_35 1)
+add_cd_file(TARGET d3dx9_35 DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(d3dx9_36 wineheaders)
-add_cab_target(d3dx9_36 1)
+add_cd_file(TARGET d3dx9_36 DESTINATION reactos/system32 FOR all)
add_importlib_target(d3dx9_36.spec)
ntdll)
add_dependencies(d3dx9_37 wineheaders)
-add_cab_target(d3dx9_37 1)
+add_cd_file(TARGET d3dx9_37 DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(d3dx9_38 wineheaders)
-add_cab_target(d3dx9_38 1)
+add_cd_file(TARGET d3dx9_38 DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(d3dx9_39 wineheaders)
-add_cab_target(d3dx9_39 1)
+add_cd_file(TARGET d3dx9_39 DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(d3dx9_40 wineheaders)
-add_cab_target(d3dx9_40 1)
+add_cd_file(TARGET d3dx9_40 DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(d3dx9_41 wineheaders)
-add_cab_target(d3dx9_41 1)
+add_cd_file(TARGET d3dx9_41 DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(d3dx9_42 wineheaders)
-add_cab_target(d3dx9_42 1)
+add_cd_file(TARGET d3dx9_42 DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(ddraw wineheaders)
-add_cab_target(ddraw 1)
+add_cd_file(TARGET ddraw DESTINATION reactos/system32 FOR all)
add_importlib_target(ddraw.spec)
ntdll)
add_dependencies(wined3d wineheaders)
-add_cab_target(wined3d 1)
+add_cd_file(TARGET wined3d DESTINATION reactos/system32 FOR all)
add_importlib_target(wined3d.spec)
add_dependencies(kbda1 psdk)
-add_cab_target(kbda1 1)
+add_cd_file(TARGET kbda1 DESTINATION reactos/system32 FOR all)
add_dependencies(kbda2 psdk)
-add_cab_target(kbda2 1)
+add_cd_file(TARGET kbda2 DESTINATION reactos/system32 FOR all)
add_dependencies(kbda3 psdk)
-add_cab_target(kbda3 1)
+add_cd_file(TARGET kbda3 DESTINATION reactos/system32 FOR all)
add_dependencies(kbdal psdk)
-add_cab_target(kbdal 1)
+add_cd_file(TARGET kbdal DESTINATION reactos/system32 FOR all)
add_dependencies(kbdarme psdk)
-add_cab_target(kbdarme 1)
+add_cd_file(TARGET kbdarme DESTINATION reactos/system32 FOR all)
add_dependencies(kbdarmw psdk)
-add_cab_target(kbdarmw 1)
+add_cd_file(TARGET kbdarmw DESTINATION reactos/system32 FOR all)
add_dependencies(kbdaze psdk)
-add_cab_target(kbdaze 1)
+add_cd_file(TARGET kbdaze DESTINATION reactos/system32 FOR all)
add_dependencies(kbdazel psdk)
-add_cab_target(kbdazel 1)
+add_cd_file(TARGET kbdazel DESTINATION reactos/system32 FOR all)
add_dependencies(kbdbe psdk)
-add_cab_target(kbdbe 1)
+add_cd_file(TARGET kbdbe DESTINATION reactos/system32 FOR all)
add_dependencies(kbdbga psdk)
-add_cab_target(kbdbga 1)
+add_cd_file(TARGET kbdbga DESTINATION reactos/system32 FOR all)
add_dependencies(kbdbgm psdk)
-add_cab_target(kbdbgm 1)
+add_cd_file(TARGET kbdbgm DESTINATION reactos/system32 FOR all)
add_dependencies(kbdbgt psdk)
-add_cab_target(kbdbgt 1)
+add_cd_file(TARGET kbdbgt DESTINATION reactos/system32 FOR all)
add_dependencies(kbdblr psdk)
-add_cab_target(kbdblr 1)
+add_cd_file(TARGET kbdblr DESTINATION reactos/system32 FOR all)
add_dependencies(kbdbr psdk)
-add_cab_target(kbdbr 1)
+add_cd_file(TARGET kbdbr DESTINATION reactos/system32 FOR all)
add_dependencies(kbdbur psdk)
-add_cab_target(kbdbur 1)
+add_cd_file(TARGET kbdbur DESTINATION reactos/system32 FOR all)
add_dependencies(kbdcan psdk)
-add_cab_target(kbdcan 1)
+add_cd_file(TARGET kbdcan DESTINATION reactos/system32 FOR all)
add_dependencies(kbdcr psdk)
-add_cab_target(kbdcr 1)
+add_cd_file(TARGET kbdcr DESTINATION reactos/system32 FOR all)
add_dependencies(kbdcz psdk)
-add_cab_target(kbdcz 1)
+add_cd_file(TARGET kbdcz DESTINATION reactos/system32 FOR all)
add_dependencies(kbdcz1 psdk)
-add_cab_target(kbdcz1 1)
+add_cd_file(TARGET kbdcz1 DESTINATION reactos/system32 FOR all)
add_dependencies(kbdda psdk)
-add_cab_target(kbdda 1)
+add_cd_file(TARGET kbdda DESTINATION reactos/system32 FOR all)
add_dependencies(kbddv psdk)
-add_cab_target(kbddv 1)
+add_cd_file(TARGET kbddv DESTINATION reactos/system32 FOR all)
add_dependencies(kbdes psdk)
-add_cab_target(kbdes 1)
+add_cd_file(TARGET kbdes DESTINATION reactos/system32 FOR all)
add_dependencies(kbdest psdk)
-add_cab_target(kbdest 1)
+add_cd_file(TARGET kbdest DESTINATION reactos/system32 FOR all)
add_dependencies(kbdfc psdk)
-add_cab_target(kbdfc 1)
+add_cd_file(TARGET kbdfc DESTINATION reactos/system32 FOR all)
add_dependencies(kbdfi psdk)
-add_cab_target(kbdfi 1)
+add_cd_file(TARGET kbdfi DESTINATION reactos/system32 FOR all)
add_dependencies(kbdfr psdk)
-add_cab_target(kbdfr 1)
+add_cd_file(TARGET kbdfr DESTINATION reactos/system32 FOR all)
add_dependencies(kbdgeo psdk)
-add_cab_target(kbdgeo 1)
+add_cd_file(TARGET kbdgeo DESTINATION reactos/system32 FOR all)
add_dependencies(kbdgerg psdk)
-add_cab_target(kbdgerg 1)
+add_cd_file(TARGET kbdgerg DESTINATION reactos/system32 FOR all)
add_dependencies(kbdgneo psdk)
-add_cab_target(kbdgneo 1)
+add_cd_file(TARGET kbdgneo DESTINATION reactos/system32 FOR all)
add_dependencies(kbdgr psdk)
-add_cab_target(kbdgr 1)
+add_cd_file(TARGET kbdgr DESTINATION reactos/system32 FOR all)
add_dependencies(kbdgrist psdk)
-add_cab_target(kbdgrist 1)
+add_cd_file(TARGET kbdgrist DESTINATION reactos/system32 FOR all)
add_dependencies(kbdhe psdk)
-add_cab_target(kbdhe 1)
+add_cd_file(TARGET kbdhe DESTINATION reactos/system32 FOR all)
add_dependencies(kbdheb psdk)
-add_cab_target(kbdheb 1)
+add_cd_file(TARGET kbdheb DESTINATION reactos/system32 FOR all)
add_dependencies(kbdhu psdk)
-add_cab_target(kbdhu 1)
+add_cd_file(TARGET kbdhu DESTINATION reactos/system32 FOR all)
add_dependencies(kbdic psdk)
-add_cab_target(kbdic 1)
+add_cd_file(TARGET kbdic DESTINATION reactos/system32 FOR all)
add_dependencies(kbdinasa psdk)
-add_cab_target(kbdinasa 1)
+add_cd_file(TARGET kbdinasa DESTINATION reactos/system32 FOR all)
add_dependencies(kbdinben psdk)
-add_cab_target(kbdinben 1)
+add_cd_file(TARGET kbdinben DESTINATION reactos/system32 FOR all)
add_dependencies(kbdindev psdk)
-add_cab_target(kbdindev 1)
+add_cd_file(TARGET kbdindev DESTINATION reactos/system32 FOR all)
add_dependencies(kbdinguj psdk)
-add_cab_target(kbdinguj 1)
+add_cd_file(TARGET kbdinguj DESTINATION reactos/system32 FOR all)
add_dependencies(kbdinmal psdk)
-add_cab_target(kbdinmal 1)
+add_cd_file(TARGET kbdinmal DESTINATION reactos/system32 FOR all)
add_dependencies(kbdir psdk)
-add_cab_target(kbdir 1)
+add_cd_file(TARGET kbdir DESTINATION reactos/system32 FOR all)
add_dependencies(kbdit psdk)
-add_cab_target(kbdit 1)
+add_cd_file(TARGET kbdit DESTINATION reactos/system32 FOR all)
add_dependencies(kbdja psdk)
-add_cab_target(kbdja 1)
+add_cd_file(TARGET kbdja DESTINATION reactos/system32 FOR all)
add_dependencies(kbdkaz psdk)
-add_cab_target(kbdkaz 1)
+add_cd_file(TARGET kbdkaz DESTINATION reactos/system32 FOR all)
add_dependencies(kbdko psdk)
-add_cab_target(kbdko 1)
+add_cd_file(TARGET kbdko DESTINATION reactos/system32 FOR all)
add_dependencies(kbdla psdk)
-add_cab_target(kbdla 1)
+add_cd_file(TARGET kbdla DESTINATION reactos/system32 FOR all)
add_dependencies(kbdlt1 psdk)
-add_cab_target(kbdlt1 1)
+add_cd_file(TARGET kbdlt1 DESTINATION reactos/system32 FOR all)
add_dependencies(kbdlv psdk)
-add_cab_target(kbdlv 1)
+add_cd_file(TARGET kbdlv DESTINATION reactos/system32 FOR all)
add_dependencies(kbdmac psdk)
-add_cab_target(kbdmac 1)
+add_cd_file(TARGET kbdmac DESTINATION reactos/system32 FOR all)
add_dependencies(kbdne psdk)
-add_cab_target(kbdne 1)
+add_cd_file(TARGET kbdne DESTINATION reactos/system32 FOR all)
add_dependencies(kbdno psdk)
-add_cab_target(kbdno 1)
+add_cd_file(TARGET kbdno DESTINATION reactos/system32 FOR all)
add_dependencies(kbdpl1 psdk)
-add_cab_target(kbdpl1 1)
+add_cd_file(TARGET kbdpl1 DESTINATION reactos/system32 FOR all)
add_dependencies(kbdpo psdk)
-add_cab_target(kbdpo 1)
+add_cd_file(TARGET kbdpo DESTINATION reactos/system32 FOR all)
add_dependencies(kbdro psdk)
-add_cab_target(kbdro 1)
+add_cd_file(TARGET kbdro DESTINATION reactos/system32 FOR all)
add_dependencies(kbdru psdk)
-add_cab_target(kbdru 1)
+add_cd_file(TARGET kbdru DESTINATION reactos/system32 FOR all)
add_dependencies(kbdru1 psdk)
-add_cab_target(kbdru1 1)
+add_cd_file(TARGET kbdru1 DESTINATION reactos/system32 FOR all)
add_dependencies(kbdsg psdk)
-add_cab_target(kbdsg 1)
+add_cd_file(TARGET kbdsg DESTINATION reactos/system32 FOR all)
add_dependencies(kbdsk psdk)
-add_cab_target(kbdsk 1)
+add_cd_file(TARGET kbdsk DESTINATION reactos/system32 FOR all)
add_dependencies(kbdsk1 psdk)
-add_cab_target(kbdsk1 1)
+add_cd_file(TARGET kbdsk1 DESTINATION reactos/system32 FOR all)
add_dependencies(kbdsw psdk)
-add_cab_target(kbdsw 1)
+add_cd_file(TARGET kbdsw DESTINATION reactos/system32 FOR all)
add_dependencies(kbdtat psdk)
-add_cab_target(kbdtat 1)
+add_cd_file(TARGET kbdtat DESTINATION reactos/system32 FOR all)
add_dependencies(kbdth0 psdk)
-add_cab_target(kbdth0 1)
+add_cd_file(TARGET kbdth0 DESTINATION reactos/system32 FOR all)
add_dependencies(kbdth1 psdk)
-add_cab_target(kbdth1 1)
+add_cd_file(TARGET kbdth1 DESTINATION reactos/system32 FOR all)
add_dependencies(kbdth2 psdk)
-add_cab_target(kbdth2 1)
+add_cd_file(TARGET kbdth2 DESTINATION reactos/system32 FOR all)
add_dependencies(kbdth3 psdk)
-add_cab_target(kbdth3 1)
+add_cd_file(TARGET kbdth3 DESTINATION reactos/system32 FOR all)
add_dependencies(kbdtuf psdk)
-add_cab_target(kbdtuf 1)
+add_cd_file(TARGET kbdtuf DESTINATION reactos/system32 FOR all)
add_dependencies(kbdtuq psdk)
-add_cab_target(kbdtuq 1)
+add_cd_file(TARGET kbdtuq DESTINATION reactos/system32 FOR all)
add_dependencies(kbduk psdk)
-add_cab_target(kbduk 1)
+add_cd_file(TARGET kbduk DESTINATION reactos/system32 FOR all)
add_dependencies(kbdur psdk)
-add_cab_target(kbdur 1)
+add_cd_file(TARGET kbdur DESTINATION reactos/system32 FOR all)
add_dependencies(kbdurs psdk)
-add_cab_target(kbdurs 1)
+add_cd_file(TARGET kbdurs DESTINATION reactos/system32 FOR all)
add_dependencies(kbdus psdk)
-add_cab_target(kbdus 1)
+add_cd_file(TARGET kbdus DESTINATION reactos/system32 FOR all)
add_dependencies(kbdusa psdk)
-add_cab_target(kbdusa 1)
+add_cd_file(TARGET kbdusa DESTINATION reactos/system32 FOR all)
add_dependencies(kbdusl psdk)
-add_cab_target(kbdusl 1)
+add_cd_file(TARGET kbdusl DESTINATION reactos/system32 FOR all)
add_dependencies(kbdusr psdk)
-add_cab_target(kbdusr 1)
+add_cd_file(TARGET kbdusr DESTINATION reactos/system32 FOR all)
add_dependencies(kbdusx psdk)
-add_cab_target(kbdusx 1)
+add_cd_file(TARGET kbdusx DESTINATION reactos/system32 FOR all)
add_dependencies(kbduzb psdk)
-add_cab_target(kbduzb 1)
+add_cd_file(TARGET kbduzb DESTINATION reactos/system32 FOR all)
add_dependencies(kbdvntc psdk)
-add_cab_target(kbdvntc 1)
+add_cd_file(TARGET kbdvntc DESTINATION reactos/system32 FOR all)
add_dependencies(kbdycc psdk)
-add_cab_target(kbdycc 1)
+add_cd_file(TARGET kbdycc DESTINATION reactos/system32 FOR all)
add_dependencies(kbdycl psdk)
-add_cab_target(kbdycl 1)
+add_cd_file(TARGET kbdycl DESTINATION reactos/system32 FOR all)
add_dependencies(idndl psdk)
-add_livecd_target(idndl reactos)
+add_cd_file(TARGET idndl DESTINATION reactos FOR all)
add_pch(ntdll ${CMAKE_CURRENT_SOURCE_DIR}/include/ntdll.h ${SOURCE})
add_dependencies(ntdll ntstatus asm)
-add_minicd_target(ntdll reactos/system32 ntdll.dll)
-add_cab_target(ntdll 1)
+add_cd_file(TARGET ntdll DESTINATION reactos/system32 NO_CAB FOR all)
add_importlib_target(def/ntdll.spec)
add_pch(deskadp ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
-add_cab_target(deskadp 1)
+add_cd_file(TARGET deskadp DESTINATION reactos/system32 FOR all)
add_pch(deskmon ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
-add_cab_target(deskmon 1)
+add_cd_file(TARGET deskmon DESTINATION reactos/system32 FOR all)
kernel32
ntdll)
-add_cab_target(devcpux 1)
+add_cd_file(TARGET devcpux DESTINATION reactos/system32 FOR all)
kernel32
ntdll)
-add_cab_target(fontext 1)
+add_cd_file(TARGET fontext DESTINATION reactos/system32 FOR all)
add_pch(slayer ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
-add_cab_target(slayer 1)
+add_cd_file(TARGET slayer DESTINATION reactos/system32 FOR all)
set_module_type(acledit win32dll)
add_importlibs(acledit msvcrt kernel32 ntdll)
-add_cab_target(acledit 1)
+add_cd_file(TARGET acledit DESTINATION reactos/system32 FOR all)
add_importlib_target(acledit.spec)
add_pch(aclui ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
-add_cab_target(aclui 1)
+add_cd_file(TARGET aclui DESTINATION reactos/system32 FOR all)
add_importlibs(activeds msvcrt kernel32 ntdll)
-add_cab_target(activeds 1)
+add_cd_file(TARGET activeds DESTINATION reactos/system32 FOR all)
spec2def(actxprxy.dll actxprxy.spec)
-add_rpcproxy_library(actxprxylib
+add_rpcproxy_files(
actxprxy_activscp.idl
actxprxy_comcat.idl
actxprxy_docobj.idl
list(APPEND SOURCE
usrmarshal.c
+ ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_activscp_p.c
+ ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_comcat_p.c
+ ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_docobj_p.c
+ ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_hlink_p.c
+ ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_htiframe_p.c
+ ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_objsafe_p.c
+ ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_ocmm_p.c
+ ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_servprov_p.c
+ ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_shobjidl_p.c
+ ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_urlhist_p.c
+ ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
${CMAKE_CURRENT_BINARY_DIR}/actxprxy.def)
add_library(actxprxy SHARED ${SOURCE})
set_entrypoint(actxprxy 0)
target_link_libraries(actxprxy
- actxprxylib
uuid
wine
${PSEH_LIB})
add_definitions(-DREGISTER_PROXY_DLL -DPROXY_DELEGATION)
-add_cab_target(actxprxy 1)
+add_cd_file(TARGET actxprxy DESTINATION reactos/system32 FOR all)
add_importlibs(advapi32 rpcrt4 kernel32 ntdll msvcrt)
add_pch(advapi32 ${CMAKE_CURRENT_SOURCE_DIR}/advapi32.h ${SOURCE})
-add_cab_target(advapi32 1)
+add_cd_file(TARGET advapi32 DESTINATION reactos/system32 FOR all)
add_importlib_target(advapi32.spec)
target_link_libraries(advpack wine)
add_importlibs(advpack ole32 setupapi version advapi32 msvcrt kernel32 ntdll)
-add_cab_target(advpack 1)
+add_cd_file(TARGET advpack DESTINATION reactos/system32 FOR all)
add_importlib_target(atl.spec)
add_dependencies(atl atl_atliface_header)
-add_cab_target(atl 1)
+add_cd_file(TARGET atl DESTINATION reactos/system32 FOR all)
add_pch(authz ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
add_importlibs(authz advapi32 msvcrt kernel32 ntdll)
-add_cab_target(authz 1)
+add_cd_file(TARGET authz DESTINATION reactos/system32 FOR all)
add_importlibs(avicap32 advapi32 user32 version msvcrt kernel32 ntdll)
-add_cab_target(avicap32 1)
+add_cd_file(TARGET avicap32 DESTINATION reactos/system32 FOR all)
add_importlib_target(avicap32.spec)
ntdll)
add_importlib_target(avifil32.spec)
-add_cab_target(avifil32 1)
+add_cd_file(TARGET avifil32 DESTINATION reactos/system32 FOR all)
add_importlibs(batt msvcrt kernel32 ntdll)
-add_cab_target(batt 1)
+add_cd_file(TARGET batt DESTINATION reactos/system32 FOR all)
add_importlibs(bcrypt msvcrt kernel32 ntdll)
-add_cab_target(bcrypt 1)
+add_cd_file(TARGET bcrypt DESTINATION reactos/system32 FOR all)
add_importlib_target(beepmidi.spec)
add_dependencies(beepmidi psdk)
-add_cab_target(beepmidi 1)
+add_cd_file(TARGET beepmidi DESTINATION reactos/system32 FOR all)
kernel32
ntdll)
-add_cab_target(browseui 1)
+add_cd_file(TARGET browseui DESTINATION reactos/system32 FOR all)
add_importlib_target(cabinet.spec)
add_dependencies(cabinet psdk)
-add_cab_target(cabinet 1)
+add_cd_file(TARGET cabinet DESTINATION reactos/system32 FOR all)
set_module_type(cards win32dll)
add_importlibs(cards user32 gdi32 msvcrt kernel32)
add_importlib_target(cards.spec)
-add_cab_target(cards 1)
+add_cd_file(TARGET cards DESTINATION reactos/system32 FOR all)
set_entrypoint(cfgmgr32 0)
add_importlibs(cfgmgr32 setupapi kernel32 ntdll)
add_dependencies(cfgmgr32 psdk)
-add_cab_target(cfgmgr32 1)
+add_cd_file(TARGET cfgmgr32 DESTINATION reactos/system32 FOR all)
add_importlibs(clusapi msvcrt kernel32 ntdll)
-add_cab_target(clusapi 1)
+add_cd_file(TARGET clusapi DESTINATION reactos/system32 FOR all)
add_importlibs(comcat ole32 user32 advapi32 ntdll)
add_dependencies(comcat psdk)
-add_cab_target(comcat 1)
+add_cd_file(TARGET comcat DESTINATION reactos/system32 FOR all)
kernel32
ntdll)
-add_cab_target(comctl32 1)
+add_cd_file(TARGET comctl32 DESTINATION reactos/system32 FOR all)
add_importlib_target(comctl32.spec)
===================================================================
--- listview.c (revision 51320)
+++ listview.c (working copy)
-@@ -1634,8 +1635,19 @@
+@@ -315,6 +315,7 @@
+ COLORREF clrBk;
+ COLORREF clrText;
+ COLORREF clrTextBk;
++ BOOL bDefaultBkColor;
+
+ /* font */
+ HFONT hDefaultFont;
+@@ -1635,8 +1636,19 @@
/* used to handle collapse main item column case */
static inline BOOL LISTVIEW_DrawFocusRect(const LISTVIEW_INFO *infoPtr, HDC hdc)
{
}
/* Listview invalidation functions: use _only_ these functions to invalidate */
-@@ -5041,7 +5053,11 @@
+@@ -5042,7 +5054,11 @@
/* Draw marquee rectangle if appropriate */
if (infoPtr->bMarqueeSelect)
if (cdmode & CDRF_NOTIFYPOSTPAINT)
notify_postpaint(infoPtr, &nmlvcd);
+@@ -7856,6 +7872,7 @@
+ {
+ TRACE("(clrBk=%x)\n", clrBk);
+
++ infoPtr->bDefaultBkColor = FALSE;
+ if(infoPtr->clrBk != clrBk) {
+ if (infoPtr->clrBk != CLR_NONE) DeleteObject(infoPtr->hBkBrush);
+ infoPtr->clrBk = clrBk;
+@@ -9248,6 +9265,7 @@
+ infoPtr->clrText = CLR_DEFAULT;
+ infoPtr->clrTextBk = CLR_DEFAULT;
+ LISTVIEW_SetBkColor(infoPtr, comctl32_color.clrWindow);
++ infoPtr->bDefaultBkColor = TRUE;
+
+ /* set default values */
+ infoPtr->nFocusedItem = -1;
+@@ -11510,6 +11528,11 @@
+
+ case WM_SYSCOLORCHANGE:
+ COMCTL32_RefreshSysColors();
++ if (infoPtr->bDefaultBkColor)
++ {
++ LISTVIEW_SetBkColor(infoPtr, comctl32_color.clrWindow);
++ infoPtr->bDefaultBkColor = TRUE;
++ }
+ return 0;
+
+ /* case WM_TIMER: */
+Index: rebar.c
+===================================================================
+--- rebar.c (revision 51320)
++++ rebar.c (working copy)
+@@ -51,7 +51,6 @@
+ * - WM_QUERYNEWPALETTE
+ * - WM_RBUTTONDOWN
+ * - WM_RBUTTONUP
+- * - WM_SYSCOLORCHANGE
+ * - WM_VKEYTOITEM
+ * - WM_WININICHANGE
+ * Notifications:
+@@ -2540,10 +2539,8 @@
+
+ /* initialize band */
+ memset(lpBand, 0, sizeof(*lpBand));
+- lpBand->clrFore = infoPtr->clrText == CLR_NONE ? infoPtr->clrBtnText :
+- infoPtr->clrText;
+- lpBand->clrBack = infoPtr->clrBk == CLR_NONE ? infoPtr->clrBtnFace :
+- infoPtr->clrBk;
++ lpBand->clrFore = infoPtr->clrText;
++ lpBand->clrBack = infoPtr->clrBk;
+ lpBand->iImage = -1;
+
+ REBAR_CommonSetupBand(infoPtr->hwndSelf, lprbbi, lpBand);
+@@ -3793,6 +3790,8 @@
+
+ case WM_SYSCOLORCHANGE:
+ COMCTL32_RefreshSysColors();
++ infoPtr->clrBtnText = comctl32_color.clrBtnText;
++ infoPtr->clrBtnFace = comctl32_color.clrBtnFace;
+ return 0;
+
+ /* case WM_VKEYTOITEM: supported according to ControlSpy */
COLORREF clrBk;
COLORREF clrText;
COLORREF clrTextBk;
+ BOOL bDefaultBkColor;
/* font */
HFONT hDefaultFont;
{
TRACE("(clrBk=%x)\n", clrBk);
+ infoPtr->bDefaultBkColor = FALSE;
if(infoPtr->clrBk != clrBk) {
if (infoPtr->clrBk != CLR_NONE) DeleteObject(infoPtr->hBkBrush);
infoPtr->clrBk = clrBk;
infoPtr->clrText = CLR_DEFAULT;
infoPtr->clrTextBk = CLR_DEFAULT;
LISTVIEW_SetBkColor(infoPtr, comctl32_color.clrWindow);
+ infoPtr->bDefaultBkColor = TRUE;
/* set default values */
infoPtr->nFocusedItem = -1;
case WM_SYSCOLORCHANGE:
COMCTL32_RefreshSysColors();
+ if (infoPtr->bDefaultBkColor)
+ {
+ LISTVIEW_SetBkColor(infoPtr, comctl32_color.clrWindow);
+ infoPtr->bDefaultBkColor = TRUE;
+ }
return 0;
/* case WM_TIMER: */
* - WM_QUERYNEWPALETTE
* - WM_RBUTTONDOWN
* - WM_RBUTTONUP
- * - WM_SYSCOLORCHANGE
* - WM_VKEYTOITEM
* - WM_WININICHANGE
* Notifications:
for (i = prev_visible(infoPtr, infoPtr->uNumBands); i > 0; i = prev_visible(infoPtr, i))
{
REBAR_BAND *lpBand = REBAR_GetBand(infoPtr, i);
- int height = lpBand->rcBand.bottom - lpBand->rcBand.top;
int cyBreakExtra; /* additional cy for the rebar after a RBBS_BREAK on this band */
+ height = lpBand->rcBand.bottom - lpBand->rcBand.top;
+
if (infoPtr->dwStyle & RBS_VARHEIGHT)
cyBreakExtra = lpBand->cyRowSoFar; /* 'height' => 'lpBand->cyRowSoFar' + 'height'*/
else
return uChanged;
}
-static LRESULT
-REBAR_InternalEraseBkGnd (const REBAR_INFO *infoPtr, HDC hdc, const RECT *clip)
+static LRESULT REBAR_EraseBkGnd (const REBAR_INFO *infoPtr, HDC hdc)
/* Function: This erases the background rectangle by drawing */
/* each band with its background color (or the default) and */
/* draws each bands right separator if necessary. The row */
else
{
old = SetBkColor (hdc, new);
- TRACE("%s background color=0x%06x, band (%d,%d)-(%d,%d), clip (%d,%d)-(%d,%d)\n",
+ TRACE("%s background color=0x%06x, band %s\n",
(lpBand->clrBack == CLR_NONE) ? "none" :
((lpBand->clrBack == CLR_DEFAULT) ? "dft" : ""),
- GetBkColor(hdc),
- rcBand.left,rcBand.top,
- rcBand.right,rcBand.bottom,
- clip->left, clip->top,
- clip->right, clip->bottom);
+ GetBkColor(hdc), wine_dbgstr_rect(&rcBand));
ExtTextOutW (hdc, 0, 0, ETO_OPAQUE, &rcBand, NULL, 0, 0);
if (lpBand->clrBack != CLR_NONE)
SetBkColor (hdc, old);
REBAR_BAND *hitBand, *rowBeginBand;
if(infoPtr->uNumBands <= 0)
- ERR("There are no bands in this rebar");
+ ERR("There are no bands in this rebar\n");
/* Up/down dragging can only occur when there is more than one
* band in the rebar */
/* initialize band */
memset(lpBand, 0, sizeof(*lpBand));
- lpBand->clrFore = infoPtr->clrText == CLR_NONE ? infoPtr->clrBtnText :
- infoPtr->clrText;
- lpBand->clrBack = infoPtr->clrBk == CLR_NONE ? infoPtr->clrBtnFace :
- infoPtr->clrBk;
+ lpBand->clrFore = infoPtr->clrText;
+ lpBand->clrBack = infoPtr->clrBk;
lpBand->iImage = -1;
REBAR_CommonSetupBand(infoPtr->hwndSelf, lprbbi, lpBand);
return 0;
}
-
-static LRESULT
-REBAR_EraseBkGnd (const REBAR_INFO *infoPtr, HDC hdc)
-{
- RECT cliprect;
-
- if (GetClipBox ( hdc, &cliprect))
- return REBAR_InternalEraseBkGnd (infoPtr, hdc, &cliprect);
- return 0;
-}
-
-
static LRESULT
REBAR_GetFont (const REBAR_INFO *infoPtr)
{
TRACE("painting (%s)\n", wine_dbgstr_rect(&ps.rcPaint));
if (ps.fErase) {
/* Erase area of paint if requested */
- REBAR_InternalEraseBkGnd (infoPtr, hdc, &ps.rcPaint);
+ REBAR_EraseBkGnd (infoPtr, hdc);
}
REBAR_Refresh (infoPtr, hdc);
EndPaint (infoPtr->hwndSelf, &ps);
case WM_SYSCOLORCHANGE:
COMCTL32_RefreshSysColors();
+ infoPtr->clrBtnText = comctl32_color.clrBtnText;
+ infoPtr->clrBtnFace = comctl32_color.clrBtnFace;
return 0;
/* case WM_VKEYTOITEM: supported according to ControlSpy */
kernel32
ntdll)
-add_cab_target(comdlg32 1)
+add_cd_file(TARGET comdlg32 DESTINATION reactos/system32 FOR all)
add_importlib_target(comdlg32.spec)
target_link_libraries(compstui wine)
add_importlibs(compstui msvcrt kernel32 ntdll)
-add_cab_target(compstui 1)
+add_cd_file(TARGET compstui DESTINATION reactos/system32 FOR all)
add_importlib_target(compstui.spec)
add_importlibs(credui advapi32 user32 comctl32 msvcrt kernel32 ntdll)
add_importlib_target(credui.spec)
-add_cab_target(credui 1)
+add_cd_file(TARGET credui DESTINATION reactos/system32 FOR all)
add_importlibs(crtdll kernel32 ntdll)
add_pch(crtdll ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
-add_cab_target(crtdll 1)
+add_cd_file(TARGET crtdll DESTINATION reactos/system32 FOR all)
add_importlibs(crypt32 user32 advapi32 msvcrt kernel32 ntdll)
-add_cab_target(crypt32 1)
+add_cd_file(TARGET crypt32 DESTINATION reactos/system32 FOR all)
add_importlib_target(crypt32.spec)
kernel32
ntdll)
-add_cab_target(cryptdlg 1)
+add_cd_file(TARGET cryptdlg DESTINATION reactos/system32 FOR all)
set_module_type(cryptdll win32dll)
target_link_libraries(cryptdll wine)
add_importlibs(cryptdll advapi32 msvcrt kernel32 ntdll)
-add_cab_target(cryptdll 1)
+add_cd_file(TARGET cryptdll DESTINATION reactos/system32 FOR all)
ntdll)
add_importlib_target(cryptnet.spec)
-add_cab_target(cryptnet 1)
+add_cd_file(TARGET cryptnet DESTINATION reactos/system32 FOR all)
ntdll)
add_importlib_target(cryptui.spec)
-add_cab_target(cryptui 1)
+add_cd_file(TARGET cryptui DESTINATION reactos/system32 FOR all)
add_importlibs(dbghelp psapi version msvcrt kernel32 ntdll)
add_importlib_target(dbghelp.spec)
-add_cab_target(dbghelp 1)
+add_cd_file(TARGET dbghelp DESTINATION reactos/system32 FOR all)
set_module_type(dciman32 win32dll)
target_link_libraries(dciman32 wine)
add_importlibs(dciman32 msvcrt kernel32 ntdll)
-add_cab_target(dciman32 1)
+add_cd_file(TARGET dciman32 DESTINATION reactos/system32 FOR all)
add_pch(devmgr ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
-add_cab_target(devmgr 1)
+add_cd_file(TARGET devmgr DESTINATION reactos/system32 FOR all)
add_importlib_target(devmgr.spec)
add_pch(dhcpcsvc ${CMAKE_CURRENT_SOURCE_DIR}/include/rosdhcp.h ${SOURCE})
-add_cab_target(dhcpcsvc 1)
+add_cd_file(TARGET dhcpcsvc DESTINATION reactos/system32 FOR all)
add_importlibs(dnsapi user32 ws2_32 iphlpapi msvcrt kernel32 ntdll)
add_pch(dnsapi ${CMAKE_CURRENT_SOURCE_DIR}/dnsapi/precomp.h ${SOURCE})
add_dependencies(dnsapi psdk)
-add_cab_target(dnsapi 1)
+add_cd_file(TARGET dnsapi DESTINATION reactos/system32 FOR all)
add_importlib_target(dnsapi.spec)
set_module_type(dwmapi win32dll)
target_link_libraries(dwmapi wine)
add_importlibs(dwmapi msvcrt kernel32 ntdll)
-add_cab_target(dwmapi 1)
+add_cd_file(TARGET dwmapi DESTINATION reactos/system32 FOR all)
set_module_type(faultrep win32dll)
target_link_libraries(faultrep wine)
add_importlibs(faultrep advapi32 msvcrt kernel32 ntdll)
-add_cab_target(faultrep 1)
+add_cd_file(TARGET faultrep DESTINATION reactos/system32 FOR all)
add_importlibs(fmifs kernel32 ntdll)
add_dependencies(fmifs psdk)
-add_cab_target(fmifs 1)
+add_cd_file(TARGET fmifs DESTINATION reactos/system32 FOR all)
add_importlib_target(fmifs.spec)
set_module_type(fusion win32dll)
target_link_libraries(fusion wine uuid)
add_importlibs(fusion shlwapi advapi32 dbghelp user32 msvcrt kernel32 ntdll)
-add_cab_target(fusion 1)
+add_cd_file(TARGET fusion DESTINATION reactos/system32 FOR all)
add_importlibs(gdi32 user32 advapi32 msvcrt kernel32 ntdll)
add_pch(gdi32 ${CMAKE_CURRENT_SOURCE_DIR}/include/precomp.h ${SOURCE})
-add_cab_target(gdi32 1)
+add_cd_file(TARGET gdi32 DESTINATION reactos/system32 FOR all)
add_importlib_target(gdi32.spec)
target_link_libraries(gdiplus crt)
endif(ARCH MATCHES amd64)
-add_cab_target(gdiplus 1)
+add_cd_file(TARGET gdiplus DESTINATION reactos/system32 FOR all)
add_importlib_target(getuname.spec)
set_module_type(getuname win32dll)
add_importlibs(getuname msvcrt kernel32 ntdll)
-add_cab_target(getuname 1)
+add_cd_file(TARGET getuname DESTINATION reactos/system32 FOR all)
kernel32
ntdll)
-add_cab_target(glu32 1)
+add_cd_file(TARGET glu32 DESTINATION reactos/system32 FOR all)
add_importlib_target(glu32.spec)
kernel32
ntdll)
-add_cab_target(hhctrl 1)
+add_cd_file(TARGET hhctrl DESTINATION reactos/system32 FOR all)
add_importlibs(hid msvcrt kernel32 ntdll)
add_pch(hid ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
-add_cab_target(hid 1)
+add_cd_file(TARGET hid DESTINATION reactos/system32 FOR all)
ntdll)
add_importlib_target(hlink.spec)
-add_cab_target(hlink 1)
+add_cd_file(TARGET hlink DESTINATION reactos/system32 FOR all)
kernel32
ntdll)
-add_cab_target(hnetcfg 1)
+add_cd_file(TARGET hnetcfg DESTINATION reactos/system32 FOR all)
set_module_type(httpapi win32dll)
target_link_libraries(httpapi wine)
add_importlibs(httpapi msvcrt kernel32 ntdll)
-add_cab_target(httpapi 1)
+add_cd_file(TARGET httpapi DESTINATION reactos/system32 FOR all)
set_module_type(iccvid win32dll)
target_link_libraries(iccvid wine)
add_importlibs(iccvid user32 msvcrt kernel32 ntdll)
-add_cab_target(iccvid 1)
+add_cd_file(TARGET iccvid DESTINATION reactos/system32 FOR all)
target_link_libraries(icmp wine)
add_importlibs(icmp ws2_32 msvcrt kernel32 ntdll)
add_importlib_target(icmp.spec)
-add_cab_target(icmp 1)
+add_cd_file(TARGET icmp DESTINATION reactos/system32 FOR all)
add_importlibs(imaadp32.acm winmm user32 msvcrt kernel32 ntdll)
add_dependencies(imaadp32.acm psdk)
-add_cab_target(imaadp32.acm 1)
+add_cd_file(TARGET imaadp32.acm DESTINATION reactos/system32 FOR all)
add_pch(imagehlp ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
-add_cab_target(imagehlp 1)
+add_cd_file(TARGET imagehlp DESTINATION reactos/system32 FOR all)
set_module_type(imm32 win32dll)
target_link_libraries(imm32 wine)
add_importlibs(imm32 advapi32 user32 msvcrt kernel32 ntdll)
-add_cab_target(imm32 1)
+add_cd_file(TARGET imm32 DESTINATION reactos/system32 FOR all)
add_importlib_target(imm32.spec)
ntdll)
add_importlib_target(inetcomm.spec)
-add_cab_target(inetcomm 1)
+add_cd_file(TARGET inetcomm DESTINATION reactos/system32 FOR all)
kernel32
ntdll)
-add_cab_target(inetmib1 1)
+add_cd_file(TARGET inetmib1 DESTINATION reactos/system32 FOR all)
set_module_type(initpki win32dll)
target_link_libraries(initpki wine)
add_importlibs(initpki msvcrt kernel32 ntdll)
-add_cab_target(initpki 1)
+add_cd_file(TARGET initpki DESTINATION reactos/system32 FOR all)
kernel32
ntdll)
-add_cab_target(inseng 1)
+add_cd_file(TARGET inseng DESTINATION reactos/system32 FOR all)
target_link_libraries(iphlpapi wine tdilib)
add_importlibs(iphlpapi dhcpcsvc advapi32 ws2_32 msvcrt kernel32 ntdll)
-add_cab_target(iphlpapi 1)
+add_cd_file(TARGET iphlpapi DESTINATION reactos/system32 FOR all)
add_importlib_target(iphlpapi.spec)
add_importlibs(itircl msvcrt kernel32 ntdll)
add_dependencies(itircl psdk)
-add_cab_target(itircl 1)
+add_cd_file(TARGET itircl DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(itss wineheaders)
-add_cab_target(itss 1)
+add_cd_file(TARGET itss DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(jscript jsglobal)
-add_cab_target(jscript 1)
+add_cd_file(TARGET jscript DESTINATION reactos/system32 FOR all)
add_importlibs(kernel32 ntdll)
add_pch(kernel32 ${CMAKE_CURRENT_SOURCE_DIR}/k32.h ${SOURCE})
add_dependencies(kernel32 psdk errcodes asm)
-add_cab_target(kernel32 1)
+add_cd_file(TARGET kernel32 DESTINATION reactos/system32 FOR all)
add_importlib_target(kernel32.spec)
static HANDLE
InternalOpenDirW(LPCWSTR DirName,
- BOOLEAN Write)
+ BOOLEAN Write)
{
- UNICODE_STRING NtPathU;
- OBJECT_ATTRIBUTES ObjectAttributes;
- NTSTATUS errCode;
- IO_STATUS_BLOCK IoStatusBlock;
- HANDLE hFile;
-
- if (!RtlDosPathNameToNtPathName_U(DirName,
- &NtPathU,
- NULL,
- NULL))
+ UNICODE_STRING NtPathU;
+ OBJECT_ATTRIBUTES ObjectAttributes;
+ NTSTATUS errCode;
+ IO_STATUS_BLOCK IoStatusBlock;
+ HANDLE hFile;
+
+ if (!RtlDosPathNameToNtPathName_U(DirName,
+ &NtPathU,
+ NULL,
+ NULL))
{
- WARN("Invalid path\n");
- SetLastError(ERROR_BAD_PATHNAME);
- return INVALID_HANDLE_VALUE;
+ WARN("Invalid path\n");
+ SetLastError(ERROR_BAD_PATHNAME);
+ return INVALID_HANDLE_VALUE;
}
InitializeObjectAttributes(&ObjectAttributes,
- &NtPathU,
- OBJ_CASE_INSENSITIVE,
- NULL,
- NULL);
+ &NtPathU,
+ OBJ_CASE_INSENSITIVE,
+ NULL,
+ NULL);
errCode = NtCreateFile (&hFile,
- Write ? FILE_GENERIC_WRITE : FILE_GENERIC_READ,
- &ObjectAttributes,
- &IoStatusBlock,
- NULL,
- 0,
- FILE_SHARE_READ|FILE_SHARE_WRITE,
- FILE_OPEN,
- 0,
- NULL,
- 0);
+ Write ? FILE_GENERIC_WRITE : FILE_GENERIC_READ,
+ &ObjectAttributes,
+ &IoStatusBlock,
+ NULL,
+ 0,
+ FILE_SHARE_READ|FILE_SHARE_WRITE,
+ FILE_OPEN,
+ 0,
+ NULL,
+ 0);
RtlFreeHeap(RtlGetProcessHeap(),
0,
if (!NT_SUCCESS(errCode))
{
- SetLastErrorByStatus (errCode);
- return INVALID_HANDLE_VALUE;
+ SetLastErrorByStatus (errCode);
+ return INVALID_HANDLE_VALUE;
}
return hFile;
}
/* Synced to Wine-2008/12/28 */
DWORD WINAPI
GetLogicalDriveStringsA(DWORD nBufferLength,
- LPSTR lpBuffer)
+ LPSTR lpBuffer)
{
- DWORD drive, count;
- DWORD dwDriveMap;
- LPSTR p;
+ DWORD drive, count;
+ DWORD dwDriveMap;
+ LPSTR p;
- dwDriveMap = GetLogicalDrives();
+ dwDriveMap = GetLogicalDrives();
- for (drive = count = 0; drive < MAX_DOS_DRIVES; drive++)
- {
- if (dwDriveMap & (1<<drive))
- count++;
- }
+ for (drive = count = 0; drive < MAX_DOS_DRIVES; drive++)
+ {
+ if (dwDriveMap & (1<<drive))
+ count++;
+ }
- if ((count * 4) + 1 > nBufferLength) return ((count * 4) + 1);
+ if ((count * 4) + 1 > nBufferLength) return ((count * 4) + 1);
- p = lpBuffer;
+ p = lpBuffer;
- for (drive = 0; drive < MAX_DOS_DRIVES; drive++)
- if (dwDriveMap & (1<<drive))
- {
- *p++ = 'A' + (UCHAR)drive;
- *p++ = ':';
- *p++ = '\\';
- *p++ = '\0';
- }
- *p = '\0';
+ for (drive = 0; drive < MAX_DOS_DRIVES; drive++)
+ if (dwDriveMap & (1<<drive))
+ {
+ *p++ = 'A' + (UCHAR)drive;
+ *p++ = ':';
+ *p++ = '\\';
+ *p++ = '\0';
+ }
+ *p = '\0';
return (count * 4);
}
/* Synced to Wine-2008/12/28 */
DWORD WINAPI
GetLogicalDriveStringsW(DWORD nBufferLength,
- LPWSTR lpBuffer)
+ LPWSTR lpBuffer)
{
- DWORD drive, count;
- DWORD dwDriveMap;
- LPWSTR p;
+ DWORD drive, count;
+ DWORD dwDriveMap;
+ LPWSTR p;
- dwDriveMap = GetLogicalDrives();
+ dwDriveMap = GetLogicalDrives();
- for (drive = count = 0; drive < MAX_DOS_DRIVES; drive++)
- {
- if (dwDriveMap & (1<<drive))
- count++;
- }
+ for (drive = count = 0; drive < MAX_DOS_DRIVES; drive++)
+ {
+ if (dwDriveMap & (1<<drive))
+ count++;
+ }
if ((count * 4) + 1 > nBufferLength) return ((count * 4) + 1);
DWORD WINAPI
GetLogicalDrives(VOID)
{
- NTSTATUS Status;
- PROCESS_DEVICEMAP_INFORMATION ProcessDeviceMapInfo;
-
- /* Get the Device Map for this Process */
- Status = NtQueryInformationProcess(NtCurrentProcess(),
- ProcessDeviceMap,
- &ProcessDeviceMapInfo,
- sizeof(ProcessDeviceMapInfo),
- NULL);
-
- /* Return the Drive Map */
- if (!NT_SUCCESS(Status))
- {
- SetLastErrorByStatus(Status);
- return 0;
- }
-
- return ProcessDeviceMapInfo.Query.DriveMap;
+ NTSTATUS Status;
+ PROCESS_DEVICEMAP_INFORMATION ProcessDeviceMapInfo;
+
+ /* Get the Device Map for this Process */
+ Status = NtQueryInformationProcess(NtCurrentProcess(),
+ ProcessDeviceMap,
+ &ProcessDeviceMapInfo,
+ sizeof(ProcessDeviceMapInfo),
+ NULL);
+
+ /* Return the Drive Map */
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastErrorByStatus(Status);
+ return 0;
+ }
+
+ return ProcessDeviceMapInfo.Query.DriveMap;
}
*/
BOOL WINAPI
GetDiskFreeSpaceA (
- LPCSTR lpRootPathName,
- LPDWORD lpSectorsPerCluster,
- LPDWORD lpBytesPerSector,
- LPDWORD lpNumberOfFreeClusters,
- LPDWORD lpTotalNumberOfClusters
- )
+ LPCSTR lpRootPathName,
+ LPDWORD lpSectorsPerCluster,
+ LPDWORD lpBytesPerSector,
+ LPDWORD lpNumberOfFreeClusters,
+ LPDWORD lpTotalNumberOfClusters
+)
{
- PWCHAR RootPathNameW=NULL;
-
- if (lpRootPathName)
- {
- if (!(RootPathNameW = FilenameA2W(lpRootPathName, FALSE)))
- return FALSE;
- }
-
- return GetDiskFreeSpaceW (RootPathNameW,
- lpSectorsPerCluster,
- lpBytesPerSector,
- lpNumberOfFreeClusters,
- lpTotalNumberOfClusters);
+ PWCHAR RootPathNameW=NULL;
+
+ if (lpRootPathName)
+ {
+ if (!(RootPathNameW = FilenameA2W(lpRootPathName, FALSE)))
+ return FALSE;
+ }
+
+ return GetDiskFreeSpaceW (RootPathNameW,
+ lpSectorsPerCluster,
+ lpBytesPerSector,
+ lpNumberOfFreeClusters,
+ lpTotalNumberOfClusters);
}
LPDWORD lpBytesPerSector,
LPDWORD lpNumberOfFreeClusters,
LPDWORD lpTotalNumberOfClusters
- )
+)
{
FILE_FS_SIZE_INFORMATION FileFsSize;
IO_STATUS_BLOCK IoStatusBlock;
}
RootPathName[3] = 0;
- hFile = InternalOpenDirW(RootPathName, FALSE);
- if (INVALID_HANDLE_VALUE == hFile)
+ hFile = InternalOpenDirW(RootPathName, FALSE);
+ if (INVALID_HANDLE_VALUE == hFile)
{
- SetLastError(ERROR_PATH_NOT_FOUND);
- return FALSE;
+ SetLastError(ERROR_PATH_NOT_FOUND);
+ return FALSE;
}
errCode = NtQueryVolumeInformationFile(hFile,
*/
BOOL WINAPI
GetDiskFreeSpaceExA (
- LPCSTR lpDirectoryName OPTIONAL,
- PULARGE_INTEGER lpFreeBytesAvailableToCaller,
- PULARGE_INTEGER lpTotalNumberOfBytes,
- PULARGE_INTEGER lpTotalNumberOfFreeBytes
- )
+ LPCSTR lpDirectoryName OPTIONAL,
+ PULARGE_INTEGER lpFreeBytesAvailableToCaller,
+ PULARGE_INTEGER lpTotalNumberOfBytes,
+ PULARGE_INTEGER lpTotalNumberOfFreeBytes
+)
{
- PWCHAR DirectoryNameW=NULL;
-
- if (lpDirectoryName)
- {
- if (!(DirectoryNameW = FilenameA2W(lpDirectoryName, FALSE)))
- return FALSE;
- }
-
- return GetDiskFreeSpaceExW (DirectoryNameW ,
- lpFreeBytesAvailableToCaller,
- lpTotalNumberOfBytes,
- lpTotalNumberOfFreeBytes);
+ PWCHAR DirectoryNameW=NULL;
+
+ if (lpDirectoryName)
+ {
+ if (!(DirectoryNameW = FilenameA2W(lpDirectoryName, FALSE)))
+ return FALSE;
+ }
+
+ return GetDiskFreeSpaceExW (DirectoryNameW ,
+ lpFreeBytesAvailableToCaller,
+ lpTotalNumberOfBytes,
+ lpTotalNumberOfFreeBytes);
}
PULARGE_INTEGER lpFreeBytesAvailableToCaller,
PULARGE_INTEGER lpTotalNumberOfBytes,
PULARGE_INTEGER lpTotalNumberOfFreeBytes
- )
+)
{
union
{
UINT WINAPI
GetDriveTypeA(LPCSTR lpRootPathName)
{
- PWCHAR RootPathNameW;
+ PWCHAR RootPathNameW;
- if (!(RootPathNameW = FilenameA2W(lpRootPathName, FALSE)))
- return DRIVE_UNKNOWN;
+ if (!(RootPathNameW = FilenameA2W(lpRootPathName, FALSE)))
+ return DRIVE_UNKNOWN;
- return GetDriveTypeW(RootPathNameW);
+ return GetDriveTypeW(RootPathNameW);
}
UINT WINAPI
GetDriveTypeW(LPCWSTR lpRootPathName)
{
- FILE_FS_DEVICE_INFORMATION FileFsDevice;
- IO_STATUS_BLOCK IoStatusBlock;
-
- HANDLE hFile;
- NTSTATUS errCode;
-
- hFile = InternalOpenDirW(lpRootPathName, FALSE);
- if (hFile == INVALID_HANDLE_VALUE)
- {
- return DRIVE_NO_ROOT_DIR; /* According to WINE regression tests */
- }
-
- errCode = NtQueryVolumeInformationFile (hFile,
- &IoStatusBlock,
- &FileFsDevice,
- sizeof(FILE_FS_DEVICE_INFORMATION),
- FileFsDeviceInformation);
- if (!NT_SUCCESS(errCode))
- {
- CloseHandle(hFile);
- SetLastErrorByStatus (errCode);
- return 0;
- }
- CloseHandle(hFile);
-
- switch (FileFsDevice.DeviceType)
+ FILE_FS_DEVICE_INFORMATION FileFsDevice;
+ IO_STATUS_BLOCK IoStatusBlock;
+ HANDLE hFile;
+ NTSTATUS Status;
+ UNICODE_STRING NtPath;
+ OBJECT_ATTRIBUTES ObjectAttributes;
+ WCHAR Buffer[MAX_PATH+1];
+
+ if (!lpRootPathName)
+ {
+ DWORD cBytes;
+
+ /* Get current directory */
+ cBytes = RtlGetCurrentDirectory_U(sizeof(Buffer), Buffer);
+ if(cBytes < sizeof(Buffer))
{
- case FILE_DEVICE_CD_ROM:
- case FILE_DEVICE_CD_ROM_FILE_SYSTEM:
- return DRIVE_CDROM;
- case FILE_DEVICE_VIRTUAL_DISK:
- return DRIVE_RAMDISK;
- case FILE_DEVICE_NETWORK_FILE_SYSTEM:
- return DRIVE_REMOTE;
- case FILE_DEVICE_DISK:
- case FILE_DEVICE_DISK_FILE_SYSTEM:
- if (FileFsDevice.Characteristics & FILE_REMOTE_DEVICE)
- return DRIVE_REMOTE;
- if (FileFsDevice.Characteristics & FILE_REMOVABLE_MEDIA)
- return DRIVE_REMOVABLE;
- return DRIVE_FIXED;
- }
+ ASSERT(cBytes < MAX_PATH*sizeof(WCHAR));
+ Buffer[cBytes/sizeof(WCHAR)] = L'\\';
+ Buffer[cBytes/sizeof(WCHAR)+1] = L'\0';
+ lpRootPathName = Buffer;
+ } /* else fail... should we allow longer current dirs? */
+ }
+
+ if (!RtlDosPathNameToNtPathName_U(lpRootPathName, &NtPath, NULL, NULL))
+ {
+ WARN("Invalid path: %ls\n", lpRootPathName);
+ return DRIVE_NO_ROOT_DIR;
+ }
+
+ /* Path from RtlDosPathNameToNtPathName_U does not contain '/' and multiple '\\' in a row */
+ if(!NtPath.Length || NtPath.Buffer[NtPath.Length/sizeof(WCHAR)-1] != L'\\')
+ {
+ /* Path must be ended by slash */
+ WARN("Invalid path: %ls\n", NtPath.Buffer);
+ return DRIVE_NO_ROOT_DIR;
+ }
+
+ /* Remove ending slash */
+ NtPath.Length -= sizeof(WCHAR);
+
+ InitializeObjectAttributes(&ObjectAttributes,
+ &NtPath,
+ OBJ_CASE_INSENSITIVE,
+ NULL,
+ NULL);
+
+ Status = NtCreateFile(&hFile,
+ FILE_GENERIC_READ,
+ &ObjectAttributes,
+ &IoStatusBlock,
+ NULL,
+ 0,
+ FILE_SHARE_READ|FILE_SHARE_WRITE,
+ FILE_OPEN,
+ 0,
+ NULL,
+ 0);
+
+ RtlFreeUnicodeString(&NtPath);
+
+ if (!NT_SUCCESS(Status))
+ {
+ WARN("Invalid path: %ls\n", lpRootPathName);
+ return DRIVE_NO_ROOT_DIR; /* According to WINE regression tests */
+ }
- ERR("Returning DRIVE_UNKNOWN for device type %d\n", FileFsDevice.DeviceType);
+ Status = NtQueryVolumeInformationFile (hFile,
+ &IoStatusBlock,
+ &FileFsDevice,
+ sizeof(FILE_FS_DEVICE_INFORMATION),
+ FileFsDeviceInformation);
+ CloseHandle(hFile);
+ if (!NT_SUCCESS(Status))
+ {
+ ERR("NtQueryVolumeInformationFile failed for %ls\n", lpRootPathName);
+ return DRIVE_UNKNOWN;
+ }
- return DRIVE_UNKNOWN;
+ switch (FileFsDevice.DeviceType)
+ {
+ case FILE_DEVICE_CD_ROM:
+ case FILE_DEVICE_CD_ROM_FILE_SYSTEM:
+ return DRIVE_CDROM;
+ case FILE_DEVICE_VIRTUAL_DISK:
+ return DRIVE_RAMDISK;
+ case FILE_DEVICE_NETWORK_FILE_SYSTEM:
+ return DRIVE_REMOTE;
+ case FILE_DEVICE_DISK:
+ case FILE_DEVICE_DISK_FILE_SYSTEM:
+ if (FileFsDevice.Characteristics & FILE_REMOTE_DEVICE)
+ return DRIVE_REMOTE;
+ if (FileFsDevice.Characteristics & FILE_REMOVABLE_MEDIA)
+ return DRIVE_REMOVABLE;
+ return DRIVE_FIXED;
+ }
+
+ ERR("Returning DRIVE_UNKNOWN for device type %d\n", FileFsDevice.DeviceType);
+
+ return DRIVE_UNKNOWN;
}
*/
BOOL WINAPI
GetVolumeInformationA(
- LPCSTR lpRootPathName,
- LPSTR lpVolumeNameBuffer,
- DWORD nVolumeNameSize,
- LPDWORD lpVolumeSerialNumber,
- LPDWORD lpMaximumComponentLength,
- LPDWORD lpFileSystemFlags,
- LPSTR lpFileSystemNameBuffer,
- DWORD nFileSystemNameSize
- )
+ LPCSTR lpRootPathName,
+ LPSTR lpVolumeNameBuffer,
+ DWORD nVolumeNameSize,
+ LPDWORD lpVolumeSerialNumber,
+ LPDWORD lpMaximumComponentLength,
+ LPDWORD lpFileSystemFlags,
+ LPSTR lpFileSystemNameBuffer,
+ DWORD nFileSystemNameSize
+)
{
- UNICODE_STRING FileSystemNameU;
- UNICODE_STRING VolumeNameU = { 0, 0, NULL };
- ANSI_STRING VolumeName;
- ANSI_STRING FileSystemName;
- PWCHAR RootPathNameW;
- BOOL Result;
+ UNICODE_STRING FileSystemNameU;
+ UNICODE_STRING VolumeNameU = { 0, 0, NULL };
+ ANSI_STRING VolumeName;
+ ANSI_STRING FileSystemName;
+ PWCHAR RootPathNameW;
+ BOOL Result;
- if (!(RootPathNameW = FilenameA2W(lpRootPathName, FALSE)))
- return FALSE;
+ if (!(RootPathNameW = FilenameA2W(lpRootPathName, FALSE)))
+ return FALSE;
- if (lpVolumeNameBuffer)
+ if (lpVolumeNameBuffer)
{
- VolumeNameU.MaximumLength = (USHORT)nVolumeNameSize * sizeof(WCHAR);
- VolumeNameU.Buffer = RtlAllocateHeap (RtlGetProcessHeap (),
- 0,
- VolumeNameU.MaximumLength);
- if (VolumeNameU.Buffer == NULL)
- {
- goto FailNoMem;
- }
+ VolumeNameU.MaximumLength = (USHORT)nVolumeNameSize * sizeof(WCHAR);
+ VolumeNameU.Buffer = RtlAllocateHeap (RtlGetProcessHeap (),
+ 0,
+ VolumeNameU.MaximumLength);
+ if (VolumeNameU.Buffer == NULL)
+ {
+ goto FailNoMem;
+ }
}
- if (lpFileSystemNameBuffer)
+ if (lpFileSystemNameBuffer)
{
- FileSystemNameU.Length = 0;
- FileSystemNameU.MaximumLength = (USHORT)nFileSystemNameSize * sizeof(WCHAR);
- FileSystemNameU.Buffer = RtlAllocateHeap (RtlGetProcessHeap (),
- 0,
- FileSystemNameU.MaximumLength);
- if (FileSystemNameU.Buffer == NULL)
- {
- if (VolumeNameU.Buffer != NULL)
- {
- RtlFreeHeap(RtlGetProcessHeap(),
- 0,
- VolumeNameU.Buffer);
- }
+ FileSystemNameU.Length = 0;
+ FileSystemNameU.MaximumLength = (USHORT)nFileSystemNameSize * sizeof(WCHAR);
+ FileSystemNameU.Buffer = RtlAllocateHeap (RtlGetProcessHeap (),
+ 0,
+ FileSystemNameU.MaximumLength);
+ if (FileSystemNameU.Buffer == NULL)
+ {
+ if (VolumeNameU.Buffer != NULL)
+ {
+ RtlFreeHeap(RtlGetProcessHeap(),
+ 0,
+ VolumeNameU.Buffer);
+ }
FailNoMem:
- SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- return FALSE;
- }
+ SetLastError(ERROR_NOT_ENOUGH_MEMORY);
+ return FALSE;
+ }
}
- Result = GetVolumeInformationW (RootPathNameW,
- lpVolumeNameBuffer ? VolumeNameU.Buffer : NULL,
- nVolumeNameSize,
- lpVolumeSerialNumber,
- lpMaximumComponentLength,
- lpFileSystemFlags,
- lpFileSystemNameBuffer ? FileSystemNameU.Buffer : NULL,
- nFileSystemNameSize);
+ Result = GetVolumeInformationW (RootPathNameW,
+ lpVolumeNameBuffer ? VolumeNameU.Buffer : NULL,
+ nVolumeNameSize,
+ lpVolumeSerialNumber,
+ lpMaximumComponentLength,
+ lpFileSystemFlags,
+ lpFileSystemNameBuffer ? FileSystemNameU.Buffer : NULL,
+ nFileSystemNameSize);
- if (Result)
+ if (Result)
{
- if (lpVolumeNameBuffer)
+ if (lpVolumeNameBuffer)
{
- VolumeNameU.Length = wcslen(VolumeNameU.Buffer) * sizeof(WCHAR);
- VolumeName.Length = 0;
- VolumeName.MaximumLength = (USHORT)nVolumeNameSize;
- VolumeName.Buffer = lpVolumeNameBuffer;
- }
-
- if (lpFileSystemNameBuffer)
- {
- FileSystemNameU.Length = wcslen(FileSystemNameU.Buffer) * sizeof(WCHAR);
- FileSystemName.Length = 0;
- FileSystemName.MaximumLength = (USHORT)nFileSystemNameSize;
- FileSystemName.Buffer = lpFileSystemNameBuffer;
- }
-
- /* convert unicode strings to ansi (or oem) */
- if (bIsFileApiAnsi)
+ VolumeNameU.Length = wcslen(VolumeNameU.Buffer) * sizeof(WCHAR);
+ VolumeName.Length = 0;
+ VolumeName.MaximumLength = (USHORT)nVolumeNameSize;
+ VolumeName.Buffer = lpVolumeNameBuffer;
+ }
+
+ if (lpFileSystemNameBuffer)
{
- if (lpVolumeNameBuffer)
- {
- RtlUnicodeStringToAnsiString (&VolumeName,
- &VolumeNameU,
- FALSE);
- }
- if (lpFileSystemNameBuffer)
- {
- RtlUnicodeStringToAnsiString (&FileSystemName,
- &FileSystemNameU,
- FALSE);
- }
- }
- else
+ FileSystemNameU.Length = wcslen(FileSystemNameU.Buffer) * sizeof(WCHAR);
+ FileSystemName.Length = 0;
+ FileSystemName.MaximumLength = (USHORT)nFileSystemNameSize;
+ FileSystemName.Buffer = lpFileSystemNameBuffer;
+ }
+
+ /* convert unicode strings to ansi (or oem) */
+ if (bIsFileApiAnsi)
+ {
+ if (lpVolumeNameBuffer)
+ {
+ RtlUnicodeStringToAnsiString (&VolumeName,
+ &VolumeNameU,
+ FALSE);
+ }
+ if (lpFileSystemNameBuffer)
+ {
+ RtlUnicodeStringToAnsiString (&FileSystemName,
+ &FileSystemNameU,
+ FALSE);
+ }
+ }
+ else
{
- if (lpVolumeNameBuffer)
- {
- RtlUnicodeStringToOemString (&VolumeName,
- &VolumeNameU,
- FALSE);
- }
- if (lpFileSystemNameBuffer)
- {
- RtlUnicodeStringToOemString (&FileSystemName,
- &FileSystemNameU,
- FALSE);
- }
- }
+ if (lpVolumeNameBuffer)
+ {
+ RtlUnicodeStringToOemString (&VolumeName,
+ &VolumeNameU,
+ FALSE);
+ }
+ if (lpFileSystemNameBuffer)
+ {
+ RtlUnicodeStringToOemString (&FileSystemName,
+ &FileSystemNameU,
+ FALSE);
+ }
+ }
}
- if (lpVolumeNameBuffer)
+ if (lpVolumeNameBuffer)
{
- RtlFreeHeap (RtlGetProcessHeap (),
- 0,
- VolumeNameU.Buffer);
+ RtlFreeHeap (RtlGetProcessHeap (),
+ 0,
+ VolumeNameU.Buffer);
}
- if (lpFileSystemNameBuffer)
+ if (lpFileSystemNameBuffer)
{
- RtlFreeHeap (RtlGetProcessHeap (),
- 0,
- FileSystemNameU.Buffer);
+ RtlFreeHeap (RtlGetProcessHeap (),
+ 0,
+ FileSystemNameU.Buffer);
}
- return Result;
+ return Result;
}
#define FS_VOLUME_BUFFER_SIZE (MAX_PATH * sizeof(WCHAR) + sizeof(FILE_FS_VOLUME_INFORMATION))
LPDWORD lpFileSystemFlags,
LPWSTR lpFileSystemNameBuffer,
DWORD nFileSystemNameSize
- )
+)
{
- PFILE_FS_VOLUME_INFORMATION FileFsVolume;
- PFILE_FS_ATTRIBUTE_INFORMATION FileFsAttribute;
- IO_STATUS_BLOCK IoStatusBlock;
- WCHAR RootPathName[MAX_PATH];
- UCHAR Buffer[max(FS_VOLUME_BUFFER_SIZE, FS_ATTRIBUTE_BUFFER_SIZE)];
-
- HANDLE hFile;
- NTSTATUS errCode;
-
- FileFsVolume = (PFILE_FS_VOLUME_INFORMATION)Buffer;
- FileFsAttribute = (PFILE_FS_ATTRIBUTE_INFORMATION)Buffer;
-
- TRACE("FileFsVolume %p\n", FileFsVolume);
- TRACE("FileFsAttribute %p\n", FileFsAttribute);
-
- if (!lpRootPathName || !wcscmp(lpRootPathName, L""))
- {
- GetCurrentDirectoryW (MAX_PATH, RootPathName);
- }
- else
- {
- wcsncpy (RootPathName, lpRootPathName, 3);
- }
- RootPathName[3] = 0;
-
- hFile = InternalOpenDirW(RootPathName, FALSE);
- if (hFile == INVALID_HANDLE_VALUE)
+ PFILE_FS_VOLUME_INFORMATION FileFsVolume;
+ PFILE_FS_ATTRIBUTE_INFORMATION FileFsAttribute;
+ IO_STATUS_BLOCK IoStatusBlock;
+ WCHAR RootPathName[MAX_PATH];
+ UCHAR Buffer[max(FS_VOLUME_BUFFER_SIZE, FS_ATTRIBUTE_BUFFER_SIZE)];
+
+ HANDLE hFile;
+ NTSTATUS errCode;
+
+ FileFsVolume = (PFILE_FS_VOLUME_INFORMATION)Buffer;
+ FileFsAttribute = (PFILE_FS_ATTRIBUTE_INFORMATION)Buffer;
+
+ TRACE("FileFsVolume %p\n", FileFsVolume);
+ TRACE("FileFsAttribute %p\n", FileFsAttribute);
+
+ if (!lpRootPathName || !wcscmp(lpRootPathName, L""))
+ {
+ GetCurrentDirectoryW (MAX_PATH, RootPathName);
+ }
+ else
{
- return FALSE;
+ wcsncpy (RootPathName, lpRootPathName, 3);
}
+ RootPathName[3] = 0;
- TRACE("hFile: %x\n", hFile);
- errCode = NtQueryVolumeInformationFile(hFile,
- &IoStatusBlock,
- FileFsVolume,
- FS_VOLUME_BUFFER_SIZE,
- FileFsVolumeInformation);
- if ( !NT_SUCCESS(errCode) )
+ hFile = InternalOpenDirW(RootPathName, FALSE);
+ if (hFile == INVALID_HANDLE_VALUE)
+ {
+ return FALSE;
+ }
+
+ TRACE("hFile: %x\n", hFile);
+ errCode = NtQueryVolumeInformationFile(hFile,
+ &IoStatusBlock,
+ FileFsVolume,
+ FS_VOLUME_BUFFER_SIZE,
+ FileFsVolumeInformation);
+ if ( !NT_SUCCESS(errCode) )
{
- WARN("Status: %x\n", errCode);
- CloseHandle(hFile);
- SetLastErrorByStatus (errCode);
- return FALSE;
+ WARN("Status: %x\n", errCode);
+ CloseHandle(hFile);
+ SetLastErrorByStatus (errCode);
+ return FALSE;
}
- if (lpVolumeSerialNumber)
- *lpVolumeSerialNumber = FileFsVolume->VolumeSerialNumber;
+ if (lpVolumeSerialNumber)
+ *lpVolumeSerialNumber = FileFsVolume->VolumeSerialNumber;
- if (lpVolumeNameBuffer)
+ if (lpVolumeNameBuffer)
{
- if (nVolumeNameSize * sizeof(WCHAR) >= FileFsVolume->VolumeLabelLength + sizeof(WCHAR))
+ if (nVolumeNameSize * sizeof(WCHAR) >= FileFsVolume->VolumeLabelLength + sizeof(WCHAR))
{
- memcpy(lpVolumeNameBuffer,
- FileFsVolume->VolumeLabel,
- FileFsVolume->VolumeLabelLength);
- lpVolumeNameBuffer[FileFsVolume->VolumeLabelLength / sizeof(WCHAR)] = 0;
- }
- else
+ memcpy(lpVolumeNameBuffer,
+ FileFsVolume->VolumeLabel,
+ FileFsVolume->VolumeLabelLength);
+ lpVolumeNameBuffer[FileFsVolume->VolumeLabelLength / sizeof(WCHAR)] = 0;
+ }
+ else
{
- CloseHandle(hFile);
- SetLastError(ERROR_MORE_DATA);
- return FALSE;
- }
+ CloseHandle(hFile);
+ SetLastError(ERROR_MORE_DATA);
+ return FALSE;
+ }
}
- errCode = NtQueryVolumeInformationFile (hFile,
- &IoStatusBlock,
- FileFsAttribute,
- FS_ATTRIBUTE_BUFFER_SIZE,
- FileFsAttributeInformation);
- CloseHandle(hFile);
- if (!NT_SUCCESS(errCode))
+ errCode = NtQueryVolumeInformationFile (hFile,
+ &IoStatusBlock,
+ FileFsAttribute,
+ FS_ATTRIBUTE_BUFFER_SIZE,
+ FileFsAttributeInformation);
+ CloseHandle(hFile);
+ if (!NT_SUCCESS(errCode))
{
- WARN("Status: %x\n", errCode);
- SetLastErrorByStatus (errCode);
- return FALSE;
+ WARN("Status: %x\n", errCode);
+ SetLastErrorByStatus (errCode);
+ return FALSE;
}
- if (lpFileSystemFlags)
- *lpFileSystemFlags = FileFsAttribute->FileSystemAttributes;
- if (lpMaximumComponentLength)
- *lpMaximumComponentLength = FileFsAttribute->MaximumComponentNameLength;
- if (lpFileSystemNameBuffer)
+ if (lpFileSystemFlags)
+ *lpFileSystemFlags = FileFsAttribute->FileSystemAttributes;
+ if (lpMaximumComponentLength)
+ *lpMaximumComponentLength = FileFsAttribute->MaximumComponentNameLength;
+ if (lpFileSystemNameBuffer)
{
- if (nFileSystemNameSize * sizeof(WCHAR) >= FileFsAttribute->FileSystemNameLength + sizeof(WCHAR))
+ if (nFileSystemNameSize * sizeof(WCHAR) >= FileFsAttribute->FileSystemNameLength + sizeof(WCHAR))
{
- memcpy(lpFileSystemNameBuffer,
- FileFsAttribute->FileSystemName,
- FileFsAttribute->FileSystemNameLength);
- lpFileSystemNameBuffer[FileFsAttribute->FileSystemNameLength / sizeof(WCHAR)] = 0;
- }
- else
+ memcpy(lpFileSystemNameBuffer,
+ FileFsAttribute->FileSystemName,
+ FileFsAttribute->FileSystemNameLength);
+ lpFileSystemNameBuffer[FileFsAttribute->FileSystemNameLength / sizeof(WCHAR)] = 0;
+ }
+ else
{
- SetLastError(ERROR_MORE_DATA);
- return FALSE;
- }
+ SetLastError(ERROR_MORE_DATA);
+ return FALSE;
+ }
}
- return TRUE;
+ return TRUE;
}
BOOL
WINAPI
SetVolumeLabelA (
- LPCSTR lpRootPathName,
- LPCSTR lpVolumeName /* NULL if deleting label */
- )
+ LPCSTR lpRootPathName,
+ LPCSTR lpVolumeName /* NULL if deleting label */
+)
{
- PWCHAR RootPathNameW;
- PWCHAR VolumeNameW = NULL;
- BOOL Result;
-
- if (!(RootPathNameW = FilenameA2W(lpRootPathName, FALSE)))
- return FALSE;
-
- if (lpVolumeName)
- {
- if (!(VolumeNameW = FilenameA2W(lpVolumeName, TRUE)))
- return FALSE;
- }
-
- Result = SetVolumeLabelW (RootPathNameW,
- VolumeNameW);
-
- if (VolumeNameW)
- {
- RtlFreeHeap (RtlGetProcessHeap (),
- 0,
- VolumeNameW );
- }
-
- return Result;
+ PWCHAR RootPathNameW;
+ PWCHAR VolumeNameW = NULL;
+ BOOL Result;
+
+ if (!(RootPathNameW = FilenameA2W(lpRootPathName, FALSE)))
+ return FALSE;
+
+ if (lpVolumeName)
+ {
+ if (!(VolumeNameW = FilenameA2W(lpVolumeName, TRUE)))
+ return FALSE;
+ }
+
+ Result = SetVolumeLabelW (RootPathNameW,
+ VolumeNameW);
+
+ if (VolumeNameW)
+ {
+ RtlFreeHeap (RtlGetProcessHeap (),
+ 0,
+ VolumeNameW );
+ }
+
+ return Result;
}
*/
BOOL WINAPI
SetVolumeLabelW(
- LPCWSTR lpRootPathName,
- LPCWSTR lpVolumeName /* NULL if deleting label */
- )
+ LPCWSTR lpRootPathName,
+ LPCWSTR lpVolumeName /* NULL if deleting label */
+)
{
- PFILE_FS_LABEL_INFORMATION LabelInfo;
- IO_STATUS_BLOCK IoStatusBlock;
- ULONG LabelLength;
- HANDLE hFile;
- NTSTATUS Status;
-
- LabelLength = wcslen(lpVolumeName) * sizeof(WCHAR);
- LabelInfo = RtlAllocateHeap(RtlGetProcessHeap(),
- 0,
- sizeof(FILE_FS_LABEL_INFORMATION) +
- LabelLength);
- if (LabelInfo == NULL)
- {
- SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- return FALSE;
- }
- LabelInfo->VolumeLabelLength = LabelLength;
- memcpy(LabelInfo->VolumeLabel,
- lpVolumeName,
- LabelLength);
-
- hFile = InternalOpenDirW(lpRootPathName, TRUE);
- if (INVALID_HANDLE_VALUE == hFile)
- {
+ PFILE_FS_LABEL_INFORMATION LabelInfo;
+ IO_STATUS_BLOCK IoStatusBlock;
+ ULONG LabelLength;
+ HANDLE hFile;
+ NTSTATUS Status;
+
+ LabelLength = wcslen(lpVolumeName) * sizeof(WCHAR);
+ LabelInfo = RtlAllocateHeap(RtlGetProcessHeap(),
+ 0,
+ sizeof(FILE_FS_LABEL_INFORMATION) +
+ LabelLength);
+ if (LabelInfo == NULL)
+ {
+ SetLastError(ERROR_NOT_ENOUGH_MEMORY);
+ return FALSE;
+ }
+ LabelInfo->VolumeLabelLength = LabelLength;
+ memcpy(LabelInfo->VolumeLabel,
+ lpVolumeName,
+ LabelLength);
+
+ hFile = InternalOpenDirW(lpRootPathName, TRUE);
+ if (INVALID_HANDLE_VALUE == hFile)
+ {
RtlFreeHeap(RtlGetProcessHeap(),
- 0,
- LabelInfo);
+ 0,
+ LabelInfo);
+ return FALSE;
+ }
+
+ Status = NtSetVolumeInformationFile(hFile,
+ &IoStatusBlock,
+ LabelInfo,
+ sizeof(FILE_FS_LABEL_INFORMATION) +
+ LabelLength,
+ FileFsLabelInformation);
+
+ RtlFreeHeap(RtlGetProcessHeap(),
+ 0,
+ LabelInfo);
+
+ if (!NT_SUCCESS(Status))
+ {
+ WARN("Status: %x\n", Status);
+ CloseHandle(hFile);
+ SetLastErrorByStatus(Status);
return FALSE;
- }
-
- Status = NtSetVolumeInformationFile(hFile,
- &IoStatusBlock,
- LabelInfo,
- sizeof(FILE_FS_LABEL_INFORMATION) +
- LabelLength,
- FileFsLabelInformation);
-
- RtlFreeHeap(RtlGetProcessHeap(),
- 0,
- LabelInfo);
-
- if (!NT_SUCCESS(Status))
- {
- WARN("Status: %x\n", Status);
- CloseHandle(hFile);
- SetLastErrorByStatus(Status);
- return FALSE;
- }
-
- CloseHandle(hFile);
- return TRUE;
+ }
+
+ CloseHandle(hFile);
+ return TRUE;
}
/**
BOOL WINAPI
GetVolumeNameForVolumeMountPointW(
- IN LPCWSTR VolumeMountPoint,
- OUT LPWSTR VolumeName,
- IN DWORD VolumeNameLength)
+ IN LPCWSTR VolumeMountPoint,
+ OUT LPWSTR VolumeName,
+ IN DWORD VolumeNameLength)
{
- UNICODE_STRING NtFileName;
- OBJECT_ATTRIBUTES ObjectAttributes;
- HANDLE FileHandle;
- IO_STATUS_BLOCK Iosb;
- ULONG BufferLength;
- PMOUNTDEV_NAME MountDevName;
- PMOUNTMGR_MOUNT_POINT MountPoint;
- ULONG MountPointSize;
- PMOUNTMGR_MOUNT_POINTS MountPoints;
- ULONG Index;
- PUCHAR SymbolicLinkName;
- BOOL Result;
- NTSTATUS Status;
-
- if (!VolumeMountPoint || !VolumeMountPoint[0])
- {
- SetLastError(ERROR_PATH_NOT_FOUND);
- return FALSE;
- }
-
- /*
- * First step is to convert the passed volume mount point name to
- * an NT acceptable name.
- */
-
- if (!RtlDosPathNameToNtPathName_U(VolumeMountPoint, &NtFileName, NULL, NULL))
- {
- SetLastError(ERROR_PATH_NOT_FOUND);
- return FALSE;
- }
-
- if (NtFileName.Length > sizeof(WCHAR) &&
- NtFileName.Buffer[(NtFileName.Length / sizeof(WCHAR)) - 1] == '\\')
- {
- NtFileName.Length -= sizeof(WCHAR);
- }
-
- /*
- * Query mount point device name which we will later use for determining
- * the volume name.
- */
-
- InitializeObjectAttributes(&ObjectAttributes, &NtFileName, 0, NULL, NULL);
- Status = NtOpenFile(&FileHandle, FILE_READ_ATTRIBUTES | SYNCHRONIZE,
- &ObjectAttributes, &Iosb,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- FILE_SYNCHRONOUS_IO_NONALERT);
- RtlFreeUnicodeString(&NtFileName);
- if (!NT_SUCCESS(Status))
- {
- SetLastErrorByStatus(Status);
- return FALSE;
- }
-
- BufferLength = sizeof(MOUNTDEV_NAME) + 50 * sizeof(WCHAR);
- do
- {
- MountDevName = RtlAllocateHeap(RtlGetProcessHeap(), 0, BufferLength);
- if (MountDevName == NULL)
- {
- NtClose(FileHandle);
- SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- return FALSE;
- }
-
- Status = NtDeviceIoControlFile(FileHandle, NULL, NULL, NULL, &Iosb,
- IOCTL_MOUNTDEV_QUERY_DEVICE_NAME,
- NULL, 0, MountDevName, BufferLength);
- if (!NT_SUCCESS(Status))
- {
- RtlFreeHeap(GetProcessHeap(), 0, MountDevName);
- if (Status == STATUS_BUFFER_OVERFLOW)
- {
- BufferLength = sizeof(MOUNTDEV_NAME) + MountDevName->NameLength;
- continue;
- }
- else
- {
+ UNICODE_STRING NtFileName;
+ OBJECT_ATTRIBUTES ObjectAttributes;
+ HANDLE FileHandle;
+ IO_STATUS_BLOCK Iosb;
+ ULONG BufferLength;
+ PMOUNTDEV_NAME MountDevName;
+ PMOUNTMGR_MOUNT_POINT MountPoint;
+ ULONG MountPointSize;
+ PMOUNTMGR_MOUNT_POINTS MountPoints;
+ ULONG Index;
+ PUCHAR SymbolicLinkName;
+ BOOL Result;
+ NTSTATUS Status;
+
+ if (!VolumeMountPoint || !VolumeMountPoint[0])
+ {
+ SetLastError(ERROR_PATH_NOT_FOUND);
+ return FALSE;
+ }
+
+ /*
+ * First step is to convert the passed volume mount point name to
+ * an NT acceptable name.
+ */
+
+ if (!RtlDosPathNameToNtPathName_U(VolumeMountPoint, &NtFileName, NULL, NULL))
+ {
+ SetLastError(ERROR_PATH_NOT_FOUND);
+ return FALSE;
+ }
+
+ if (NtFileName.Length > sizeof(WCHAR) &&
+ NtFileName.Buffer[(NtFileName.Length / sizeof(WCHAR)) - 1] == '\\')
+ {
+ NtFileName.Length -= sizeof(WCHAR);
+ }
+
+ /*
+ * Query mount point device name which we will later use for determining
+ * the volume name.
+ */
+
+ InitializeObjectAttributes(&ObjectAttributes, &NtFileName, 0, NULL, NULL);
+ Status = NtOpenFile(&FileHandle, FILE_READ_ATTRIBUTES | SYNCHRONIZE,
+ &ObjectAttributes, &Iosb,
+ FILE_SHARE_READ | FILE_SHARE_WRITE,
+ FILE_SYNCHRONOUS_IO_NONALERT);
+ RtlFreeUnicodeString(&NtFileName);
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastErrorByStatus(Status);
+ return FALSE;
+ }
+
+ BufferLength = sizeof(MOUNTDEV_NAME) + 50 * sizeof(WCHAR);
+ do
+ {
+ MountDevName = RtlAllocateHeap(RtlGetProcessHeap(), 0, BufferLength);
+ if (MountDevName == NULL)
+ {
NtClose(FileHandle);
- SetLastErrorByStatus(Status);
+ SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return FALSE;
- }
- }
- }
- while (!NT_SUCCESS(Status));
-
- NtClose(FileHandle);
-
- /*
- * Get the mount point information from mount manager.
- */
-
- MountPointSize = MountDevName->NameLength + sizeof(MOUNTMGR_MOUNT_POINT);
- MountPoint = RtlAllocateHeap(GetProcessHeap(), 0, MountPointSize);
- if (MountPoint == NULL)
- {
- RtlFreeHeap(GetProcessHeap(), 0, MountDevName);
- SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- return FALSE;
- }
- RtlZeroMemory(MountPoint, sizeof(MOUNTMGR_MOUNT_POINT));
- MountPoint->DeviceNameOffset = sizeof(MOUNTMGR_MOUNT_POINT);
- MountPoint->DeviceNameLength = MountDevName->NameLength;
- RtlCopyMemory(MountPoint + 1, MountDevName->Name, MountDevName->NameLength);
- RtlFreeHeap(RtlGetProcessHeap(), 0, MountDevName);
-
- RtlInitUnicodeString(&NtFileName, L"\\??\\MountPointManager");
- InitializeObjectAttributes(&ObjectAttributes, &NtFileName, 0, NULL, NULL);
- Status = NtOpenFile(&FileHandle, FILE_GENERIC_READ | SYNCHRONIZE, &ObjectAttributes,
- &Iosb, FILE_SHARE_READ | FILE_SHARE_WRITE,
- FILE_SYNCHRONOUS_IO_NONALERT);
- if (!NT_SUCCESS(Status))
- {
- SetLastErrorByStatus(Status);
- RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoint);
- return FALSE;
- }
-
- BufferLength = sizeof(MOUNTMGR_MOUNT_POINTS);
- do
- {
- MountPoints = RtlAllocateHeap(RtlGetProcessHeap(), 0, BufferLength);
- if (MountPoints == NULL)
- {
- RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoint);
- NtClose(FileHandle);
- SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- return FALSE;
- }
-
- Status = NtDeviceIoControlFile(FileHandle, NULL, NULL, NULL, &Iosb,
- IOCTL_MOUNTMGR_QUERY_POINTS,
- MountPoint, MountPointSize,
- MountPoints, BufferLength);
- if (!NT_SUCCESS(Status))
- {
- if (Status == STATUS_BUFFER_OVERFLOW)
- {
- BufferLength = MountPoints->Size;
- RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoints);
- continue;
- }
- else if (!NT_SUCCESS(Status))
- {
+ }
+
+ Status = NtDeviceIoControlFile(FileHandle, NULL, NULL, NULL, &Iosb,
+ IOCTL_MOUNTDEV_QUERY_DEVICE_NAME,
+ NULL, 0, MountDevName, BufferLength);
+ if (!NT_SUCCESS(Status))
+ {
+ RtlFreeHeap(GetProcessHeap(), 0, MountDevName);
+ if (Status == STATUS_BUFFER_OVERFLOW)
+ {
+ BufferLength = sizeof(MOUNTDEV_NAME) + MountDevName->NameLength;
+ continue;
+ }
+ else
+ {
+ NtClose(FileHandle);
+ SetLastErrorByStatus(Status);
+ return FALSE;
+ }
+ }
+ }
+ while (!NT_SUCCESS(Status));
+
+ NtClose(FileHandle);
+
+ /*
+ * Get the mount point information from mount manager.
+ */
+
+ MountPointSize = MountDevName->NameLength + sizeof(MOUNTMGR_MOUNT_POINT);
+ MountPoint = RtlAllocateHeap(GetProcessHeap(), 0, MountPointSize);
+ if (MountPoint == NULL)
+ {
+ RtlFreeHeap(GetProcessHeap(), 0, MountDevName);
+ SetLastError(ERROR_NOT_ENOUGH_MEMORY);
+ return FALSE;
+ }
+ RtlZeroMemory(MountPoint, sizeof(MOUNTMGR_MOUNT_POINT));
+ MountPoint->DeviceNameOffset = sizeof(MOUNTMGR_MOUNT_POINT);
+ MountPoint->DeviceNameLength = MountDevName->NameLength;
+ RtlCopyMemory(MountPoint + 1, MountDevName->Name, MountDevName->NameLength);
+ RtlFreeHeap(RtlGetProcessHeap(), 0, MountDevName);
+
+ RtlInitUnicodeString(&NtFileName, L"\\??\\MountPointManager");
+ InitializeObjectAttributes(&ObjectAttributes, &NtFileName, 0, NULL, NULL);
+ Status = NtOpenFile(&FileHandle, FILE_GENERIC_READ | SYNCHRONIZE, &ObjectAttributes,
+ &Iosb, FILE_SHARE_READ | FILE_SHARE_WRITE,
+ FILE_SYNCHRONOUS_IO_NONALERT);
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastErrorByStatus(Status);
+ RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoint);
+ return FALSE;
+ }
+
+ BufferLength = sizeof(MOUNTMGR_MOUNT_POINTS);
+ do
+ {
+ MountPoints = RtlAllocateHeap(RtlGetProcessHeap(), 0, BufferLength);
+ if (MountPoints == NULL)
+ {
RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoint);
- RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoints);
NtClose(FileHandle);
- SetLastErrorByStatus(Status);
+ SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return FALSE;
- }
- }
- }
- while (!NT_SUCCESS(Status));
-
- RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoint);
- NtClose(FileHandle);
-
- /*
- * Now we've gathered info about all mount points mapped to our device, so
- * select the correct one and copy it into the output buffer.
- */
-
- for (Index = 0; Index < MountPoints->NumberOfMountPoints; Index++)
- {
- MountPoint = MountPoints->MountPoints + Index;
- SymbolicLinkName = (PUCHAR)MountPoints + MountPoint->SymbolicLinkNameOffset;
-
- /*
- * Check for "\\?\Volume{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\"
- * (with the last slash being optional) style symbolic links.
- */
-
- if (MountPoint->SymbolicLinkNameLength == 48 * sizeof(WCHAR) ||
- (MountPoint->SymbolicLinkNameLength == 49 * sizeof(WCHAR) &&
- SymbolicLinkName[48] == L'\\'))
- {
- if (RtlCompareMemory(SymbolicLinkName, L"\\??\\Volume{",
- 11 * sizeof(WCHAR)) == 11 * sizeof(WCHAR) &&
- SymbolicLinkName[19] == L'-' && SymbolicLinkName[24] == L'-' &&
- SymbolicLinkName[29] == L'-' && SymbolicLinkName[34] == L'-' &&
- SymbolicLinkName[47] == L'}')
- {
- if (VolumeNameLength >= MountPoint->SymbolicLinkNameLength / sizeof(WCHAR))
+ }
+
+ Status = NtDeviceIoControlFile(FileHandle, NULL, NULL, NULL, &Iosb,
+ IOCTL_MOUNTMGR_QUERY_POINTS,
+ MountPoint, MountPointSize,
+ MountPoints, BufferLength);
+ if (!NT_SUCCESS(Status))
+ {
+ if (Status == STATUS_BUFFER_OVERFLOW)
{
- RtlCopyMemory(VolumeName,
- (PUCHAR)MountPoints + MountPoint->SymbolicLinkNameOffset,
- MountPoint->SymbolicLinkNameLength);
- VolumeName[1] = L'\\';
- Result = TRUE;
+ BufferLength = MountPoints->Size;
+ RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoints);
+ continue;
}
- else
+ else if (!NT_SUCCESS(Status))
{
- SetLastError(ERROR_FILENAME_EXCED_RANGE);
- Result = FALSE;
+ RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoint);
+ RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoints);
+ NtClose(FileHandle);
+ SetLastErrorByStatus(Status);
+ return FALSE;
}
+ }
+ }
+ while (!NT_SUCCESS(Status));
- RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoints);
+ RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoint);
+ NtClose(FileHandle);
- return Result;
- }
- }
- }
+ /*
+ * Now we've gathered info about all mount points mapped to our device, so
+ * select the correct one and copy it into the output buffer.
+ */
+
+ for (Index = 0; Index < MountPoints->NumberOfMountPoints; Index++)
+ {
+ MountPoint = MountPoints->MountPoints + Index;
+ SymbolicLinkName = (PUCHAR)MountPoints + MountPoint->SymbolicLinkNameOffset;
+
+ /*
+ * Check for "\\?\Volume{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\"
+ * (with the last slash being optional) style symbolic links.
+ */
+
+ if (MountPoint->SymbolicLinkNameLength == 48 * sizeof(WCHAR) ||
+ (MountPoint->SymbolicLinkNameLength == 49 * sizeof(WCHAR) &&
+ SymbolicLinkName[48] == L'\\'))
+ {
+ if (RtlCompareMemory(SymbolicLinkName, L"\\??\\Volume{",
+ 11 * sizeof(WCHAR)) == 11 * sizeof(WCHAR) &&
+ SymbolicLinkName[19] == L'-' && SymbolicLinkName[24] == L'-' &&
+ SymbolicLinkName[29] == L'-' && SymbolicLinkName[34] == L'-' &&
+ SymbolicLinkName[47] == L'}')
+ {
+ if (VolumeNameLength >= MountPoint->SymbolicLinkNameLength / sizeof(WCHAR))
+ {
+ RtlCopyMemory(VolumeName,
+ (PUCHAR)MountPoints + MountPoint->SymbolicLinkNameOffset,
+ MountPoint->SymbolicLinkNameLength);
+ VolumeName[1] = L'\\';
+ Result = TRUE;
+ }
+ else
+ {
+ SetLastError(ERROR_FILENAME_EXCED_RANGE);
+ Result = FALSE;
+ }
+
+ RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoints);
+
+ return Result;
+ }
+ }
+ }
- RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoints);
- SetLastError(ERROR_INVALID_PARAMETER);
+ RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoints);
+ SetLastError(ERROR_INVALID_PARAMETER);
- return FALSE;
+ return FALSE;
}
/*
LPCSTR lpszVolumeMountPoint,
LPSTR lpszVolumeName,
DWORD cchBufferLength
- )
+)
{
BOOL ret;
WCHAR volumeW[50], *pathW = NULL;
HANDLE
WINAPI
FindFirstVolumeW(
- LPWSTR volume,
- DWORD len
- )
+ LPWSTR volume,
+ DWORD len
+)
{
DWORD size = 1024;
HANDLE mgr = CreateFileW( MOUNTMGR_DOS_DEVICE_NAME, 0, FILE_SHARE_READ|FILE_SHARE_WRITE,
HANDLE
WINAPI
FindFirstVolumeA(
- LPSTR volume,
- DWORD len
- )
+ LPSTR volume,
+ DWORD len
+)
{
WCHAR *buffer = NULL;
HANDLE handle;
WINAPI
FindVolumeClose(
HANDLE hFindVolume
- )
+)
{
return RtlFreeHeap(RtlGetProcessHeap(), 0, hFindVolume);
}
}
while (!GetVolumeNameForVolumeMountPointW(UnicodeFilePath.Buffer,
- VolumeName,
- MAX_PATH))
+ VolumeName,
+ MAX_PATH))
{
if (((UnicodeFilePath.Length == 4) && (UnicodeFilePath.Buffer[0] == '\\') &&
- (UnicodeFilePath.Buffer[1] == '\\')) || ((UnicodeFilePath.Length == 6) &&
- (UnicodeFilePath.Buffer[1] == ':')))
+ (UnicodeFilePath.Buffer[1] == '\\')) || ((UnicodeFilePath.Length == 6) &&
+ (UnicodeFilePath.Buffer[1] == ':')))
{
break;
}
HANDLE hMapping;
NTSTATUS Status;
PVOID lpBaseAddress = NULL;
- SIZE_T ViewSize;
+ SIZE_T ViewSize = 0;
//PUNICODE_STRING OriginalName;
//UNICODE_STRING dotDLL = RTL_CONSTANT_STRING(L".DLL");
set_module_type(loadperf win32dll)
target_link_libraries(loadperf wine)
add_importlibs(loadperf msvcrt kernel32 ntdll)
-add_cab_target(loadperf 1)
+add_cd_file(TARGET loadperf DESTINATION reactos/system32 FOR all)
add_importlib_target(loadperf.spec)
kernel32
ntdll)
-add_cab_target(localspl 1)
+add_cd_file(TARGET localspl DESTINATION reactos/system32 FOR all)
add_importlib_target(localui.spec)
add_importlibs(localui winspool user32 msvcrt kernel32 ntdll)
-add_cab_target(localui 1)
+add_cd_file(TARGET localui DESTINATION reactos/system32 FOR all)
add_importlib_target(lpk.spec)
add_importlibs(lpk user32 usp10 msvcrt kernel32 ntdll)
-add_cab_target(lpk 1)
+add_cd_file(TARGET lpk DESTINATION reactos/system32 FOR all)
add_importlibs(lsasrv rpcrt4 kernel32 ntdll)
add_dependencies(lsasrv psdk)
-add_cab_target(lsasrv 1)
+add_cd_file(TARGET lsasrv DESTINATION reactos/system32 FOR all)
add_importlib_target(lsasrv.spec)
add_importlibs(lz32 kernel32 ntdll)
add_dependencies(lz32 psdk)
-add_cab_target(lz32 1)
+add_cd_file(TARGET lz32 DESTINATION reactos/system32 FOR all)
add_importlib_target(lz32.spec)
target_link_libraries(mapi32 wine uuid)
add_importlibs(mapi32 shlwapi shell32 user32 advapi32 msvcrt kernel32 ntdll)
-add_cab_target(mapi32 1)
+add_cd_file(TARGET mapi32 DESTINATION reactos/system32 FOR all)
set_module_type(mciavi32 win32dll)
target_link_libraries(mciavi32 wine)
add_importlibs(mciavi32 msvfw32 winmm user32 gdi32 msvcrt kernel32 ntdll)
-add_cab_target(mciavi32 1)
+add_cd_file(TARGET mciavi32 DESTINATION reactos/system32 FOR all)
target_link_libraries(mcicda wine)
add_importlibs(mcicda winmm user32 kernel32 ntdll)
add_dependencies(mcicda psdk)
-add_cab_target(mcicda 1)
+add_cd_file(TARGET mcicda DESTINATION reactos/system32 FOR all)
target_link_libraries(mciqtz32 wine strmiids)
add_importlibs(mciqtz32 winmm oleaut32 ole32 user32 gdi32 msvcrt kernel32 ntdll)
-add_cab_target(mciqtz32 1)
+add_cd_file(TARGET mciqtz32 DESTINATION reactos/system32 FOR all)
target_link_libraries(mciseq wine)
add_importlibs(mciseq winmm user32 kernel32 ntdll msvcrt)
add_dependencies(mciseq psdk)
-add_cab_target(mciseq 1)
+add_cd_file(TARGET mciseq DESTINATION reactos/system32 FOR all)
target_link_libraries(mciwave wine)
add_importlibs(mciwave user32 winmm msvcrt kernel32 ntdll)
add_dependencies(mciwave psdk)
-add_cab_target(mciwave 1)
+add_cd_file(TARGET mciwave DESTINATION reactos/system32 FOR all)
add_importlib_target(mlang.spec)
add_dependencies(mlang psdk)
-add_cab_target(mlang 1)
+add_cd_file(TARGET mlang DESTINATION reactos/system32 FOR all)
set_entrypoint(mmdrv 0)
add_importlibs(mmdrv winmm user32 kernel32 ntdll)
add_dependencies(mmdrv psdk)
-add_cab_target(mmdrv 1)
+add_cd_file(TARGET mmdrv DESTINATION reactos/system32 FOR all)
set_module_type(modemui win32dll)
add_importlibs(modemui msvcrt kernel32 ntdll)
-add_cab_target(modemui 1)
+add_cd_file(TARGET modemui DESTINATION reactos/system32 FOR all)
target_link_libraries(mpr wine)
add_importlibs(mpr advapi32 user32 msvcrt kernel32 ntdll)
-add_cab_target(mpr 1)
+add_cd_file(TARGET mpr DESTINATION reactos/system32 FOR all)
add_importlib_target(mpr.spec)
set_module_type(mprapi win32dll)
target_link_libraries(mprapi wine)
add_importlibs(mprapi msvcrt kernel32 ntdll)
-add_cab_target(mprapi 1)
+add_cd_file(TARGET mprapi DESTINATION reactos/system32 FOR all)
add_importlibs(msacm32 msvcrt advapi32 user32 winmm kernel32 ntdll)
add_dependencies(msacm32 psdk)
-add_cab_target(msacm32 1)
+add_cd_file(TARGET msacm32 DESTINATION reactos/system32 FOR all)
add_importlib_target(msacm32.spec)
add_subdirectory(msacm32.drv)
add_importlibs(msacm32.drv msacm32 user32 winmm advapi32 kernel32 ntdll)
add_dependencies(msacm32.drv psdk)
-add_cab_target(msacm32.drv 1)
\ No newline at end of file
+add_cd_file(TARGET msacm32.drv DESTINATION reactos/system32 FOR all)
\ No newline at end of file
target_link_libraries(msadp32.acm wine)
add_importlibs(msadp32.acm winmm user32 msvcrt kernel32 ntdll)
add_dependencies(msadp32.acm psdk)
-add_cab_target(msadp32.acm 1)
+add_cd_file(TARGET msadp32.acm DESTINATION reactos/system32 FOR all)
add_pch(msafd ${CMAKE_CURRENT_SOURCE_DIR}/msafd.h ${SOURCE})
add_importlibs(msafd advapi32 msvcrt kernel32 ntdll)
-add_cab_target(msafd 1)
+add_cd_file(TARGET msafd DESTINATION reactos/system32 FOR all)
set_module_type(mscat32 win32dll)
target_link_libraries(mscat32 wine)
add_importlibs(mscat32 wintrust msvcrt kernel32 ntdll)
-add_cab_target(mscat32 1)
+add_cd_file(TARGET mscat32 DESTINATION reactos/system32 FOR all)
set_module_type(mscms win32dll)
target_link_libraries(mscms wine)
add_importlibs(mscms msvcrt advapi32 kernel32 ntdll)
-add_cab_target(mscms 1)
+add_cd_file(TARGET mscms DESTINATION reactos/system32 FOR all)
set_module_type(mscoree win32dll)
target_link_libraries(mscoree wine uuid)
add_importlibs(mscoree advapi32 shell32 msvcrt kernel32 ntdll)
-add_cab_target(mscoree 1)
+add_cd_file(TARGET mscoree DESTINATION reactos/system32 FOR all)
target_link_libraries(msctf uuid wine)
add_importlibs(msctf ole32 oleaut32 user32 advapi32 msvcrt kernel32 ntdll)
-add_cab_target(msctf 1)
+add_cd_file(TARGET msctf DESTINATION reactos/system32 FOR all)
target_link_libraries(msftedit uuid wine)
add_importlibs(msftedit riched20 msvcrt kernel32 ntdll)
-add_cab_target(msftedit 1)
+add_cd_file(TARGET msftedit DESTINATION reactos/system32 FOR all)
target_link_libraries(msg711.acm wine)
add_importlibs(msg711.acm winmm user32 msvcrt kernel32 ntdll)
add_dependencies(msg711.acm psdk)
-add_cab_target(msg711.acm 1)
+add_cd_file(TARGET msg711.acm DESTINATION reactos/system32 FOR all)
set_module_type(msgina win32dll)
target_link_libraries(msgina wine)
add_importlibs(msgina advapi32 user32 gdi32 userenv msvcrt kernel32 ntdll)
-add_cab_target(msgina 1)
+add_cd_file(TARGET msgina DESTINATION reactos/system32 FOR all)
add_importlibs(msgsm32.acm winmm user32 msvcrt kernel32 ntdll)
add_dependencies(msgsm32.acm psdk)
-add_cab_target(msgsm32.acm 1)
+add_cd_file(TARGET msgsm32.acm DESTINATION reactos/system32 FOR all)
set_entrypoint(mshtml.tlb 0)
set_target_properties(mshtml.tlb PROPERTIES SUFFIX "")
add_dependencies(mshtml.tlb mshtml_tlb)
-add_cab_target(mshtml.tlb 1)
+add_cd_file(TARGET mshtml.tlb DESTINATION reactos/system32 FOR all)
ntdll)
add_dependencies(mshtml mshtml_nsiface_header)
-add_cab_target(mshtml 1)
+add_cd_file(TARGET mshtml DESTINATION reactos/system32 FOR all)
;; CrSource
HKCR,"CLSID\%CLSID_CrSource%",,,"Microsoft CrSource 4.0"
HKCR,"CLSID\%CLSID_CrSource%\BrowseInPlace",,16
-HKCR,"CLSID\%CLSID_CrSource%\DefaultIcon",,0x00020000,"%16422%\Internet Explorer\iexplore.exe,1"
+;;HKCR,"CLSID\%CLSID_CrSource%\DefaultIcon",,0x00020000,"%16422%\Internet Explorer\iexplore.exe,1"
HKCR,"CLSID\%CLSID_CrSource%\EnablePlugin\.css",,,"PointPlus plugin"
HKCR,"CLSID\%CLSID_CrSource%\InProcServer32",,,"mshtml.dll"
HKCR,"CLSID\%CLSID_CrSource%\InProcServer32","ThreadingModel",,"Apartment"
;; HTMLDocument
HKCR,"CLSID\%CLSID_HTMLDocument%",,,"HTML Document"
HKCR,"CLSID\%CLSID_HTMLDocument%\BrowseInPlace",,16
-HKCR,"CLSID\%CLSID_HTMLDocument%\DefaultIcon",,0x00020000,"%16422%\Internet Explorer\iexplore.exe,1"
+;;HKCR,"CLSID\%CLSID_HTMLDocument%\DefaultIcon",,0x00020000,"%16422%\Internet Explorer\iexplore.exe,1"
HKCR,"CLSID\%CLSID_HTMLDocument%\InProcServer32",,,"mshtml.dll"
HKCR,"CLSID\%CLSID_HTMLDocument%\InProcServer32","ThreadingModel",,"Apartment"
HKCR,"CLSID\%CLSID_HTMLDocument%\MiscStatus",,,"2228625"
;; MHTMLDocument
HKCR,"CLSID\%CLSID_MHTMLDocument%",,,"MHTML Document"
HKCR,"CLSID\%CLSID_MHTMLDocument%\BrowseInPlace",,16
-HKCR,"CLSID\%CLSID_MHTMLDocument%\DefaultIcon",,0x00020000,"%16422%\Internet Explorer\iexplore.exe,1"
+;;HKCR,"CLSID\%CLSID_MHTMLDocument%\DefaultIcon",,0x00020000,"%16422%\Internet Explorer\iexplore.exe,1"
HKCR,"CLSID\%CLSID_MHTMLDocument%\InProcServer32",,,"mshtml.dll"
HKCR,"CLSID\%CLSID_MHTMLDocument%\InProcServer32","ThreadingModel",,"Apartment"
HKCR,"CLSID\%CLSID_MHTMLDocument%\MiscStatus",,,"2228625"
HKCR,"CLSID\%CLSID_Scriptlet%\MiscStatus\1",,,"131473"
HKCR,"CLSID\%CLSID_Scriptlet%\ProgID",,,"ScriptBridge.ScriptBridge.1"
HKCR,"CLSID\%CLSID_Scriptlet%\Programmable",,16
-HKCR,"CLSID\%CLSID_Scriptlet%\ToolboxBitmap32",,,"%16422%\Internet Explorer\iexplore.exe,1"
+;;HKCR,"CLSID\%CLSID_Scriptlet%\ToolboxBitmap32",,,"%16422%\Internet Explorer\iexplore.exe,1"
HKCR,"CLSID\%CLSID_Scriptlet%\TypeLib",,,"%LIBID_MSHTML%"
HKCR,"CLSID\%CLSID_Scriptlet%\Version",,,"4.0"
HKCR,"CLSID\%CLSID_Scriptlet%\VersionIndependentProgID",,,"ScriptBridge.ScriptBridge"
HKCR,".gif","Content Type",,"image/gif"
HKCR,"giffile",,,"GIF Image"
HKCR,"giffile\CLSID",,,"%CLSID_HTMLDocument%"
-HKCR,"giffile\shell\open\command",,,"""%16422%\Internet Explorer\iexplore.exe"" -nohome"
+;;HKCR,"giffile\shell\open\command",,,"""%16422%\Internet Explorer\iexplore.exe"" -nohome"
HKCR,"giffile\shell\open\ddeexec",,,"""file:%%1"",,-1,,,,,"
-HKCR,"giffile\shell\open\ddeexec\Application",,,"IExplore"
+;;HKCR,"giffile\shell\open\ddeexec\Application",,,"IExplore"
HKCR,"giffile\shell\open\ddeexec\Topic",,,"WWW_OpenURL"
;; HKCR,"giffile\DefaultIcon",,,"%16422%\Internet Explorer\iexplore.exe,9"
HKCR,"htmlfile",,,"HTML Document"
HKCR,"htmlfile\BrowseInPlace",,16
HKCR,"htmlfile\CLSID",,,"%CLSID_HTMLDocument%"
-HKCR,"htmlfile\DefaultIcon",,0x00020000,"%16422%\Internet Explorer\iexplore.exe,1"
+;;HKCR,"htmlfile\DefaultIcon",,0x00020000,"%16422%\Internet Explorer\iexplore.exe,1"
HKCR,"htmlfile_FullWindowEmbed",,,"HTML Plugin Document"
HKCR,"htmlfile_FullWindowEmbed\BrowseInPlace",,16
HKCR,"htmlfile_FullWindowEmbed\CLSID",,,"%CLSID_HTMLPluginDocument%"
HKCR,".jpe","Content Type",,"image/jpeg"
HKCR,"jpegfile",,,"JPEG Image"
HKCR,"jpegfile\CLSID",,,"%CLSID_HTMLDocument%"
-HKCR,"jpegfile\shell\open\command",,,"""%16422%\Internet Explorer\iexplore.exe"" -nohome"
+;;HKCR,"jpegfile\shell\open\command",,,"""%16422%\Internet Explorer\iexplore.exe"" -nohome"
HKCR,"jpegfile\shell\open\ddeexec",,,"""file:%%1"",,-1,,,,,"
-HKCR,"jpegfile\shell\open\ddeexec\Application",,,"IExplore"
+;;HKCR,"jpegfile\shell\open\ddeexec\Application",,,"IExplore"
HKCR,"jpegfile\shell\open\ddeexec\Topic",,,"WWW_OpenURL"
;; HKCR,"jpegfile\DefaultIcon",,,"%16422%\Internet Explorer\iexplore.exe,8"
HKCR,".jpeg","Content Type",,"image/jpeg"
HKCR,"jpegfile",,,"JPEG Image"
HKCR,"jpegfile\CLSID",,,"%CLSID_HTMLDocument%"
-HKCR,"jpegfile\shell\open\command",,,"""%16422%\Internet Explorer\iexplore.exe"" -nohome"
+;;HKCR,"jpegfile\shell\open\command",,,"""%16422%\Internet Explorer\iexplore.exe"" -nohome"
HKCR,"jpegfile\shell\open\ddeexec",,,"""file:%%1"",,-1,,,,,"
-HKCR,"jpegfile\shell\open\ddeexec\Application",,,"IExplore"
+;;HKCR,"jpegfile\shell\open\ddeexec\Application",,,"IExplore"
HKCR,"jpegfile\shell\open\ddeexec\Topic",,,"WWW_OpenURL"
;; HKCR,"jpegfile\DefaultIcon",,,"%16422%\Internet Explorer\iexplore.exe,8"
HKCR,".jpg","Content Type",,"image/jpeg"
HKCR,"jpegfile",,,"JPEG Image"
HKCR,"jpegfile\CLSID",,,"%CLSID_HTMLDocument%"
-HKCR,"jpegfile\shell\open\command",,,"""%16422%\Internet Explorer\iexplore.exe"" -nohome"
+;;HKCR,"jpegfile\shell\open\command",,,"""%16422%\Internet Explorer\iexplore.exe"" -nohome"
HKCR,"jpegfile\shell\open\ddeexec",,,"""file:%%1"",,-1,,,,,"
-HKCR,"jpegfile\shell\open\ddeexec\Application",,,"IExplore"
+;;HKCR,"jpegfile\shell\open\ddeexec\Application",,,"IExplore"
HKCR,"jpegfile\shell\open\ddeexec\Topic",,,"WWW_OpenURL"
;; HKCR,"jpegfile\DefaultIcon",,,"%16422%\Internet Explorer\iexplore.exe,8"
HKCR,".jfif","Content Type",,"image/jpeg"
HKCR,"pjpegfile",,,"JPEG Image"
HKCR,"pjpegfile\CLSID",,,"%CLSID_HTMLDocument%"
-HKCR,"pjpegfile\shell\open\command",,,"""%16422%\Internet Explorer\iexplore.exe"" -nohome"
+;;HKCR,"pjpegfile\shell\open\command",,,"""%16422%\Internet Explorer\iexplore.exe"" -nohome"
HKCR,"pjpegfile\shell\open\ddeexec",,,"""file:%%1"",,-1,,,,,"
-HKCR,"pjpegfile\shell\open\ddeexec\Application",,,"IExplore"
+;;HKCR,"pjpegfile\shell\open\ddeexec\Application",,,"IExplore"
HKCR,"pjpegfile\shell\open\ddeexec\Topic",,,"WWW_OpenURL"
;; HKCR,"pjpegfile\DefaultIcon",,,"%16422%\Internet Explorer\iexplore.exe,8"
HKCR,".png","Content Type",,"image/png"
HKCR,"pngfile",,,"PNG Image"
HKCR,"pngfile\CLSID",,,"%CLSID_HTMLDocument%"
-HKCR,"pngfile\shell\open\command",,,"""%16422%\Internet Explorer\iexplore.exe""" -nohome"
+;;HKCR,"pngfile\shell\open\command",,,"""%16422%\Internet Explorer\iexplore.exe""" -nohome"
HKCR,"pngfile\shell\open\ddeexec",,,"""file:%%1"",,-1,,,,,"
-HKCR,"pngfile\shell\open\ddeexec\Application",,,"IExplore"
+;;HKCR,"pngfile\shell\open\ddeexec\Application",,,"IExplore"
HKCR,"pngfile\shell\open\ddeexec\Topic",,,"WWW_OpenURL"
;; HKCR,"pngfile\DefaultIcon",,,"%16422%\Internet Explorer\iexplore.exe,9"
HKCR,".xbm","Content Type",,"image/x-xbitmap"
HKCR,"xbmfile",,,"XBM Image"
HKCR,"xbmfile\CLSID",,,"%CLSID_HTMLDocument%"
-HKCR,"xbmfile\shell\open\command",,,"""%16422%\Internet Explorer\iexplore.exe"" -nohome"
+;;HKCR,"xbmfile\shell\open\command",,,"""%16422%\Internet Explorer\iexplore.exe"" -nohome"
HKCR,"xbmfile\shell\open\ddeexec",,,"""file:%%1"",,-1,,,,,"
-HKCR,"xbmfile\shell\open\ddeexec\Application",,,"IExplore"
+;;HKCR,"xbmfile\shell\open\ddeexec\Application",,,"IExplore"
HKCR,"xbmfile\shell\open\ddeexec\Topic",,,"WWW_OpenURL"
;; HKCR,"xbmfile\DefaultIcon",,,"%16422%\Internet Explorer\iexplore.exe,9"
kernel32
ntdll)
-add_cab_target(msi 1)
+add_cd_file(TARGET msi DESTINATION reactos/system32 FOR all)
add_importlib_target(msi.spec)
set_module_type(msimg32 win32dll)
target_link_libraries(msimg32 wine)
add_importlibs(msimg32 gdi32 msvcrt kernel32 ntdll)
-add_cab_target(msimg32 1)
+add_cd_file(TARGET msimg32 DESTINATION reactos/system32 FOR all)
add_importlib_target(msimg32.spec)
target_link_libraries(msimtf uuid wine)
add_importlibs(msimtf msvcrt imm32 kernel32 ntdll)
-add_cab_target(msimtf 1)
+add_cd_file(TARGET msimtf DESTINATION reactos/system32 FOR all)
target_link_libraries(msisip wine)
add_importlibs(msisip crypt32 ole32 msvcrt kernel32 ntdll)
-add_cab_target(msisip 1)
+add_cd_file(TARGET msisip DESTINATION reactos/system32 FOR all)
set_module_type(msisys win32ocx)
target_link_libraries(msisys uuid wine)
add_importlibs(msisys msvcrt kernel32 ntdll)
-add_cab_target(msisys 1)
+add_cd_file(TARGET msisys DESTINATION reactos/system32 FOR all)
add_importlibs(msnet32 msvcrt kernel32 ntdll)
-add_cab_target(msnet32 1)
+add_cd_file(TARGET msnet32 DESTINATION reactos/system32 FOR all)
set_module_type(msrle32 win32dll)
target_link_libraries(msrle32 wine)
add_importlibs(msrle32 msvcrt winmm user32 kernel32 ntdll)
-add_cab_target(msrle32 1)
+add_cd_file(TARGET msrle32 DESTINATION reactos/system32 FOR all)
add_importlibs(mssign32 msvcrt kernel32 ntdll)
-add_cab_target(mssign32 1)
+add_cd_file(TARGET mssign32 DESTINATION reactos/system32 FOR all)
add_importlibs(mssip32 msvcrt kernel32 ntdll)
-add_cab_target(mssip32 1)
+add_cd_file(TARGET mssip32 DESTINATION reactos/system32 FOR all)
add_importlibs(mstask ole32 msvcrt kernel32 ntdll)
-add_cab_target(mstask 1)
+add_cd_file(TARGET mstask DESTINATION reactos/system32 FOR all)
add_pch(msvcrt ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
add_importlibs(msvcrt kernel32 ntdll)
-add_cab_target(msvcrt 1)
+add_cd_file(TARGET msvcrt DESTINATION reactos/system32 FOR all)
add_importlib_target(msvcrt.spec)
add_importlibs(msvcrt20 msvcrt kernel32 ntdll)
add_dependencies(msvcrt20 psdk)
-add_cab_target(msvcrt20 1)
+add_cd_file(TARGET msvcrt20 DESTINATION reactos/system32 FOR all)
add_importlibs(msvcrt40 msvcrt kernel32 ntdll)
-add_cab_target(msvcrt40 1)
+add_cd_file(TARGET msvcrt40 DESTINATION reactos/system32 FOR all)
add_importlibs(msvfw32 winmm version comctl32 user32 gdi32 advapi32 msvcrt kernel32 ntdll)
-add_cab_target(msvfw32 1)
+add_cd_file(TARGET msvfw32 DESTINATION reactos/system32 FOR all)
add_importlib_target(msvfw32.spec)
set_module_type(msvidc32 win32dll)
target_link_libraries(msvidc32 wine)
add_importlibs(msvidc32 user32 msvcrt kernel32 ntdll)
-add_cab_target(msvidc32 1)
+add_cd_file(TARGET msvidc32 DESTINATION reactos/system32 FOR all)
set_module_type(mswsock win32dll)
add_importlibs(mswsock ws2_32 msvcrt kernel32)
-add_cab_target(mswsock 1)
+add_cd_file(TARGET mswsock DESTINATION reactos/system32 FOR all)
add_importlib_target(mswsock.spec)
ntdll)
add_dependencies(msxml3 msxml3_v1)
-add_cab_target(msxml3 1)
+add_cd_file(TARGET msxml3 DESTINATION reactos/system32 FOR all)
add_importlibs(nddeapi kernel32 ntdll)
add_dependencies(nddeapi psdk)
-add_cab_target(nddeapi 1)
\ No newline at end of file
+add_cd_file(TARGET nddeapi DESTINATION reactos/system32 FOR all)
\ No newline at end of file
add_importlibs(netapi32 iphlpapi ws2_32 advapi32 msvcrt kernel32 ntdll)
-add_cab_target(netapi32 1)
+add_cd_file(TARGET netapi32 DESTINATION reactos/system32 FOR all)
add_importlib_target(netapi32.spec)
add_importlibs(netcfgx rpcrt4 setupapi advapi32 iphlpapi ole32 user32 comctl32 ws2_32 msvcrt kernel32 ntdll)
-add_cab_target(netcfgx 1)
+add_cd_file(TARGET netcfgx DESTINATION reactos/system32 FOR all)
include_directories(${REACTOS_BINARY_DIR}/include/reactos)
-spec2def(netevent.dll netevent.spec)
-
-add_library(netevent SHARED netevent.c netevt.rc ${CMAKE_CURRENT_BINARY_DIR}/netevent.def)
+add_library(netevent SHARED netevt.rc)
set_module_type(netevent win32dll)
add_importlibs(netevent msvcrt kernel32)
add_dependencies(netevent neteventmsg)
-add_cab_target(netevent 1)
+add_cd_file(TARGET netevent DESTINATION reactos/system32 FOR all)
+++ /dev/null
-/*
- * PROJECT: ReactOS Network Event Handler
- * LICENSE: GPL - See COPYING in the top level directory
- * FILE: dll/win32/netevent/netevent.c
- * PURPOSE: Dummy main file
- * COPYRIGHT: Eric Kohl
- */
-
-#include <windows.h>
-
-BOOL
-WINAPI
-DllMain(IN HINSTANCE hinstDLL,
- IN DWORD dwReason,
- IN LPVOID lpvReserved)
-{
- switch (dwReason)
- {
- case DLL_PROCESS_ATTACH:
- DisableThreadLibraryCalls(hinstDLL);
- break;
- }
-
- return TRUE;
-}
+++ /dev/null
-# netevent.dll exports
set_module_type(netid win32dll)
add_importlibs(netid user32 gdi32 comctl32 advapi32 netapi32 msvcrt kernel32 ntdll)
-add_cab_target(netid 1)
+add_cd_file(TARGET netid DESTINATION reactos/system32 FOR all)
#include "lang/es-ES.rc"
#include "lang/fr-FR.rc"
#include "lang/id-ID.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/it-IT.rc"
#include "lang/nl-NL.rc"
#include "lang/no-NO.rc"
add_pch(netshell ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
-add_cab_target(netshell 1)
+add_cd_file(TARGET netshell DESTINATION reactos/system32 FOR all)
#include "lang/hu-HU.rc"
#include "lang/id-ID.rc"
#include "lang/it-IT.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/nl-NL.rc"
#include "lang/no-NO.rc"
#include "lang/pl-PL.rc"
add_importlibs(newdev gdi32 comctl32 setupapi advapi32 user32 shell32 msvcrt kernel32 ntdll)
-add_cab_target(newdev 1)
+add_cd_file(TARGET newdev DESTINATION reactos/system32 FOR all)
add_importlib_target(newdev.spec)
add_importlibs(ntdsapi user32 kernel32 ntdll)
add_importlib_target(ntdsapi.spec)
add_dependencies(ntdsapi psdk)
-add_cab_target(ntdsapi 1)
+add_cd_file(TARGET ntdsapi DESTINATION reactos/system32 FOR all)
add_importlibs(ntlanman netapi32 msvcrt kernel32 ntdll)
-add_cab_target(ntlanman 1)
+add_cd_file(TARGET ntlanman DESTINATION reactos/system32 FOR all)
kernel32
ntdll)
-add_cab_target(ntmarta 1)
+add_cd_file(TARGET ntmarta DESTINATION reactos/system32 FOR all)
add_importlibs(ntprint winspool msvcrt kernel32 ntdll)
add_dependencies(ntprint psdk)
-add_cab_target(ntprint 1)
+add_cd_file(TARGET ntprint DESTINATION reactos/system32 FOR all)
kernel32
ntdll)
-add_cab_target(objsel 1)
+add_cd_file(TARGET objsel DESTINATION reactos/system32 FOR all)
ntdll)
-add_cab_target(odbc32 1)
+add_cd_file(TARGET odbc32 DESTINATION reactos/system32 FOR all)
ntdll)
add_importlib_target(odbccp32.spec)
-add_cab_target(odbccp32 1)
+add_cd_file(TARGET odbccp32 DESTINATION reactos/system32 FOR all)
${CMAKE_CURRENT_BINARY_DIR}
${REACTOS_SOURCE_DIR}/include/reactos/wine)
-add_rpcproxy_library(ole32proxy
+add_rpcproxy_files(
dcom.idl
ole32_unknwn.idl
ole32_objidl.idl
usrmarshal.c
ole32res.rc
${CMAKE_CURRENT_BINARY_DIR}/dcom_i.c
+ ${CMAKE_CURRENT_BINARY_DIR}/dcom_p.c
+ ${CMAKE_CURRENT_BINARY_DIR}/ole32_unknwn_p.c
+ ${CMAKE_CURRENT_BINARY_DIR}/ole32_objidl_p.c
+ ${CMAKE_CURRENT_BINARY_DIR}/ole32_oleidl_p.c
${CMAKE_CURRENT_BINARY_DIR}/ole32_stubs.c
+ ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
${CMAKE_CURRENT_BINARY_DIR}/ole32.def)
add_library(ole32 SHARED ${SOURCE})
set_module_type(ole32 win32dll)
target_link_libraries(ole32
- ole32proxy
wine
irotrpc
uuid
add_importlibs(ole32 advapi32 user32 gdi32 rpcrt4 msvcrt kernel32 ntdll)
add_dependencies(ole32 ole32idl)
-add_cab_target(ole32 1)
+add_cd_file(TARGET ole32 DESTINATION reactos/system32 FOR all)
add_importlib_target(ole32.spec)
add_importlibs(oleacc user32 msvcrt kernel32 ntdll)
add_importlib_target(oleacc.spec)
-add_cab_target(oleacc 1)
+add_cd_file(TARGET oleacc DESTINATION reactos/system32 FOR all)
vartype.c
oleaut32.rc
${CMAKE_CURRENT_BINARY_DIR}/oleaut32_stubs.c
+ ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
+ ${CMAKE_CURRENT_BINARY_DIR}/oleaut32_oaidl_p.c
+ ${CMAKE_CURRENT_BINARY_DIR}/oleaut32_ocidl_p.c
${CMAKE_CURRENT_BINARY_DIR}/oleaut32.def)
remove_definitions(-D_WIN32_WINNT=0x502)
spec2def(oleaut32.dll oleaut32.spec)
-add_rpcproxy_library(oleaut32proxy oleaut32_oaidl.idl oleaut32_ocidl.idl)
+add_rpcproxy_files(oleaut32_oaidl.idl oleaut32_ocidl.idl)
add_library(oleaut32 SHARED ${SOURCE})
set_module_type(oleaut32 win32dll)
target_link_libraries(oleaut32
- oleaut32proxy
wine
wineldr
uuid
add_importlibs(oleaut32 windowscodecs ole32 rpcrt4 user32 gdi32 advapi32 comctl32 urlmon msvcrt kernel32 ntdll)
-add_cab_target(oleaut32 1)
+add_cd_file(TARGET oleaut32 DESTINATION reactos/system32 FOR all)
add_importlib_target(oleaut32.spec)
add_importlibs(olecli32 ole32 gdi32 kernel32 ntdll)
add_dependencies(olecli32 psdk)
-add_cab_target(olecli32 1)
+add_cd_file(TARGET olecli32 DESTINATION reactos/system32 FOR all)
target_link_libraries(oledlg wine)
add_importlibs(oledlg ole32 comdlg32 user32 advapi32 msvcrt kernel32 ntdll)
add_importlib_target(oledlg.spec)
-add_cab_target(oledlg 1)
+add_cd_file(TARGET oledlg DESTINATION reactos/system32 FOR all)
kernel32
ntdll)
-add_cab_target(olepro32 1)
+add_cd_file(TARGET olepro32 DESTINATION reactos/system32 FOR all)
add_importlibs(olesvr32 kernel32 ntdll)
add_dependencies(olesvr32 psdk)
-add_cab_target(olesvr32 1)
+add_cd_file(TARGET olesvr32 DESTINATION reactos/system32 FOR all)
add_importlibs(olethk32 msvcrt kernel32 ntdll)
add_dependencies(olethk32 psdk)
-add_cab_target(olethk32 1)
+add_cd_file(TARGET olethk32 DESTINATION reactos/system32 FOR all)
add_pch(opengl32 ${CMAKE_CURRENT_SOURCE_DIR}/opengl32.h ${SOURCE})
-add_cab_target(opengl32 1)
+add_cd_file(TARGET opengl32 DESTINATION reactos/system32 FOR all)
add_importlib_target(opengl32.spec)
add_importlibs(pdh kernel32 ntdll msvcrt)
add_importlib_target(pdh.spec)
-add_cab_target(pdh 1)
+add_cd_file(TARGET pdh DESTINATION reactos/system32 FOR all)
add_importlibs(pidgen msvcrt kernel32 ntdll)
-add_cab_target(pidgen 1)
+add_cd_file(TARGET pidgen DESTINATION reactos/system32 FOR all)
add_importlibs(powrprof advapi32 user32 comctl32 msvcrt kernel32 ntdll)
add_importlib_target(powrprof.spec)
-add_cab_target(powrprof 1)
+add_cd_file(TARGET powrprof DESTINATION reactos/system32 FOR all)
add_importlibs(printui shell32 kernel32 ntdll)
add_dependencies(printui psdk)
-add_cab_target(printui 1)
+add_cd_file(TARGET printui DESTINATION reactos/system32 FOR all)
add_importlibs(psapi msvcrt kernel32 ntdll)
add_importlib_target(psapi.spec)
add_pch(psapi ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
-add_cab_target(psapi 1)
+add_cd_file(TARGET psapi DESTINATION reactos/system32 FOR all)
target_link_libraries(pstorec uuid wine)
add_importlibs(pstorec msvcrt kernel32 ntdll)
add_dependencies(pstorec pstorec_tlb)
-add_cab_target(pstorec 1)
+add_cd_file(TARGET pstorec DESTINATION reactos/system32 FOR all)
set_module_type(qmgr win32dll)
target_link_libraries(qmgr uuid wine)
add_importlibs(qmgr ole32 wininet urlmon advapi32 msvcrt kernel32 ntdll)
-add_cab_target(qmgr 1)
+add_cd_file(TARGET qmgr DESTINATION reactos/system32 FOR all)
add_dependencies(qmgr qmgr_idlheader)
list(APPEND SOURCE
version.rc
${CMAKE_CURRENT_BINARY_DIR}/qmgrprxy_i.c
+ ${CMAKE_CURRENT_BINARY_DIR}/qmgrprxy_p.c
+ ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
${CMAKE_CURRENT_BINARY_DIR}/qmgrprxy.def)
-add_rpcproxy_library(qmgrprxylib qmgrprxy.idl)
+add_rpcproxy_files(qmgrprxy.idl)
add_library(qmgrprxy SHARED ${SOURCE})
set_module_type(qmgrprxy win32dll)
-target_link_libraries(qmgrprxy qmgrprxylib ${PSEH_LIB} wine)
+target_link_libraries(qmgrprxy ${PSEH_LIB} wine)
add_importlibs(qmgrprxy rpcrt4 msvcrt kernel32 ntdll)
-add_cab_target(qmgrprxy 1)
+add_cd_file(TARGET qmgrprxy DESTINATION reactos/system32 FOR all)
add_importlibs(query msvcrt kernel32 ntdll)
-add_cab_target(query 1)
+add_cd_file(TARGET query DESTINATION reactos/system32 FOR all)
add_importlibs(rasadhlp ws2_32 msvcrt kernel32 ntdll)
-add_cab_target(rasadhlp 1)
+add_cd_file(TARGET rasadhlp DESTINATION reactos/system32 FOR all)
add_importlibs(rasapi32 kernel32 ntdll)
add_importlib_target(rasapi32.spec)
add_dependencies(rasapi32 psdk)
-add_cab_target(rasapi32 1)
+add_cd_file(TARGET rasapi32 DESTINATION reactos/system32 FOR all)
add_importlibs(rasdlg msvcrt kernel32 ntdll)
-add_cab_target(rasdlg 1)
+add_cd_file(TARGET rasdlg DESTINATION reactos/system32 FOR all)
add_importlibs(rasman msvcrt kernel32 ntdll)
-add_cab_target(rasman 1)
+add_cd_file(TARGET rasman DESTINATION reactos/system32 FOR all)
add_importlibs(resutils msvcrt kernel32 ntdll)
-add_cab_target(resutils 1)
+add_cd_file(TARGET resutils DESTINATION reactos/system32 FOR all)
add_importlib_target(riched20.spec)
-add_cab_target(riched20 1)
+add_cd_file(TARGET riched20 DESTINATION reactos/system32 FOR all)
set_module_type(riched32 win32dll)
target_link_libraries(riched32 wine)
add_importlibs(riched32 riched20 user32 msvcrt kernel32 ntdll)
-add_cab_target(riched32 1)
+add_cd_file(TARGET riched32 DESTINATION reactos/system32 FOR all)
add_importlibs(rpcrt4 msvcrt user32 advapi32 secur32 iphlpapi ws2_32 kernel32 ntdll)
add_dependencies(rpcrt4 winesdk)
-add_cab_target(rpcrt4 1)
+add_cd_file(TARGET rpcrt4 DESTINATION reactos/system32 FOR all)
add_importlib_target(rpcrt4.spec)
set_entrypoint(rsabase 0)
target_link_libraries(rsabase wine)
add_importlibs(rsabase rsaenh ntdll)
-add_cab_target(rsabase 1)
+add_cd_file(TARGET rsabase DESTINATION reactos/system32 FOR all)
target_link_libraries(rsaenh wine)
add_importlibs(rsaenh msvcrt crypt32 advapi32 kernel32 ntdll)
add_importlib_target(rsaenh.spec)
-add_cab_target(rsaenh 1)
+add_cd_file(TARGET rsaenh DESTINATION reactos/system32 FOR all)
add_importlibs(samlib advapi32 msvcrt kernel32 ntdll)
-add_cab_target(samlib 1)
+add_cd_file(TARGET samlib DESTINATION reactos/system32 FOR all)
add_importlib_target(samlib.spec)
set_entrypoint(samsrv 0)
add_importlibs(samsrv kernel32 ntdll)
add_dependencies(samsrv psdk)
-add_cab_target(samsrv 1)
+add_cd_file(TARGET samsrv DESTINATION reactos/system32 FOR all)
add_importlibs(sccbase msvcrt kernel32 ntdll)
-add_cab_target(sccbase 1)
+add_cd_file(TARGET sccbase DESTINATION reactos/system32 FOR all)
add_importlibs(schannel secur32 msvcrt kernel32 ntdll)
-add_cab_target(schannel 1)
+add_cd_file(TARGET schannel DESTINATION reactos/system32 FOR all)
add_importlibs(secur32 advapi32 msvcrt kernel32 ntdll)
add_pch(secur32 ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
-add_cab_target(secur32 1)
+add_cd_file(TARGET secur32 DESTINATION reactos/system32 FOR all)
add_importlib_target(secur32.spec)
add_importlibs(security secur32 advapi32 ntdll kernel32)
-add_cab_target(security 1)
+add_cd_file(TARGET security DESTINATION reactos/system32 FOR all)
target_link_libraries(sensapi wine)
add_importlibs(sensapi msvcrt kernel32 ntdll)
add_importlib_target(sensapi.spec)
-add_cab_target(sensapi 1)
+add_cd_file(TARGET sensapi DESTINATION reactos/system32 FOR all)
set_module_type(serialui win32dll)
add_importlibs(serialui user32 shlwapi msvcrt kernel32)
-add_cab_target(serialui 1)
+add_cd_file(TARGET serialui DESTINATION reactos/system32 FOR all)
ntdll)
-add_cab_target(setupapi 1)
+add_cd_file(TARGET setupapi DESTINATION reactos/system32 FOR all)
add_importlib_target(setupapi.spec)
add_importlibs(sfc msvcrt kernel32 ntdll)
add_pch(sfc ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
-add_cab_target(sfc 1)
+add_cd_file(TARGET sfc DESTINATION reactos/system32 FOR all)
add_importlibs(sfc_os msvcrt kernel32 ntdll)
add_pch(sfc_os ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
-add_cab_target(sfc_os 1)
+add_cd_file(TARGET sfc_os DESTINATION reactos/system32 FOR all)
add_importlibs(shdoclc kernel32 ntdll)
add_dependencies(shdoclc psdk)
-add_cab_target(shdoclc 1)
\ No newline at end of file
+add_cd_file(TARGET shdoclc DESTINATION reactos/system32 FOR all)
\ No newline at end of file
ntdll)
add_dependencies(shdocvw shdocvw_v1)
-add_cab_target(shdocvw 1)
+add_cd_file(TARGET shdocvw DESTINATION reactos/system32 FOR all)
add_importlib_target(shdocvw.spec)
msvcrt
ntdll)
-add_cab_target(shell32 1)
+add_cd_file(TARGET shell32 DESTINATION reactos/system32 FOR all)
add_importlib_target(shell32.spec)
/* TRANSLATOR : Mário Kaèmár /Mario Kacmar/ aka Kario (kario@szm.sk)
* NOTE : partially translated
* TRANSLATED : 26-12-2007
- * LAST CHANGE: 31-05-2010
+ * LAST CHANGE: 27-03-2011
*/
/*
LTEXT "Ktoré pou\9eívate¾ské konto chcete pou\9ei\9d k spusteniu tohto programu?", -1, 10, 20, 220, 20
CHECKBOX "Aktuálny pou\9eívate¾ %s", 14000, 10, 45, 150, 10
LTEXT "Chráni\9d poèítaè a údaje pred neoprávnenými aktivitami programu", -1, 25, 57, 200, 10, WS_DISABLED
- CHECKBOX "This option can prevent computer viruses from harming your computer or personal data, but selecting it might cause the program to function improperly.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE
+ CHECKBOX "Táto mo\9enos\9d mô\9ee zabráni\9d poèítaèovým vírusom aby po\9akodili poèítaè alebo osobné údaje, ale jej zvolenie mô\9ee spôsobi\9d, \9ee program nebude správne fungova\9d.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE
CHECKBOX "Nasledujúci pou\9eívate¾:", 14002, 10, 100, 90, 10
LTEXT "Meno pou\9eívate¾a:", -1, 20, 118, 54, 10
COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP
IDS_LOGOFF_PROMPT "Naozaj sa chcete odhlási\9d?"
/* Run File dialog */
- IDS_RUNDLG_ERROR "Unable to display Run File dialog box (internal error)"
- IDS_RUNDLG_BROWSE_ERROR "Unable to display Browse dialog box (internal error)"
- IDS_RUNDLG_BROWSE_CAPTION "Browse"
- IDS_RUNDLG_BROWSE_FILTER "Executable Files (*.exe)\0*.exe\0All Files (*.*)\0*.*\0"
+ IDS_RUNDLG_ERROR "Nemo\9eno zobrazi\9d dialogové okno Spusti\9d súbor (vnútorná chyba)"
+ IDS_RUNDLG_BROWSE_ERROR "Nemo\9eno zobrazi\9d dialogové okno Preh¾adáva\9d (vnútorná chyba)"
+ IDS_RUNDLG_BROWSE_CAPTION "Preh¾adáva\9d"
+ IDS_RUNDLG_BROWSE_FILTER "Spustite¾né súbory (*.exe)\0*.exe\0V\9aetky súbory (*.*)\0*.*\0"
/* shell folder path default values */
IDS_PROGRAMS "Ponuka \8atart\\Programy"
IDS_RECYCLEBIN_DISKSPACE "Dostupné miesto"
IDS_EMPTY_BITBUCKET "Vyprázdni\9d Kô\9a"
IDS_PICK_ICON_TITLE "Choose Icon"
- IDS_PICK_ICON_FILTER "Súbory ikon (*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0All Files (*.*)\0*.*\0"
- IDS_OPEN_WITH_FILTER "Spustite¾né súbory (*.exe)\0*.exe\0All Files (*.*)\0*.*\0"
+ IDS_PICK_ICON_FILTER "Súbory ikon (*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0V\9aetky súbory (*.*)\0*.*\0"
+ IDS_OPEN_WITH_FILTER "Spustite¾né súbory (*.exe)\0*.exe\0V\9aetky súbory (*.*)\0*.*\0"
IDS_DIRECTORY "Prieèinok"
- IDS_VIRTUAL_DRIVER "Virtual Device Driver"
+ IDS_VIRTUAL_DRIVER "Ovládaè virtuálneho zariadenia"
IDS_BAT_FILE "Dávkový súbor systému ReactOS"
IDS_CMD_FILE "Príkazový skript systému ReactOS"
IDS_COM_FILE "DOS aplikácia"
#include "lang/fr-FR.rc"
#include "lang/hu-HU.rc"
#include "lang/it-IT.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/ko-KR.rc"
#include "lang/nl-NL.rc"
#include "lang/no-NO.rc"
(pThis->FolderSettings.fFlags & FWF_TRANSPARENT))
return SendMessageW(pThis->hWndParent, WM_ERASEBKGND, wParam, lParam); /* redirect to parent */
break;
+
+ case WM_SYSCOLORCHANGE:
+ /* Forward WM_SYSCOLORCHANGE to common controls */
+ SendMessage(pThis->hWndList, WM_SYSCOLORCHANGE, 0, 0);
+ break;
+
case CWM_GETISHELLBROWSER:
return (LRESULT)pThis->pShellBrowser;
}
target_link_libraries(shfolder wine)
add_importlibs(shfolder shell32 kernel32 ntdll)
add_dependencies(shfolder psdk)
-add_cab_target(shfolder 1)
+add_cd_file(TARGET shfolder DESTINATION reactos/system32 FOR all)
kernel32
ntdll)
-add_cab_target(shimgvw 1)
+add_cd_file(TARGET shimgvw DESTINATION reactos/system32 FOR all)
--- /dev/null
+LANGUAGE LANG_FRENCH, SUBLANG_DEFAULT
+
+STRINGTABLE
+BEGIN
+ IDS_APPTITLE "Visionneuse d'Images et Fax de ReactOS"
+ IDS_SETASDESKBG "Définir comme Arrière-plan du Bureau"
+
+ /* Tooltips */
+ IDS_TOOLTIP_NEXT_PIC "Image Suivante"
+ IDS_TOOLTIP_PREV_PIC "Image Précédente"
+ IDS_TOOLTIP_ZOOM_IN "Augmenter (+)"
+ IDS_TOOLTIP_ZOOM_OUT "Diminuer (-)"
+ IDS_TOOLTIP_ROT_CLOCKW "Tourner dans le sens des aiguilles d'une montre (Ctrl+K)"
+ IDS_TOOLTIP_ROT_COUNCW "Tourner dans le sens opposé des aiguilles d'une montre (Ctrl+L)"
+ IDS_TOOLTIP_PRINT "Imprimer (Ctrl+P)"
+ IDS_TOOLTIP_SAVEAS "Enregistrer sous... (Ctrl+S)"
+END
#include "lang/de-DE.rc"
#include "lang/en-US.rc"
#include "lang/es-ES.rc"
+#include "lang/fr-FR.rc"
#include "lang/it-IT.rc"
#include "lang/no-NO.rc"
#include "lang/lt-LT.rc"
DPRINT("ImageView_PrintToW() not implemented\n");
}
-VOID WINAPI
-imageview_fullscreenW(HWND hwnd, HINSTANCE hInst, LPCWSTR path, int nShow)
-{
- DPRINT("ImageView_fullscreenW() not implemented\n");
-}
-
BOOL WINAPI
DllMain(IN HINSTANCE hinstDLL,
IN DWORD dwReason,
@ stdcall ImageView_PrintTo(ptr ptr wstr long)
@ stdcall ImageView_PrintToA(ptr ptr str long)
@ stdcall ImageView_PrintToW(ptr ptr wstr long)
-@ stdcall imageview_fullscreenW(ptr ptr wstr long)
+@ stdcall imageview_fullscreenW(ptr ptr wstr long) ImageView_FullscreenW
@ stub ConvertDIBSECTIONToThumbnail
@ stub -private DllCanUnloadNow
@ stub -private DllGetClassObject
msvcrt
ntdll)
-add_cab_target(shlwapi 1)
+add_cd_file(TARGET shlwapi DESTINATION reactos/system32 FOR all)
add_importlib_target(shlwapi.spec)
add_importlibs(slbcsp msvcrt kernel32 ntdll)
-add_cab_target(slbcsp 1)
+add_cd_file(TARGET slbcsp DESTINATION reactos/system32 FOR all)
target_link_libraries(smdll smlib)
add_importlibs(smdll ntdll)
add_dependencies(smdll psdk)
-add_cab_target(smdll 1)
+add_cd_file(TARGET smdll DESTINATION reactos/system32 FOR all)
add_importlib_target(smdll.spec)
set_module_type(sndblst win32dll)
target_link_libraries(sndblst mment4 mmebuddy)
add_importlibs(sndblst user32 winmm advapi32 msvcrt kernel32 ntdll)
-add_cab_target(sndblst 1)
+add_cd_file(TARGET sndblst DESTINATION reactos/system32 FOR all)
add_importlibs(snmpapi msvcrt kernel32 ntdll)
-add_cab_target(snmpapi 1)
+add_cd_file(TARGET snmpapi DESTINATION reactos/system32 FOR all)
add_importlib_target(snmpapi.spec)
add_importlibs(softpub wintrust)
-add_cab_target(softpub 1)
\ No newline at end of file
+add_cd_file(TARGET softpub DESTINATION reactos/system32 FOR all)
\ No newline at end of file
add_importlibs(spoolss winspool msvcrt kernel32 ntdll)
add_importlib_target(spoolss.spec)
-add_cab_target(spoolss 1)
+add_cd_file(TARGET spoolss DESTINATION reactos/system32 FOR all)
add_importlibs(srclient kernel32 ntdll)
add_dependencies(srclient psdk)
-add_cab_target(srclient 1)
+add_cd_file(TARGET srclient DESTINATION reactos/system32 FOR all)
set_entrypoint(stdole2.tlb 0)
set_target_properties(stdole2.tlb PROPERTIES SUFFIX "")
add_dependencies(stdole2.tlb std_ole_v2)
-add_cab_target(stdole2.tlb 1)
+add_cd_file(TARGET stdole2.tlb DESTINATION reactos/system32 FOR all)
set_target_properties(stdole32.tlb PROPERTIES SUFFIX "")
add_dependencies(stdole32.tlb std_ole_v1)
-add_cab_target(stdole32.tlb 1)
+add_cd_file(TARGET stdole32.tlb DESTINATION reactos/system32 FOR all)
regsvr.c
sti.c
sti_main.c
+ ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
+ ${CMAKE_CURRENT_BINARY_DIR}/sti_wia_p.c
${CMAKE_CURRENT_BINARY_DIR}/sti.def)
-add_rpcproxy_library(stiproxy sti_wia.idl)
+add_rpcproxy_files(sti_wia.idl)
add_library(sti SHARED ${SOURCE})
set_entrypoint(sti 0)
target_link_libraries(sti
- stiproxy
wine
uuid
${PSEH_LIB})
kernel32
ntdll)
-add_cab_target(sti 1)
+add_cd_file(TARGET sti DESTINATION reactos/system32 FOR all)
add_importlibs(sxs kernel32 ntdll)
add_dependencies(sxs psdk)
-add_cab_target(sxs 1)
+add_cd_file(TARGET sxs DESTINATION reactos/system32 FOR all)
ntdll)
-add_cab_target(syssetup 1)
+add_cd_file(TARGET syssetup DESTINATION reactos/system32 FOR all)
#include "lang/hu-HU.rc"
#include "lang/id-ID.rc"
#include "lang/it-IT.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/no-NO.rc"
#include "lang/nl-NL.rc"
#include "lang/pl-PL.rc"
add_importlibs(t2embed gdi32 user32 advapi32 version msvcrt kernel32 ntdll)
-add_cab_target(t2embed 1)
+add_cd_file(TARGET t2embed DESTINATION reactos/system32 FOR all)
add_importlibs(tapi32 advapi32 kernel32 ntdll)
add_dependencies(tapi32 psdk)
-add_cab_target(tapi32 1)
+add_cd_file(TARGET tapi32 DESTINATION reactos/system32 FOR all)
add_library(tapiui SHARED tapiui.rc)
set_entrypoint(tapiui 0)
add_dependencies(tapiui psdk)
-add_cab_target(tapiui 1)
+add_cd_file(TARGET tapiui DESTINATION reactos/system32 FOR all)
add_importlibs(traffic msvcrt kernel32 ntdll)
add_dependencies(traffic psdk)
-add_cab_target(traffic 1)
+add_cd_file(TARGET traffic DESTINATION reactos/system32 FOR all)
set_module_type(twain_32 win32dll)
target_link_libraries(twain_32 wine)
add_importlibs(twain_32 msvcrt kernel32 ntdll)
-add_cab_target(twain_32 1)
+add_cd_file(TARGET twain_32 DESTINATION reactos/system32 FOR all)
set_module_type(uext2 win32dll)
target_link_libraries(uext2 ext2lib)
add_importlibs(uext2 msvcrt kernel32 ntdll)
-add_cab_target(uext2 1)
+add_cd_file(TARGET uext2 DESTINATION reactos/system32 FOR all)
set_module_type(ufat win32dll)
target_link_libraries(ufat vfatlib)
add_importlibs(ufat msvcrt kernel32 ntdll)
-add_cab_target(ufat 1)
+add_cd_file(TARGET ufat DESTINATION reactos/system32 FOR all)
add_importlibs(ufatx kernel32 ntdll)
add_importlib_target(ufatx.spec)
add_dependencies(ufatx psdk)
-add_cab_target(ufatx 1)
+add_cd_file(TARGET ufatx DESTINATION reactos/system32 FOR all)
advapi32
kernel32
ntdll)
-add_cab_target(unicows 1)
+add_cd_file(TARGET unicows DESTINATION reactos/system32 FOR all)
set_module_type(untfs win32dll)
target_link_libraries(untfs ntfslib)
add_importlibs(untfs msvcrt kernel32 ntdll)
-add_cab_target(untfs 1)
+add_cd_file(TARGET untfs DESTINATION reactos/system32 FOR all)
add_importlibs(updspapi setupapi kernel32 ntdll)
add_dependencies(updspapi psdk)
-add_cab_target(updspapi 1)
+add_cd_file(TARGET updspapi DESTINATION reactos/system32 FOR all)
add_importlibs(url shell32 shlwapi msvcrt kernel32 ntdll)
-add_cab_target(url 1)
+add_cd_file(TARGET url DESTINATION reactos/system32 FOR all)
spec2def(urlmon.dll urlmon.spec)
-add_rpcproxy_library(urlmonproxy urlmon_urlmon.idl)
+add_rpcproxy_files(urlmon_urlmon.idl)
list(APPEND SOURCE
bindctx.c
urlmon_main.c
usrmarshal.c
rsrc.rc
+ ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
+ ${CMAKE_CURRENT_BINARY_DIR}/urlmon_urlmon_p.c
${CMAKE_CURRENT_BINARY_DIR}/urlmon_stubs.c
${CMAKE_CURRENT_BINARY_DIR}/urlmon.def)
set_module_type(urlmon win32dll)
target_link_libraries(urlmon
- urlmonproxy
uuid
wine
${PSEH_LIB})
add_definitions(-DPROXY_CLSID_IS="{0x79EAC9F1,0xBAF9,0x11CE,{0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B}}")
-add_cab_target(urlmon 1)
+add_cd_file(TARGET urlmon DESTINATION reactos/system32 FOR all)
add_importlib_target(urlmon.spec)
add_pch(user32 ${CMAKE_CURRENT_SOURCE_DIR}/include/user32.h ${SOURCE})
add_importlibs(user32 gdi32 advapi32 imm32 msvcrt kernel32 ntdll)
-add_cab_target(user32 1)
+add_cd_file(TARGET user32 DESTINATION reactos/system32 FOR all)
add_importlib_target(user32.spec)
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
- * FILE: subsys/csrss/win32csr/appswitch.c
+ * FILE: dll/win32/user32/controls/appswitch.c
* PURPOSE: app switching functionality
* PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org)
*/
-#define NDEBUG
-#include "w32csr.h"
-#include <debug.h>
+#include <user32.h>
+
+#include <wine/debug.h>
+WINE_DEFAULT_DEBUG_CHANNEL(user32);
typedef struct APPSWITCH_ITEM
{
hProcess = OpenProcess(PROCESS_QUERY_INFORMATION|PROCESS_VM_READ, FALSE, dwPid);
if (hProcess)
{
- if (GetModuleFileNameExW(hProcess, NULL, szFileName, MAX_PATH))
+// if (GetModuleFileNameExW(hProcess, NULL, szFileName, MAX_PATH))
{
szFileName[MAX_PATH-1] = L'\0';
PrivateExtractIconExW(szFileName, 0, &hIcon, NULL, 1);
/* get the text length */
Length = SendMessageW(hwnd, WM_GETTEXTLENGTH, 0, 0);
/* allocate item structure for it */
- pItem = (PAPPSWITCH_ITEM)HeapAlloc(Win32CsrApiHeap, HEAP_ZERO_MEMORY, sizeof(APPSWITCH_ITEM) + Length * sizeof(WCHAR));
+// pItem = (PAPPSWITCH_ITEM)HeapAlloc(Win32CsrApiHeap, HEAP_ZERO_MEMORY, sizeof(APPSWITCH_ITEM) + Length * sizeof(WCHAR));
if (!pItem)
return TRUE;
if (Length)
/* FIXME
* launch window
*/
- DPRINT1("launch alt-tab window\n");
+ FIXME("launch alt-tab window\n");
}
else
{
SetRect(&Rect, X-5, Y-5, X + XSize + 5, Y + YSize + 5);
FillRect(hDc, &Rect, hBrush);
DeleteObject((HGDIOBJ)hBrush);
- SendDlgItemMessageW(hwndDlg, IDC_STATIC_CUR_APP, WM_SETTEXT, 0, (LPARAM)pCurItem->szText);
+// SendDlgItemMessageW(hwndDlg, IDC_STATIC_CUR_APP, WM_SETTEXT, 0, (LPARAM)pCurItem->szText);
}
DrawIcon(hDc, X, Y, pCurItem->hIcon);
{
pNextItem = pCurItem->Next;
DestroyIcon(pCurItem->hIcon);
- HeapFree(Win32CsrApiHeap, 0, pCurItem);
+// HeapFree(Win32CsrApiHeap, 0, pCurItem);
pCurItem = pNextItem;
}
pRoot = NULL;
InitializeAppSwitchHook()
{
hhk = SetWindowsHookEx(WH_KEYBOARD_LL, KeyboardHookProc, NULL, 0);
- DPRINT("InitializeAppSwitchHook hhk %p\n", hhk);
+ TRACE("InitializeAppSwitchHook hhk %p\n", hhk);
}
{
WINDOWPLACEMENT wp;
POINT Pt;
+ LRESULT lResult;
if (!IsWindowEnabled( hWnd )) return 0;
if (ISITHOOKED(WH_CBT))
{
- LRESULT lResult;
NtUserMessageCall( hWnd, WM_SYSCOMMAND, wParam, lParam, (ULONG_PTR)&lResult, FNID_DEFWINDOWPROC, FALSE);
if (lResult) return 0;
}
break;
case SC_CLOSE:
return SendMessageW(hWnd, WM_CLOSE, 0, 0);
-
+// case SC_DEFAULT:
case SC_MOUSEMENU:
{
Pt.x = (short)LOWORD(lParam);
}
break;
+ case SC_SCREENSAVE:
+ NtUserMessageCall( hWnd, WM_SYSCOMMAND, wParam, lParam, (ULONG_PTR)&lResult, FNID_DEFWINDOWPROC, FALSE);
+ break;
+
+ case SC_NEXTWINDOW:
+ case SC_PREVWINDOW:
+ FIXME("Implement Alt-Tab!!! wParam 0x%x lParam 0x%x\n",wParam,lParam);
+ break;
+
+ case SC_HOTKEY:
+ {
+ HWND hwnd, hWndLastActive;
+
+ hwnd = (HWND)lParam;
+ PWND pWnd = ValidateHwnd(hwnd);
+ if (pWnd)
+ {
+ hWndLastActive = GetLastActivePopup(hwnd);
+ if (hWndLastActive)
+ {
+ hwnd = hWndLastActive;
+ pWnd = ValidateHwnd(hwnd);
+ }
+ SetForegroundWindow(hwnd);
+ if (pWnd->style & WS_MINIMIZE)
+ {
+ PostMessage(hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
+ }
+ }
+ }
+ break;
+
default:
- /* FIXME: Implement */
- UNIMPLEMENTED;
+ FIXME("Unimplemented DefWndHandleSysCommand wParam 0x%x\n",wParam);
break;
}
if(wParam == VK_F10) iF10Key = VK_F10;
break;
- /* FIXME: This is also incomplete. */
case WM_SYSKEYDOWN:
{
if (HIWORD(lParam) & KEYDATA_ALT)
- {
- HWND top = GetAncestor(hWnd, GA_ROOT);
- /* if( HIWORD(lParam) & ~KEYDATA_PREVSTATE ) */
- if ( (wParam == VK_MENU || wParam == VK_LMENU
- || wParam == VK_RMENU) && !iMenuSysKey )
- iMenuSysKey = 1;
- else
- iMenuSysKey = 0;
+ { /* Previous state, if the key was down before this message,
+ this is a cheap way to ignore autorepeat keys. */
+ if ( !(HIWORD(lParam) & KEYDATA_PREVSTATE) )
+ {
+ if ( ( wParam == VK_MENU ||
+ wParam == VK_LMENU ||
+ wParam == VK_RMENU ) && !iMenuSysKey )
+ iMenuSysKey = 1;
+ else
+ iMenuSysKey = 0;
+ }
iF10Key = 0;
if (wParam == VK_F4) /* Try to close the window */
{
- if (!(GetClassLongPtrW(top, GCL_STYLE) & CS_NOCLOSE))
- {
- if (bUnicode)
- PostMessageW(top, WM_SYSCOMMAND, SC_CLOSE, 0);
- else
- PostMessageA(top, WM_SYSCOMMAND, SC_CLOSE, 0);
- }
+ HWND top = GetAncestor(hWnd, GA_ROOT);
+ if (!(GetClassLongPtrW(top, GCL_STYLE) & CS_NOCLOSE))
+ PostMessageW(top, WM_SYSCOMMAND, SC_CLOSE, 0);
}
- else if (wParam == VK_SNAPSHOT)
+ else if (wParam == VK_SNAPSHOT) // Alt-VK_SNAPSHOT?
{
- HWND hwnd = hWnd;
- while (GetParent(hwnd) != NULL)
- {
- hwnd = GetParent(hwnd);
- }
- DefWndScreenshot(hwnd);
+ HWND hwnd = hWnd;
+ while (GetParent(hwnd) != NULL)
+ {
+ hwnd = GetParent(hwnd);
+ }
+ DefWndScreenshot(hwnd);
+ }
+ else if ( wParam == VK_ESCAPE || wParam == VK_TAB ) // Alt-Tab/ESC Alt-Shift-Tab/ESC
+ {
+ WPARAM wParamTmp;
+ HWND Active = GetActiveWindow(); // Noticed MDI problem.
+ if (!Active)
+ {
+ FIXME("WM_SYSKEYDOWN VK_ESCAPE no active\n");
+ break;
+ }
+ wParamTmp = GetKeyState(VK_SHIFT) & 0x8000 ? SC_PREVWINDOW : SC_NEXTWINDOW;
+ SendMessageW( Active, WM_SYSCOMMAND, wParamTmp, wParam );
}
}
else if( wParam == VK_F10 )
SendMessageW( hWnd, WM_CONTEXTMENU, (WPARAM)hWnd, MAKELPARAM(-1, -1) );
iF10Key = 1;
}
- else if( wParam == VK_ESCAPE && (GetKeyState(VK_SHIFT) & 0x8000))
- SendMessageW( hWnd, WM_SYSCOMMAND, SC_KEYMENU, ' ' );
break;
}
case WM_SYSCHAR:
{
iMenuSysKey = 0;
- if (wParam == '\r' && IsIconic(hWnd))
+ if (wParam == VK_RETURN && IsIconic(hWnd))
{
PostMessageW( hWnd, WM_SYSCOMMAND, SC_RESTORE, 0L );
break;
}
if ((HIWORD(lParam) & KEYDATA_ALT) && wParam)
{
- if (wParam == '\t' || wParam == '\x1b') break;
- if (wParam == ' ' && (GetWindowLongPtrW( hWnd, GWL_STYLE ) & WS_CHILD))
+ if (wParam == VK_TAB || wParam == VK_ESCAPE) break;
+ if (wParam == VK_SPACE && (GetWindowLongPtrW( hWnd, GWL_STYLE ) & WS_CHILD))
SendMessageW( GetParent(hWnd), Msg, wParam, lParam );
else
SendMessageW( hWnd, WM_SYSCOMMAND, SC_KEYMENU, wParam );
}
else /* check for Ctrl-Esc */
- if (wParam != '\x1b') MessageBeep(0);
- break;
- }
-
- case WM_SHOWWINDOW:
- {
- if (lParam) // Call when it is necessary.
- NtUserMessageCall( hWnd, Msg, wParam, lParam, 0, FNID_DEFWINDOWPROC, FALSE);
+ if (wParam != VK_ESCAPE) MessageBeep(0);
break;
}
- case WM_CLIENTSHUTDOWN:
- {
- LRESULT lResult;
- NtUserMessageCall( hWnd, Msg, wParam, lParam, (ULONG_PTR)&lResult, FNID_DEFWINDOWPROC, FALSE);
- return lResult;
- }
-
case WM_CANCELMODE:
{
iMenuSysKey = 0;
break;
}
+/* Move to win32k !*/
+ case WM_SHOWWINDOW:
+ if (!lParam) break; // Call when it is necessary.
+ case WM_CLIENTSHUTDOWN:
+ case WM_GETHOTKEY:
+ case WM_SETHOTKEY:
+ {
+ LRESULT lResult;
+ NtUserMessageCall( hWnd, Msg, wParam, lParam, (ULONG_PTR)&lResult, FNID_DEFWINDOWPROC, !bUnicode);
+ return lResult;
+ }
}
return 0;
}
TRACE("\tlooking for '%c' (0x%02x) in [%p]\n", (char) Key, Key, MenuInfo);
if (NULL == MenuInfo || ! IsMenu(MenuInfo->Self))
- {
+ {
if (MenuGetRosMenuInfo(&SysMenuInfo, GetSystemMenu(WndOwner, FALSE)))
- {
+ {
MenuInfo = &SysMenuInfo;
- }
+ }
else
- {
+ {
MenuInfo = NULL;
- }
- }
+ }
+ }
if (NULL != MenuInfo)
- {
+ {
if (MenuGetAllRosMenuItemInfo(MenuInfo->Self, &Items) <= 0)
- {
+ {
return -1;
- }
- if (! ForceMenuChar)
- {
- Key = toupperW(Key);
+ }
+ if ( !ForceMenuChar )
+ {
ItemInfo = Items;
for (i = 0; i < MenuInfo->MenuItemCount; i++, ItemInfo++)
- {
+ {
if ((ItemInfo->lpstr) && NULL != ItemInfo->dwTypeData)
- {
+ {
WCHAR *p = (WCHAR *) ItemInfo->dwTypeData - 2;
do
- {
- p = strchrW(p + 2, '&');
- }
- while (NULL != p && L'&' == p[1]);
- if (NULL != p && (toupperW(p[1]) == Key))
- {
- return i;
- }
- }
- }
- }
+ {
+ p = strchrW (p + 2, '&');
+ }
+ while (p != NULL && p [1] == '&');
+ if (p && (toupperW(p[1]) == toupperW(Key))) return i;
+ }
+ }
+ }
MenuChar = SendMessageW(WndOwner, WM_MENUCHAR,
MAKEWPARAM(Key, MenuInfo->Flags), (LPARAM) MenuInfo->Self);
- if (2 == HIWORD(MenuChar))
- {
- return LOWORD(MenuChar);
- }
- if (1 == HIWORD(MenuChar))
- {
- return (UINT) (-2);
- }
+ if (HIWORD(MenuChar) == MNC_EXECUTE) return LOWORD(MenuChar);
+ if (HIWORD(MenuChar) == MNC_CLOSE) return (UINT)(-2);
}
-
return (UINT)(-1);
}
MenuInfo.FocusedItem = NO_SELECTED_ITEM;
}
- /* ReactOS Check */
- if (!ValidateHwnd(hwndOwner))
- { // This window maybe already DEAD!!!
+ /* store the owner for DrawItem */
+ if (!IsWindow(hwndOwner))
+ {
+ SetLastError( ERROR_INVALID_WINDOW_HANDLE );
return FALSE;
}
- /* store the owner for DrawItem */
MenuInfo.WndOwner = hwndOwner;
MenuSetRosMenuInfo(&MenuInfo);
if( uItem == NO_SELECTED_ITEM )
MenuMoveSelection( hwnd, &MenuInfo, ITEM_NEXT );
else
- PostMessageW( hwnd, WM_KEYDOWN, VK_DOWN, 0L );
+ PostMessageW( hwnd, WM_KEYDOWN, VK_RETURN, 0 );
}
track_menu:
add_importlibs(userenv advapi32 user32 msvcrt kernel32 ntdll)
add_pch(userenv ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
-add_cab_target(userenv 1)
+add_cd_file(TARGET userenv DESTINATION reactos/system32 FOR all)
add_importlib_target(userenv.spec)
add_importlibs(usp10 gdi32 msvcrt kernel32 ntdll)
add_importlib_target(usp10.spec)
-add_cab_target(usp10 1)
+add_cd_file(TARGET usp10 DESTINATION reactos/system32 FOR all)
add_importlibs(uxtheme user32 advapi32 gdi32 msimg32 msvcrt kernel32 ntdll)
-add_cab_target(uxtheme 1)
+add_cd_file(TARGET uxtheme DESTINATION reactos/system32 FOR all)
add_importlib_target(uxtheme.spec)
set_module_type(vdmdbg win32dll)
add_importlibs(vdmdbg msvcrt kernel32 ntdll)
add_pch(vdmdbg ${CMAKE_CURRENT_SOURCE_DIR}/vdmdbg.h ${SOURCE})
-add_cab_target(vdmdbg 1)
+add_cd_file(TARGET vdmdbg DESTINATION reactos/system32 FOR all)
target_link_libraries(version wine)
add_importlibs(version lz32 kernel32 ntdll)
add_dependencies(version psdk)
-add_cab_target(version 1)
+add_cd_file(TARGET version DESTINATION reactos/system32 FOR all)
add_importlib_target(version.spec)
mmixer)
add_importlibs(wdmaud.drv user32 winmm advapi32 msvcrt setupapi ksuser kernel32 ntdll)
-add_cab_target(wdmaud.drv 1)
+add_cd_file(TARGET wdmaud.drv DESTINATION reactos/system32 FOR all)
add_importlibs(windowscodecs ole32 shlwapi advapi32 msvcrt kernel32 ntdll)
add_importlib_target(windowscodecs.spec)
-add_cab_target(windowscodecs 1)
+add_cd_file(TARGET windowscodecs DESTINATION reactos/system32 FOR all)
add_dependencies(winemp3.acm psdk)
-add_cab_target(winemp3.acm 1)
\ No newline at end of file
+add_cd_file(TARGET winemp3.acm DESTINATION reactos/system32 FOR all)
\ No newline at end of file
add_importlibs(winfax kernel32 ntdll)
add_dependencies(winfax psdk)
-add_cab_target(winfax 1)
+add_cd_file(TARGET winfax DESTINATION reactos/system32 FOR all)
add_importlibs(wing32 user32 gdi32 msvcrt)
add_dependencies(wing32 psdk)
-add_cab_target(wing32 1)
+add_cd_file(TARGET wing32 DESTINATION reactos/system32 FOR all)
target_link_libraries(winhttp wine)
add_importlibs(winhttp shlwapi wininet ws2_32 msvcrt crypt32 advapi32 kernel32 ntdll)
add_importlib_target(winhttp.spec)
-add_cab_target(winhttp 1)
+add_cd_file(TARGET winhttp DESTINATION reactos/system32 FOR all)
add_importlibs(wininet mpr shlwapi shell32 user32 advapi32 secur32 crypt32 ws2_32 msvcrt kernel32 ntdll)
-add_cab_target(wininet 1)
+add_cd_file(TARGET wininet DESTINATION reactos/system32 FOR all)
add_importlib_target(wininet.spec)
add_subdirectory(midimap)
-add_cab_target(winmm 1)
+add_cd_file(TARGET winmm DESTINATION reactos/system32 FOR all)
add_importlib_target(winmm.spec)
add_importlibs(midimap advapi32 user32 winmm kernel32 ntdll)
add_dependencies(midimap psdk)
-add_cab_target(midimap 1)
+add_cd_file(TARGET midimap DESTINATION reactos/system32 FOR all)
set_module_type(winspool win32dll)
target_link_libraries(winspool wine)
add_importlibs(winspool advapi32 shlwapi msvcrt kernel32 ntdll)
-add_cab_target(winspool 1)
+add_cd_file(TARGET winspool DESTINATION reactos/system32 FOR all)
add_importlib_target(winspool.spec)
target_link_libraries(winsta wine)
add_importlibs(winsta msvcrt kernel32 ntdll)
add_pch(winsta ${CMAKE_CURRENT_SOURCE_DIR}/winsta.h ${SOURCE})
-add_cab_target(winsta 1)
+add_cd_file(TARGET winsta DESTINATION reactos/system32 FOR all)
add_importlib_target(wintrust.spec)
-add_cab_target(wintrust 1)
+add_cd_file(TARGET wintrust DESTINATION reactos/system32 FOR all)
add_importlib_target(wlanapi.spec)
add_dependencies(wlanapi psdk)
-add_cab_target(wlanapi 1)
+add_cd_file(TARGET wlanapi DESTINATION reactos/system32 FOR all)
add_importlibs(wldap32 user32 msvcrt kernel32 ntdll)
add_importlib_target(wldap32.spec)
-add_cab_target(wldap32 1)
+add_cd_file(TARGET wldap32 DESTINATION reactos/system32 FOR all)
add_importlibs(wmi advapi32)
add_dependencies(wmi psdk)
-add_cab_target(wmi 1)
+add_cd_file(TARGET wmi DESTINATION reactos/system32 FOR all)
add_importlibs(ws2_32 user32 advapi32 dnsapi ws2help msvcrt kernel32 ntdll)
add_pch(ws2_32 ${CMAKE_CURRENT_SOURCE_DIR}/include/ws2_32.h ${SOURCE})
-add_cab_target(ws2_32 1)
+add_cd_file(TARGET ws2_32 DESTINATION reactos/system32 FOR all)
add_importlib_target(ws2_32.spec)
set_module_type(ws2_32_new win32dll)
target_link_libraries(ws2_32_new wine)
add_importlibs(ws2_32_new user32 advapi32 dnsapi ws2help msvcrt kernel32 ntdll)
-add_cab_target(ws2_32_new 1)
+add_cd_file(TARGET ws2_32_new DESTINATION reactos/system32 FOR all)
set_module_type(ws2help win32dll)
add_importlibs(ws2help advapi32 ws2_32 msvcrt kernel32 ntdll)
-add_cab_target(ws2help 1)
+add_cd_file(TARGET ws2help DESTINATION reactos/system32 FOR all)
add_importlib_target(ws2help.spec)
set_module_type(wshirda win32dll)
add_importlibs(wshirda ws2_32 msvcrt kernel32 ntdll)
-add_cab_target(wshirda 1)
+add_cd_file(TARGET wshirda DESTINATION reactos/system32 FOR all)
target_link_libraries(wshtcpip tdilib)
add_importlibs(wshtcpip ws2_32 kernel32 ntdll)
add_dependencies(wshtcpip psdk)
-add_cab_target(wshtcpip 1)
+add_cd_file(TARGET wshtcpip DESTINATION reactos/system32 FOR all)
set_module_type(wsock32 win32dll)
add_importlibs(wsock32 mswsock ws2_32 msvcrt kernel32 ntdll)
-add_cab_target(wsock32 1)
+add_cd_file(TARGET wsock32 DESTINATION reactos/system32 FOR all)
add_importlibs(wtsapi32 advapi32 msvcrt kernel32 ntdll)
-add_cab_target(wtsapi32 1)
+add_cd_file(TARGET wtsapi32 DESTINATION reactos/system32 FOR all)
set_module_type(wuapi win32dll)
target_link_libraries(wuapi uuid wine wuguid)
add_importlibs(wuapi ole32 advapi32 msvcrt kernel32 ntdll)
-add_cab_target(wuapi 1)
+add_cd_file(TARGET wuapi DESTINATION reactos/system32 FOR all)
set_module_type(xinput1_1 win32dll)
add_importlibs(xinput1_1 msvcrt kernel32 xinput1_3)
-add_cab_target(xinput1_1 1)
+add_cd_file(TARGET xinput1_1 DESTINATION reactos/system32 FOR all)
set_module_type(xinput1_2 win32dll)
add_importlibs(xinput1_2 msvcrt kernel32 xinput1_3)
-add_cab_target(xinput1_2 1)
+add_cd_file(TARGET xinput1_2 DESTINATION reactos/system32 FOR all)
set_module_type(xinput1_3 win32dll)
target_link_libraries(xinput1_3 wine)
add_importlibs(xinput1_3 msvcrt kernel32 ntdll)
-add_cab_target(xinput1_3 1)
+add_cd_file(TARGET xinput1_3 DESTINATION reactos/system32 FOR all)
set_module_type(xinput9_1_0 win32dll)
add_importlibs(xinput9_1_0 msvcrt kernel32 xinput1_3)
-add_cab_target(xinput9_1_0 1)
+add_cd_file(TARGET xinput9_1_0 DESTINATION reactos/system32 FOR all)
add_importlibs(xmllite msvcrt kernel32 ntdll)
add_importlib_target(xmllite.spec)
-add_cab_target(xmllite 1)
+add_cd_file(TARGET xmllite DESTINATION reactos/system32 FOR all)
add_library(beep SHARED beep.c beep.rc)
set_module_type(beep kernelmodedriver)
add_importlibs(beep ntoskrnl hal)
-add_cab_target(beep 2)
+add_cd_file(TARGET beep DESTINATION reactos/system32/drivers FOR all)
add_importlibs(bootvid ntoskrnl hal)
add_pch(bootvid ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
add_dependencies(bootvid psdk bugcodes)
-add_minicd_target(bootvid reactos bootvid.dll)
-add_cab_target(bootvid 1)
+add_cd_file(TARGET bootvid DESTINATION reactos/system32 NO_CAB FOR all)
add_importlib_target(bootvid.spec)
add_importlibs(kdcom ntoskrnl hal)
add_dependencies(kdcom psdk bugcodes)
-add_minicd_target(kdcom reactos kdcom.dll)
-add_livecd_target(kdcom reactos/system32)
+add_cd_file(TARGET kdcom DESTINATION reactos/system32 NO_CAB FOR all)
add_importlib_target(kdcom.spec)
set_module_type(nmidebug kernelmodedriver)
add_importlibs(nmidebug ntoskrnl hal)
-add_minicd_target(nmidebug reactos)
-add_cab_target(nmidebug 2)
+add_cd_file(TARGET nmidebug DESTINATION reactos/system32/drivers NO_CAB FOR all)
set_module_type(null kernelmodedriver)
add_importlibs(null ntoskrnl hal)
-add_cab_target(null 2)
+add_cd_file(TARGET null DESTINATION reactos/system32/drivers FOR all)
set_module_type(battc kernelmodedriver)
add_importlibs(battc ntoskrnl hal)
-add_cab_target(battc 2)
+add_cd_file(TARGET battc DESTINATION reactos/system32/drivers FOR all)
add_importlib_target(battc.spec)
add_importlibs(acpi ntoskrnl hal)
-add_minicd_target(acpi reactos acpi.sys)
-add_livecd_target(acpi reactos/system32/drivers)
+add_cd_file(TARGET acpi DESTINATION reactos/system32/drivers NO_CAB FOR all)
add_subdirectory(cmbatt)
add_subdirectory(compbatt)
add_pch(cmbatt ${CMAKE_CURRENT_SOURCE_DIR}/cmbatt.h ${SOURCE})
-add_cab_target(cmbatt 2)
\ No newline at end of file
+add_cd_file(TARGET cmbatt DESTINATION reactos/system32/drivers FOR all)
\ No newline at end of file
add_pch(compbatt ${CMAKE_CURRENT_SOURCE_DIR}/compbatt.h ${SOURCE})
-add_cab_target(compbatt 2)
\ No newline at end of file
+add_cd_file(TARGET compbatt DESTINATION reactos/system32/drivers FOR all)
\ No newline at end of file
set_module_type(isapnp kernelmodedriver)
add_importlibs(isapnp ntoskrnl hal)
-add_minicd_target(isapnp reactos isapnp.sys)
-add_livecd_target(isapnp reactos/system32/drivers)
+add_cd_file(TARGET isapnp DESTINATION reactos/system32/drivers NO_CAB FOR all)
set_module_type(pci kernelmodedriver)
add_importlibs(pci ntoskrnl hal)
-add_minicd_target(pci reactos pci.sys)
-add_livecd_target(pci reactos/system32/drivers)
+add_cd_file(TARGET pci DESTINATION reactos/system32/drivers NO_CAB FOR all)
add_pch(pcix ${CMAKE_CURRENT_SOURCE_DIR}/pci.h ${SOURCE})
add_dependencies(pcix pciclass)
+
+add_cd_file(TARGET pcix DESTINATION reactos/system32/drivers NO_CAB FOR all)
set_module_type(pcmcia kernelmodedriver)
add_importlibs(pcmcia ntoskrnl hal)
-add_minicd_target(pcmcia reactos pcmcia.sys)
-add_livecd_target(pcmcia reactos/system32/drivers)
+add_cd_file(TARGET pcmcia DESTINATION reactos/system32/drivers NO_CAB FOR all)
set_module_type(dxapi kernelmodedriver)
add_importlibs(dxapi ntoskrnl hal videoprt)
-add_cab_target(dxapi 2)
\ No newline at end of file
+add_cd_file(TARGET dxapi DESTINATION reactos/system32/drivers FOR all)
\ No newline at end of file
set_module_type(dxg kernelmodedriver)
add_importlibs(dxg dxgthk ntoskrnl)
-add_cab_target(dxg 2)
\ No newline at end of file
+add_cd_file(TARGET dxg DESTINATION reactos/system32/drivers FOR all)
\ No newline at end of file
add_importlibs(dxgthk win32k)
add_importlib_target(dxgthk.spec)
-add_cab_target(dxgthk 2)
+add_cd_file(TARGET dxgthk DESTINATION reactos/system32/drivers FOR all)
add_pch(cdfs ${CMAKE_CURRENT_SOURCE_DIR}/cdfs.h ${SOURCE})
-add_minicd_target(cdfs reactos cdfs.sys)
-add_livecd_target(cdfs reactos/system32/drivers cdfs.sys)
+add_cd_file(TARGET cdfs DESTINATION reactos/system32/drivers NO_CAB FOR all)
set_module_type(ext2fs kernelmodedriver)
add_importlibs(ext2fs ntoskrnl hal)
-add_minicd_target(ext2fs reactos ext2.sys)
-add_livecd_target(ext2fs reactos/system32/drivers ext2.sys)
+add_cd_file(TARGET ext2fs DESTINATION reactos/system32/drivers NO_CAB FOR all)
add_pch(fastfat ${CMAKE_CURRENT_SOURCE_DIR}/vfat.h ${SOURCE})
-add_minicd_target(fastfat reactos fastfat.sys)
-add_livecd_target(fastfat reactos/system32/drivers)
+add_cd_file(TARGET fastfat DESTINATION reactos/system32/drivers NO_CAB FOR all)
set_module_type(fs_rec kernelmodedriver)
add_importlibs(fs_rec ntoskrnl hal)
-add_cab_target(fs_rec 2)
+add_cd_file(TARGET fs_rec DESTINATION reactos/system32/drivers FOR all)
add_pch(msfs ${CMAKE_CURRENT_SOURCE_DIR}/msfs.h ${SOURCE})
-add_cab_target(msfs 2)
+add_cd_file(TARGET msfs DESTINATION reactos/system32/drivers FOR all)
set_module_type(mup kernelmodedriver)
add_importlibs(mup ntoskrnl hal)
-add_cab_target(mup 2)
\ No newline at end of file
+add_cd_file(TARGET mup DESTINATION reactos/system32/drivers FOR all)
\ No newline at end of file
set_module_type(npfs kernelmodedriver)
add_importlibs(npfs ntoskrnl hal)
add_pch(npfs ${CMAKE_CURRENT_SOURCE_DIR}/npfs.h ${SOURCE})
-add_cab_target(npfs 2)
+add_cd_file(TARGET npfs DESTINATION reactos/system32/drivers FOR all)
add_pch(ntfs ${CMAKE_CURRENT_SOURCE_DIR}/ntfs.h ${SOURCE})
-add_minicd_target(ntfs reactos)
-add_livecd_target(ntfs reactos/system32/drivers)
+add_cd_file(TARGET ntfs DESTINATION reactos/system32/drivers NO_CAB FOR all)
set_module_type(i8042prt kernelmodedriver)
add_importlibs(i8042prt ntoskrnl hal)
-add_minicd_target(i8042prt reactos)
-add_livecd_target(i8042prt reactos/system32/drivers)
\ No newline at end of file
+add_cd_file(TARGET i8042prt DESTINATION reactos/system32/drivers NO_CAB FOR all)
\ No newline at end of file
add_importlibs(kbdclass ntoskrnl hal)
-add_minicd_target(kbdclass reactos kbdclass.sys)
-add_livecd_target(kbdclass reactos/system32/drivers)
\ No newline at end of file
+add_cd_file(TARGET kbdclass DESTINATION reactos/system32/drivers NO_CAB FOR all)
\ No newline at end of file
add_importlibs(mouclass ntoskrnl hal)
-add_cab_target(mouclass 2)
\ No newline at end of file
+add_cd_file(TARGET mouclass DESTINATION reactos/system32/drivers FOR all)
\ No newline at end of file
set_module_type(sermouse kernelmodedriver)
add_importlibs(sermouse ntoskrnl hal)
-add_cab_target(sermouse 2)
+add_cd_file(TARGET sermouse DESTINATION reactos/system32/drivers FOR all)
add_importlibs(ks ntoskrnl hal)
add_dependencies(ks psdk bugcodes)
-add_cab_target(ks 2)
+add_cd_file(TARGET ks DESTINATION reactos/system32/drivers FOR all)
add_importlib_target(ks.spec)
set_module_type(swenum kernelmodedriver)
add_importlibs(swenum ks ntoskrnl hal)
-add_minicd_target(swenum reactos)
-add_livecd_target(swenum reactos/system32/drivers)
+add_cd_file(TARGET swenum DESTINATION reactos/system32/drivers NO_CAB FOR all)
add_pch(afd ${CMAKE_CURRENT_SOURCE_DIR}/include/afd.h ${SOURCE})
-add_cab_target(afd 2)
+add_cd_file(TARGET afd DESTINATION reactos/system32/drivers FOR all)
set_module_type(ne2000 kernelmodedriver)
add_importlibs(ne2000 ndis ntoskrnl hal)
-add_cab_target(ne2000 2)
+add_cd_file(TARGET ne2000 DESTINATION reactos/system32/drivers FOR all)
set_module_type(pcnet kernelmodedriver)
add_importlibs(pcnet ndis ntoskrnl hal)
-add_cab_target(pcnet 2)
+add_cd_file(TARGET pcnet DESTINATION reactos/system32/drivers FOR all)
add_pch(ndis ${CMAKE_CURRENT_SOURCE_DIR}/include/ndissys.h ${SOURCE})
-add_cab_target(ndis 2)
+add_cd_file(TARGET ndis DESTINATION reactos/system32/drivers FOR all)
add_importlib_target(ndis.spec)
add_pch(tcpip ${CMAKE_CURRENT_SOURCE_DIR}/include/precomp.h ${SOURCE})
-add_cab_target(tcpip 2)
+add_cd_file(TARGET tcpip DESTINATION reactos/system32/drivers FOR all)
set_module_type(tdi kernelmodedriver)
add_importlibs(tdi ntoskrnl hal)
-add_cab_target(tdi 2)
+add_cd_file(TARGET tdi DESTINATION reactos/system32/drivers FOR all)
set_module_type(serenum kernelmodedriver)
add_importlibs(serenum ntoskrnl hal)
-add_cab_target(serenum 2)
+add_cd_file(TARGET serenum DESTINATION reactos/system32/drivers FOR all)
set_module_type(serial kernelmodedriver)
add_importlibs(serial ntoskrnl hal)
-add_cab_target(serial 2)
+add_cd_file(TARGET serial DESTINATION reactos/system32/drivers FOR all)
set_module_type(blue kernelmodedriver)
add_importlibs(blue ntoskrnl hal)
-add_minicd_target(blue reactos blue.sys)
-add_livecd_target(blue reactos/system32/drivers)
+add_cd_file(TARGET blue DESTINATION reactos/system32/drivers NO_CAB FOR all)
ntoskrnl
hal)
-add_minicd_target(cdrom reactos cdrom.sys)
-add_livecd_target(cdrom reactos/system32/drivers)
+add_cd_file(TARGET cdrom DESTINATION reactos/system32/drivers NO_CAB FOR all)
add_importlibs(class2 scsiport ntoskrnl hal)
add_importlib_target(class2.spec)
-add_minicd_target(class2 reactos class2.sys)
-add_livecd_target(class2 reactos/system32/drivers)
+add_cd_file(TARGET class2 DESTINATION reactos/system32/drivers NO_CAB FOR all)
ntoskrnl
hal)
-add_minicd_target(disk reactos disk.sys)
-add_livecd_target(disk reactos/system32/drivers)
+add_cd_file(TARGET disk DESTINATION reactos/system32/drivers NO_CAB FOR all)
ntoskrnl
hal)
-add_minicd_target(ramdisk reactos ramdisk.sys)
-add_livecd_target(ramdisk reactos/system32/drivers)
+add_cd_file(TARGET ramdisk DESTINATION reactos/system32/drivers NO_CAB FOR all)
set_module_type(classpnp kernelmodedriver)
add_importlibs(classpnp hal ntoskrnl)
-add_minicd_target(classpnp reactos classpnp.sys)
-add_livecd_target(classpnp reactos/system32/drivers)
+add_cd_file(TARGET classpnp DESTINATION reactos/system32/drivers NO_CAB FOR all)
set_module_type(floppy kernelmodedriver)
add_importlibs(floppy hal ntoskrnl)
-add_minicd_target(floppy reactos floppy.sys)
-add_livecd_target(floppy reactos/system32/drivers)
+add_cd_file(TARGET floppy DESTINATION reactos/system32/drivers NO_CAB FOR all)
set_module_type(atapi kernelmodedriver)
add_importlibs(atapi scsiport)
-add_minicd_target(atapi reactos atapi.sys)
-add_livecd_target(atapi reactos/system32/drivers)
+add_cd_file(TARGET atapi DESTINATION reactos/system32/drivers NO_CAB FOR all)
set_module_type(pciide kernelmodedriver)
add_importlibs(pciide pciidex ntoskrnl)
-add_cab_target(pciide 2)
+add_cd_file(TARGET pciide DESTINATION reactos/system32/drivers FOR all)
set_module_type(pciidex kernelmodedriver)
add_importlibs(pciidex ntoskrnl)
-add_cab_target(pciidex 2)
+add_cd_file(TARGET pciidex DESTINATION reactos/system32/drivers FOR all)
add_importlib_target(pciidex.spec)
set_module_type(uniata kernelmodedriver)
add_importlibs(uniata scsiport ntoskrnl hal)
-add_minicd_target(uniata reactos uniata.sys)
-add_livecd_target(uniata reactos/system32/drivers)
\ No newline at end of file
+add_cd_file(TARGET uniata DESTINATION reactos/system32/drivers NO_CAB FOR all)
\ No newline at end of file
set_module_type(buslogic kernelmodedriver)
add_importlibs(buslogic scsiport)
-add_minicd_target(buslogic reactos buslogic.sys)
-add_livecd_target(buslogic reactos/system32/drivers)
+add_cd_file(TARGET buslogic DESTINATION reactos/system32/drivers NO_CAB FOR all)
add_importlibs(scsiport ntoskrnl hal)
add_importlib_target(scsiport.spec)
-add_minicd_target(scsiport reactos scsiport.sys)
-add_livecd_target(scsiport reactos/system32/drivers)
+add_cd_file(TARGET scsiport DESTINATION reactos/system32/drivers NO_CAB FOR all)
add_pch(usbdriver ${CMAKE_CURRENT_SOURCE_DIR}/usbdriver.h ${SOURCE})
-add_cab_target(usbdriver 2)
+add_cd_file(TARGET usbdriver DESTINATION reactos/system32/drivers FOR all)
target_link_libraries(framebuf libcntpr)
add_importlibs(framebuf win32k)
add_dependencies(framebuf psdk bugcodes)
-add_cab_target(framebuf 1)
+add_cd_file(TARGET framebuf DESTINATION reactos/system32 FOR all)
add_importlibs(vgaddi win32k)
target_link_libraries(vgaddi libcntpr)
add_dependencies(vgaddi psdk bugcodes)
-add_cab_target(vgaddi 1)
\ No newline at end of file
+add_cd_file(TARGET vgaddi DESTINATION reactos/system32 FOR all)
\ No newline at end of file
add_importlibs(ftfd win32k)
add_dependencies(ftfd psdk)
-add_cab_target(ftfd 1)
+add_cd_file(TARGET ftfd DESTINATION reactos/system32 FOR all)
add_importlib_target(ftfd.spec)
target_link_libraries(vbemp libcntpr)
-add_cab_target(vbemp 2)
+add_cd_file(TARGET vbemp DESTINATION reactos/system32/drivers FOR all)
add_importlibs(vgamp videoprt)
add_pch(vgamp ${CMAKE_CURRENT_SOURCE_DIR}/vgamp.h ${SOURCE})
-add_cab_target(vgamp 2)
+add_cd_file(TARGET vgamp DESTINATION reactos/system32/drivers FOR all)
add_pch(vga ${CMAKE_CURRENT_SOURCE_DIR}/vga.h ${SOURCE})
-add_cab_target(vga 2)
+add_cd_file(TARGET vga DESTINATION reactos/system32/drivers FOR all)
add_importlibs(videoprt ntoskrnl hal)
add_pch(videoprt ${CMAKE_CURRENT_SOURCE_DIR}/videoprt.h ${SOURCE})
-add_cab_target(videoprt 2)
+add_cd_file(TARGET videoprt DESTINATION reactos/system32/drivers FOR all)
add_importlib_target(videoprt.spec)
add_importlibs(portcls ntoskrnl ks drmk hal)
-add_cab_target(portcls 2)
\ No newline at end of file
+add_cd_file(TARGET portcls DESTINATION reactos/system32/drivers FOR all)
\ No newline at end of file
add_importlibs(drmk ntoskrnl)
add_importlib_target(drmk.spec)
-add_cab_target(drmk 2)
+add_cd_file(TARGET drmk DESTINATION reactos/system32/drivers FOR all)
add_importlibs(kmixer ntoskrnl ks hal)
-add_cab_target(kmixer 2)
\ No newline at end of file
+add_cd_file(TARGET kmixer DESTINATION reactos/system32/drivers FOR all)
\ No newline at end of file
add_importlibs(wdmaud ntoskrnl ks hal)
-add_cab_target(wdmaud 2)
\ No newline at end of file
+add_cd_file(TARGET wdmaud DESTINATION reactos/system32/drivers FOR all)
\ No newline at end of file
add_importlibs(sysaudio ntoskrnl ks hal)
-add_cab_target(sysaudio 2)
\ No newline at end of file
+add_cd_file(TARGET sysaudio DESTINATION reactos/system32/drivers FOR all)
\ No newline at end of file
add_importlibs(wmilib ntoskrnl)
add_importlib_target(wmilib.spec)
-add_cab_target(wmilib 2)
+add_cd_file(TARGET wmilib DESTINATION reactos/system32/drivers FOR all)
"${WRC} -i <OBJECT> -o <OBJECT>"
"<CMAKE_RC_COMPILER> -i <OBJECT> -J res -O coff -o <OBJECT>")
-if(NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
- set(CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_AR> crs <TARGET> <LINK_FLAGS> <OBJECTS>")
-endif()
-
# Compiler Core
add_definitions(-pipe -fms-extensions)
macro(set_module_type MODULE TYPE)
- add_dependencies(${MODULE} psdk buildno_header)
+ add_dependencies(${MODULE} psdk)
if(${IS_CPP})
target_link_libraries(${MODULE} stlport -lsupc++ -lgcc)
endif()
add_importlibs(hal ntoskrnl)
target_link_libraries(hal libcntpr)
- add_minicd_target(hal reactos hal.dll)
- add_livecd_target(hal reactos/system32)
+ add_cd_file(TARGET hal DESTINATION reactos/system32 NO_CAB FOR all)
# mini_hal
add_library(mini_hal ${MINI_HAL_SOURCE})
#define __WINE_CONFIG_H
+#define HAVE_SPAWNVP 1
+
/* Define to 1 if you have the <float.h> header file. */
#define HAVE_FLOAT_H 1
PETHREAD Thread
);
+NTKERNELAPI
+PVOID
+NTAPI
+PsGetProcessWin32WindowStation(
+ PEPROCESS Process
+);
+
+NTKERNELAPI
+VOID
+NTAPI
+PsSetProcessWindowStation(
+ PEPROCESS Process,
+ PVOID WindowStation
+);
+
NTKERNELAPI
PTEB
NTAPI
IN PEPROCESS Process
);
+NTKERNELAPI
+NTSTATUS
+NTAPI
+PsGetProcessExitStatus(
+ PEPROCESS Process
+);
+
//
// Quota Functions
//
*
*/
-DEFINE_GUID(GUID_DEVCLASS_CDROM, 0x4D36E965, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_DISPLAY, 0x4D36E968, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_KEYBOARD, 0x4D36E96B, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_MEDIA, 0x4D36E96C, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_MOUSE, 0x4D36E96F, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_NET, 0x4D36E972, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_NETCLIENT, 0x4D36E973, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_NETSERVICE, 0x4D36E974, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_NETTRANS, 0x4D36E975, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_DISKDRIVE, 0x4D36E967, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_SOUND, 0x4d36e97C, 0xe325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_1394, 0x6BDD1FC1, 0x810F, 0x11D0, 0xBE, 0xC7, 0x08, 0x00, 0x2B, 0xE2, 0x09, 0x2F);
+DEFINE_GUID(GUID_DEVCLASS_ADAPTER, 0x4D36E964, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_APMSUPPORT, 0xD45B1C18, 0xC8FA, 0x11D1, 0x9F, 0x77, 0x00, 0x00, 0xF8, 0x05, 0xF5, 0x30);
+DEFINE_GUID(GUID_DEVCLASS_BATTERY, 0x72631E54, 0x78A4, 0x11D0, 0xBC, 0xF7, 0x00, 0xAA, 0x00, 0xB7, 0xB3, 0x2A);
+DEFINE_GUID(GUID_DEVCLASS_BLUETOOTH, 0xE0CBF06C, 0xCD8B, 0x4647, 0xBB, 0x8A, 0x26, 0x3B, 0x43, 0xF0, 0xF9, 0x74);
+DEFINE_GUID(GUID_DEVCLASS_CDROM, 0x4D36E965, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_COMPUTER, 0x4D36E966, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_DECODER, 0x6BDD1FC2, 0x810F, 0x11D0, 0xBE, 0xC7, 0x08, 0x00, 0x2B, 0xE2, 0x09, 0x2F);
+DEFINE_GUID(GUID_DEVCLASS_DISKDRIVE, 0x4D36E967, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_DISPLAY, 0x4D36E968, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_FDC, 0x4D36E969, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_FLOPPYDISK, 0x4D36E980, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_GPS, 0x6BDD1FC3, 0x810F, 0x11D0, 0xBE, 0xC7, 0x08, 0x00, 0x2B, 0xE2, 0x09, 0x2F);
+DEFINE_GUID(GUID_DEVCLASS_HDC, 0x4D36E96A, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_HIDCLASS, 0x745A17A0, 0x74D3, 0x11D0, 0xB6, 0xFE, 0x00, 0xA0, 0xC9, 0x0F, 0x57, 0xDA);
+DEFINE_GUID(GUID_DEVCLASS_IMAGE, 0x6BDD1FC6, 0x810F, 0x11D0, 0xBE, 0xC7, 0x08, 0x00, 0x2B, 0xE2, 0x09, 0x2F);
+DEFINE_GUID(GUID_DEVCLASS_INFRARED, 0x6BDD1FC5, 0x810F, 0x11D0, 0xBE, 0xC7, 0x08, 0x00, 0x2B, 0xE2, 0x09, 0x2F);
+DEFINE_GUID(GUID_DEVCLASS_KEYBOARD, 0x4D36E96B, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_LEGACYDRIVER, 0x8ECC055D, 0x047F, 0x11D1, 0xA5, 0x37, 0x00, 0x00, 0xF8, 0x75, 0x3E, 0xD1);
+DEFINE_GUID(GUID_DEVCLASS_MEDIA, 0x4D36E96C, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_MEDIUM_CHANGER, 0xCE5939AE, 0xEBDE, 0x11D0, 0xB1, 0x81, 0x00, 0x00, 0xF8, 0x75, 0x3E, 0xC4);
+DEFINE_GUID(GUID_DEVCLASS_MODEM, 0x4D36E96D, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_MONITOR, 0x4D36E96E, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_MOUSE, 0x4D36E96F, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_MTD, 0x4D36E970, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_MULTIFUNCTION, 0x4D36E971, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_MULTIPORTSERIAL, 0x50906CB8, 0xBA12, 0x11D1, 0xBF, 0x5D, 0x00, 0x00, 0xF8, 0x05, 0xF5, 0x30);
+DEFINE_GUID(GUID_DEVCLASS_NET, 0x4D36E972, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_NETCLIENT, 0x4D36E973, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_NETSERVICE, 0x4D36E974, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_NETTRANS, 0x4D36E975, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_NODRIVER, 0x4D36E976, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_PCMCIA, 0x4D36E977, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_PORTS, 0x4D36E978, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_PRINTER, 0x4D36E979, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_PRINTERUPGRADE, 0x4D36E97A, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_PROCESSOR, 0x50127DC3, 0x0F36, 0x415E, 0xA6, 0xCC, 0x4C, 0xB3, 0xBE, 0x91, 0x0B, 0x65);
+DEFINE_GUID(GUID_DEVCLASS_SCSIADAPTER, 0x4D36E97B, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_SMARTCARDREADER, 0x50DD5230, 0xBA8A, 0x11D1, 0xBF, 0x5D, 0x00, 0x00, 0xF8, 0x05, 0xF5, 0x30);
+DEFINE_GUID(GUID_DEVCLASS_SOUND, 0x4D36E97C, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_SYSTEM, 0x4D36E97D, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_TAPEDRIVE, 0x6D807884, 0x7D21, 0x11CF, 0x80, 0x1C, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_UNKNOWN, 0x4D36E97E, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_USB, 0x36FC9E60, 0xC465, 0x11CF, 0x80, 0x56, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
+DEFINE_GUID(GUID_DEVCLASS_VOLUME, 0x71A27CDD, 0x812A, 0x11D0, 0xBE, 0xC7, 0x08, 0x00, 0x2B, 0xE2, 0x09, 0x2F);
+;
+; netevent.mc MESSAGE resources for netevent.dll
+;
+
MessageIdTypedef=DWORD
SeverityNames=(Success=0x0:STATUS_SEVERITY_SUCCESS
LanguageNames=(English=0x409:MSG00409)
+
+;
+; message definitions
+;
+
+; Facility=System
+
+; Eventlog messages 6xxx-
+
MessageId=6005
Severity=Warning
Facility=System
MessageId=6009
Severity=Warning
Facility=System
-SymbolicName=EVENT_EventlogProductInfo
+SymbolicName=EVENT_EventLogProductInfo
Language=English
ReactOS %1 %2 %3 %4.
.
+; transport messages
+
MessageId=9004
Severity=Error
Facility=System
ULONG SourceLine;
} ROSSYM_ENTRY, *PROSSYM_ENTRY;
+enum _ROSSYM_REGNAME {
+ ROSSYM_X86_EAX = 0,
+ ROSSYM_X86_ECX,
+ ROSSYM_X86_EDX,
+ ROSSYM_X86_EBX,
+ ROSSYM_X86_ESP,
+ ROSSYM_X86_EBP,
+ ROSSYM_X86_ESI,
+ ROSSYM_X86_EDI,
+
+ ROSSYM_X64_RAX = 0,
+ ROSSYM_X64_RDX,
+ ROSSYM_X64_RCX,
+ ROSSYM_X64_RBX,
+ ROSSYM_X64_RSI,
+ ROSSYM_X64_RDI,
+ ROSSYM_X64_RBP,
+ ROSSYM_X64_RSP,
+ Rossym_X64_R8,
+ ROSSYM_X64_R9,
+ ROSSYM_X64_R10,
+ ROSSYM_X64_R11,
+ ROSSYM_X64_R12,
+ ROSSYM_X64_R13,
+ ROSSYM_X64_R14,
+ ROSSYM_X64_R15
+};
+
+typedef struct _ROSSYM_REGISTERS {
+ ULONGLONG Registers[32];
+} ROSSYM_REGISTERS, *PROSSYM_REGISTERS;
+
+typedef struct _ROSSYM_PARAMETER {
+ ULONGLONG Value;
+ char *ValueName;
+} ROSSYM_PARAMETER, *PROSSYM_PARAMETER;
+
+typedef enum _ROSSYM_LINEINFO_FLAGS {
+ ROSSYM_LINEINFO_HAS_REGISTERS = 1
+} ROSSYM_LINEINFO_FLAGS;
+
+typedef enum _ROSSYM_LINEINFO_TYPE {
+ ROSSYM_LINEINFO_UNKNOWN,
+ ROSSYM_LINEINFO_NARROW_STRING,
+ ROSSYM_LINEINFO_WIDE_STRING,
+ ROSSYM_LINEINFO_ANSI_STRING,
+ ROSSYM_LINEINFO_UNICODE_STRING,
+ ROSSYM_LINEINFO_HANDLE
+} ROSSYM_LINEINFO_STRINGTYPE;
+
+typedef struct _ROSSYM_LINEINFO {
+ ROSSYM_LINEINFO_FLAGS Flags;
+ ULONG LineNumber;
+ char *FileName;
+ char *FunctionName;
+ ROSSYM_REGISTERS Registers;
+ ULONG NumParams;
+ ROSSYM_PARAMETER Parameters[16];
+} ROSSYM_LINEINFO, *PROSSYM_LINEINFO;
+
typedef struct _ROSSYM_CALLBACKS {
PVOID (*AllocMemProc)(ULONG_PTR Size);
VOID (*FreeMemProc)(PVOID Area);
BOOLEAN (*ReadFileProc)(PVOID FileContext, PVOID Buffer, ULONG Size);
BOOLEAN (*SeekFileProc)(PVOID FileContext, ULONG_PTR Position);
+ BOOLEAN (*MemGetProc)(PVOID FileContext, ULONG_PTR *Target, PVOID SourceMem, ULONG Size);
} ROSSYM_CALLBACKS, *PROSSYM_CALLBACKS;
-typedef struct _ROSSYM_OWN_FILECONTEXT {
- BOOLEAN (*ReadFileProc)(PVOID FileContext, PVOID Buffer, ULONG Size);
- BOOLEAN (*SeekFileProc)(PVOID FileContext, ULONG_PTR Position);
-} ROSSYM_OWN_FILECONTEXT, *PROSSYM_OWN_FILECONTEXT;
-
struct Dwarf;
typedef struct Dwarf *PROSSYM_INFO;
VOID RosSymInit(PROSSYM_CALLBACKS Callbacks);
-VOID RosSymInitKernelMode(VOID);
VOID RosSymInitUserMode(VOID);
-BOOLEAN RosSymCreateFromMem(PVOID ImageStart, ULONG_PTR ImageSize,
- PROSSYM_INFO *RosSymInfo);
BOOLEAN RosSymCreateFromFile(PVOID FileContext, PROSSYM_INFO *RosSymInfo);
-BOOLEAN RosSymGetAddressInformation(PROSSYM_INFO RosSymInfo,
- ULONG_PTR RelativeAddress,
- ULONG *LineNumber,
- char *FileName,
- char *FunctionName);
+BOOLEAN RosSymGetAddressInformation
+(PROSSYM_INFO RosSymInfo,
+ ULONG_PTR RelativeAddress,
+ PROSSYM_LINEINFO RosSymLineInfo);
+VOID RosSymFreeInfo(PROSSYM_LINEINFO RosSymLineInfo);
VOID RosSymDelete(PROSSYM_INFO RosSymInfo);
#endif /* REACTOS_ROSSYM_H_INCLUDED */
//
// Definitions used by WM_LOGONNOTIFY
//
+#define LN_SHELL_EXITED 0x2
#define LN_START_TASK_MANAGER 0x4
#define LN_LOCK_WORKSTATION 0x5
#define LN_UNLOCK_WORKSTATION 0x6
HWND hProgmanWindow;
HWND hShellWindow;
+ PPROCESSINFO ppiShellProcess;
+
union
{
UINT Dummy;
-2010-02-13 Werner Lemberg <wl@gnu.org>
+2010-11-28 Werner Lemberg <wl@gnu.org>
- * Version 2.3.12 released.
- ==========================
+ * Version 2.4.4 released.
+ =========================
- Tag sources with `VER-2-3-12'.
+ Tag sources with `VER-2-4-4'.
* docs/CHANGES: Updated.
* docs/VERSION.DLL: Update documentation and bump version number to
- 2.3.12.
+ 2.4.4
* README, Jamfile (RefDoc),
builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
- builds/wince/vc2008-ce/index.html: s/2.3.11/2.3.12/, s/2311/2312/.
-
- * include/freetype/freetype.h (FREETYPE_PATCH): Set to 12.
-
- * builds/unix/configure.raw (version_info): Set to 10:0:4.
-
-2010-02-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Improve autotool version checking to work with beta releases.
-
- * autogen.sh (check_tool_version): Improve the extraction of version
- number from "tool --version" output. Some beta releases of
- autotools have extra strings before version number.
-
-2010-02-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Fix overallocating bug in FT_Outline_New_Internal().
-
- * src/base/ftoutln.c (FT_Outline_New_Internal): The length of
- FT_Outline->points[] should be numPoints, not 2 * numPoints.
- Found by Paul Messmer, see
- http://lists.gnu.org/archive/html/freetype-devel/2010-02/msg00003.html
-
-2010-02-10 Ken Sharp <ken.sharp@artifex.com>
-
- Really fix Savannah bug #28678 (part 2).
-
- Since we consider `sbw' for the horizontal direction only, we still have
- to synthesize vertical metrics if the user wants to use the vertical
- writing direction.
-
- * src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c
- (cid_slot_load_glyph), src/type1/t1gload.c (T1_Load_Glyph):
- Synthesize vertical metrics (only) if FT_LOAD_VERTICAL_LAYOUT is
- set.
-
-2010-02-10 Ken Sharp <ken.sharp@artifex.com>
-
- Really fix Savannah bug #28678 (part 1).
-
- After long discussion, we now consider the character width vector
- (wx,wy) returned by the `sbw' Type 1 operator as being part of *one*
- direction only. For example, if you are using the horizontal
- writing direction, you get the horizontal and vertical components of
- the advance width for this direction. Note that OpenType and CFF fonts
- don't have such a vertical component; instead, the GPOS table can be
- used to generate two-dimensional advance widths (but this isn't
- handled by FreeType).
-
- * include/freetype/ftincrem.h (FT_Incremental_MetricsRec): Add
- `advance_v' field to hold the vertical component of the advance
- value.
-
- * src/truetype/ttgload.c (tt_get_metrics), src/cff/cffgload.c
- (cff_slot_load), src/type1/t1gload.c
- (T1_Parse_Glyph_And_Get_Char_String), src/cid/cidgload.c
- (cid_load_glyph): Use it.
-
-2010-02-08 Werner Lemberg <wl@gnu.org>
-
- * devel/ftoption.h [FT_CONFIG_OPTION_PIC]: Define.
-
-2010-02-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Prevent NULL pointer dereference passed to FT_Module_Requester.
-
- * src/sfnt/sfdriver.c (sfnt_get_interface): Don't use `module'.
- * src/psnames/psmodule.c (psnames_get_interface): Ditto.
-
- * src/cff/cffdrivr.c (cff_get_interface): Check NULL `driver'.
- * src/truetype/ttdriver.c (tt_get_interface): Ditto.
-
-2010-01-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Fix memory leaks in previous patch.
-
- * src/sfnt/sfobjs.c (sfnt_load_face): Don't overwrite the strings
- allocated for face->root.family_name and style_name.
-
-2010-01-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- New parameters for FT_Open_Face() to ignore preferred family names.
-
- Preferred family names should be used for legacy systems that
- can hold only a few faces (<= 4) for a family name. Suggested by
- Andreas Heinrich.
- http://lists.gnu.org/archive/html/freetype/2010-01/msg00001.html
-
- * include/freetype/ftsnames.h (FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY,
- FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY): Define.
-
- * src/sfnt/sfobjs.h (sfnt_load_face): Check the arguments and
- ignore preferred family and subfamily names if requested.
+ builds/wince/vc2008-ce/index.html: s/2.4.3/2.4.4/, s/243/244/.
-2010-01-27 Ken Sharp <ken.sharp@artifex.com>
-
- Fix Savannah bug #28678.
-
- * src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c
- (cid_load_glyph): Handle vertical metrics correctly.
-
- * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Handle
- vertical metrics correctly.
- (T1_Load_Glyph): Don't synthesize vertical metrics.
-
-2010-01-14 Werner Lemberg <wl@gnu.org>
-
- Make FT_Set_Transform work if no renderer is available.
-
- * src/base/ftobjs.c (FT_Load_Glyph): Apply `standard' transformation
- if no renderer is compiled into the library.
-
-2010-01-14 Werner Lemberg <wl@gnu.org>
-
- Fix compilation warning.
-
- * src/base/ftbase.h: s/LOCAL_DEF/LOCAL/.
- * src/base/ftobjc.s: Include ftbase.h conditionally.
-
-2010-01-11 Kwang Yul Seo <skyul@company100.net>
-
- Provide inline assembly code for RVCT compiler.
- This is Savannah patch #7059.
-
- * include/freetype/config/ftconfig.h (FT_MULFIX_ASSEMBLER,
- FT_MulFix_arm) [__CC_ARM || __ARM_CC]: Define.
-
-2010-01-08 Ken Sharp <ken.sharp@artifex.com>
-
- Fix Savannah bug #28521.
-
- Issue #28226 involved a work-around for a font which used the
- `setcurrentpoint' operator in an invalid way; this operator is only
- supposed to be used with the result of OtherSubrs, and the font used
- it directly. The supplied patch removed the block of code which
- checked this usage entirely.
-
- This turns out to be a Bad Thing. If `setcurrentpoint' is being
- used correctly it should reset the flex flag in the decoder. If we
- don't do this then the flag never gets reset and we omit any further
- contours from the glyph (at least until we close the path or
- similar).
-
- * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
- <op_setcurrentpoint>: Handle `flex_state' correctly.
-
-2010-01-05 Werner Lemberg <wl@gnu.org>
-
- Apply reports from clang static analyzer.
-
- * src/lzw/ftlzw.c (ft_lzw_file_init), src/base/ftstroke.c
- (FT_Stroker_ParseOutline), src/base/ftsynth.c
- (FT_GlyphSlot_Embolden): Remove dead code.
-
- * src/base/ftpatent.c (_tt_check_patents_in_table): Initialize
- `offset_i' and `length_i'.
-
-2010-01-05 Ralph Giles <giles@ghostscript.com>
-
- Enable the incremental font interface by default.
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
- Ghostscript requires the incremental font interface for handling
- some Postscript documents. It is moving to using FreeType as its
- primary renderer; supporting this in the default build makes it
- Ghostscript to be linked against the system FreeType when one is
- available.
+ * builds/unix/configure.raw (version_info): Set to 12:2:6.
- * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_INCREMENTAL):
- Uncomment.
+2010-11-28 Alexei Podtelezhnikov <apodtele@gmail.com>
-2010-01-05 Werner Lemberg <wl@gnu.org>
+ [ftsmooth]: Minor code simplification.
- Fix Savannah bug #28395.
+ * src/smooth/ftgrays (gray_render_cubic): Do only one comparison
+ instead of two.
- * src/truetype/ttdriver.c (Load_Glyph), src/type1/t1gload.c
- (T1_Loada_Glyph): Don't check `num_glyphs' if incremental interface
- is used.
+2010-11-26 Johnson Y. Yan <yinsen_yan@foxitsoftware.com>
-2010-01-05 Ken Sharp <ken.sharp@artifex.com>
+ [truetype] Better multi-threading support.
- Make Type 1 `seac' operator work with incremental interface.
- This fixes Savannah bug #28480.
+ * src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone
+ references.
- * src/psaux/t1decode.c (t1operator_seac): Don't check `glyph_names'
- if incremental interface is used.
+2010-11-23 John Tytgat <John.Tytgat@esko.com>
-2010-01-04 Ken Sharp <ken.sharp@artifex.com>
+ * src/psaux/t1decode.c (t1_decoder_parse_charstring): Expand
+ start_point, check_points, add_point, add_point1, close_contour
+ macros.
+ Remove add_contour macro.
+ Return error code from t1_builder_start_point and
+ t1_builder_check_points when there was one (instead of returning 0).
- Make incremental interface work with TrueType fonts.
- This fixes Savannah bug #28478.
+2010-11-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/truetype/ttgload.c (load_truetype_glyph): Don't check
- `glyf_offset' if incremental interface is used.
+ [truetype] Identify the tricky fonts by cvt/fpgm/prep checksums.
+ Some Latin TrueType fonts are still expected to be unhinted.
+ Fix Savannah bug #31645.
-2009-12-31 Lars Abrahamsson <wonko@opera.com>
+ * src/truetype/ttobjs.c (tt_check_trickyness): Divided to...
+ (tt_check_trickyness_family): this checking family name, and
+ (tt_check_trickyness_sfnt_ids): this checking cvt/fpgm/prep.
+ (tt_get_sfnt_checksum): Function to retrieve the sfnt checksum
+ for specified subtable even if cleared by lazy PDF generators.
+ (tt_synth_sfnt_checksum): Function to calculate the checksum.
- Make compilation with FT_CONFIG_OPTION_PIC work again.
+2010-11-18 Werner Lemberg <wl@gnu.org>
- * src/base/ftglyph.c (FT_Glyph_To_Bitmap) [FT_CONFIG_OPTION_PIC]:
- Declare `library' for FT_BITMAP_GLYPH_CLASS_GET.
+ [truetype] Fix `loca' handling for inconsistent number of glyphs.
+ Reported by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>.
- * src/base/ftinit.c (ft_destroy_default_module_classes,
- ft_create_default_module_classes): Use proper casts (needed for C++
- compilation).
+ * src/truetype/ttpload.c (tt_face_load_loca): While sanitizing,
+ handle case where `loca' is the last table in the font.
- * src/sfnt/ttcmap.c (tt_cmap13_class_rec): Use FT_DEFINE_TT_CMAP.
+2010-11-18 Werner Lemberg <wl@gnu.org>
-2009-12-22 Marc Kleine-Budde <mkl@pengutronix.de>
+ [sfnt] Ignore all errors while loading `OS/2' table.
+ Suggested by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>.
- Make freetype-config aware of $SYSROOT.
- This is Savannah patch #7040.
+ * src/sfnt/sfobjs.c (sfnt_load_face): Do it.
- * builds/unix/freetype-config.in: Decorate with ${SYSROOT} where
- appropriate.
+2010-11-18 Johnson Y. Yan <yinsen_yan@foxitsoftware.com>
-2009-12-20 Werner Lemberg <wl@gnu.org>
+ [type1] Fix matrix normalization.
- Fix compiler warning.
- Reported by Sean.
+ * src/type1/t1load.c (parse_font_matrix): Handle sign of scaling
+ factor.
- * src/base/ftdbgmem.c [!FT_DEBUG_MEMORY]: ANSI C doesn't like empty
- source files; however, some compilers warn about an unused variable
- declaration. This is now replaced with a typedef.
+2010-11-18 Werner Lemberg <wl@gnu.org>
-2009-12-18 Werner Lemberg <wl@gnu.org>
+ [type1] Improve guard against malformed data.
+ Based on a patch submitted by Johnson Y. Yan
+ <yinsen_yan@foxitsoftware.com>
- Fix Savannah bug #28320.
+ * src/type1/t1load.c (read_binary_data): Check `size'.
- There exist corrupt, subsetted fonts (embedded in PDF files) which
- contain a private dict that ends with an unterminated floating point
- number (no operator following). We now ignore this error (as
- acrobat does).
+2010-11-17 Werner Lemberg <wl@gnu.org>
- * src/cff/cffparse.c (cff_parser_run): Don't emit a syntax error for
- unterminated floating point numbers.
+ [sfnt] While tracing, output table checksums also.
-2009-12-16 Werner Lemberg <wl@gnu.org>
+ * src/sfnt/ttload.c (tt_face_load_font_dir): Do it.
- Really fix compiler warnings.
- Reported by Sean.
+2010-11-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/truetype/ttgxvar.c (GX_PT_POINTS_ARE_WORDS,
- GX_PT_POINT_RUN_COUNT_MASK): Convert enum values to macros.
+ [UVS] Fix find_variant_selector_charmap(), Savannah bug #31545.
-2009-12-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Since 2010-07-04, find_variant_selector_charmap() returns
+ the first cmap subtable always under rogue-compatible
+ configuration, it causes NULL pointer dereference and
+ make UVS-related functions crashed.
- Improve configure.raw to copy some options from CFLAGS to LDFLAGS.
- The linker of Mac OS X 10.6 is sensitive to the architecture. If
- the architectures are specified explicitly for the C compiler, the
- linker requires the architecture specifications too.
+ * src/base/ftobjs.c (Fix find_variant_selector_charmap):
+ Returns UVS cmap correctly.
- * builds/unix/configure.raw: Replace `-isysroot' option parser by
- more generic argument parser.
+2010-11-01 Alexei Podtelezhnikov <apodtele@gmail.com>
-2009-12-15 Werner Lemberg <wl@gnu.org>
+ [ftsmooth] Improve rendering.
- Fix compiler warnings.
- Reported by Sean.
+ * src/smooth/ftsmooth.c (gray_render_conic): Since version 2.4.3,
+ cubic deviations have been estimated _after_ UPSCALE, whereas
+ conic ones have been evaluated _before_ UPSCALE, which produces
+ inferior rendering results. Fix this.
+ Partially undo change from 2010-10-15 by using ONE_PIXEL/4; this has
+ been tested with demo images sent to the mailing list. See
- * src/truetype/ttgxvar.c (ft_var_readpackeddeltas): Fix counter data
- type.
+ http://lists.gnu.org/archive/html/freetype-devel/2010-10/msg00055.html
-2009-12-14 Ken Sharp <ken.sharp@artifex.com>
+ and later mails in this thread.
- Ignore invalid `setcurrentpoint' operations in Type 1 fonts.
- This fixes Savannah bug #28226.
+2010-10-28 Werner Lemberg <wl@gnu.org>
- At least two wild PostScript files of unknown provenance contain
- Type 1 fonts, apparently converted from TrueType fonts in earlier
- PDF versions of the files, which use the `setcurrentpoint' operator
- inappropriately.
+ [ftraster] Minor fixes.
- FreeType currently throws an error in this case, but Ghostscript and
- Adobe Distiller both accept the fonts and ignore the problem. This
- commit #ifdefs out the check so PostScript interpreters using
- FreeType can render these files.
+ Reported by Tom Bishop <wenlin@wenlin.com>.
- The specification says `setcurrentpoint' should only be used to set
- the point after a `Subr' call, but these fonts use it to set the
- initial point to (0,0). Unnecessarily so, as they correctly use an
- `hsbw' operation which implicitly sets the initial point.
+ * src/raster/ftraster.c (ULong): Remove unused typedef.
+ (TWorker): Remove unused variable `precision_mask'.
- * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
- <op_setcurrentpoint>: Comment out code.
+2010-10-28 Werner Lemberg <wl@gnu.org>
-2009-12-14 Bram Tassyns <bramt@enfocus.be>
+ [ftraster] Fix rendering.
- Fix parsing of /CIDFontVersion.
- This fixes Savannah bug #28287.
+ Problem reported by Tom Bishop <wenlin@wenlin.com>; see
+ thread starting with
- * src/cid/cidtoken.h: `cid_version' in CID_FaceInfoRec (in
- t1tables.h) is of type FT_Fixed.
+ http://lists.gnu.org/archive/html/freetype/2010-10/msg00049.html
-2009-12-14 Werner Lemberg <wl@gnu.org>
+ * src/raster/ftraster.c (Line_Up): Replace FMulDiv with SMulDiv
+ since the involved multiplication exceeds 32 bits.
- Trace glyph index in CID module.
- Suggested in Savannah patch #7023.
+2010-10-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/cid/cidgload.c (cid_load_glyph): Add tracing message.
+ Revert a change of `_idx' type in FTC_CACHE_LOOKUP_CMP().
-2009-12-03 Werner Lemberg <wl@gnu.org>
+ * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Revert
+ the type of `_idx' from FT_PtrDist (by previous change)
+ to original FT_UFast, to match with FT_CacheRec.
- Fix compiler warnings.
+2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/truetype/ttgload.c (tt_get_metrics): Put `Exit' label into the
- proper preprocessor conditional.
- * src/pfr/pfrobjs.c (pfr_slot_load): Pacify gcc.
+ [cache] Change the hash types to FT_PtrDist.
-2009-11-25 John Tytgat <John.Tytgat@esko.com>
+ On LLP64 platforms (e.g. Win64), FT_ULong (32-bit)
+ variables are inappropriate to calculate hash values
+ from the memory address (64-bit). The hash variables
+ are extended from FT_ULong to FT_PtrDist and new
+ hashing macro functions are introduced. The hash
+ values on 16-bit memory platforms are changed, but
+ ILP32 and LP64 are not changed. The hash value in
+ the cache subsystem is not reverted to the memory
+ address, so using signed type FT_PtrDist is safe.
- Better handling of start of `eexec' section.
- This fixes Savannah bug #28090.
+ * src/cache/ftccache.h (_FTC_FACE_ID_HASH): New hash
+ function to replace FTC_FACE_ID_HASH() for portability.
+ * src/cache/ftcmanag.h (FTC_SCALER_HASH): Replace
+ FTC_FACE_ID_HASH() by _FTC_FACE_ID_HASH().
+ * src/cache/ftccmap.c (FTC_CMAP_HASH): Ditto.
- * src/type1/t1parse.c (T1_Get_Private_Dict): Skip all whitespace
- characters before start of `eexec' section.
+ * src/cache/ftccache.h (FTC_NodeRec): The type of the
+ member `hash' is changed from FT_UInt32 to FT_PtrDist.
-2009-11-20 Werner Lemberg <wl@gnu.org>
+ * src/cache/ftccache.h (FTC_Cache_Lookup): The type of the
+ argument `hash' is changed from FT_UInt32 to FT_PtrDist.
+ (FTC_Cache_NewNode): Ditto.
+ * src/cache/ftccache.c (ftc_cache_add): Ditto.
+ (FTC_Cache_Lookup): Ditto. (FTC_Cache_NewNode): Ditto.
+ * src/cache/ftcglyph.h (FTC_GCache_Lookup): Ditto.
+ * src/cache/ftcglyph.c (FTC_GCache_Lookup): Ditto.
- Fix Savannah bug #27742.
+ * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): The type
+ of the internal variable `hash' is changed to FT_PtrDist
+ from FT_UInt32. (FTC_ImageCache_LookupScaler): Ditto.
+ (FTC_SBitCache_Lookup): Ditto.
+ (FTC_SBitCache_LookupScaler): Ditto.
+ * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Ditto.
+ * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Ditto.
+ Also the type of the internal variable `_idx' is changed to
+ FT_PtrDist from FT_UFast for better pointer calculation.
+
+2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/base/ftstroke.c (ft_stroker_outside): Avoid silent division by
- zero, using a threshold for `theta'.
+ [cache] Hide internal macros incompatible with LLP64.
-2009-11-20 Werner Lemberg <wl@gnu.org>
+ FT_POINTER_TO_ULONG(), FTC_FACE_ID_HASH() and
+ FTC_IMAGE_TYPE_HASH() are enclosed by
+ FT_CONFIG_OPTION_OLD_INTERNALS and hidden from
+ normal clients.
- Fix Savannah bug #28036.
+ For the history of these macros, see the investigation:
+ http://lists.gnu.org/archive/html/freetype/2010-10/msg00022.html
- * src/type1/t1afm.c (t1_get_index): Fix comparison.
+2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-2009-11-16 Werner Lemberg <wl@gnu.org>
+ Change the type of FT_MEM_VAL() from FT_ULong to FT_PtrDist.
- Fix compiler warnings.
- Reported by Kevin Blenkinsopp <arqon@promode.org>.
+ On LLP64 platforms (e.g. Win64), unsigned long (32-bit)
+ cannot cover the memory address (64-bit). FT_MEM_VAL() is
+ used for hashing only and not dereferred, so using signed
+ type FT_PtrDist is safe.
- * src/sfnt/ttload.c (check_table_dir): Use proper data type.
+ * src/base/ftdbgmem.c (FT_MEM_VAL): Change the type of the
+ return value from FT_ULong to FT_PtrDist.
+ (ft_mem_table_resize): The type of hash is changed to
+ FT_PtrDist. (ft_mem_table_get_nodep): Ditto.
-2009-11-15 Werner Lemberg <wl@gnu.org>
+2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- Really fix FreeDesktop bug #21197.
- This also fixes Savannah bug #28021.
+ Replace "%lx" for memory address by "%p", LLP64 platforms.
- * src/autofit/aflatin.c (af_latin_metrics_check_digits),
- src/autofit/aflatin2.c (af_latin2_metrics_check_digits): Fix loop.
+ On LLP64 platforms (e.g. Win64), long (32-bit) cannot cover
+ the memory address (64-bit). Also the casts from the pointer
+ type to long int should be removed to preserve the address
+ correctly.
-2009-11-15 Werner Lemberg <wl@gnu.org>
+ * src/raster/ftraster.c (New_Profile): Replace "%lx" by "%p".
+ (End_Profile) Ditto.
+ * src/truetype/ttinterp.c (Init_Context): Ditto.
- Add tracing messages for advance values.
+2010-10-15 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/base/ftobjs.c (FT_Load_Glyph), src/truetype/ttgload.c
- (TT_Get_HMetrics, TT_Get_VMetrics): Do it.
+ Fix thinko in spline flattening.
-2009-11-08 Werner Lemberg <wl@gnu.org>
+ FT_MAX_CURVE_DEVIATION is dependent on the value of ONE_PIXEL.
- Fix compiler warning.
- Reported by Jeremy Manson <jeremy.manson@gmail.com>.
+ * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): Remove it and
+ replace it everywhere with ONE_PIXEL/8.
- * src/truetype/ttgload.c (load_truetype_glyph): Initialize `error'.
+2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-2009-11-04 Werner Lemberg <wl@gnu.org>
+ [raccess] Skip unrequired resource access rules by Darwin VFS.
- Remove compiler warning.
- Reported by Sean McBride <sean@rogue-research.com>.
+ When a resource fork access rule by Darwin VFS could open the
+ resource fork but no font is found in it, the rest of rules
+ by Darwin VFS are skipped. It reduces the warnings of the
+ deprecated resource fork access method by recent Darwin kernel.
+ Fix MacPorts ticket #18859:
+ http://trac.macports.org/ticket/18859
- * src/tools/apinames.c (read_header_file)<STATE_TYPE>: Use a cast to
- `int', as specified in the printf(3) man page.
+ * src/base/ftobjs.c (load_face_in_embedded_rfork):
+ When FT_Stream_New() returns FT_Err_Cannot_Open_Stream, it
+ means that the file is possible to be fopen()-ed but zero-sized.
+ Also there is a case that the resource fork is not zero-sized,
+ but no supported font exists in it. If a rule by Darwin VFS
+ falls into such cases, there is no need to try other Darwin VFS
+ rules anymore. Such cases are marked by vfs_rfork_has_no_font.
+ If it is TRUE, the Darwin VFS rules are skipped.
-2009-11-04 Werner Lemberg <wl@gnu.org>
+2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- Fix Savannah bug #27921.
+ [raccess] Grouping resource access rules based on Darwin VFS.
- * src/cff/cffobjs.c (cff_face_init), src/cid/cidobjs.c
- (cid_face_init), src/type1/t1afm.c (T1_Read_Metrics),
- src/type1/t1objs.c (T1_Face_Init): Don't use unsigned constant
- values for rounding if the argument can be negative.
+ MacOS X/Darwin kernel supports a few tricky methods to access
+ a resource fork via ANSI C or POSIX interface. Current resource
+ fork accessor tries all possible methods to support all kernels.
+ But if a method could open a resource fork but no font is found,
+ there is no need to try other methods older than tested method.
+ To determine whether the rule index is for Darwin VFS, a local
+ function ftrfork.c::raccess_rule_by_darwin_vfs() is introduced.
+ To use this function in ftobjs.c etc but it should be inlined,
+ it is exposed by ftbase.h.
-2009-11-03 Bram Tassyns <bramt@enfocus.be>
+ * src/base/ftrfork.c (FT_RFork_Rule): New enum type to identify
+ the rules to access the resource fork.
+ (raccess_guess_rec): New structure to bind the rule function and
+ rule enum type.
+ (FT_Raccess_Guess): The list of the rule functions is replaced by
+ (raccess_guess_table): This. This is exposed to be used by other
+ intra module functions.
+ (raccess_rule_by_darwin_vfs): A function to return a boolean
+ if the rule specified by the rule index is based on Darwin VFS.
- Add basic support for Type1 charstrings in CFF.
- This fixes Savannah bug #27922.
+2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/cff/cffgload.c (CFF_Operator, cff_argument_counts): Handle
- `seac', `sbw', and `setcurrentpoint' opcodes.
- (cff_compute_bias): Add parameter to indicate the charstring type.
- Update all callers.
- (cff_operator_seac): Add parameter for side bearing.
- (cff_decoder_parse_charstrings): Updated for more Type1 support.
+ Prevent to open a FT_Stream for zero-sized file on non-Unix.
-2009-11-03 Werner Lemberg <wl@gnu.org>
+ builds/unix/ftsystem.c prevents to open an useless stream from
+ zero-sized file and returns FT_Err_Cannot_Open_Stream, but the
+ stream drivers for ANSI C, Amiga and VMS return useless streams.
+ For cross-platform consistency, all stream drivers should act
+ same.
- Return correct `linearHoriAdvance' value for embedded TT bitmaps too.
- Reported by Jeremy Manson <jeremy.manson@gmail.com>.
+ * src/base/ftsystem.c (FT_Stream_Open): If the size of the opened
+ file is zero, FT_Err_Cannot_Open_Stream is returned.
+ * builds/amiga/src/base/ftsystem.c (FT_Stream_Open): Ditto.
+ * src/vms/ftsystem.c (FT_Stream_Open): Ditto.
- src/truetype/ttgload.c (load_truetype_glyph): Add parameter to
- quickly load the glyph header only.
- Update all callers.
- (tt_loader_init): Add parameter to quickly load the `glyf' table
- only.
- Update all callers.
- (TT_Load_Glyph): Compute linear advance values for embedded bitmap
- glyphs too.
+2010-10-12 Werner Lemberg <wl@gnu.org>
-2009-11-03 Werner Lemberg <wl@gnu.org>
+ Fix Savannah bug #31310.
- Improve code readability.
+ * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against
+ invalid `runcnt' values.
- * src/ttgload.c (load_truetype_glyph): Move metrics calculation
- to...
- (tt_get_metrics): This new function.
+2010-10-08 Chris Liddell <chris.liddell@artifex.com>
-2009-10-26 Bram Tassyns <bramt@enfocus.be>
+ Fix Savannah bug #31275.
- Fix Savannah bug #27811.
+ * src/sfnt/ttpost.c: Include FT_INTERNAL_DEBUG_H.
- * src/truetype/ttxgvar.c (ft_var_readpackeddeltas): Fix
- signed/unsigned mismatch.
+2010-10-06 Werner Lemberg <wl@gnu.org>
-2009-10-19 Ning Dong <flintning@163.com>
+ [truetype] Improve error handling of `SHZ' bytecode instruction.
+ Problem reported by Chris Evans <scarybeasts@gmail.com>.
- Fix handling of `get' and `put' CFF instructions.
+ * src/truetype/ttinterp.c (Ins_SHZ): Check `last_point'.
- * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_get,
- cff_op_put>: Appendix B of Adobe Technote #5177 limits the number of
- elements for the `get' and `put' operators to 32.
- * src/cff/cffgload.h (CFF_MAX_TRANS_ELEMENTS): Define.
- (CFF_Decoder): Use it for `buildchar' and remove `len_buildchar'.
+2010-10-05 Werner Lemberg <wl@gnu.org>
-2009-10-18 Werner Lemberg <wl@gnu.org>
+ Fix Savannah bug #31253.
+ Patch submitted by an anonymous reporter.
- Fix handling of `dup' CFF instruction.
- Problem and solution reported by Ning Dong <flintning@163.com>.
+ * configure: Use `awk' instead of `sed' to manipulate output of `ls
+ -id'.
- * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_dup>:
- Increase `args' by 2, not 1.
+2010-10-03 Werner Lemberg <wl@gnu.org>
-2009-10-10 Werner Lemberg <wl@gnu.org>
+ * Version 2.4.3 released.
+ =========================
- * Version 2.3.11 released.
- ==========================
+ Tag sources with `VER-2-4-3'.
- Tag sources with `VER-2-3-11'.
+ * docs/CHANGES: Updated.
* docs/VERSION.DLL: Update documentation and bump version number to
- 2.3.11.
+ 2.4.3
- * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
+ * README, Jamfile (RefDoc),
+ builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
+ builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj,
+ builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
+ builds/win32/visualce/freetype.vcproj,
builds/win32/visualce/index.html,
- builds/win32/visualce/freetype.dsp,
- builds/win32/visualce/freetype.vcproj: s/2.3.10/2.3.11/, s/2310/2311/.
-
- * include/freetype/freetype.h (FREETYPE_PATCH): Set to 11.
+ builds/wince/vc2005-ce/freetype.vcproj,
+ builds/wince/vc2005-ce/index.html,
+ builds/wince/vc2008-ce/freetype.vcproj,
+ builds/wince/vc2008-ce/index.html: s/2.4.2/2.4.3/, s/242/243/.
- * builds/unix/configure.raw (version_info): Set to 9:22:3.
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
-2009-10-10 Werner Lemberg <wl@gnu.org>
+ * builds/unix/configure.raw (version_info): Set to 12:1:6.
- * docs/CHANGES, docs/release: Updated.
+2010-10-03 Werner Lemberg <wl@gnu.org>
-2009-10-10 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Avoid `configure' issues with symbolic links.
+ Based on a patch from Alexander Stohr <Alexander.Stohr@gmx.de>.
- * src/pcf/pcfread.c (pcf_get_properties): Fix a bug in the nprops
- truncation. Reported by Martin von Gagern and Peter Volkov.
- https://bugs.gentoo.org/288357 and https://bugs.gentoo.org/288256
+ * configure: Compare directories using `ls -id'.
+ Check existence of `reference' subdirectory before creating it.
-2009-10-06 Werner Lemberg <wl@gnu.org>
+2010-10-02 Werner Lemberg <wl@gnu.org>
- * Version 2.3.10 released.
- ==========================
+ Fix Savannah bug #31088 (sort of).
+ * src/sfnt/ttload.c (tt_face_load_maxp): Always allocate at least 64
+ function entries.
- Tag sources with `VER-2-3-10'.
+2010-10-02 Werner Lemberg <wl@gnu.org>
- * builds/toplevel.mk (major, minor, patch): Fix regexp to allow more
- than a single digit.
- (dist): We now use git.
+ [smooth] Fix splitting of cubics for negative values.
- * docs/VERSION.DLL: Update documentation and bump version number to
- 2.3.10.
+ Reported by Róbert Márki <gsmiko@gmail.com>; see
+ http://lists.gnu.org/archive/html/freetype/2010-09/msg00019.html.
- * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
- builds/win32/visualc/freetype.dsp,
- builds/win32/visualc/freetype.vcproj,
- builds/win32/visualce/index.html,
- builds/win32/visualce/freetype.dsp,
- builds/win32/visualce/freetype.vcproj: s/2.3.9/2.3.10/, s/239/2310/.
+ * src/smooth/ftgrays.c (gray_render_cubic): Fix thinko.
- * include/freetype/freetype.h (FREETYPE_PATCH): Set to 10.
+2010-10-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * builds/unix/configure.raw (version_info): Set to 9:21:3.
+ Fix Savannah bug #31040.
-2009-10-06 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttinterp.c (free_buffer_in_size): Remove.
+ (TT_RunIns): Updated.
- Fix `make multi'.
+2010-09-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/cache/ftccache.c, src/cache/ftcsbits.c (FT_COMPONENT): Define.
+ [sfnt] Make error message filling NULL names less verbose.
- * src/sfnt/sfdriver.c: Include FT_INTERNAL_DEBUG_H.
+ * src/sfnt/ttpost.c (load_format_20): Showing 1 summary message
+ when we fill `post' names by NULL, instead of per-entry message.
-2009-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-09-20 Graham Asher <graham.asher@btinternet.com>
+ David Bevan <david.bevan@pb.com>
- [cache] Fix Savannah bug #27441, clean up Redhat bugzilla #513582.
- Tricky casts in FTC_{CACHE,GCACHE,MRULIST}_LOOKUP_CMP() are removed.
- Now these functions should be called with FTC_Node or FTC_MruNode
- variable, and the caller should cast them to appropriate pointers to
- concrete data. These tricky casts can GCC-4.4 optimizer (-O2)
- confused and the crashing binaries are generated.
+ [smooth] Fix and improve spline flattening.
- * src/cache/ftcmru.h (FTC_MRULIST_LOOKUP_CMP): Drop tricky cast.
- Now the 4th argument `node' of this function should be typed as
- FTC_MruNode.
+ This fixes the flattening of cubic, S-shaped curves and speeds up
+ the handling of both the conic and cubic arcs.
- * src/cache/ftcglyph.h (FTC_GCACHE_LOOKUP_CMP): For inline
- implementation, new temporal variable FTC_MruNode `_mrunode' to take
- the pointer from FTC_MRULIST_LOOKUP_CMP(). For non-inline
- implementation, tricky cast is dropped.
+ See the discussions on the freetype-devel mailing list in late
+ August and September 2010 for details.
- * src/cache/ftcmanag.c (FTC_SIZE_NODE): New macro casting
- to FTC_SizeNode.
- (FTC_Manager_LookupSize): Replace FTC_SizeNode `node' by FTC_MruNode
- `mrunode', and FTC_SIZE_NODE() is inserted.
- (FTC_FACE_NODE): New macro casting to FTC_FaceNode.
- (FTC_Manager_LookupFace) Replace FTC_FaceNode `node' by FTC_MruNode
- `mrunode', and FTC_FACE_NODE() is inserted.
+ * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): New macro.
+ (TWorker): Remove `conic_level' and `cubic_level' elements.
+ (gray_render_conic): Simplify algorithm.
+ (gray_render_cubic): New algorithm; details are given in the code
+ comments.
+ (gray_convert_glyph): Remove heuristics.
- * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): Change the type of
- `node' from FTC_INode to FTC_Node. Extra casting macro FTC_NODE()
- is dropped.
- (FTC_ImageCache_LookupScaler): Ditto.
- (FTC_SBitCache_Lookup): Change the type of `node' from FTC_SNode to
- FTC_Node. Extra casting macro FTC_NODE() is dropped. FTC_SNODE()
- is inserted.
- (FTC_SBitCache_LookupScaler): Ditto.
+2010-09-19 Werner Lemberg <wl@gnu.org>
- * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Change the type of
- `node' from FTC_CMapNode to FTC_Node. Extra casting macro
- FTC_NODE() is dropped, FTC_CMAP_NODE() is inserted.
+ Minor fixes.
-2009-09-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/cff/cffload.c (cff_charset_compute_cids): `charset->sids[i]'
+ is `FT_UShort'.
+ (cff_index_access_element): Don't use additions in comparison.
+ * src/sfnt/ttpost.c (load_format_20): Make `post_limit' of type
+ `FT_Long'.
+ Don't use additions in comparison.
+ Improve tracing messages.
+ (load_format_25, load_post_names): Make `post_limit' of type
+ `FT_Long'.
- [cache, psaux, type1] Fix for multi build.
- In multi build, some cpp functions are left as unresolved symbols.
+2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/cache/ftcbasic.c: Include FT_INTERNAL_DEBUG_H for FT_TRACE1().
+ [cff] Truncate the element length at the end of the stream.
+ See Savannah bug #30975.
- * src/psaux/t1decode.c: Include FT_INTERNAL_CALC_H for
- FIXED_TO_INT().
- * src/type1/t1gload.c: Ditto.
- * src/type1/t1objs.c: Ditto.
+ * src/cff/cffload.c (cff_index_access_element): `off2', the offset
+ to the next element is truncated at the end of the stream to prevent
+ invalid I/O. As `off1', the offset to the requested element has
+ been checked by FT_STREAM_SEEK(), `off2' should be checked
+ similarly.
-2009-09-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- [autofit] Fix for multi build.
+ [cff] Ignore CID > 0xFFFFU.
+ See Savannah bug #30975.
- * src/autofit/afmodule.h: Include FT_INTERNAL_OBJECTS_H to use
- FT_DECLARE_MODULE() macro in multi build.
+ * src/cff/cffload.c (cff_charset_compute_cids): Ignore CID if
+ greater than 0xFFFFU. CFF font spec does not mention maximum CID in
+ the font, but PostScript and PDF spec define that maximum CID is
+ 0xFFFFU.
- * src/autofit/aflatin.c: Include <ft2build.h> to handle
- FT_ADVANCES_H correctly in multi build.
+2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-2009-09-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ [cff] Make trace message in cff_charset_load() verbose.
+ See Savannah bug #30975.
- [cache] Check the face filled by FTC_Manager_LookupFace().
+ * src/cff/cffload.c (cff_charset_load): Report the original `nleft'
+ and truncated `nleft'.
- * src/cache/ftcbasic.c (ftc_basic_family_get_count): Return
- immediately if FTC_Manager_LookupFace() fills face by NULL. Such
- case can occur when the code is optimized by GCC-4.2.x.
+2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-2009-09-23 Werner Lemberg <wl@gnu.org>
+ [cff] Correct `max_cid' from CID array length to max CID.
+ See Savannah bug #30975.
- * docs/CHANGES: Updated.
+ * src/cff/cffload.c (cff_charset_compute_cids): Don't increment
+ max_cid after detecting max CID. The array CFF_Charset->cids is
+ allocated by max_cid + 1.
+ (cff_charset_cid_to_gindex): Permit CID is less than or equal to
+ CFF_Charset->max_cid.
+ * src/cff/cffobjs.c (cff_face_init): FT_Face->num_glyphs is
+ calculated as CFF_Charset->max_cid + 1.
-2009-09-12 Werner Lemberg <wl@gnu.org>
+2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- [raster] Fix 5-levels grayscale output.
- This was broken since version 2.3.0.
+ [truetype] Sanitize the broken offsets in `loca'.
+ See Savannah bug #31040.
- * src/raster/ftraster.c (count_table): Use pre-2.3.0 values (which
- were then computed dynamically).
- (Vertical_Gray_Sweep_Step): Updated.
+ * src/truetype/ttpload.c (tt_face_get_location): If `pos1', the
+ offset to the requested entry in `glyf' exceeds the end of the
+ table, return offset=0, length=0. If `pos2', the offset to the next
+ entry in `glyf' exceeds the end of the table, truncate the entry
+ length at the end of `glyf' table.
- (ft_black_render): Initialize `worker->gray_lines' (problem found by
- valgrind).
+2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- (FT_RASTER_OPTION_ANTI_ALIASING, DEBUG_RASTER): Dont' #undef, just
- comment out.
+ [sfnt] Prevent overrunning in `post' table parser.
+ See Savannah bug #31040.
-2009-09-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/sfnt/ttpost.c (load_post_names): Get the length of `post'
+ table and pass the limit of `post' table to load_format_20() and
+ load_format_25().
+ (load_format_20): Stop the parsing when we reached at the limit of
+ `post' table. If more glyph names are required, they are filled by
+ NULL names.
- Improve configure.raw for cross build.
+2010-09-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * builds/unix/configure.raw: Remove temporal files created by the
- suffix checking for CC_BUILD. Set XX_ANSIFLAGS and XX_CFLAGS when
- cross compiler is GCC. AC_PROG_CC checks whether the cross compiler
- is GCC, its result is stored in GCC.
+ [truetype] Don't duplicate size->twilight structure to be freed.
+ See Savannah bug #31040 for detail.
-2009-09-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/truetype/ttinterp.c (free_buffer_in_size): Don't duplicate
+ FT_GlyphZoneRec size->twilight to be freed. If duplicated,
+ FT_FREE() erases the duplicated pointers only and leave original
+ pointers. They can cause the double-free crash when the burst
+ errors occur in TrueType interpreter and free_buffer_in_size() is
+ invoked repeatedly.
- [BDF] Modify hash API to take size_t value instead of void *.
+2010-09-15 Werner Lemberg <wl@gnu.org>
- The hash API in BDF driver is designed to be generic, it takes
- void * typed data. But BDF driver always gives an unsigned long
- integer (the index to a property). To reduce non-essential
- casts from unsigned long to void* and from void* to unsigned
- long, the hash API is changed to take size_t integer.
- The issue of incompatible cast between unsigned long and void*
- on LLP64 platform is reported by NightStrike from MinGW-Win64
- project. See
- http://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html
+ Make bytecode debugging with FontForge work again.
- * src/bdf/bdf.h: The type of hashnode->data is changed from
- void* to size_t.
+ * src/truetype/ttinterp.c (TT_RunIns): Don't call
+ `free_buffer_in_size' in case of error if a debugger is active.
- * src/bdf/bdflib.c (hash_insert): Get size_t data, instead of
- void* data.
- (bdf_create_property): Get the name length of new property by
- size_t variable, with a cut-off at FT_ULONG_MAX.
- (_bdf_set_default_spacing): Get the name length of the face by
- size_t variable, with a cut-off at 256.
- (bdf_get_property): Get the property id by size_t variable to
- reduce the casts between 32-bit prop ID & hashnode->data during
- simple copying.
- (_bdf_add_property): Ditto.
- (_bdf_parse_start): Calculate the index to the property array
- by size_t variable.
- (bdf_get_font_property): Drop a cast to unsigned long.
+2010-09-14 Werner Lemberg <wl@gnu.org>
-2009-09-10 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Improve tracing messages.
- [Win64] Improve the computation of random seed from stack address.
+ * src/truetype/ttinterp.c (TT_RunIns): Improve wording of tracing
+ message.
+ * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Add
+ tracing message.
+ * src/truetype/ttgload.c (tt_loader_init): Add tracing message.
+ * src/cache/ftcsbits.c (ftc_snode_load): Emit tracing message if
+ glyph doesn't fit into a small bitmap container.
+
+2010-09-13 Werner Lemberg <wl@gnu.org>
+
+ Fix minor issues reported by <muktha.narayan@wipro.com>.
+
+ * src/autofit/aflatin.c (af_latin_compute_stem_width): Remove
+ redundant conditional check.
+ * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Ditto.
+ * src/cff/cffload.c (cff_encoding_load): Remove conditional check
+ which always evaluates to `true'.
+ * src/pshinter/pshalgo.c (ps_glyph_interpolate_strong_points):
+ Ditto.
+ * src/truetype/ttinterp.c (Ins_IUP): Ditto.
+ * src/cid/cidgload.c (cid_slot_load_glyph): Don't check for NULL if
+ value is already dereferenced.
+ * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix check of `face'.
- On LLP64 platform, the conversion from pointer to FT_Fixed need
- to drop higher 32-bit. Explict casts are required. Reported by
- NightStrike from MinGW-w64 project. See
- http://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html
+2010-08-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/cff/cffgload.c: Convert the pointers to FT_Fixed explicitly.
+ Ignore the environmental setting of LIBTOOL.
+ Patch is suggested by Adrian Bunk, to prevent unexpected
+ reflection of environmental LIBTOOL. See:
+ http://savannah.nongnu.org/patch/?7290
- * src/psaux/t1decode.c: Ditto.
+ * builds/unix/unix-cc.in: LIBTOOL is unconditionally set to
+ $(FT_LIBTOOL_DIR)/libtool. FT_LIBTOOL_DIR is set to $(BUILD_DIR)
+ by default.
+ * configure: When configured for the building out of source tee,
+ FT_LIBTOOL_DIR is set to $(OBJ_DIR).
+2010-08-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-2009-09-03 Werner Lemberg <wl@gnu.org>
+ [truetype] Decrease the trace level catching the interpreter error.
- [raster] Improvements for stand-alone mode.
+ * src/truetype/ttinterp.c (TT_RunIns): Decrease the trace level
+ showing the error when the interpreter returns with an error,
+ from FT_TRACE7() to FT_TRACE1().
- * src/raster/rules.mk: Don't handle ftmisc.h. It is needed for
- stand-alone mode only.
+2010-08-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/raster/ftmisc.h (FT_MemoryRec , FT_Alloc_Func, FT_Free_Func,
- FT_Realloc_Func): Copy declarations from ftsystem.h.
+ [truetype] Prevent bytecode reuse after the interpretation error.
-2009-09-02 Bram Tassyns <bramt@enfocus.be>
+ * src/truetype/ttinterp.c (free_buffer_in_size): New function to
+ free the buffer allocated during the interpretation of this glyph.
+ (TT_RunIns): Unset FT_Face->size->{cvt_ready,bytecode_ready} if
+ an error occurs in the bytecode interpretation. The interpretation
+ of invalid bytecode may break the function definitions and referring
+ them in later interpretation is danger. By unsetting these flags,
+ `fpgm' and `prep' tables are executed again in next interpretation.
- Improve vertical metrics calculation (Savannah bug #27364).
+ This fixes Savannah bug #30798, reported by Robert Święcki.
- The calculation of `vertBearingX' is not defined in the OTF font
- spec so FreeType does a `best effort' attempt. However, this value
- is defined in the PDF and PostScript specs, and that algorithm is
- better than the one FreeType currently uses:
+2010-08-29 Werner Lemberg <wl@gnu.org>
- FreeType: Use the middle of the bounding box as the X coordinate
- of the vertical origin.
+ [ftraster] Pacify compiler.
- Adobe PDF spec: Use the middle of the horizontal advance vector as
- the X coordinate of the vertical origin.
+ * src/raster/ftraster.c (ft_black_new) [_STANDALONE_]: `memory' is
+ not used.
- FreeType's algorithm goes wrong if you have a really small glyph
- (like the full-width, circle-like dot at the end of the sentence, as
- used in CJK scripts) with large bearings. With the FreeType
- algorithm this dot gets centered on the baseline; with the PDF
- algorithm it gets the correct location (in the top right). Note
- that this is a serious issue, it's like printing the dot at the end
- of a Roman sentence at the center of the textline instead of on the
- baseline like it should. So i believe the PDF spec's algorithm
- should be used in FreeType as well.
+2010-08-29 Werner Lemberg <wl@gnu.org>
- The `vertBearingY' value for such small glyphs is also very strange
- if no `vmtx' information is present, since the height of the bbox is
- not representable for the height of the glyph visually (the
- whitespace up to the baseline is part of the glyph). The fix also
- includes some code for a better estimate of `vertBearingY'.
+ [cff] Allow SIDs >= 65000.
- * src/base/ftobjs.c (ft_synthesize_vertical_metrics): `vertBearingX'
- is now calculated as described by the Adobe PDF Spec. Estimate for
- `vertBearingY' now works better for small glyphs completely above or
- below the baseline into account.
+ * src/cff/cffload.c (cff_charset_load): Fix change from 2009-03-20:
+ The threshold for SIDs is not applicable here. I misinterpreted the
+ `SID values 65000 and above are available for implementation use'
+ sentence in the CFF specification.
- * src/cff/cffgload.c (cff_slot_load): `vertBearingX' is now
- calculated as described by the Adobe PDF Spec. Vertical metrics
- information was always ignored when FT_CONFIG_OPTION_OLD_INTERNALS
- was not defined.
+ Problem reported by Ivan Ninčić <inincic@pdftron.com>.
- * src/truetype/ttgload.c (compute_glyph_metrics): `vertBearingX' is
- now calculated as described by the Adobe PDF Spec.
+2010-08-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-2009-09-01 John Tytgat <John.Tytgat@esko.com>
+ Force hinting when the font lacks its familyname.
- Fix custom cmap for empty Type 1 font (Savannah bug #27294).
+ In Type42 or Type11 font embedded in PostScript & PDF, TrueType sfnt
+ stream may lack `name' table because they are not required. Hinting
+ for nameless fonts is safer for PDFs including embedded Chinese
+ fonts. Written by David Bevan, see:
- * include/freetype/internal/t1types.h (T1_EncodingRecRec_): Update
- comment to reflect revised code_last meaning.
- * src/type1/t1load.c (T1_Open_Face), src/type42/t42objs.c
- (T42_Open_Face): Assign max_char as highest character code + 1 and
- use this for T1_EncodingRecRec_::code_last.
- * src/psaux/t1cmap.c (t1_cmap_custom_init): Follow revised
- T1_EncodingRecRec_::code_last meaning.
+ http://lists.gnu.org/archive/html/freetype-devel/2010-08/msg00021.html
+ http://lists.freedesktop.org/archives/poppler/2010-August/006310.html
-2009-08-25 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttobjs.c (tt_check_trickyness): If a NULL pointer by
+ nameless font is given, TRUE is returned to enable hinting.
- Fix rendering of horizontally compressed CFFs.
- Bug reported by Ivan Nincic <inincic@pdftron.com>.
+2010-08-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/cff/cffgload.c (cff_slot_load): Thinko: Check `xx' element of
- `font_matrix' also.
+ Register yet another tricky TrueType font.
- * docs/CHANGES: Updated.
+ * src/truetype/ttobjs.c (tt_check_trickyness): Add `HuaTianKaiTi?',
+ a Kaishu typeface paired with `HuaTianSongTi?' by Huatian
+ Information Industry.
-2009-08-03 suyu0925@gmail.com
+2010-08-17 Teijo Kinnunen <Teijo.Kinnunen@nuance.com>
- Don't call `ft_fseek' every time when executing `ft_fread'.
+ Fix Savannah bug #30788.
- * src/base/ftstream.c (FT_Stream_Seek), src/base/ftsystem.c
- (ft_ansi_stream_io): Implement it.
+ * src/cache/ftccache.c (FTC_Cache_Clear): Check `cache->buckets' for
+ NULL too.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-08-10 Werner Lemberg <wl@gnu.org>
- sfnt: Cast a charcode to 32-bit in cmap format 14 parser.
-
- * src/sfnt/ttcmap.c (tt_cmap14_char_var_index,
- tt_cmap14_char_var_isdefault, tt_cmap14_char_variants,
- tt_cmap14_variant_chars): Correct mismatches from
- FT_CMap_CharVarIndexFunc prototype, FT_ULong arguments
- are replaced by FT_UInt32 arguments.
+ Try to fix Savannah bug #30717 (and probably #30719 too).
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Add another
+ overflow test for `width' and `height'.
- sfnt: Cast a charcode to 32-bit in cmap format 12 parser.
+2010-08-06 Werner Lemberg <wl@gnu.org>
- * src/sfnt/ttcmap.c (tt_cmap12_char_next):
- Insert explicit cast from FT_UFast to FT_UInt32
- for return value.
+ * Version 2.4.2 released.
+ =========================
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- psaux: Fix a few casts to FT_Int32 value.
+ Tag sources with `VER-2-4-2'.
- * src/psaux/t1decode.c (t1_decoder_parse_charstrings):
- Fix a few casts setting `value' from FT_Long to FT_Int32,
- because `value' is typed as FT_Int32 since 2009-06-22.
+ * docs/CHANGES: Updated.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.4.2
- sfnt: Fix a data type mismatching with its source.
+ * README, Jamfile (RefDoc),
+ builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
+ builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj,
+ builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
+ builds/win32/visualce/freetype.vcproj,
+ builds/win32/visualce/index.html,
+ builds/wince/vc2005-ce/freetype.vcproj,
+ builds/wince/vc2005-ce/index.html,
+ builds/wince/vc2008-ce/freetype.vcproj,
+ builds/wince/vc2008-ce/index.html: s/2.4.1/2.4.2/, s/241/242/.
- * src/sfnt/ttcmap.c (tt_cmap13_char_next): Fix the
- type of `gindex' from FT_ULong to FT_UInt because
- it is set by FT_UInt tt_cmap13_char_map_binary() or
- TT_CMap13->cur_gindex.
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * builds/unix/configure.raw (version_info): Set to 12:0:6.
- sfnt: Extend a few local variables to load 32-bit values.
+2010-08-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/sfnt/ttkern.c (tt_face_load_kern): Extend `count'
- and `kern' to load 32-bit values.
+ Fix Savannah bug #30648.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/base/ftobjs.c (FT_Done_Library): Specify the order of font
+ drivers during the face closing process. Type42 faces should be
+ closed before TrueType faces, because a Type42 face refers to
+ another internal TrueType face which is created from sfnt[] array on
+ the memory.
- pfr: Extend `num_aux' to take 32-bit value.
+2010-08-06 Yuriy Kaminskiy <yumkam@mail.ru>
- * src/pfr/pfrload.c (pfr_phy_font_load): Extend
- `num_aux' to load 32-bit value.
+ [raster] Fix valgrind warning.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/raster/ftraster.c (Decompose_Curve) <default>: Access point[0]
+ only if we don't hit `limit'.
- pcf: Truncate FT_ULong `nprops' to fit to int PCF_Face->nprops.
+2010-08-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/pcf/pcfread.c (pcf_get_properties): Load `nprops'
- as FT_ULong value from PCF file, but truncate it as
- int to fit PCF_Face->nprops. The number of truncated
- properties is shown in the trace message.
+ Fix Savannah bug #30658.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/base/ftobjs.c (Mac_Read_POST_Resource): Check that the total
+ length of collected POST segments does not overrun the allocated
+ buffer.
- gxvalid: Extend a few local variables to reduce the casts.
+2010-08-06 Yuriy Kaminskiy <yumkam@mail.ru>
- * src/gxvalid/gxvmorx.c (gxv_morx_subtables_validate):
- Extend `type' and `rest' to take FT_ULong values.
+ Fix conditional usage of FT_MulFix_i386.
+ With -ansi flag, gcc does not define `i386', only `__i386__'.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in:
+ s/i386/__i386__/.
- gxvalid: Extend `settingTable' to take 32-bit offset.
+2010-08-05 Werner Lemberg <wl@gnu.org>
- * src/gxvalid/gxvfeat.c (gxv_feat_name_validate):
- Extend `settingTable' to take 32-bit offset.
+ Fix Savannah bug #30657.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/truetype/ttinterp.c (BOUNDSL): New macro.
+ Change `BOUNDS' to `BOUNDSL' where appropriate.
- autofit: Cast FT_Long glyph_count to compare with FT_UInt GID.
+ * src/truetype/ttinterp.h (TT_ExecContextRec): Fix type of
+ `cvtSize'.
- * src/autofit/afglobal.c (af_face_globals_is_digit,
- af_face_globals_compute_script_coverage): Cast FT_Long
- globals->glyph_count to FT_ULong, to compare with FT_UInt
- gindex.
+2010-08-05 Werner Lemberg <wl@gnu.org>
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Fix Savannah bug #30656.
- smooth: Exclude 16-bit system in invalid pitch/height check.
+ * src/type42/t42parse.c (t42_parse_sfnts): Protect against negative
+ string_size.
+ Fix comparison.
- * src/smooth/ftsmooth.c (ft_smooth_render_generic):
- pitch and height are typed as FT_UInt but checked to fit
- 16-bit range, to avoid the overflows. On 16-bit system,
- this checking inserts a conditional that never occurs.
+2010-08-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-2009-07-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ [cff] Don't use any values in decoder after parsing error.
- cff: Type large constants > 0x7FFF as long for 16-bit systems.
+ * src/cff/cffgload.c (cff_slot_load): Skip the evaluations
+ of the values in decoder, if cff_decoder_parse_charstrings()
+ returns any error.
- * src/cff/cffload.c (cff_charset_load): Type large
- constants > 0x7FFF as long, because normal constants
- are typed signed integer that is less than 0x8000 on
- 16-bit systems.
+2010-08-04 Werner Lemberg <wl@gnu.org>
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Fix Savannah bug #30644.
- base: Remove an unused variable.
+ * src/base/ftstream.c (FT_Stream_EnterFrame): Fix comparison.
- * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Remove an
- unused variable `library'. glyph->library is used.
+2010-08-04 Werner Lemberg <wl@gnu.org>
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ `make devel' fails if FT_CONFIG_OPTION_OLD_INTERNALS is set.
- cache: Check higher bits in flags for non ILP32 systems.
+ * devel/ftoption.h: Synchronize with
+ include/freetype/config/ftoption.h.
- 4 public functions ought to take FT_ULong flags, but take
- FT_UInt flags. To keep binary compatibility, we drop higher
- bits on non ILP32 platforms,
- ILP64 systems: No drop occurs.
- LP64 systems: Higher bits are not used.
- 16-bit systems: Drop can occur.
- See
- http://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00065.html
- These functions will be refined to take FT_ULong flags in
- next bump with incompatible API change.
+2010-08-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/cache/ftcbasic.c (FTC_ImageCache_Lookup):
- Check `flags' in `type', the 2nd argument.
- (FTC_SBitCache_Lookup): Ditto.
- (FTC_ImageCache_LookupScaler): Check `load_flags',
- the 3rd argument.
- (FTC_SBitCache_LookupScaler): Ditto.
+ [cff] Improve stack overflow test.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings): Check stack
+ after execution of operations too.
- sfnt: Ignore invalid GIDs in glyph name lookup.
+2010-07-18 Werner Lemberg <wl@gnu.org>
- * include/freetype/internal/fttrace.h:
- New trace module for sfdriver.c is added.
+ Add reference counters and to FT_Library and FT_Face objects.
- * src/sfnt/sfdriver.c (sfnt_get_name_index):
- Restrict glyph name lookup to FT_UInt GID.
- Genuine TrueType can hold 16-bit glyphs.
+ * include/freetype/freetype.h (FT_Reference_Face): New function.
+ * include/freetype/ftmodapi.h (FT_Rererence_Library): New function.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * include/freetype/internal/ftobjs.h (FT_Face_InternalRec,
+ FT_LibraryRec): New field `refcount'.
- pcf: Fix a comparison between FT_Long and FT_ULong.
+ * src/base/ftobjs.c (FT_Open_Face, FT_New_Library): Handle
+ `refcount'.
+ (FT_Reference_Face, FT_Reference_Library): Implement new functions.
+ (FT_Done_Face, FT_Done_Library): Handle `refcount'.
- * src/pcf/pcfread.c (pcf_get_bitmaps): Return an error
- if PCF_Face->nemetrics is negative.
+ * docs/CHANGES: Updated.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-07-18 Werner Lemberg <wl@gnu.org>
- gxvalid: Guarantee `nFeatureFlags' size up to 32-bit.
+ * Version 2.4.1 released.
+ =========================
- * src/gxvalid/gxvmort.c (gxv_mort_featurearray_validate):
- Extend the 3rd argument `nFeatureFlags' to FT_ULong.
- * src/gxvalid/gxvmort.h: Ditto.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Tag sources with `VER-2-4-1'.
- sfnt: Insert explicit cast for LP64 system.
+ * docs/CHANGES: Updated.
- * src/sfnt/ttkern.c (tt_face_load_kern): Insert
- cast from unsigned long to FT_UInt32.
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.4.1.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * README, Jamfile (RefDoc),
+ builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
+ builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj,
+ builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
+ builds/win32/visualce/freetype.vcproj,
+ builds/win32/visualce/index.html,
+ builds/wince/vc2005-ce/freetype.vcproj,
+ builds/wince/vc2005-ce/index.html,
+ builds/wince/vc2008-ce/freetype.vcproj,
+ builds/wince/vc2008-ce/index.html: s/2.4.0/2.4.1/, s/240/241/.
- gxvalid: Guarantee `just' table size upto 32-bit.
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
- * src/gxvalid/gxvjust.c (gxv_just_validate):
- The type of `offset' is changed from FT_UInt to
- FT_Offset, for 16-bit platforms.
+ * builds/unix/configure.raw (version_info): Set to 11:1:5.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-07-17 Werner Lemberg <wl@gnu.org>
- gxvalid: Guarantee `trak' table size upto 32-bit.
+ [cff] Final try to fix `hintmask' and `cntrmask' limit check.
- * src/gxvalid/gxvtrak.c (gxv_trak_validate):
- The type of `offset' is changed from FT_UInt to
- FT_Offset, for 16-bit platforms.
+ Problem reported by Tobias Wolf <towolf@gmail.com>.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ <cff_op_hintmask>: Sigh. I'm apparently too silly to fix this
+ correctly in less than three tries.
- type1: Fix a data type mismatching with its source.
+2010-07-12 Werner Lemberg <wl@gnu.org>
- * include/freetype/internal/t1types.h: The type of
- T1_Face->buildchar is matched with T1_Decorder->top.
+ * Version 2.4.0 released.
+ =========================
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- pfr: Fix a data type mismatching with its source.
+ Tag sources with `VER-2-4-0'.
- * src/pfr/pfrtypes.h: The type of PFR_KernItem->offset
- is extended from FT_UInt32 to FT_Offset, because it is
- calculated with the pointer difference, in
- pfr_extra_item_load_kerning_pairs().
+ * docs/CHANGES: Updated.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.4.0.
- pfr: Fix a data type mismatching with its source.
+ * README, Jamfile (RefDoc),
+ builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
+ builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj,
+ builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
+ builds/win32/visualce/freetype.vcproj,
+ builds/win32/visualce/index.html,
+ builds/wince/vc2005-ce/freetype.vcproj,
+ builds/wince/vc2005-ce/index.html,
+ builds/wince/vc2008-ce/freetype.vcproj,
+ builds/wince/vc2008-ce/index.html: s/2.3.12/2.4.0/, s/2312/240/.
- * src/pfr/pfrtypes.h: The type of PFR_PhysFont->chars_offset
- is extended from FT_UInt32 to FT_Offset, because it is
- calculated with the pointer difference in pfr_phy_font_load().
+ * include/freetype/freetype.h (FREETYPE_MINOR): Set to 4.
+ (FREETYPE_PATCH): Set to 0.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * builds/unix/configure.raw (version_info): Set to 11:0:5.
- pfr: Fix a data type mismatching with its source.
+2010-07-12 Werner Lemberg <wl@gnu.org>
- * src/pfr/pfrtypes.h: The type of PFR_PhyFont->bct_offset
- is extended from FT_UInt32 to FT_Long, because it is
- loaded by FT_STREAM_POS() in pfr_phy_font_load().
+ Remove C++ warnings.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ */*: Initialize pointers where necessary to make g++ happy.
- smooth: Improve the format in debug message.
+2010-07-12 malc <av1474@comtv.ru>
+ Richard Henderson <rth@redhat.com>
- * src/smooth/ftgrays.c (gray_dump_cells): Improve the
- format specifications to dump variables.
+ Fix type-punning issues with C++.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * include/freetype/internal/ftmemory.h (FT_ASSIGNP) [__cplusplus]:
+ Emulate a `typeof' operator with an inline template which uses
+ `static_cast'.
- sfnt: Fix a data type mismatching with its source.
+2010-07-11 Werner Lemberg <wl@gnu.org>
- * src/sfnt/sfobjs.c (sfnt_load_face): The type of
- local `flags' is matched with FT_Face->face_flags.
+ Fix C++ compilation issue.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/tools/apinames.c (names_dump) <OUTPUT_WATCOM_LBC>: Fix
+ type of `dot' variable.
- psaux: Fix a data type mismatching with its source.
+2010-07-10 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * include/freetype/internal/psaux.h: The type of
- T1_DecorderRec.buildchar is matched with
- T1_DecorderRec.top.
+ Fix another case reported in Savannah bug #30373.
+ Permit a face for Type1, Type42 and CFF without charmap,
+ patch by Tor Andersson.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/type1/t1objs.c (T1_Face_Init): Reset the error if it
+ is FT_Err_No_Unicode_Glyph_Name.
+ * src/type42/t42objs.c (T42_Face_Init): Ditto.
+ * src/cff/cffobjs.c (cff_face_init): Ditto.
- truetype: Extend TrueType GX packed deltas to FT_Offset.
+2010-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/truetype/ttgxvar.c (ft_var_readpackeddeltas):
- The type of 2nd argument `delta_cnt' is changed from
- FT_Int to FT_Offset, because its source can be cvt
- table size calculated from stream position.
+ Use defined macros to set {platform,encoding}_id.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/bdf/bdfdrivr.c: Include ttnameid.h and use macros to
+ set charmap.{platfom,encoding}_id.
+ * src/pcf/pcfdrivr.c: Ditto.
+ * src/winfonts/winfnt.c: Ditto.
+ * src/type1/t1objs.c: Ditto.
+ * src/type42/t42objs.c: Ditto.
+ * src/cff/cffobjs.c: Ditto.
+ * src/pfr/pfrobjs.c: Ditto.
+
+2010-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Fix Savannah bug #30373.
+ Too serious check of errors by `FT_CMap_New' since 2010-07-04
+ is fixed. Reported by Tor Andersson.
+
+ * include/freetype/fterrdef.h
+ (PSnames_Err_No_Unicode_Glyph_Name): New error code to
+ indicate the Unicode charmap synthesis failed because
+ no Unicode glyph name is found.
+
+ * src/psnames/psmodule.c (ps_unicodes_init): Return
+ PSnames_Err_No_Unicode_Glyph_Name when no Unicode glyph name
+ is found in the font.
+ * src/cff/cffcmap.c (cff_cmap_unicode_init): Return
+ CFF_Err_No_Unicode_Glyph_Name when no SID is available.
+
+ * src/type1/t1objs.c (T1_Face_Init): Proceed if `FT_CMap_New'
+ is failed by the lack of Unicode glyph name.
+ * src/type42/t42objs.c (T42_Face_Init): Ditto.
+ * src/cff/cffobjs.c (cff_face_init): Ditto.
- truetype: Extend mmvar_len to hold size_t values.
+2010-07-09 Ken Sharp <ken.sharp@artifex.com>
- * src/truetype/ttgxvar.h: The type of
- GX_BlendRec.mmvar_len is changed from FT_Int to
- FT_Offset, because TT_Get_MM_Var() calculates it
- by sizeof() results.
+ Make ftraster.c compile in stand-alone mode with MSVC compiler.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/raster/ftmisc.h (FT_Int64) [_WIN32, _WIN64]: Fix typedef
+ since there is no `inttypes.h' for MSVC.
- truetype: Check invalid function number in IDEF instruction.
+2010-07-08 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttinterp.c (Ins_IDEF): Check
- if the operand fits to 8-bit opcode limitation.
+ Fix Savannah bug #30361.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/truetype/ttinterp.c (Ins_IUP): Fix bounds check.
- truetype: Check invalid function number in FDEF instruction.
+2010-07-06 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttinterp.c (Ins_FDEF): Check
- if the operand fits 16-bit function number.
+ Pacify compiler.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/cff/cffload.c (cff_index_get_pointers): Initialize
+ `new_bytes'.
- truetype: Truncate the deltas of composite glyph at 16-bit values.
+2010-07-05 Eugene A. Shatokhin <spectre@ispras.ru>
- * src/truetype/ttgload.c (load_truetype_glyph):
- Insert cast from FT_Long (deltas[i].{x,y}) to
- FT_Int16 in the summation of deltas[] for composite
- glyphs. Because deltas[i] is typed as FT_Pos,
- its component x, y are typed as FT_Long, but
- their sources are always FT_Int16 when they are
- loaded by ft_var_readpackeddeltas(). However,
- the limitation about the summed deltas is unclear.
+ Fix Savannah bug #27648.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/base/ftobjs.c (ft_remove_renderer, FT_Add_Module): Call
+ `raster_done' only if we have an outline glyph format.
- truetype: Truncate the instructions upto 16-bit per a glyph.
+2010-07-05 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttgload.c (TT_Hint_Glyph): Truncate
- the instructions upto 16-bit length per a glyph.
+ Fix Savannah bug #30030.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * builds/win32/*/freetype.vcproj: Add ftxf86.c.
- truetype: Cast the numerical operands to 32-bit for LP64 systems.
+2010-07-05 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttinterp.c (Ins_SPHIX, INS_MIAP,
- Ins_MIRP): Insert cast from long (args[], the
- operands passed to TrueType operator) to FT_Int32
- (the argument of TT_MulFix14()).
+ [cff] Next try to fix `hintmask' and `cntrmask' limit check.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Problem reported by malc <av1474@comtv.ru>.
- truetype: Cast the project vector to 32-bit for LP64 system.
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ <cff_op_hintmask>: It is possible that there is just a single byte
+ after the `hintmask' or `cntrmask', e.g., a `return' instruction.
+
+2010-07-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Restrict the number of the charmaps in a rogue-compatible mode.
+ Fix for Savannah bug #30059.
+
+ * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Replace `16' the
+ minimum character code passed by a legacy rogue client by...
+ * include/freetype/config/ftoption.h (FT_MAX_CHARMAP_CACHEABLE):
+ This. It is undefined when FT_CONFIG_OPTION_OLD_INTERNALS is
+ undefined (thus the rogue client compatibility is not required).
+
+ * src/cff/cffobjs.c (cff_face_init): Abort the automatic
+ selection or synthesis of Unicode cmap subtable when the charmap
+ index exceeds FT_MAX_CHARMAP_CACHEABLE.
+ * src/sfnt/ttcmap.c (tt_face_build_cmaps): Issue error message
+ when the charmap index exceeds FT_MAX_CHARMAP_CACHEABLE.
+
+ * src/base/ftobjs.c (find_unicode_charmap): When Unicode charmap
+ is found after FT_MAX_CHARMAP_CACHEABLE, ignore it and search
+ earlier one.
+ (find_variant_selector_charmap): When UVS charmap is found after
+ FT_MAX_CHARMAP_CACHEABLE, ignore it and search earlier one.
+ (FT_Select_Charmap): When a charmap matching with requested
+ encoding but after FT_MAX_CHARMAP_CACHEABLE, ignore and search
+ earlier one.
+ (FT_Set_Charmap): When a charmap matching with requested
+ charmap but after FT_MAX_CHARMAP_CACHEABLE, ignore and search
+ earlier one.
+ (FT_Get_Charmap_Index): When a requested charmap is found
+ after FT_MAX_CHARMAP_CACHEABLE, return the inverted charmap
+ index.
+
+2010-07-04 Werner Lemberg <wl@gnu.org>
+
+ TrueType hinting is no longer patented.
- * src/truetype/ttinterp.c (Project, DualProject):
- Insert casts from FT_Pos (the arguments `dx', `dy')
- to FT_UInt32 (the argument to TT_DotFix14()).
+ * include/freetype/config/ftoption.h, devel/ftoption.h
+ (TT_CONFIG_OPTION_BYTECODE_INTERPRETER): Define.
+ (TT_CONFIG_OPTION_UNPATENTED_HINTING): Undefine.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * docs/CHANGES, docs/INSTALL, include/freetype/freetype.h: Updated.
+ * docs/TRUETYPE, docs/PATENTS: Removed.
- truetype: Cast the scaling params to 32-bit for LP64 system.
+2010-07-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/truetype/ttgload.c (TT_Process_Composite_Component):
- Insert casts from long (return value of FT_MulFix()) to
- FT_Int32 (the argument to FT_SqrtFixed()).
+ Check error value by `FT_CMap_New'.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/cff/cffobjs.c (cff_face_init): Check error value by
+ `FT_CMap_New'.
+ * src/pfr/pfrobjs.c (pfr_face_init): Ditto.
+ * src/type1/t1jobjs.c (T1_Face_Init): Ditto.
+ * src/type42/t42jobjs.c (T42_Face_Init): Ditto.
- sfnt: Cast a character code to FT_UInt32 for LP64 system.
+2010-07-03 Werner Lemberg <wl@gnu.org>
- * src/sfnt/ttcmap.c (tt_cmap14_char_map_nondef_binary,
- tt_cmap14_variants, tt_cmap14_char_variants,
- tt_cmap14_def_char_count, tt_cmap14_get_def_chars,
- tt_cmap14_get_nondef_chars, tt_cmap14_variant_chars)
- Insert casts when FT_UInt32 variable is loaded by
- TT_NEXT_{UINT24|ULONG}. Because most of them are
- compared with FT_UInt32 values in public API, replacing
- FT_UFast is not recommended.
+ Make ftgrays.c compile stand-alone again.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/smooth/ftgrays.c [_STANDALONE_]: Include `stddef.h'.
+ (FT_INT_MAX, FT_PtrDist)[_STANDALONE_]: Define.
- sfnt: Cast a character code to FT_UInt32 for LP64 system.
+2010-07-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/sfnt/ttcmap.c (tt_cmap4_init, tt_cmap4_next):
- Insert the casts from unsigned long constant to
- FT_UInt32.
+ Additional fix for Savannah bug #30306.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/base/ftobjs.c (Mac_Read_POST_Resource): If the type of the
+ POST fragment is 0, the segment is completely ignored. The declared
+ length of the segment is not cared at all. According to Adobe
+ Technical Note 5040, type 0 segment is a comment only and should not
+ be loaded for the interpreter. Reported by Robert Święcki.
- sfnt: Extend TT_BDF->strings_size to FT_ULong for huge BDF.
+2010-07-01 Werner Lemberg <wl@gnu.org>
- * include/freetype/internal/tttypes.h: The type
- of TT_BDF->string_size is extended from FT_UInt32
- to FT_ULong, because BDF specification does not
- restrict the length of string.
- * src/sfnt/ttbdf.c: The scratch variable `strings'
- to load TT_BDF->string_size is matched with
- TT_BDF->string_size.
+ [truetype] Protect against code range underflow.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF): Don't allow
+ negative IP values.
- psaux: Handle the string length by FT_Offset variables.
+2010-07-01 Werner Lemberg <wl@gnu.org>
- * src/psaux/afmparse.c (afm_parser_next_key,
- afm_tokenize, afm_parse_track_kern,
- afm_parse_kern_pairs, afm_parse_kern_data,
- afm_parser_skip_section, afm_parser_parse):
- The length of key is handled by FT_Offset,
- instead of FT_UInt. Although the length of
- PostScript strings or name object is 16-bit,
- AFM_STREAM_KEY_LEN() calculates the length
- from the pointer difference.
+ [truetype] Add rudimentary tracing for bytecode instructions.
- * src/psaux/afmparse.h (afm_parser_next_key):
- Ditto.
+ * src/truetype/ttinterp.c (opcode_name) [FT_DEBUG_LEVEL_TRACE]: New
+ array.
+ (TT_RunIns): Trace opcodes.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-06-30 Werner Lemberg <wl@gnu.org>
- pcf: Fix some data types mismatching with their sources.
+ Fix Savannah bug #30263.
- * src/pcf/pcfread.c (pcf_get_bitmaps): The types
- of `nbitmaps', `i', `sizebitmaps' are matched with
- the type of area FT_Bitmap.pitch * FT_Bitmap.rows.
+ * src/smooth/ftgrays.c (gray_render_span): Use cast to `unsigned
+ int' to avoid integer overflow.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use smaller
+ threshold values for `width' and `height'. This is not directly
+ related to the bug fix but makes sense anyway.
- pcf: Handle the string length by size_t variables.
+2010-07-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/pcf/pcfread.c (pcf_interpret_style): The types
- of nn, len, lengths[4] are changed to size_t, because
- they are loaded by (or compared with) ft_strlen().
+ Initial fix for Savannah bug #30306.
- * src/pcf/pcfutil.c (BitOrderInvert, TwoByteSwap,
- FourByteSwap): The type of the 2nd argument `nbytes'
- is changed to size_t, for similarity with ANSI C
- string functions.
+ * src/base/ftobjs.c (Mac_Read_POST_Resource): Check `rlen', the
+ length of fragment declared in the POST fragment header, and prevent
+ an underflow in length calculation. Some fonts set the length to
+ zero in spite of the existence of a following 16bit `type'.
+ Reported by Robert Święcki.
- * src/pcf/pcfdrivr.c (PCF_Glyph_Load): The type of
- `bytes' is changed to FT_Offset, because it is passed
- to FT_ALLOC(), via ft_glyphslot_alloc_bitmap(). At
- least, using unsigned type is better.
+2010-07-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Additional fix for Savannah bug #30248 and #30249.
- pcf: Fix some data types mismatching with their sources.
+ * src/base/ftobjs.c (Mac_Read_POST_Resource): Check the buffer size
+ during gathering PFB fragments embedded in LaserWriter PS font for
+ Macintosh. Reported by Robert Święcki.
- * src/pcf/pcfread.c (pcf_seek_to_table_type,
- pcf_has_table_type): The type of 3rd argument
- `ntables' is matched with PCF_Toc->count.
+2010-06-30 Alexei Podtelezhnikov <apodtele@gmail.com>
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Minor optimizations by avoiding divisions.
- otvalid: Truncate the glyph index to 16-bit.
+ * src/sfnt/ttkern.c (tt_face_load_kern, tt_face_get_kerning):
+ Replace divisions with multiplication in comparisons.
- * src/otvalid/otvalid.c (otv_validate): Checks
- face->num_glyphs does not exceed 16-bit limit,
- pass FT_UInt num_glyphs to backend functions
- otv_{GPOS|GSUB|GDEF|JSTF|MATH}_validate().
+2010-06-29 Werner Lemberg <wl@gnu.org>
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Fix minor tracing issues.
- cache: Insert explict casts for LP64 systems.
+ * src/cff/cffgload.c, src/truetype/ttgload.c: Adjust tracing levels.
- * src/cache/ftcbasic.c (FTC_ImageCache_Lookup,
- FTC_SBitCache_Lookup): The type of FTC_ImageType->width
- is FT_Int, so the cast to unsigned larger type FT_ULong
- is introduced for the comparisons with 0x10000L for
- LP64 platform.
+2010-06-27 Werner Lemberg <wl@gnu.org>
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ [cff] Really fix `hintmask' and `cntrmask' limit check.
- cache: Fix some data types mismatching with their sources.
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ <cff_op_hintmask>: Fix thinko and handle tracing also.
- * src/cache/ftccache.h: The type of return value
- by FTC_Node_WeightFunc function is changed to
- FT_Offset. The type of FTC_CacheClass->cache_size
- is changed to FT_Offset, too.
+2010-06-27 Werner Lemberg <wl@gnu.org>
- * src/cache/ftccback.h (ft_inode_weight,
- ftc_snode_weight): Ditto.
+ Fix valgrind warning.
- * src/cache/ftccmap.c (ftc_cmap_node_weight): Ditto.
+ * src/base/ftoutln.c (FT_Outline_Get_Orientation): Initialize
+ `result' array.
- * src/cache/ftcimage.c (ftc_inode_weight,
- FTC_INode_Weight): Ditto.
+2010-06-27 Werner Lemberg <wl@gnu.org>
- * src/cache/ftcsbits.c (ftc_snode_weight,
- FTC_SNode_Weight): Ditto.
+ [cff] Fix memory leak.
- * src/cache/ftcmru.h: The type of
- FTC_MruListClass->node_size is changed to FT_Offset,
- because it is passed to FT_ALLOC() to specify the
- size of buffer.
+ * src/cff/cffgload.c (cff_operator_seac): Free charstrings even in
+ case of errors.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-06-27 Werner Lemberg <wl@gnu.org>
- XXX_cmap_encoding_char_next() return FT_UInt32 values.
+ [cff] Protect against invalid `hintmask' and `cntrmask' operators.
- * include/freetype/internal/services/svpscmap.h:
- The size of the charcode value returned by
- the function typed PS_Unicodes_CharNextFunc is
- matched with its input charcode value.
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ <cff_op_hintmask>: Ensure that we don't exceed `limit' while parsing
+ the bit masks of the `hintmask' and `cntrmask' operators.
- * src/cff/cffmap.c (cff_cmap_encoding_char_next,
- cff_cmap_unicode_char_next): Ditto.
+2010-06-26 Werner Lemberg <wl@gnu.org>
- * src/pfr/pfrmap.c (pfr_cmap_encoding_char_next):
- Ditto.
+ Fix PFR change 2010-06-24.
- * src/psaux/t1cmap.c (t1_cmap_std_char_next,
- t1_cmap_custom_char_next, t1_cmap_unicode_char_next):
- Ditto.
+ * src/pfr/pfrgload.c (pfr_glyph_load_simple): Really protect against
+ invalid indices.
- * src/psnames/psmodule.c (ps_unicodes_char_next):
- Ditto.
+2010-06-26 Werner Lemberg <wl@gnu.org>
- * src/winfonts/winfnt.c (fnt_cmap_char_next):
- Ditto.
+ Improve PFR tracing messages.
- * src/sfnt/ttcmap.c (tt_cmap0_char_next,
- tt_cmap2_char_next, tt_cmap4_char_next,
- tt_cmap6_char_next, tt_cmap10_char_next,
- tt_cmap12_char_next, tt_cmap13_char_next): Ditto.
- (tt_cmap14_char_variants): Handle base unicode
- codepoint by FT_UInt32 variable to avoid overflow
- on 16-bit platforms.
- (tt_cmap14_ensure): The type of `num_results' is
- extend to FT_UInt32, to cover unsigned 32-bit
- `numVarSelectorRecords' in cmap14 table header.
-
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- truetype: Extend TT_Face->num_locations for broken TTFs.
-
- * include/freetype/internal/tttypes.h:
- TT_Face->num_locations are extended from FT_UInt
- to FT_ULong, to stand with broken huge loca table.
- Some people insists there are broken TTF including
- the glyphs over 16-bit limitation, in PRC market.
- * src/truetype/ttpload.c (tt_face_load_loca):
- Remove unrequired 16-bit truncation for FT_UInt
- TT_Face->num_locations.
-
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- smooth: Fix some data types mismatching with their sources.
-
- * src/smooth/ftgrays.c: The type of `TCoord' is
- matched to `TPos', because they are mixed in
- gray_set_cell(). The type of TCell->x is extended
- to `TPos', because gray_find_cell() sets it by
- TWorker.ex. The type of TCell->cover is extended
- to `TCoord', because gray_render_scanline() adds
- TCoord value to it. The type of TWork.cover is matched
- with TCell->cover. The types of
- TWork.{max_cells,num_cells} are changed to FT_PtrDist,
- because they are calculated from the memory addresses.
- The type of TWork.ycount is changed to TPos, because
- it is calculated from TPos variables.
- (gray_find_cell): The type of `x' is matched with
- its initial value ras.ex.
- (gray_render_scanline): The types of `mod', `lift'
- and `rem' are changed to TCoord, because their values
- are set with explicit casts to TCoord. When ras.area
- is updated by the differential values including
- `delta', they are explicitly cast to TArea, because
- the type of `delta' is not TArea but TCoord.
- (gray_render_line): The type of `mod' is extended
- from int to TCoord, because (TCoord)dy is added to mod.
- (gray_hline): The argument `acount' is extended to
- TCoord, to match with the parameters in the callers.
-
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- cff: Fix some data types mismatching with their sources.
-
- * src/cff/cffobjs.c (cff_face_init): The type of
- `scaling' is matched with the scaling parameter
- in FT_Matrix_Multiply_Scaled() and
- FT_Vector_Transform_Scaled().
-
- * src/cff/cffparse.c (cff_parse_real): The type of
- `power_ten', `scaling', `exponent_add',
- `integer_length', `fraction_length',
- `new_fraction_length' and `shift' are matched with
- the type of `exponent' to avoid unexpected truncation.
- (cff_parse_fixed_scaled): The type of `scaling' is
- matched with the `scaling' argument to
- cff_parse_real().
- (cff_parse_fixed_dynamic): Ditto.
- (cff_parse_font_matrix): The type of `scaling' is
- matched with the `scaling' argument to
- cff_parse_dynamic().
-
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- autofit: Fix some data types mismatching with their sources.
-
- * src/autofit/afglobal.c: Correct the type of
- AF_FaceGlobalsRec.glyph_count to match with
- FT_Face->num_glyphs.
- (af_face_globals_compute_script_coverage):
- Insert explicit cast to compare
- FT_Long AF_FaceGlobalsRec.glyph_count versus
- FT_UInt gindex. The type of `nn' is changed
- to scan glyph index upto AF_FaceGlobalsRec.glyph_count.
- (af_face_globals_get_metrics): The type of `script_max'
- is changed to cover size_t value. Insert explicit cast
- to compare FT_Long AF_FaceGlobalsRec.glyph_count versus
- FT_UInt gindex.
-
- * src/autofit/afhints.c (af_axis_hints_new_segment):
- Insert explicit cast to calculate `big_max' from
- integer and size_t values.
- (af_axis_hints_new_edge): Ditto.
-
- * src/autofit/aflatin.c (af_latin_metrics_init_blues):
- The type of `best_y' is matched to FT_Vector.y.
- (af_latin_compute_stem_width): The type of `delta' is
- matched to `dist' and `org_dist'.
-
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- autofit: Count the size of the memory object by ptrdiff_t.
-
- * src/autofit/afcjk.c (af_cjk_hint_edges): The
- number of edges `n_edges' should be counted by
- FT_PtrDist variable instead of FT_Int.
-
- * src/autofit/aflatin.c (af_latin_hint_edges):
- Ditto.
+ * src/pfr/pfrgload.c (pfr_glyph_load_rec): Emit tracing messages for
+ simple and compound glyph offsets.
- * src/autofit/aftypes.h: In AF_ScriptClassRec,
- the size of metric `script_metrics_size' should
- be counted by FT_Offset variable instead of FT_UInt.
+2010-06-26 Werner Lemberg <wl@gnu.org>
- * src/autofit/afhints.c
- (af_glyph_hints_align_strong_points): The cursors
- for the edges `min', `max', `mid' in the memory
- buffer should be typed FT_PtrDist.
+ Fix last PFR change.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/pfr/pfrobjs.c (pfr_face_init): Fix rejection logic.
- autofit: Fix for unused variable `first'.
+2010-06-26 Werner Lemberg <wl@gnu.org>
- * src/autofit/afhints.c (af_glyph_hints_reload): Insert
- FT_UNUSED() to hide the unused variable warning.
+ Fix Savannah bug #30262.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/sfnt/ttload.c (tt_face_load_maxp): Limit `maxComponentDepth'
+ arbitrarily to 100 to avoid stack exhaustion.
- Improve bitmap size or pixel variables for 16-bit systems.
+2010-06-26 Werner Lemberg <wl@gnu.org>
- * include/freetype/config/ftstdlib.h: Introduce
- FT_INT_MIN, to use in signed integer overflow in
- 16-bit and 64-bit platforms.
-
- * include/freetype/internal/fttrace.h: Add a tracer
- to ftsynth.c.
-
- * src/base/ftbitmap.c (FT_Bitmap_Embolden): Check
- invalid strength causing integer overflow on 16-bit
- platform.
-
- * src/base/ftcalc.c (ft_corner_orientation): Change
- the internal calculation from FT_Int to FT_Long, to
- avoid an overflow on 16-bit platforms. The caller of
- this function should use only the sign of result,
- so the cast to FT_Int is acceptable.
-
- * src/base/ftsynth.c: Introduce a tracer for synth module.
- (FT_GlyphSlot_Embolden): Check invalid strength causing
- integer overflow on 16-bit platform.
-
- * src/bdf/bdfdrivr.c (BDF_Face_Init): The glyph index
- in FT2 API is typed as FT_UInt, although BDF driver
- can handle unsigned long glyph index internally. To
- avoid integer overflow on 16-bit platform, too large
- glyph index should be excluded.
- (BDF_Glyph_Load): The glyph pitch in FT2 is typed as
- FT_UInt, although BDF driver can handle unsigned long
- glyph pitch internally. To avoid integer overflow on
- 16-bit platform, too large glyph pitch should not be
- returned.
-
- * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): The glyph
- pitch in FT2 is typed as FT_UInt, although PFR font
- format can include huge bitmap glyph with 24-bit pitch
- (however, a glyph spends 16.7 pixel, it's not realistic).
- To avoid integer overflow on 16-bit platform, huge
- bitmap glyph should be excluded.
-
- * src/smooth/ftgrays.c (gray_hline): As FT_Span.x is
- truncated to fit its type (16-bit short), FT_Span.y
- should be truncated to fit its type (FT_Int).
-
- * src/cff/cffdrivr.c (cff_get_ros): CFF specification
- defines the supplement in ROS as a real number.
- Truncate it to fit public FT2 API.
-
- * src/cff/cffparse.c (cff_parse_cid_ros): Warn the
- supplement if it is truncated or rounded in cff_get_ros().
-
- * src/cff/cfftypes.h: Change the type of internal variable
- `supplement' from FT_Long to FT_ULong to fit the signedness
- to the type in public API.
+ Add some memory checks (mainly for debugging).
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/base/ftstream.c (FT_Stream_EnterFrame): Exit with error
+ if the frame size is larger than the stream size.
- psaux: Prevent invalid arguments to afm_parser_read_vals().
+ * src/base/ftsystem.c (ft_ansi_stream_io): Exit with error if
+ seeking a position larger than the stream size.
- * src/psaux/afmparse.c (afm_parser_read_vals): Change
- the type of `n' to prevent negative number how many
- arguments should be parsed.
+2010-06-25 Werner Lemberg <wl@gnu.org>
- * src/psaux/afmparse.h (afm_parser_read_vals): Ditto.
+ Fix Savannah bug #30261.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/pfr/pfrobjs.c (pfr_face_init): Reject fonts which contain
+ neither outline nor bitmap glyphs.
- base: Prevent some overflows on LP64 systems.
+2010-06-25 Werner Lemberg <wl@gnu.org>
- * src/base/ftadvance.c (FT_Get_Advances): Cast the
- unsigned long constant FT_LOAD_ADVANCE_ONLY to FT_UInt32
- for LP64 platforms.
+ Fix Savannah bug #30254.
- * src/base/ftcalc.c (FT_Sqrt32): All internal variables
- are changed to FT_UInt32 from FT_ULong.
- (FT_MulDiv): Insert casts to FT_Int32 for LP64 platforms.
- This function is designed for 32-bit integer, although
- their arguments and return value are FT_Long.
+ * src/cff/cffload.c (cff_index_get_pointers): Do sanity check for
+ first offset also.
- * src/base/ftobjs.c (FT_Get_Char_Index): Check `charcode'
- is within unsigned 32-bit integer for LP64 platforms.
- (FT_Face_GetCharVariantIndex): Check `charcode' and
- `variantSelector' are within 32-bit integer for LP64
- platforms.
- (FT_Face_GetCharsOfVariant): Check `variantSelector' is
- within unsigned 32-bit integer for LP64 platforms.
+2010-06-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/base/fttrigon.c (ft_trig_downscale): The FT_Fixed
- variable `val' and unsigned long constant FT_TRIG_SCALE
- are cast to FT_UInt32, when calculates FT_UInt32.
- (FT_Vector_Rotate): The long constant 1L is cast to
- FT_Int32 to calculate FT_Int32 `half'.
+ Initial fix for Savannah bug #30248 and #30249.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/base/ftobjs.c (Mac_Read_POST_Resource): Check the error during
+ reading a PFB fragment embedded in LaserWriter PS font for Macintosh.
+ Reported by Robert Święcki.
- cff: Cast the long variables to 32-bit for LP64 systems.
+2010-06-24 Werner Lemberg <wl@gnu.org>
- * src/cff/cffdrivr.c (cff_get_advances): Insert
- explicit cast to modify a 32-bit flag by unsigned
- long constant.
+ Fix Savannah bug #30247.
- * src/cff/cffobjs.c (cff_face_init): Ditto.
+ * src/pcf/pcfread.c (pcf_get_metrics): Disallow (invalid) fonts with
+ zero metrics.
- * src/cff/cffgload.c (cff_decoder_parse_charstrings):
- Replace the casts to FT_Long by the casts to FT_Int32
- for LP64 platforms.
+2010-06-24 Graham Asher <graham.asher@btinternet.com>
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/smooth/ftgrays.c (gray_render_cubic): Fix algorithm.
+ The previous version was too aggressive, as demonstrated in
+ http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00020.html.
- pcf: Improve PCF_PropertyRec.value names on LP64 platforms.
+2010-06-24 Werner Lemberg <wl@gnu.org>
- * src/pcf/pcf.h: In PCF_PropertyRec.value, the member
- `integer' is replaced by `l', `cardinal' is replaced
- by `ul', to fix the difference between the name and
- the types on LP64 platforms.
+ */*: Use module specific error names where appropriate.
- * src/pcf/pcfdrivr.c (pcf_get_bdf_property): Reflect
- PCF_PropertyRec.value change, with appropriate casts
- to FT_Int32/FT_UInt32. Their destinations
- BDF_PropertyRec.{integer|cardinal} are public and
- explicitly defined as FT_Int32/FT_UInt32.
+2010-06-24 Werner Lemberg <wl@gnu.org>
- * src/pcf/pcfread.c (pcf_get_properties, pcf_load_font):
- Reflect PCF_PropertyRec.value change.
+ Fix Savannah bug #30236.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/sfnt/ttcmap.c (tt_face_build_cmaps): Improve check for pointer
+ to `cmap_table'.
- pcf: Fix some data types mismatching with their sources.
+2010-06-24 Werner Lemberg <wl@gnu.org>
- * src/pcf/pcfdrivr.c (pcf_cmap_char_index): The type of
- `code' is matched to PCF_Encoding->enc.
- (pcf_cmap_char_next): The type of `charcode' is matched
- to PCF_Encoding->enc. When *acharcode is set by charcode,
- an overflow is checked and cast to unsigned 32-bit
- integer.
+ Fix Savannah bug #30235.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/pfr/pfrgload.c (pfr_glyph_load_simple): Protect against
+ invalid indices if there aren't any coordinates for indexing.
- bdf: Improve bdf_property_t.value names for LP64 platforms.
+2010-06-24 Werner Lemberg <wl@gnu.org>
- * src/bdf/bdf.h: In bdf_property_t.value, the member
- `int32' is replaced by `l', `card32' is replaced by
- `ul', to fix the difference between the name and the
- types on LP64 platforms.
+ [bdf]: Font properties are optional.
- * src/bdf/bdfdrivr.c (BDF_Face_Init): Reflect
- bdf_property_t.value change.
- (bdf_get_bdf_property): Reflect bdf_property_t.value
- change, with appropriate casts to FT_Int32/FT_UInt32.
- Their destinations BDF_PropertyRec.{integer|cardinal}
- are public and explicitly defined as FT_Int32/FT_UInt32.
+ * src/bdf/bdflib.c (_bdf_readstream): Use special error code to
+ indicate a redo operation.
+ (_bdf_parse_start): Handle `CHARS' keyword here too and pass current
+ input line to `_bdf_parse_glyph'.
- * src/bdf/bdflib.c (_bdf_add_property): Reflect
- bdf_property_t.value change.
+2010-06-23 Werner Lemberg <wl@gnu.org>
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Fix Savannah bug #30220.
- bdf: Fix some data types mismatching with their sources.
+ * include/freetype/fterrdef.h
+ (BDF_Err_Missing_Fontboundingbox_Field): New error code.
- * src/bdf/bdrdrivr.c (bdf_cmap_char_index): The type
- of `code' is matched with BDF_encoding_el->enc.
- (bdf_cmap_char_next): The type of `charcode' is
- matched with BDF_encoding_el->enc. When *acharcode
- is set by charcode, an overflow is checked and
- cast to unsigned 32-bit integer.
+ * src/bdf/bdflib.c (_bdf_parse_start): Check for missing
+ `FONTBOUNDINGBOX' field.
+ Avoid memory leak if there are multiple `FONT' lines (which is
+ invalid but doesn't hurt).
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-06-21 Werner Lemberg <wl@gnu.org>
- autofit: Improve Unicode range definitions.
+ Fix Savannah bug #30168.
- * src/autofit/aftypes.h (AF_UNIRANGE_REC): New macro
- to declare a range by two unsigned 32-bit integer,
- to avoid 64-bit range definition on LP64 platforms.
+ * src/pfr/pfrgload.c (pfr_glyph_load_compound): Limit the number of
+ subglyphs to avoid endless recursion.
- * src/autofit/aflatin.c (af_latin_uniranges): Ditto.
+2010-06-20 Werner Lemberg <wl@gnu.org>
- * src/autofit/aflatin2.c (af_latin2_uniranges): Ditto.
+ Fix Savannah bug #30145.
- * src/autofit/afindic.c (af_indic_uniranges): Ditto.
+ * src/psaux/psobjs.c (t1_builder_add_contour): Protect against
+ `outline == NULL' which might happen in invalid fonts.
- * src/autofit/afcjk.c (af_cjk_uniranges): Declare
- the ranges by AF_UNIRANGE_REC.
+2010-06-19 Werner Lemberg <wl@gnu.org>
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Fix Savannah bug #30135.
- smooth: Fix a data type mismatching with its source.
+ * src/bdf/bdflib.c (_bdf_list_join): Don't modify value in static
+ string `empty'.
+ (_bdf_parse_glyph): Avoid memory leak in case of error.
- * src/smooth/ftgrays.c (gray_sweep): The type of
- `area' is matched with the 3rd argument `area'
- of gray_hline().
+2010-06-15 Werner Lemberg <wl@gnu.org>
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Fix Savannah bug #30108.
- smooth: Fix a data type mismatching with its source.
+ * src/autofit/afglobal.c (af_face_globals_compute_script_coverage):
+ Properly mask AF_DIGIT bit in comparison.
- * src/smooth/ftgrays.c (gray_render_line): The type
- of `area' is matched with TWorker.area.
+2010-06-11 Werner Lemberg <wl@gnu.org>
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Fix Savannah bug #30106.
- cache: Disable the legacy compatibility if 16-bit system.
+ Point numbers for FreeType's implementation of hinting masks are
+ collected before the final number of points of a glyph has been
+ determined; in particular, the code for handling the `endchar'
+ opcode can reduce the number of points.
- * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): Exclude
- the legacy behaviour from 16-bit platform, because the
- current hack cannot detect the caller uses this function
- via legacy convension.
- (FTC_SBitCache_Lookup): Ditto.
+ * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Assure that
+ `end_point' is not larger than `glyph->num_points'.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-06-11 Werner Lemberg <wl@gnu.org>
- cache: Check 32-bit glyph index on 16-bit systems.
+ [cff]: Improve debugging output.
- * src/cache/ftcbasic.c (ftc_basic_family_get_count):
- Check overflow caused by the face including large
- number of glyphs > 64k.
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ <cff_op_hintmask>: Implement it.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-06-10 Graham Asher <graham.asher@btinternet.com>
- cache: Fix some data types mismatching with their sources.
+ ftgrays: Speed up rendering of small cubic splines.
- * src/cache/ftccache.c (ftc_cache_resize): The types of
- `p', `mask', `count' are matched with FTC_Cache->{p,mask}.
- (FTC_Cache_Clear): The type of `old_index' is matched to
- FTC_Cache->{p,mask}.
+ * src/smooth/ftgrays.c (gray_render_cubic): Implement new,
+ simplified algorithm to find out whether the spline can be replaced
+ with two straight lines. See this thread for more:
- * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): The type
- of `_idx' is matched with FTC_Cache->{p,mask}.
+ http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00000.html
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-06-09 Werner Lemberg <wl@gnu.org>
- cache: Fix some data types mismatching with their sources.
+ Fix Savannah bug #30082.
- * src/cache/ftcsbits.c (ftc_snode_load): The types
- of `xadvance' and `yadvance' are matched with
- FT_GlyphSlot->advance.{x|y}.
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ <cff_op_callothersubr>: Protect against stack underflow.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-06-08 Werner Lemberg <wl@gnu.org>
- cache: Cast NULL to a required function type explicitly.
+ Fix Savannah bug #30053.
- * src/cache/ftcmanag.c (FTC_Manager_RemoveFaceID):
- Insert explicit cast from NULL to function type.
+ * src/cff/cffparse.c (cff_parse_real): Handle border case where
+ `fraction_length' has value 10.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-06-07 Werner Lemberg <wl@gnu.org>
- fttypes.h: Cast FT_MAKE_TAG output to FT_Tag exlicitly.
+ Fix Savannah bug #30052.
+ This bug has been introduced with commit 2415cbf3.
- * include/freetype/fttypes.h (FT_MAKE_TAG):
- Cast the result to FT_Tag.
+ * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Protect
+ against endless loop in case of corrupted font header data.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-05-26 Werner Lemberg <wl@gnu.org>
- psnames: Handle Unicode codepoints by FT_UInt32 variables.
+ Remove unused variable.
+ Found by Graham.
- * src/psnames/psmodule.c (BASE_GLYPH): Cast the result
- to unsigned 32-bit integer for LP64 platform.
- (ps_unicode_value): Return the value by unsigned 32-bit
- integer instead of unsigned long.
+ * src/autofit/afhints.c (af_glyph_hints_reload): Remove unused
+ variable `first' in first block.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-05-22 Werner Lemberg <wl@gnu.org>
- psaux: Use size_t variable to pass the buffer size.
+ Fix various memory problems found by linuxtesting.org.
- * src/psaux/psaux.h (to_bytes): The type of `max_bytes'
- (the argument to pass the buffer size) is changed to
- size_t, to match with ANSI C string functions.
+ * src/base/ftgxval.c (FT_TrueTypeGX_Free, FT_ClassicKern_Free),
+ src/base/ftotval.c (FT_OpenType_Free), src/base/ftpfr.c
+ (ft_pfr_check): Check `face'.
- * src/psaux/psconv.h (PS_Conv_StringDecode,
- PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Ditto.
+ * src/base/ftobjs.c (FT_Get_Charmap_Index): Check `charmap' and
+ `charmap->face'.
+ (FT_Render_Glyph): Check `slot->face'.
+ (FT_Get_SubGlyph_Info): Check `glyph->subglyphs'.
- * src/psaux/psconv.c (PS_Conv_StringDecode,
- PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Ditto.
+2010-05-22 Werner Lemberg <wl@gnu.org>
- * src/psaux/psobjs.h (ps_parser_to_bytes): Ditto.
+ autofit: Remove dead code.
+ Suggested by Graham.
- * src/psaux/psobjs.c (ps_parser_to_bytes): Ditto.
+ * src/autofit/afhints.c (af_glyph_hints_compute_inflections):
+ Removed.
+ (af_glyph_hints_reload): Remove third argument.
+ Update all callers.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-05-21 Bram Tassyns <bramt@enfocus.be>
- type1: Use size_t variable to pass the string length.
+ Fix Savannah bug #27987.
- * psaux.h: The type of `len' (the argument to pass
- the buffer size to the function in AFM_ParserRec)
- is changed to size_t, to match with ANSI C string
- functions.
+ * src/cff/cffobjs.c (remove_subset_prefix): New function.
+ (cff_face_init): Use it to adjust `cffface->family_name'.
- * t1afm.c (t1_get_index): Ditto.
+2010-05-20 Werner Lemberg <wl@gnu.org>
- * test_afm.c (dummy_get_index): Ditto.
+ TrueType: Make FreeType ignore maxSizeOfInstructions in `maxp'.
- * afmparse.c (afm_parser_read_vals): To call
- AFM_ParserRec.get_index, the length of token
- `len' is cast to size_t.
+ Acroread does the same.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Call
+ `Update_Max' to adjust size of instructions array if necessary and
+ add a rough safety check.
- cid: Fix some data types mismatching with their sources.
+ (load_truetype_glyph): Save `loader->byte_len' before recursive
+ call.
- * src/cid/cidparse.c (cid_parser_new): The types of
- `read_len' and `stream_len' are matched to
- FT_Stream->size. Unrequired cast is removed.
+ * src/truetype/ttinterp.h, src/truetype/ttinterp.c (Update_Max):
+ Declare it as FT_LOCAL.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-05-18 Hongbo Ni <hongbo@njstar.com>
- cff: Fix for unused variable `rest'.
+ Apply Savannah patch #7196.
- * src/cff/cffparse.c (cff_parse_real): Insert
- FT_UNUSED() to hide the unused variable warning.
+ * src/cff/cffgload.c (cff_slot_load): Prevent crash if CFF subfont
+ index is out of range.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-05-11 Werner Lemberg <wl@gnu.org>
- cff: Fix some data types mismatching with their sources.
+ * docs/formats.txt: Give pointer to PCF documentation.
+ Information provided by Alan Coopersmith
+ <alan.coopersmith@oracle.com>.
- * src/cff/cffgload.c (cff_slot_load): The types of
- `top_upm' and `sub_upm' are matched with
- CFF_FontRecDict->units_per_em.
+2010-05-10 Ken Sharp <ken.sharp@artifex.com>
- * src/cff/cffobjs.c (cff_size_select): Ditto.
- (cff_size_request): Ditto.
+ Fix Savannah bug #29846.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Previously we discovered fonts which used `setcurrentpoint' to set
+ the initial point of a contour to 0,0. This caused FreeType to
+ raise an error, because the `setcurrentpoint' operator is only
+ supposed to be used with the results from an OtherSubr subroutine.
- bdf: Fix some data types mismatching with their sources.
+ This was fixed by simply ignoring the error and carrying on.
- * bdflib.c (_bdf_list_ensure): The type of `num_items'
- is matched with _bdf_list_t.used. Also the types of
- `oldsize', `newsize', `bigsize' are matched too.
- (_bdf_readstream): `cursor' is used as an offset to
- the pointer, it should be typed as FT_Offset. Also
- the types of `bytes', `start', `end', `avail' are matched.
+ Now we have found a font which uses setcurrentpoint to actually
+ establish a non-zero point for a contour during the course of a
+ glyph program. FWIW, these files may be produced by an application
+ called `Intaglio' on the Mac, when converting TrueType fonts to
+ Type 1.
- * bdfdrivr.c: The type of BDF_CMap->num_encodings is
- matched with FT_CMap->clazz->size.
- (bdf_cmap_char_index): The types of `min', `max', `mid'
- are matched with BDF_CMap->num_encodings. The type of
- `result' is matched with encoding->glyph.
- (bdf_cmap_char_next): Ditto, the type of `code' is
- matched with BDF_encoding_el.enc.
- (bdf_interpret_style): The type of `lengths' is changed
- to size_t, to take the value by ft_strlen(). Also the
- types of `len', `nn', `mm' are matched.
+ The fix allows the new invalid behaviour, the old invalid behaviour
+ and real proper usage of the operator to work the same way as Adobe
+ interpreters apparently do.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ (t1_decoder_parse_charstrings): Make `setcurrentpoint' use the top
+ two elements of the stack to establish unconditionally the current x
+ and y coordinates.
- sfnt: Count the size of the memory object by ptrdiff_t.
+ Make the `flex' subroutine handling (OtherSubr 0) put the current
+ x,y coordinates onto the stack, instead of two dummy uninitialised
+ values.
- * src/sfnt/ttbdf.c (tt_face_find_bdf_prop): The type of
- `peroperty_len' is changed from FT_UInt to FT_Offset,
- to match with size_t, which is appropriate type for the
- object in the memory buffer.
+2010-04-14 Ken Sharp <ken.sharp@artifex.com>
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Fix Savannah bug #29444.
- lzw: Count the size of the memory object by ptrdiff_t.
+ * src/psaux/psobjs.c (t1_builder_start_point): Accept (invalid)
+ `lineto' immediately after `hsbw', in accordance with Acrobat, GS,
+ and others.
- * src/lzw/ftzopen.h: The types of FT_LzwState->{buf_total,
- stack_size} are changed from FT_UInt to FT_Offset, to match
- with size_t, which is appropriate type for the object in
- the memory buffer.
+2010-04-14 Michał Cichoń <thedmd@artifexmundi.com>
- * src/lzw/ftzopen.c (ft_lzwstate_stack_grow): The types of
- `old_size' and `new_size' are changed from FT_UInt to
- FT_Offset, to match with size_t, which is appropriate type
- for the object in the memory buffer.
+ Fix Savannah bug #27999.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/cache/ftcmanag.c (FTC_Manager_RemoveFaceID): Only remove
+ selected entry, not all.
- otvalid: Count the table size on memory by ptrdiff_t.
+2010-04-06 Jonathan Kew <jfkthame@gmail.com>
- * src/otvalid/otvgpos.c (otv_ValueRecord_validate):
- Change the type of table size from FT_UInt to
- FT_PtrDist because it is calculated by the memory
- addresses.
+ Add overflow check to `fvar' table.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis and instance
+ count.
- otvalid: Prevent an overflow by GPOS/GSUB 32b-bit offset.
+2010-04-05 Ken Sharp <ken.sharp@artifex.com>
- * src/otvalid/otvgpos.c (otv_ExtensionPos_validate):
- Extend ExtensionOffset from FT_UInt to FT_ULong, to
- cover 32-bit offset on 16-bit platform.
+ Fix Savannah bug #29335.
- * src/otvalid/otvgsub.c (otv_ExtensionSubst_validate):
- Ditto.
+ * src/raster/ftraster.c (Line_Up): Use slow multiplication to
+ prevent overflow. This shouldn't have any serious impact on speed,
+ however.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-04-05 Werner Lemberg <wl@gnu.org>
- ftobjs.c: Prevent an overflow in glyph index handling.
+ Add new function `FT_Library_SetLcdFilterWeights'.
- * src/base/ftobjs.c (FT_Face_GetCharsOfVariant):
- Improve the cast in comparison to avoid the truncation.
+ This is based on code written by Lifter
+ <http://unixforum.org/index.php?showuser=11691>. It fixes
+ FreeDesktop bug #27386.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): New
+ function.
- Improve the variable types in raccess_make_file_name().
+ * include/freetype/ftlcdfil.h: Updated.
- * src/base/ftrfork.c (raccess_make_file_name):
- Change the type of cursor variable `tmp' to const char*,
- to prevent the unexpected modification of original pathname.
- (raccess_make_file_name): Change the type of new_length
- to size_t.
+ * docs/CHANGES: Updated.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-04-01 John Tytgat <John.Tytgat@esko.com>
- ftpatent.c: Fix for unused variable `error'.
+ Fix Savannah bug #29404.
- * src/base/ftpatent.c (_tt_check_patents_in_range):
- Fix warning for unused variable `error'.
+ * src/truetype/ttgload.c: Revert change 2752bd1a (check on bit 1
+ of `head' table of TrueType fonts).
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-03-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- type1: Check invalid string longer than PostScript limit.
+ Fix `multi build' for Tytgat's CFF driver improvement.
- * src/type1/t1afm.c (t1_get_index): Check invalid string
- which exceeds the limit of PostScript string/name objects.
+ * src/base/cffload.h (cff_index_get_name): Added.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-03-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- gzip: Use FT2 zcalloc() & zfree() in ftgzip.c by default.
+ Remove duplicated inclusion of `FT_OUTLINE_H' in ftobjs.c.
- * src/gzip/ftgzip.c (zcalloc, zcfree): Disable all
- zcalloc() & zfree() by zlib in zutil.c, those in
- ftgzip.c by FT2 are enabled by default. To use
- zlib zcalloc() & zfree(), define USE_ZLIB_ZCALLOC.
- See discussion:
- http://lists.gnu.org/archive/html/freetype-devel/2009-02/msg00000.html
+ * src/base/ftobjs.c: Remove 2nd inclusion of `FT_OUTLINE_H'.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-03-11 Chris Liddell <chris.liddell@artifex.com>
- gzip: Distinguish PureC from TurboC on MSDOS.
+ Fix Savannah bug #27442.
- * src/gzip/zutil.c (zcalloc, zcfree): Enable only for
- MSDOS platform.
+ * src/raster/ftraster.c (ft_black_reset): Fix `buffer_size'.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-03-09 Werner Lemberg <wl@gnu.org>
- gxvalid: Insert PureC pragma to allow unevaluated variables.
+ Remove unused variable.
+ Reported by Graham.
- * builds/atari/ATARI.H: Insert PureC pragma not to
- warn against set-but-unevaluated variable in gxvalid
- module.
+ * src/cff/cffparse.c (cff_parse_real): Remove `rest'.
-2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2010-03-02 John Tytgat <John.Tytgat@esko.com>
- gxvalid: Pass the union by the pointer instead of the value.
+ Improve CFF string (especially glyphname) lookup performance.
- * src/gxvalid/gxvcommn.h:
- - Declare new type `GXV_LookupValueCPtr'.
- - Update the type of the 2nd argument to pass GXV_LookupValueDesc
- data to the function prototyped as GXV_Lookup_Value_Validate_Func,
- from GXV_LookupValueDesc to GXV_LookupValueCPtr.
- - Likewise for the function prototyped as
- GXV_Lookup_Fmt4_Transit_Func.
+ We do this by avoiding memory allocation and file I/O. This is
+ Savannah patch #7104.
- - Declare new type `GXV_StateTable_GlyphOffsetCPtr'.
- - Update the type of the 3rd argument to pass
- GXV_StateTable_GlyphOffsetDesc data to the function prototyped
- as GXV_StateTable_Entry_Validate_Func, from
- GXV_StateTable_GlyphOffsetDesc to GXV_StateTable_GlyphOffsetCPtr.
+ * src/cff/cfftypes.h: Include PS cmaps service and
+ FT_INTERNAL_POSTSCRIPT_HINTS_H.
+ (CFF_SubFontRec): Remove `num_local_subrs'.
+ (CFF_FontRec): Add `num_strings', `strings', and `string_pool'
+ fields.
+ Remove `string_index' and `num_global_subrs' fields.
+ Use real types instead of `void' for `pshinter' and `psnames' fields.
- - Declare new type `GXV_XStateTable_GlyphOffsetCPtr'.
- - Update the type of the 3rd argument to pass
- GXV_XStateTable_GlyphOffsetDesc data to the function prototyped
- as GXV_XStateTable_Entry_Validate_Func,
- from GXV_XStateTable_GlyphOffsetDesc
- to GXV_XStateTable_GlyphOffsetCPtr.
+ * src/cff/cffload.c: Don't include PS cmaps service.
+ (cff_index_get_pointers): Add `pool' parameter which allows to
+ insert an extra NUL character for each String INDEX entry.
+ (cff_index_get_name): Make it a local function.
+ (cff_index_get_string): New function.
+ (cff_subfont_load): Updated.
+ (cff_font_load): Initialize `num_strings', `strings', and
+ `string_pool' fields in the `CFF_FontRec' structure.
+ (cff_index_get_sid_string): Use `cff_index_get_string' instead of
+ `cff_index_get_name'.
+ (cff_font_done): Updated.
- * src/gxvalid/gxvcommn.c (gxv_LookupTable_fmt0_validate,
- gxv_XClassTable_lookupval_validate,
- gxv_XClassTable_lookupfmt4_transit):
- Update from GXV_LookupValueDesc to GXV_LookupValueCPtr.
-
- * src/gxvalid/gxvbsln.c (gxv_bsln_LookupValue_validate,
- gxv_bsln_LookupFmt4_transit): Ditto.
-
- * src/gxvalid/gxvjust.c
- (gxv_just_pcTable_LookupValue_entry_validate,
- gxv_just_classTable_entry_validate,
- gxv_just_wdcTable_LookupValue_validate): Ditto.
-
- * src/gxvalid/gxvkern.c
- (gxv_kern_subtable_fmt1_entry_validate): Ditto.
-
- * src/gxvalid/gxvlcar.c (gxv_lcar_LookupValue_validate,
- gxv_lcar_LookupFmt4_transit): Ditto.
-
- * src/gxvalid/gxvopbd.c (gxv_opbd_LookupValue_validate,
- gxv_opbd_LookupFmt4_transit): Ditto.
-
- * src/gxvalid/gxvprop.c (gxv_prop_LookupValue_validate,
- gxv_prop_LookupFmt4_transit): Ditto.
-
- * src/gxvalid/gxvmort4.c
- (gxv_mort_subtable_type4_lookupval_validate): Ditto.
-
- * src/gxvalid/gxvmort0.c
- (gxv_mort_subtable_type0_entry_validate): Update
- from GXV_StateTable_GlyphOffsetDesc
- to GXV_StateTable_GlyphOffsetCPtr.
-
- * src/gxvalid/gxvmort1.c
- (gxv_mort_subtable_type1_entry_validate): Ditto.
-
- * src/gxvalid/gxvmort2.c
- (gxv_mort_subtable_type2_entry_validate): Ditto.
-
- * src/gxvalid/gxvmort5.c
- (gxv_mort_subtable_type5_entry_validate): Ditto.
-
- * src/gxvalid/gxvmorx2.c
- (gxv_morx_subtable_type2_entry_validate): Ditto.
-
- * src/gxvalid/gxvmorx5.c
- (gxv_morx_subtable_type5_entry_validate): Ditto.
-
- * src/gxvalid/gxvmorx1.c
- (gxv_morx_subtable_type1_entry_validate): Ditto.
- (gxv_morx_subtable_type1_LookupValue_validate,
- gxv_morx_subtable_type1_LookupFmt4_transit):
- Update from GXV_LookupValueDesc to GXV_LookupValueCPtr.
-
- * src/gxvalid/gxvmorx0.c
- (gxv_morx_subtable_type0_entry_validate): Update
- from GXV_XStateTable_GlyphOffsetDesc
- to GXV_XStateTable_GlyphOffsetCPtr.
+ * src/cff/cffload.h: Don't include PS cmaps service.
+ (cff_index_get_string): Added.
+ (cff_index_get_sid_string): Updated.
-2009-07-29 Fabrice Bellet <fabrice@bellet.info>
+ * src/cff/cffobjs.c: Don't include PS cmaps service and
+ FT_INTERNAL_POSTSCRIPT_HINTS_H.
+ (cff_size_get_globals_funcs, cff_slot_init): Updated.
+ (cff_face_init): Follow `cff_index_get_name',
+ `cff_index_get_string', and `cff_index_get_sid_string' changes.
- Fix Redhat bugzilla #513582 and Savannah bug #26849.
+ * src/cff/cffcmap.c (cff_sid_free_glyph_name): Removed.
+ (cff_sid_to_glyph_name): Use `cff_index_get_cid_string'.
+ (cff_cmap_unicode_init): Updated.
- * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP) <FTC_INLINE>: Fix
- aliasing bug.
+ * src/cff/cffdrivr.c: Don't include PS cmap service.
+ (cff_get_glyph_name): Avoid unnecessary lookup for POSTSCRIPT_CMAPS
+ service.
+ (cff_get_glyph_name, cff_ps_get_font_info, cff_get_ros): Follow API
+ `cff_index_get_sid_string' change.
+ (cff_get_name_index): Use `cff_index_get_string' instead of
+ `cff_index_get_name'.
-2009-07-19 Werner Lemberg <wl@gnu.org>
+ * src/cff/cffgload.c: Don't include FT_INTERNAL_POSTSCRIPT_HINTS_H.
+ (cff_decoder_init, cff_decoder_prepare): Updated.
- Document recent library changes.
+2010-02-27 Werner Lemberg <wl@gnu.org>
- * docs/CHANGES: Do it.
+ Simplify code.
+ Suggested by Behdad.
-2009-07-17 Werner Lemberg <wl@gnu.org>
+ * src/base/ftobjs.c (FT_Get_First_Char): Don't use a loop since we
+ call FT_Get_Next_Char anyway if necessary.
- Fix Savannah bug #23786.
+2010-02-26 Behdad Esfahbod <behdad@behdad.org>
- * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't reset x_ppem
- and y_ppem. Otherwise the `*_CVT_Stretched' functions in ttinterp.c
- get never called.
- An anonymous guy suggested this change on Savannah, and it seems to
- be the right solution.
+ Improve handling of invalid glyph indices in char->index functions.
-2009-07-15 Werner Lemberg <wl@gnu.org>
+ * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Use a
+ loop.
- * docs/release: Updated.
+2010-02-18 Chris Liddell <chris.liddell@artifex.com>
-2009-07-15 Werner Lemberg <wl@gnu.org>
+ Fix Savannah bug #28905.
- README.CVS -> README.git
+ Initialize phantom points before calling the incremental interface
+ to update glyph metrics.
- * README.CVS: Renamed to...
- * README.git: This.
+ * src/truetype/ttgload.c (tt_get_metrics_incr_overrides)
+ [FT_CONFIG_OPTION_INCREMENTAL]: New function, split off from...
+ (tt_get_metrics): This.
Updated.
-
-2009-07-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Borland C++ compiler patch proposed by Mirco Babin.
- http://lists.gnu.org/archive/html/freetype/2009-07/msg00016.html.
-
- * builds/exports.mk: Delete unused flags, CCexe_{CFLAGS,LDFLAGS}.
- Fix APINAMES_C and APINAMES_EXE pathnames to reflect the platform
- specific pathname syntax.
- * builds/compiler/bcc.mk: Remove unused flag, CCexe_LDFLAGS.
- Define TE = `-e' separately (bcc32 cannot specify the pathname of
- binary executable by T = `-o').
- Extend the large page size in linking freetype.lib.
- Add extra CLEAN target to delete bcc specific temporary files.
- * builds/compiler/bcc-dev.mk: Ditto.
-
-2009-07-14 Werner Lemberg <wl@gnu.org>
-
- Fix Savannah bug #27026.
-
- * builds/win32/vc2005/freetype.sln: Use correct version number.
-
-2009-07-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Add a script to check the undefined and unused trace macros.
-
- * src/tools/chktrcmp.py: A script to check trace_XXXX macros
- that are used in C source but undefined in fttrace.h, or
- defined in fttrace.h but unused in C sources. See
- http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html.
- * docs/DEBUG: Mention on chktrcmp.py.
- * docs/release: Ditto.
-
-2009-07-09 Werner Lemberg <wl@gnu.org>
-
- [ftraster] Make it compile again with -D_STANDALONE_.
-
- * src/raster/ftraster.c [_STANDALONE_]: Define
- FT_CONFIG_STANDARD_LIBRARY_H.
- Include `string.h'.
- Don't include `rastpic.h'.
- Define FT_DEFINE_RASTER_FUNCS.
-
-2009-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- smooth: Check glyph size by width/height, instead of pitch/height.
- Suggested by der Mouse <mouse@Rodents-Montreal.ORG>.
-
- * src/smooth/ftsmooth.c (ft_smooth_render_generic): Improve
- the check for too large glyph. Replace the pair of `pitch' and
- `height' by the pair of `width' and `height'. `pitch' cannot
- be greater than `height'. The required is checking the product
- `pitch' * `height' <= FT_ULONG_MAX, but we use cheap checks for
- the realistic case only.
-
-2009-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Register 2 missing trace components, t1afm and ttbdf.
-
- * include/freetype/internal/fttrace.h: Add FT_TRACE_DEF( t1afm )
- and FT_TRACE_DEF( ttbdf ). See
- http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html
-
-2009-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Register a trace component for ftgloadr.c.
-
- * include/freetype/internal/fttrace.h: Add FT_TRACE_DEF( gloader ).
- The macro `trace_gloader' was already used in the initial version
- on 2002-02-24.
-
-2009-07-08 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Prevent the overflows by a glyph with too many points or contours.
- The bug is reported by Boris Letocha <b.letocha@gmc.net>. See
- http://lists.gnu.org/archive/html/freetype-devel/2009-06/msg00031.html
- http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00002.html
-
- * include/freetype/ftimage.h (FT_OUTLINE_CONTOURS_MAX,
- FT_OUTLINE_POINTS_MAX): New macros to declare the maximum
- values of FT_Outline.{n_contours,n_points}.
- * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Check the
- total numbers of points and contours cause no overflows in
- FT_Outline.{n_contours,n_points}.
-
- * include/freetype/internal/ftgloadr.h (FT_GLYPHLOADER_CHECK_P,
- FT_GLYPHLOADER_CHECK_C): Compare the numbers of points and
- contours as unsigned long number, instead of signed int, to
- prevent the overflows on 16-bit systems.
-
-2009-07-05 Bram Tassyns <bramt@enfocus.be>
-
- Improve compatibility to Acroread.
- This fixes Savannah bug #26944.
-
- * src/cff/cffload.c (cff_charset_compute_cids): For multiple GID to
- single CID mappings, make the lowest value win.
-
-2009-06-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- ftpatent: Fix a bug by wrong usage of service->table_info().
- http://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00039.html
-
- * include/freetype/internal/services/svsfnt.h: Extend
- FT_SFNT_TableInfoFunc() to take new argument to obtain the offset
- to the specified table.
- * src/sfnt/sfdriver.c (sfnt_table_info): Extend to return the
- table-offset to the caller function.
- * src/base/ftpatent.c (_tt_check_patents_in_table): Use new
- service->table_info().
- * src/base/ftobjs.c (FT_Sfnt_Table_Info): Synchronize to new
- service->table_info().
-
-2009-06-28 Werner Lemberg <wl@gnu.org>
-
- [psaux, cff] Protect against nested `seac' calls.
-
- * include/freetype/internal/psaux.h (T1_Decoder), src/cff/cffgload.h
- (CFF_Decoder): Add `seac' boolean variable.
-
- * src/cff/cffgload.c (cff_operator_seac), src/psaux/t1decode.c
- (t1operator_seac): Use it.
-
-2009-06-28 Werner Lemberg <wl@gnu.org>
-
- Thinko.
-
- * src/psaux/t1decode.c (t1operator_seac)
- [FT_CONFIG_OPTION_INCREMENTAL]: Test for existence of incremental
- interface.
-
-2009-06-28 Werner Lemberg <wl@gnu.org>
-
- * devel/ftoption.h [FT_CONFIG_OPTION_INCREMENTAL]: Define.
-
-2009-06-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Add tools to preprocess the source files for AtariST PureC.
-
- * builds/atari/deflinejoiner.awk: New file to filter C source files
- for broken C preprocessor of PureC compiler.
-
- * builds/atari/gen-purec-patch.sh: New file to generate a patch set
- for PureC, by using deflinejoiner.awk.
-
-2009-06-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Keep existing modules.cfg in the building tree.
-
- * configure: If `configure' is executed outside of the source tree,
- an existing `modules.cfg' file in the build directory should be
- kept, not overwritten by the version in the source tree.
-
-2009-06-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Filter --srcdir= option before invoking builds/unix/configure.
-
- * configure: If builds/unix/configure is invoked with --srcdir
- option, the option should take `builds/unix' directory instead of
- the top source directory. Thus the configure script in the top
- directory should modify the --srcdir= option if
- `builds/unix/configure' is invoked.
-
-2009-06-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Improve configure.raw for cross-building on exe-suffixed systems.
-
- * builds/unix/configure.raw: Fix a bug in sed script to extract
- native suffix for binary executables, patch by Peter Breitenlohner.
- http://lists.gnu.org/archive/html/freetype-devel/2009-04/msg00036.html
-
-2009-06-26 Werner Lemberg <wl@gnu.org>
-
- [truetype] Remove TT_SubGlyphRec.
-
- * src/truetype/ttobjs.h (TT_SubGlyphRec): Removed, unused.
-
-2009-06-26 Werner Lemberg <wl@gnu.org>
-
- * */*: For warning messages, replace FT_ERROR with FT_TRACE0.
-
- FT_ERROR is now used only if a function produces a non-zero `error'
- value.
-
- Formatting, improving and harmonizing debug strings.
-
-2009-06-25 Werner Lemberg <wl@gnu.org>
-
- Provide version information better.
-
- * src/base/ftinit.c (FT_Init_FreeType): Don't set version here
- but...
- * src/base/ftobjs.c (FT_New_Library): Here.
-
-2009-06-22 Werner Lemberg <wl@gnu.org>
-
- Use 16.16 format while parsing Type 1 charstrings.
- This fixes Savannah bug #26867.
-
- Previously, only integers have been used which can lead to serious
- rounding errors.
-
- However, fractional values are only used internally; after the
- charstrings (of either Type 1 or 2) have been processed, the
- resulting coordinates get rounded to integers currently -- before
- applying scaling. This should be fixed; at the same time a new load
- flag should be introduced, to be used in combination with
- FT_LOAD_NO_SCALE, which indicates that font units are returned in
- 16.16 format. Similarly, the incremental interface should be
- extended to allow fractional values for metrics.
-
- * include/freetype/internal/psaux.h (T1_BuilderRec): Remove `shift'
- field.
- * include/freetype/internal/pshints.h (T1_Hints_SetStemFunc,
- T1_Hints_SetStem3Func): Use FT_Fixed for coordinates.
-
- * src/psaux/psobjs.c: Include FT_INTERNAL_CALC_H.
- (t1_build_add_point): Always convert fixed to integer.
- * src/psaux/t1decode.c (t1_decoder_parse_charstrings):
- Use 16.16 format everywhere (except for large integers followed by a
- `div').
- [CAN_HANDLE_NON_INTEGRAL_T1_OPERANDS]: Remove #ifdef and activate
- code uncoditionally.
- Add support for random numbers and update remaining code
- accordingly; this should work now.
- (t1_operator_seac): Updated.
- * src/psaux/pshrec.c: Include FT_INTERNAL_CALC_H.
- (ps_hints_t1stem3, t1_hints_stem): Updated.
-
- * src/cid/cidgload.c: Include FT_INTERNAL_CALC_H.
- (cid_load_glyph) [FT_CONFIG_OPTION_INCREMENTAL],
- (cid_face_compute_max_advance, cid_slot_load_glyph): Updated.
-
- * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String)
- [FT_CONFIG_OPTION_INCREMENTAL], (T1_Get_Advances, T1_Load_Glyph):
- Updated.
- * src/type1/t1load.c: Include FT_INTERNAL_CALC_H.
- * src/type1/t1objs.c (T1_Face_Init): Updated.
-
-2009-06-21 Werner Lemberg <wl@gnu.org>
-
- * src/pshinter/pshrec.c: Use PSH_Err_Ok.
-
-2009-06-21 Werner Lemberg <wl@gnu.org>
-
- Code beautification.
-
- * src/type1/t1load.c (FT_INT_TO_FIXED): Removed.
- Replace everywhere with INT_TO_FIXED.
- (FT_FIXED_TO_INT): Move to ...
- * include/freetype/internal/ftcalc.h (FIXED_TO_INT): Here.
- Update all users.
-
-2009-06-20 Werner Lemberg <wl@gnu.org>
-
- Remove unused variables.
-
- * include/freetype/internal/psaux.h (T1_BuilderRec),
- src/cff/cffgload.h (CFF_Builder): Remove `last'.
- Update all users.
-
-2009-06-20 Werner Lemberg <wl@gnu.org>
-
- [psaux] Check large integers while parsing charstrings.
-
- * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Large
- integers must be followed by a `div' operator.
-
-2009-06-20 Werner Lemberg <wl@gnu.org>
-
- [cff] Revert last change.
-
- * src/cff/cffgload.c (cff_decoder_parse_charstrings): Do it.
- Next time, don't confuse Type 2 charstring opcodes with TOP DICT
- values...
-
-2009-06-20 Werner Lemberg <wl@gnu.org>
-
- * src/autofit/aflatin.c (af_latin_metrics_check_digits): Fix
- compiler warning.
-
-2009-06-20 Werner Lemberg <wl@gnu.org>
-
- * builds/compiler/gcc.mk (CFLAGS): Use -O3, not -O6.
-
-2009-06-19 Werner Lemberg <wl@gnu.org>
-
- [cff] Fix handling of reserved byte 0xFF.
-
- * src/cff/cffgload.c (cff_decoder_parse_charstrings): Abort if byte
- 0xFF is encountered.
-
-2009-06-19 Werner Lemberg <wl@gnu.org>
-
- Improve debug messages for Type1 charstrings.
-
- * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Emit newlines
- after instructions.
- Prettify output.
-
-2009-06-19 Werner Lemberg <wl@gnu.org>
-
- More ftgray fixes for FT_STATIC_RASTER.
- Problems reported by suyu@cooee.cn.
-
- * src/smooth/ftgrays.c (gray_move_to, gray_raster_render): Use
- RAS_VAR.
-
-2009-06-18 Werner Lemberg <wl@gnu.org>
-
- * docs/CHANGES: Updated.
-
-2009-06-18 Werner Lemberg <wl@gnu.org>
-
- Fix B/W rasterization of subglyphs with different drop-out modes.
-
- Normally, the SCANMODE instruction (if present) to set the drop-out
- mode in a TrueType font is located in the `prep' table only and thus
- valid for all glyphs. However, there are fonts like `pala.ttf'
- which additionally contain this instruction in the hinting code of
- some glyphs (but not all). As a result it can happen that a
- composite glyph needs multiple drop-out modes for its subglyphs
- since the rendering state gets reset for each subglyph.
-
- FreeType collects the hinted outlines from all subglyphs, then it
- sends the data to the rasterizer. It also sends the drop-out mode
- -- after hinting has been applied -- and here is the error: It sends
- the drop-out mode of the last subglyph only; drop-out modes of all
- other subglyphs are lost.
-
- This patch fixes the problem; it adds a second, alternative
- mechanism to pass the drop-out mode: For each contour, the
- rasterizer now checks the first `tags' array element. If bit 2 is
- set, bits 5-7 contain the contour's drop-out mode, overriding the
- global drop-out mode.
-
- * include/freetype/ftimage.h (FT_CURVE_TAG_HAS_SCANMODE): New macro.
-
- * src/truetype/ttgload.c (TT_Hint_Glyph): Store drop-out mode in
- `tags[0]'.
-
- * src/raster/ftraster.c (Flow_Up, Overshoot_Top, Overshoot_Bottom):
- Use bits 3-5 instead of 0-2.
- (New_Profile): Set the drop-out mode in the profile's `flags' field.
- (Decompose_Curve): Check `tags[0]' and set `dropOutControl' if
- necessary.
- (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
- Horizontal_Gray_Sweep_Drop, Draw_Sweep): Use the profile's drop-out
- mode.
-
-2009-06-16 Werner Lemberg <wl@gnu.org>
-
- Improve scan conversion rules 4 and 6.
-
- Two new constraints are introduced to better identify a `stub' -- a
- concept which is only vaguely described in the OpenType
- specification. The old code was too rigorous and suppressed more
- pixel than it should.
-
- . The intersection of the two profiles with the scanline is less
- than a half pixel. Code related to this was already present in
- the sources but has been commented out.
-
- . The endpoint of the original contour forming a profile has a
- distance (`overshoot') less than half a pixel to the scanline.
-
- Note that the two additional conditions fix almost all differences
- to the Windows rasterizer, but some problematic cases remain.
-
- * src/raster/ftraster.c (Overshoot_Top, Overshoot_Bottom): New
- macros for the `flags' field in the `TProfile' structure.
- (IS_BOTTOM_OVERSHOOT, IS_TOP_OVERSHOOT): New macros.
- (New_Profile, End_Profile): Pass overshoot flag as an argument and
- set it accordingly.
- Update callers.
- (Vertical_Sweep_Drop, Horizontal_Sweep_Drop): Implement the two new
- constraints.
-
-2009-06-11 Werner Lemberg <wl@gnu.org>
-
- Increase precision for B/W rasterizer.
-
- * src/raster/ftraster.c (Set_High_Precision): Add two more bits to
- the precision. This corrects rendering of some small glyphs, for
- example, glyph `xi' in verdana.ttf at 13 ppem. Testing with ftbench
- on my GNU/Linux box I don't see a performance degradation.
-
-2009-06-08 Michael Zucchi <notzed@gmail.com>
-
- Handle FT_STROKER_LINECAP_BUTT.
- This fixes Savannah bug #26757.
-
- * src/base/ftstroke.c (ft_stroker_cap): Implement it.
-
-2009-06-07 Harald Fernengel <harry@kdevelop.org>
-
- Fix some potential out-of-memory crashes.
-
- * src/base/ftobjs.c (ft_glyphslot_done): Check `slot->internal'.
- * src/base/ftstream.c (FT_Stream_ReleaseFrame): Check `stream'.
- * src/truetype/ttinterp.c (TT_New_Context): Avoid double-free of
- `exec' in case of failure.
-
-2009-06-07 Werner Lemberg <wl@gnu.org>
-
- Simplify math.
- Suggested by Alexei Podtelezhnikov <apodtele@gmail.com>.
-
- * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
- Horizontal_Gray_Sweep_Drop): Do it.
-
-2009-06-04 Werner Lemberg <wl@gnu.org>
-
- Preparation for fixing scan conversion rules 4 and 6.
-
- * src/raster/ftraster.c (TFlow): Replace enumeration with...
- (Flow_Up): This macro.
- (TProfile): Replace `flow' member with `flags' bit field.
- Update all affected code.
-
-2009-05-29 James Cloos <cloos@jhcloos.com>
-
- Enable autohinting for glyphs rotated by multiples of 90°.
-
- * src/base/ftobjs.c (FT_Load_Glyph): Alter check for permitted
- matrices to allow rotations by multiples of 90°, not only unrotated,
- possibly slanted matrices.
-
-2009-05-28 Werner Lemberg <wl@gnu.org>
-
- Remove compiler warning.
- Reported by Krzysztof Kowalczyk <kkowalczyk@gmail.com>.
-
- * src/autofit/aflatin2.c (af_latin2_hint_edges): Move declaration of
- `n_edges' into `#if' block.
-
-2009-05-28 Werner Lemberg <wl@gnu.org>
-
- Make compilation work with FT_CONFIG_OPTION_USE_ZLIB not defined.
- Reported by Krzysztof Kowalczyk <kkowalczyk@gmail.com>.
-
- * src/pcf/pcfdrivr.c (PCF_Face_Init) [!FT_CONFIG_OPTION_USE_ZLIB]:
- Make it work.
- Simplify #ifdef logic.
-
-2009-05-22 Werner Lemberg <wl@gnu.org>
-
- Improve b/w rasterizer.
- Problem reported by Krzysztof Kotlenga <pocek@users.sf.net>.
-
- * src/raster/raster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
- Horizontal_Gray_Sweep_Drop): For smart drop-out mode, if
- intersections are equally distant relative to next pixel center,
- select the left pixel, not the right one.
-
-2009-05-19 Werner Lemberg <wl@gnu.org>
-
- Fix Savannah bug #26600.
-
- * src/type42/t42parse.c (t42_load_keyword): Handle
- T1_FIELD_LOCATION_FONT_EXTRA.
-
-2009-04-30 Werner Lemberg <wl@gnu.org>
-
- Document recent changes to ftview.
-
- * docs/CHANGES: Do it.
-
-2009-04-27 Werner Lemberg <wl@gnu.org>
-
- autohinter: Don't change digit widths if all widths are the same.
- This fixes FreeDesktop bug #21197.
-
- * src/autofit/afglobal.c (AF_DIGIT): New macro.
- (af_face_globals_compute_script_coverage): Mark ASCII digits in
- `glyph_scripts' array.
- (af_face_globals_get_metrics): Updated.
- (af_face_globals_is_digit): New function.
- * src/autofit/afglobal.h: Updated.
- (AF_ScriptMetricsRec): Add `digits_have_same_width' flag.
-
- * src/autofit/aflatin.c: Include FT_ADVANCES_H.
- (af_latin_metrics_check_digits): New function.
- (af_latin_metrics_init): Use it.
- * src/autofit/aflatin.h: Updated.
- * src/autofit/afcjk.c (af_cjk_metrics_init): Updated.
-
- * src/autofit/aflatin2.c: Similar changes as with aflatin.c.
-
- * src/autofit/afloader.c (af_loader_load_g): Test digit width.
-
- * docs/CHANGES: Document it.
-
-2009-04-26 Werner Lemberg <wl@gnu.org>
-
- Make ftgrays compile with _STANDALONE_ and FT_STATIC_RASTER again.
- Problems reported by suyu@cooee.cn.
-
- * src/smooth/ftgrays.c (FT_DEFINE_OUTLINE_FUNCS,
- FT_DEFINE_RASTER_FUNCS) [_STANDALONE_]: Define.
- [!_STANDALONE_]: Include ftspic.h only here.
- (ras): Define/declare after definition of `TWorker'.
- Use `RAS_VAR_' where necessary.
-
-2009-04-21 Karl Berry <karl@gnu.org>
-
- Fix AC_CHECK_FT2.
-
- * builds/unix/freetype2.m4: Only check PATH for freetype-config if
- we did not already find it from a prefix option.
-
-2009-04-05 Oran Agra <oran@monfort.co.il>
-
- Add #error to modules and files that do not support PIC yet.
-
- When FT_CONFIG_OPTION_PIC is defined the following files will
- create #error:
- * src/bdf/bdfdrivr.h
- * src/cache/ftcmanag.c
- * src/cid/cidriver.h
- * src/gxvalid/gxvmod.h
- * src/gzip/ftgzip.c
- * src/lzw/ftlzw.c
- * src/otvalid/otvmod.h
- * src/pcf/pcfdrivr.h
- * src/pfr/pfrdrivr.h
- * src/psaux/psauxmod.h
- * src/type1/t1driver.h
- * src/type42/t42drivr.h
- * src/winfonts/winfnt.h
-
-2009-04-05 Oran Agra <oran@monfort.co.il>
-
- Position Independent Code (PIC) support in autofit module.
-
- * include/freetype/internal/autohint.h add macros to init
- instances of FT_AutoHinter_ServiceRec.
-
- * src/autofit/afmodule.h declare autofit_module_class
- using macros from ftmodapi.h,
- when FT_CONFIG_OPTION_PIC is defined create and destroy
- functions will be declared.
- * src/autofit/afmodule.c when FT_CONFIG_OPTION_PIC is defined
- af_autofitter_service and autofit_module_class structs
- will have functions to init or create and destroy them
- instead of being allocated in the global scope.
- And macros will be used from afpic.h in order to access them.
-
- * src/autofit/aftypes.h add macros to init and declare
- instances of AF_ScriptClassRec.
-
- * src/autofit/afcjk.h declare af_cjk_script_class
- using macros from aftypes.h,
- when FT_CONFIG_OPTION_PIC is defined init function will be declared.
- * src/autofit/afcjk.c when FT_CONFIG_OPTION_PIC is defined
- af_cjk_script_class struct will have function to init it instead of
- being allocated in the global scope.
-
- * src/autofit/afdummy.h declare af_dummy_script_class
- using macros from aftypes.h,
- when FT_CONFIG_OPTION_PIC is defined init function will be declared.
- * src/autofit/afdummy.c when FT_CONFIG_OPTION_PIC is defined
- af_dummy_script_class struct will have function to init it instead of
- being allocated in the global scope.
-
- * src/autofit/afindic.h declare af_indic_script_class
- using macros from aftypes.h,
- when FT_CONFIG_OPTION_PIC is defined init function will be declared.
- * src/autofit/afindic.c when FT_CONFIG_OPTION_PIC is defined
- af_indic_script_class struct will have function to init it instead of
- being allocated in the global scope.
-
- * src/autofit/aflatin.h declare af_latin_script_class
- using macros from aftypes.h,
- when FT_CONFIG_OPTION_PIC is defined init function will be declared.
- * src/autofit/aflatin.c when FT_CONFIG_OPTION_PIC is defined
- af_latin_script_class struct will have function to init it instead of
- being allocated in the global scope.
- Change af_latin_blue_chars to be PIC-compatible by being a two
- dimentional array rather than array of pointers.
-
-
- * src/autofit/aflatin2.h declare af_latin2_script_class
- using macros from aftypes.h,
- when FT_CONFIG_OPTION_PIC is defined init function will be declared.
- * src/autofit/aflatin2.c when FT_CONFIG_OPTION_PIC is defined
- af_latin2_script_class struct will have function to init it instead of
- being allocated in the global scope.
- Change af_latin2_blue_chars to be PIC-compatible by being a two
- dimentional array rather than array of pointers.
-
- * src/autofit/afglobal.c when FT_CONFIG_OPTION_PIC is defined
- af_script_classes array initialization was moved to afpic.c and
- is later refered using macros defeined in afpic.h.
-
- New Files:
- * src/autofit/afpic.h declare struct to hold PIC globals for autofit
- module and macros to access them.
- * src/autofit/afpic.c implement functions to allocate, destroy and
- initialize PIC globals for autofit module.
-
- * src/autofit/autofit.c add new file to build: afpic.c.
- * src/autofit/jamfile add new files to FT2_MULTI build: afpic.c.
-
-2009-04-05 Oran Agra <oran@monfort.co.il>
-
- Position Independent Code (PIC) support in pshinter module.
-
- * include/freetype/internal/pshints.h add macros to init
- instances of PSHinter_Interface.
-
- * src/pshinter/pshmod.h declare pshinter_module_class
- using macros from ftmodapi.h,
- when FT_CONFIG_OPTION_PIC is defined create and destroy
- functions will be declared.
- * src/pshinter/pshmod.c when FT_CONFIG_OPTION_PIC is defined
- pshinter_interface and pshinter_module_class structs
- will have functions to init or create and destroy them
- instead of being allocated in the global scope.
- And macros will be used from pshpic.h in order to access them.
-
- New Files:
- * src/pshinter/pshpic.h declare struct to hold PIC globals for pshinter
- module and macros to access them.
- * src/pshinter/pshpic.c implement functions to allocate, destroy and
- initialize PIC globals for pshinter module.
-
- * src/pshinter/pshinter.c add new file to build: pshpic.c.
- * src/pshinter/jamfile add new files to FT2_MULTI build: pshpic.c.
-
-2009-04-05 Oran Agra <oran@monfort.co.il>
-
- Position Independent Code (PIC) support in psnames module.
-
- * include/freetype/internal/services/svpscmap.h add macros to init
- instances of FT_Service_PsCMapsRec.
-
- * src/psnames/psmodule.h declare psnames_module_class
- using macros from ftmodapi.h,
- when FT_CONFIG_OPTION_PIC is defined create and destroy
- functions will be declared.
- * src/psnames/psmodule.c when FT_CONFIG_OPTION_PIC is defined
- pscmaps_interface and pscmaps_services structs
- and psnames_module_class array
- will have functions to init or create and destroy them
- instead of being allocated in the global scope.
- And macros will be used from pspic.h in order to access them.
-
- New Files:
- * src/psnames/pspic.h declare struct to hold PIC globals for psnames
- module and macros to access them.
- * src/psnames/pspic.c implement functions to allocate, destroy and
- initialize PIC globals for psnames module.
-
- * src/psnames/psnames.c add new file to build: pspic.c.
- * src/psnames/jamfile add new files to FT2_MULTI build: pspic.c.
-
-2009-04-05 Oran Agra <oran@monfort.co.il>
-
- Position Independent Code (PIC) support in raster renderer.
-
- * src/raster/ftrend1.h declare ft_raster1_renderer_class
- and ft_raster5_renderer_class
- using macros from ftrender.h,
- when FT_CONFIG_OPTION_PIC is defined create and destroy
- functions will be declared.
- * src/smooth/ftrend1.c when FT_CONFIG_OPTION_PIC is defined
- ft_raster1_renderer_class and ft_raster5_renderer_class structs
- will have functions to init or create and destroy them
- instead of being allocated in the global scope.
- Macros will be used from rastpic.h in order to access
- ft_standard_raster from the pic_container (allocated in ftraster.c).
- In ft_raster1_render when PIC is enabled, the last letter of
- module_name is used to verfy the renderer class rather than the
- class pointer.
-
- * src/raster/ftraster.c when FT_CONFIG_OPTION_PIC is defined
- ft_standard_raster struct will have function to init it
- instead of being allocated in the global scope.
-
- New Files:
- * src/raster/rastpic.h declare struct to hold PIC globals for raster
- renderer and macros to access them.
- * src/raster/rastpic.c implement functions to allocate, destroy and
- initialize PIC globals for raster renderer.
-
- * src/raster/raster.c add new file to build: rastpic.c.
- * src/raster/jamfile add new files to FT2_MULTI build: rastpic.c.
-
-2009-04-05 Oran Agra <oran@monfort.co.il>
-
- Position Independent Code (PIC) support in smooth renderer.
-
- * src/smooth/ftsmooth.h declare ft_smooth_renderer_class,
- ft_smooth_lcd_renderer_class and ft_smooth_lcd_v_renderer_class
- using macros from ftrender.h,
- when FT_CONFIG_OPTION_PIC is defined create and destroy
- functions will be declared.
- * src/smooth/ftsmooth.c when FT_CONFIG_OPTION_PIC is defined
- the following structs:
- ft_smooth_renderer_class, ft_smooth_lcd_renderer_class
- and ft_smooth_lcd_v_renderer_class
- will have functions to init or create and destroy them
- instead of being allocated in the global scope.
- And macros will be used from ftspic.h in order to access
- ft_grays_raster from the pic_container (allocated in ftgrays.c).
-
- * src/smooth/ftgrays.h include FT_CONFIG_CONFIG_H
- * src/smooth/ftgrays.c when FT_CONFIG_OPTION_PIC is NOT defined
- func_interface was moved from gray_convert_glyph_inner function
- to the global scope.
- When FT_CONFIG_OPTION_PIC is defined
- func_interface and ft_grays_raster structs
- will have functions to init them
- instead of being allocated in the global scope.
- And func_interface will be allocated on the stack of
- gray_convert_glyph_inner.
-
- New Files:
- * src/smooth/ftspic.h declare struct to hold PIC globals for smooth
- renderer and macros to access them.
- * src/smooth/ftspic.c implement functions to allocate, destroy and
- initialize PIC globals for smooth renderer.
-
- * src/smooth/smooth.c add new file to build: ftspic.c.
- * src/smooth/jamfile add new files to FT2_MULTI build: ftspic.c.
-
-2009-04-05 Oran Agra <oran@monfort.co.il>
-
- Position Independent Code (PIC) support in cff driver.
-
- * include/freetype/internal/services/svcid.h add macros to init
- instances of FT_Service_CIDRec.
- * include/freetype/internal/services/svpsinfo.h add macros to init
- instances of FT_Service_PsInfoRec.
-
- * src/cff/cffcmap.h declare cff_cmap_encoding_class_rec
- and cff_cmap_unicode_class_rec using macros from
- ftobjs.h, when FT_CONFIG_OPTION_PIC is defined create and destroy
- functions will be declared.
- * src/cff/cffcmap.c when FT_CONFIG_OPTION_PIC is defined
- the following structs:
- cff_cmap_encoding_class_rec and cff_cmap_unicode_class_rec
- will have functions to init or create and destroy them
- instead of being allocated in the global scope.
-
- * src/cff/cffdrivr.h declare cff_driver_class using macros from
- ftdriver.h, when FT_CONFIG_OPTION_PIC is defined create and destroy
- functions will be declared.
- * src/cff/cffdrivr.c when FT_CONFIG_OPTION_PIC is defined
- the following structs:
- cff_service_glyph_dict, cff_service_ps_info, cff_service_ps_name
- cff_service_get_cmap_info, cff_service_cid_info, cff_driver_class,
- and cff_services array
- will have functions to init or create and destroy them
- instead of being allocated in the global scope.
- And macros will be used from cffpic.h in order to access them
- from the pic_container.
- Use macros from cffpic.h in order to access the
- structs allocated in cffcmap.c
-
- * src/cff/cffobjs.c Use macros from cffpic.h in order to access the
- structs allocated in cffcmap.c
-
- * src/cff/parser.c when FT_CONFIG_OPTION_PIC is defined
- implement functions to create and destroy cff_field_handlers array
- instead of being allocated in the global scope.
- And macros will be used from cffpic.h in order to access it
- from the pic_container.
-
- New Files:
- * src/cff/cffpic.h declare struct to hold PIC globals for cff
- driver and macros to access them.
- * src/cff/cffpic.c implement functions to allocate, destroy and
- initialize PIC globals for cff driver.
-
- * src/cff/cff.c add new file to build: cffpic.c.
- * src/cff/jamfile add new files to FT2_MULTI build: cffpic.c.
-
-2009-04-05 Oran Agra <oran@monfort.co.il>
-
- Position Independent Code (PIC) support in sfnt driver.
-
- * include/freetype/internal/services/svbdf.h add macros to init
- instances of FT_Service_BDFRec.
- * include/freetype/internal/services/svgldict.h add macros to init
- instances of FT_Service_GlyphDictRec.
- * include/freetype/internal/services/svpostnm.h add macros to init
- instances of FT_Service_PsFontNameRec.
- * include/freetype/internal/services/svsfnt.h add macros to init
- instances of FT_Service_SFNT_TableRec.
- * include/freetype/internal/services/svttcmap.h add macros to init
- instances of FT_Service_TTCMapsRec.
- * include/freetype/internal/sfnt.h add macros to init
- instances of SFNT_Interface.
-
- * src/sfnt/sfdriver.h declare sfnt_module_class using macros from
- ftmodapi.h, when FT_CONFIG_OPTION_PIC is defined create and destroy
- functions will be declared.
- * src/sfnt/sfdriver.c when FT_CONFIG_OPTION_PIC is defined
- the following structs:
- sfnt_service_sfnt_table, sfnt_service_glyph_dict, sfnt_service_ps_name
- tt_service_get_cmap_info, sfnt_service_bdf, sfnt_interface,
- sfnt_module_class, and sfnt_services array
- will have functions to init or create and destroy them
- instead of being allocated in the global scope.
- And macros will be used from sfntpic.h in order to access them
- from the pic_container.
-
- * src/sfnt/ttcmap.h add macros to init
- instances of TT_CMap_ClassRec.
- * src/sfnt/ttcmap.c when FT_CONFIG_OPTION_PIC is defined
- the following structs:
- tt_cmap0_class_rec, tt_cmap2_class_rec, tt_cmap4_class_rec
- tt_cmap6_class_rec, tt_cmap8_class_rec, tt_cmap10_class_rec,
- tt_cmap12_class_rec, tt_cmap14_class_rec and tt_cmap_classes array
- will have functions to init or create and destroy them
- instead of being allocated in the global scope.
- And macros will be used from sfntpic.h in order to access them
- from the pic_container.
- The content of tt_cmap_classes is now described in the
- new file 'ttcmapc.h'.
-
- New Files:
- * src/sfnt/sfntpic.h declare struct to hold PIC globals for sfnt
- driver and macros to access them.
- * src/sfnt/sfntpic.c implement functions to allocate, destroy and
- initialize PIC globals for sfnt driver.
- * src/sfnt/ttcmapc.h describing the content of
- tt_cmap_classes allocated in ttcmap.c
-
- * src/sfnt/sfnt.c add new file to build: sfntpic.c.
- * src/sfnt/jamfile add new files to FT2_MULTI build: sfntpic.c.
-
-2009-04-05 Oran Agra <oran@monfort.co.il>
-
- Position Independent Code (PIC) support in truetype driver.
-
- * include/freetype/internal/services/svmm.h add macros to init
- instances of FT_Service_MultiMastersRec.
- * include/freetype/internal/services/svttglyf.h add macros to init
- instances of FT_Service_TTGlyfRec.
-
- * src/truetype/ttdriver.h declare tt_driver_class using macros from
- ftdriver.h, when FT_CONFIG_OPTION_PIC is defined create and destroy
- functions will be declared.
- * src/truetype/ttdriver.c when FT_CONFIG_OPTION_PIC is defined
- the following structs:
- tt_service_gx_multi_masters, tt_service_truetype_glyf, tt_driver_class
- and tt_services array,
- will have functions to init or create and destroy them
- instead of being allocated in the global scope.
- And macros will be used from ttpic.h in order to access them
- from the pic_container.
- * src/truetype/ttobjs.c change trick_names array to be
- PIC-compatible by being a two dimentional array rather than array
- of pointers.
-
- New Files:
- * src/truetype/ttpic.h declare struct to hold PIC globals for truetype
- driver and macros to access them.
- * src/truetype/ttpic.c implement functions to allocate, destroy and
- initialize PIC globals for truetype driver.
-
- * src/truetype/truetype.c add new file to build: ttpic.c.
- * src/truetype/jamfile add new files to FT2_MULTI build: ttpic.c.
-
-2009-04-05 Oran Agra <oran@monfort.co.il>
-
- Position Independent Code (PIC) support and infrastructure in base.
-
- * include/freetype/config/ftoption.h add FT_CONFIG_OPTION_PIC
- * include/freetype/internal/ftobjs.h Add pic_container member to
- FT_LibraryRec.
- Add macros to declare and init instances of FT_CMap_ClassRec.
- Add macros to init instances of FT_Outline_Funcs and FT_Raster_Funcs.
- Add macros to declare, allocate and initialize modules
- (FT_Module_Class).
- Add macros to declare, allocate and initialize renderers
- (FT_Renderer_Class).
- Add macro to init instances of FT_Glyph_Class.
- Add macros to declare, allocate and initialize drivers
- (FT_Driver_ClassRec).
- * include/freetype/internal/ftpic.h new file to declare the
- FT_PIC_Container struct and the functions to allocate and detroy it.
- * include/freetype/internal/ftserv.h add macros to allocate and
- destory arrays of FT_ServiceDescRec.
- * include/freetype/internal/internal.h define macro to include
- ftpic.h.
-
- New Files:
- * src/base/ftpic.c implement functions to allocate and destory the
- global pic_container.
- * src/base/basepic.h declare struct to hold PIC globals for base and
- macros to access them.
- * src/base/basepic.c implement functions to allocate, destroy and
- initialize PIC globals for base.
-
- * src/base/ftinit.c when FT_CONFIG_OPTION_PIC is defined implement
- functions that allocate and destroy ft_default_modules according to
- FT_CONFIG_MODULES_H in the pic_container instead of the global scope
- and use macro from basepic.h to access it.
- * src/base/ftobjs.c add calls to the functions that allocate and
- destroy the global pic_container when the library is created and
- destroyed.
-
- * src/base/jamfile add new files to FT2_MULTI build:
- ftpic.c and basepic.c.
- * src/base/ftbase.c add new files to build:
- ftpic.c and basepic.c.
-
- * src/base/ftglyph.c when FT_CONFIG_OPTION_PIC is defined
- ft_bitmap_glyph_class and ft_outline_glyph_class will be allocated
- in the pic_container instead of the global scope and use macros from
- basepic.h to access them.
- * src/base/ftbbox.c allocate bbox_interface stract on the stack
- instead of the global scope when FT_CONFIG_OPTION_PIC is defined.
- * src/base/ftstroke.c access ft_outline_glyph_class allocated in
- ftglyph.c via macros from basepic.h
-
-2009-04-05 Oran Agra <oran@monfort.co.il>
-
- Preparing changes in cff parser later needed for PIC version.
-
- * src/cff/cffload.c, src/cff/cffload.h, src/cff/cffobjs.c,
- src/cff/cffparse.c, src/cff/cffparse.h: Add library pointer to
- 'CFF_ParserRec' set by `cff_parser_init'.
- Route library pointer from 'cff_face_init' to 'cff_subfont_load'
- for `cff_parser_init'.
-
- * src/cff/cffparse.c (CFF_Field_Handler): Move it to...
- * src/cff/cffparse.h: This file, to be used by other C files.
-
-2009-04-05 Oran Agra <oran@monfort.co.il>
-
- Minor change in ftstroke.c.
-
- * src/base/ftstroke.c (FT_StrokerRec): Replace `memory' member with
- `library' needed for PIC version.
- Update all callers.
-
-2009-04-04 Werner Lemberg <wl@gnu.org>
-
- ftnames.c -> ftsnames.c
-
- * src/base/ftnames.c: Rename to...
- * src/base/ftsnames.c: This.
- * src/base/Jamfile, src/base/rules.mk, src/base/ftbase.c: Updated.
-
-2009-04-04 Werner Lemberg <wl@gnu.org>
-
- Add support for cmap type 13.
-
- * devel/ftoption.h, include/freetype/config/ftoption.h
- (TT_CONFIG_CMAP_FORMAT_13): New macro.
-
- * src/sfnt/ttcmap.c (TT_CMap13Rec, tt_cmap13_init,
- tt_cmap13_validate, tt_cmap13_char_index, tt_cmap13_char_next,
- tt_cmap13_get_info, tt_cmap13_char_map_def_binary,
- tt_cmap14_class_rec): New functions and structures for cmap 13
- support.
- (tt_cmap_classes): Register tt_cmap13_class_rec.
-
- * docs/CHANGES: Mention cmap 13 support.
-
-2009-04-01 Werner Lemberg <wl@gnu.org>
-
- Ignore empty contours in CFF glyphs.
-
- Problem reported by Albert Astals Cid <aacid@kde.org>.
-
- * src/cff/cffgload.c (cff_builder_close_contour): Synchronize with
- t1_builder_close_contour.
-
-2009-03-21 Werner Lemberg <wl@gnu.org>
-
- Another redundant header inclusion.
-
- * src/truetype/ttgxvar.c: Fix Ghostscript Coverity issue #4041.
-
-2009-03-21 Werner Lemberg <wl@gnu.org>
-
- Remove redundant header inclusions.
-
- This covers many Ghostscript Coverity issues.
-
- * src/*: Do it.
-
-2009-03-21 Werner Lemberg <wl@gnu.org>
-
- Fix Ghostscript Coverity issue #3904.
-
- * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against
- invalid values of `runcnt'.
-
-2009-03-20 Werner Lemberg <wl@gnu.org>
-
- Fix `make multi' run.
-
- * src/smooth/ftsmooth.h: Include FT_INTERNAL_DEBUG_H.
-
-2009-03-20 Werner Lemberg <wl@gnu.org>
-
- Fix Savannah bug #25923.
-
- * src/cache/ftccmap.c (FTC_CMAP_HASH): Fix typo.
-
-2009-03-20 Werner Lemberg <wl@gnu.org>
-
- Protect against too large glyphs.
-
- Problem reported by Tavis Ormandy <taviso@google.com>.
-
- * src/smooth/ftsmooth.c (ft_smooth_render_generic): Don't allow
- `pitch' or `height' to be larger than 0xFFFF.
-
-2009-03-20 Werner Lemberg <wl@gnu.org>
- Tavis Ormandy <taviso@google.com>
-
- Fix validation for various cmap table formats.
-
- * src/sfnt/ttcmap.c (tt_cmap8_validate, tt_cmap10_validate,
- tt_cmap12_validate): Check `length' correctly.
- (tt_cmap_14_validate): Check `length' and `numMappings' correctly.
-
-2009-03-20 Werner Lemberg <wl@gnu.org>
-
- Protect against malformed compressed data.
-
- * src/lzw/ftzopen.c (ft_lzwstate_io): Test whether `state->prefix' is
- zero.
-
-2009-03-20 Werner Lemberg <wl@gnu.org>
-
- Protect against invalid SID values in CFFs.
-
- Problem reported by Tavis Ormandy <taviso@google.com>.
-
- * src/cff/cffload.c (cff_charset_load): Reject SID values larger
- than 64999.
-
-2009-03-19 Vincent Richomme <richom.v@free.fr>
-
- Update WinCE Visual C project files.
-
- * builds/wince/vc2005-ce/freetype.vcproj,
- builds/wince/vc2008-ce/freetype.vcproj: Add missing base extension
- files.
-
-2009-03-19 Werner Lemberg <wl@gnu.org>
-
- Remove unused Win32 code.
-
- * builds/wince/ftdebug.c: Remove code guarded with `!_WIN32_WCE'.
- Since Win32 is handled separately this is no longer needed.
-
-2009-03-19 Vincent Richomme <richom.v@free.fr>
-
- Make `gzip' module compile on WinCE.
-
- * src/gzip/zconf.h [_WIN32_WCE]: Define NO_ERRNO_H.
-
-2009-03-19 Werner Lemberg <wl@gnu.org>
-
- Remove unused WinCE code.
-
- * builds/win32/ftdebug.c: Remove code guarded with `_WIN32_WCE'.
- Since WinCE is handled separately this is no longer needed.
-
-2009-03-16 Werner Lemberg <wl@gnu.org>
-
- docmaker: Don't ignore single-line code blocks.
-
- * src/tools/docmaker/content.py (DocBlock::_init__): Fix change from
- 2009-01-31.
-
-2009-03-15 Steve Langasek <steve.langasek@canonical.com>
-
- Use __asm__ for declaring assembly instead of asm.
-
- * builds/unix/ftconfig.in (FT_MulFix_arm): Use __asm__ instead of
- asm on arm, fixing a build failure on armel with -pedantic.
-
-2009-03-14 Werner Lemberg <wl@gnu.org>
-
- Fix valgrind warning.
-
- * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_bit_aligned): Don't read
- past the end of the frame.
-
-2009-03-12 Werner Lemberg <wl@gnu.org>
-
- * Version 2.3.9 released.
- =========================
-
-
- Tag sources with `VER-2-3-9'.
-
-2009-03-12 Werner Lemberg <wl@gnu.org>
-
- * builds/unix/freetype2.in: Move @FT2_EXTRA_LIBS@ to `Libs.private'.
-
-2009-03-12 Werner Lemberg <wl@gnu.org>
-
- Fix some FreeType Coverity issues as reported for Ghostscript.
-
- * src/base/ftobjs.c (FT_New_Face, FT_New_Memory_Face): Initialize
- `args.stream' (#3874, #3875).
- (open_face_PS_from_sfnt_stream): Improve error management (#3786).
- * src/base/ftmm.c (ft_face_get_mm_service): Fix check of `aservice'
- (#3870).
- * src/base/ftstroke.c (ft_stroke_border_get_counts): Remove dead
- code (#3790).
- * src/base/ftrfork.c (raccess_guess_apple_generic): Check error
- value of `FT_Stream_Skip' (#3784).
-
- * src/type1/t1gload.c (T1_Load_Glyph): Check `size' before accessing
- it (#3872)
-
- * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Check `face' before accessing
- it (#3871).
- * src/pcf/pcfread.c (pcf_get_metrics): Handle return value of
- `pcf_get_metric' (#3789, #3782).
- (pcf_get_properties): Use FT_STREAM_SKIP (#3783).
-
- * src/cache/ftcmanag.c (FTC_Manager_RegisterCache): Fix check of
- `acache' (#3797)
-
- * src/cff/cffdrivr.c (cff_ps_get_font_info): Fix check of `cff'
- (#3796).
- * src/cff/cffgload.c (cff_decoder_prepare): Check `size' (#3795).
- * src/cff/cffload.c (cff_index_get_pointers): Add comment (#3794).
-
- * src/bdf/bdflib.c (_bdf_add_property): Check `fp->value.atom'
- (#3793).
- (_bdf_parse_start): Add comment (#3792).
-
- * src/raster/ftraster.c (Finalize_Profile_Table): Check
- `ras.fProfile' (#3791).
-
- * src/sfnt/ttsbit.c (Load_SBit_Image): Use FT_STREAM_SKIP (#3785).
-
- * src/gzip/ftgzip.c (ft_gzip_get_uncompressed_size): Properly ignore
- seek error (#3781).
-
-2009-03-11 Michael Toftdal <toftdal@gmail.com>
-
- Extend CID service functions to handle CID-keyed CFFs as CID fonts.
-
- * include/freetype/ftcid.h (FT_Get_CID_Is_Internally_CID_keyed,
- FT_Get_CID_From_Glyph_Index): New functions.
-
- * include/freetype/internal/services/svcid.h
- (FT_CID_GetIsInternallyCIDKeyedFunc,
- FT_CID_GetCIDFromGlyphIndexFunc): New function typedefs.
- (CID Service): Use them.
-
- * src/base/ftcid.c: Include FT_CID_H.
- (FT_Get_CID_Is_Internally_CID_keyed, FT_Get_CID_From_Glyph_Index):
- New functions.
-
- * src/cff/cffdrivr.c (cff_get_is_cid, cff_get_cid_from_glyph_index):
- New functions.
- (cff_service_cid_info): Add them.
- * src/cff/cffload.c (cff_font_load): Don't free `font->charset.sids'
- -- it is needed for access as a CID-keyed font. It gets deleted
- later on.
-
- * src/cid/cidriver.c (cid_get_is_cid, cid_get_cid_from_glyph_index):
- New functions.
- (cid_service_cid_info): Add them.
-
- * docs/CHANGES: Updated.
-
-2009-03-11 Bram Tassyns <bramt@enfocus.be>
-
- Fix Savannah bug #25597.
-
- * src/cff/cffparse.c (cff_parse_real): Don't allow fraction_length
- to become larger than 9.
-
-2009-03-11 Werner Lemberg <wl@gnu.org>
-
- Fix Savannah bug #25814.
-
- * builds/unix/freetype2.in: As suggested in the bug report, move
- @LIBZ@ to `Libs.private'.
-
-2009-03-11 Werner Lemberg <wl@gnu.org>
-
- Fix Savannah bug #25781.
- We now simply check for a valid `offset', no longer handling `delta
- = 1' specially.
-
- * src/sfnt/ttcmap.c (tt_cmap4_validate): Don't check `delta' for
- last segment.
- (tt_cmap4_set_range, tt_cmap4_char_map_linear,
- tt_cmap4_char_map_binary): Check offset.
-
-2009-03-11 Werner Lemberg <wl@gnu.org>
-
- * src/base/Jamfile: Fix handling of ftadvanc.c.
- Reported by Oran Agra <oran@monfort.co.il>.
-
-2009-03-10 Vincent Richomme <richom.v@free.fr>
-
- Restructure Win32 and Wince compiler support.
-
- * src/builds/win32: Remove files for WinCE.
- Move VC 2005 support to a separate directory.
- Add directory for VC 2008 support.
-
- * src/builds/wince: New directory hierarchy for WinCE compilers
- (VC 2005 and VC 2008).
-
-2009-03-09 Werner Lemberg <wl@gnu.org>
-
- More preparations for 2.3.9 release.
-
- * docs/CHANGES: Updated.
-
- * Jamfile, README: s/2.3.8/2.3.9/, s/238/239/.
-
-2009-03-09 Werner Lemberg <wl@gnu.org>
-
- * src/sfnt/rules.mk (SFNT_DRV_H): Add ttsbit0.c.
-
-2009-03-09 Alexey Kryukov <anagnost@yandex.ru>
-
- Fix handling of EBDT formats 8 and 9 (part 2).
-
- This patch fixes the following problems in ttsbit0.c:
-
- . Bitmaps for compound glyphs were never allocated.
-
- . `SBitDecoder' refused to load metrics if some other metrics have
- already been loaded. This condition certainly makes no sense for
- recursive calls, so I've just disabled it. Another possibility
- would be resetting `decoder->metrics_loaded' to false before
- loading each composite component. However, we must restore the
- original metrics after finishing the recursion; otherwise we can
- get a misaligned glyph.
-
- . `tt_sbit_decoder_load_bit_aligned' incorrectly handled `x_pos',
- causing some glyph components to be shifted too far to the right
- (especially noticeable for small sizes).
-
- Note that support for grayscale bitmaps (not necessarily compound) is
- completely broken in ttsbit0.c.
-
- * src/sfnt/tt_sbit_decoder_load_metrics: Always load metrics.
- (tt_sbit_decoder_load_bit_aligned): Handle `x_pos' correctly in case
- of `h == height'.
- (tt_sbit_decoder_load_compound): Reset metrics after loading
- components.
- Allocate bitmap.
-
-2009-03-09 Werner Lemberg <wl@gnu.org>
-
- * builds/unix/configure.raw (version_info): Set to 9:20:3.
-
-2009-03-03 David Turner <david@freetype.org>
-
- Protect SFNT kerning table parser against malformed tables.
-
- This closes Savannah BUG #25750.
-
- * src/sfnt/ttkern.c (tt_face_load_kern, tt_face_get_kerning): Fix a
- bug where a malformed table would be successfully loaded but later
- crash the engine during parsing.
-
-2009-03-03 David Turner <david@freetype.org>
-
- Update documentation and bump version number to 2.3.9.
-
- * include/freetype/freetype.h: Bump patch version to 9.
- * docs/CHANGES: Document the ABI break in 2.3.8.
- * docs/VERSION.DLL: Update version numbers table for 2.3.9.
-
-2009-03-03 David Turner <david@freetype.org>
-
- Remove ABI-breaking field in public PS_InfoFontRec definition.
-
- Instead, we define a new internal PS_FontExtraRec structure to
- hold the additional field, then place it in various internal
- positions of the corresponding FT_Face derived objects.
-
- * include/freetype/t1tables.h (PS_FontInfoRec): Remove the
- `fs_type' field from the public structure.
- * include/freetype/internal/psaux.h (T1_FieldLocation): New
- enumeration `T1_FIELD_LOCATION_FONT_EXTRA'.
- * include/freetype/internal/t1types.h (PS_FontExtraRec): New
- structure.
- (T1_FontRec, CID_FaceRec): Add it.
-
- * src/cid/cidload.c (cid_load_keyword): Handle
- T1_FIELD_LOCATION_FONT_EXTRA.
- * src/cid/cidtoken.h, src/type1/t1tokens.h, src/type42/t42parse.c:
- Adjust FT_STRUCTURE and T1CODE properly to handle `FSType'.
- * src/type1/t1load.c (t1_load_keyword): Handle
- T1_FIELD_LOCATION_FONT_EXTRA.
-
- * include/freetype/internal/services/svpsinfo.h (PsInfo service):
- Add `PS_GetFontExtraFunc' function typedef.
-
- * src/base/ftfstype.c: Include FT_INTERNAL_SERVICE_H and
- FT_SERVICE_POSTSCRIPT_INFO_H.
- (FT_Get_FSType_Flags): Use POSTSCRIPT_INFO service.
-
- * src/cff/cffdrivr.c (cff_service_ps_info): Updated.
- * src/cid/cidriver.c (cid_ps_get_font_extra): New function.
- (cid_service_ps_info): Updated.
- * src/type1/t1driver.c (t1_ps_get_font_extra): New function.
- (t1_service_ps_info): Updated.
- * src/type42/t42drivr.c (t42_ps_get_font_extra): New function.
- (t42_service_ps_info): Updated.
-
-2009-03-02 Alexey Kryukov <anagnost@yandex.ru>
-
- Fix handling of EBDT formats 8 and 9.
-
- The main cycle in `blit_sbit' makes too many iterations: it actually
- needs the count of lines in the source bitmap rather than in the
- target image.
-
- * src/sfnt/ttsbit.c (blit_sbit) [FT_CONFIG_OPTION_OLD_INTERNALS]:
- Add parameter `source_height' and use it for main loop.
- (Load_SBit_Single) [FT_CONFIG_OPTION_OLD_INTERNALS]: Updated.
-
-2009-02-23 Werner Lemberg <wl@gnu.org>
-
- Fix Savannah bug #25669.
-
- * src/base/ftadvanc.h (FT_Get_Advances): Fix serious typo.
-
- * src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics): Fix
- scaling factor for non-scalable fonts.
-
- * src/cff/cffdrivr.c (cff_get_advances): Use correct advance width
- value to prevent incorrect scaling.
-
- * docs/CHANGES: Document it.
-
-2009-02-15 Matt Godbolt <matt@godbolt.org>
-
- Fix Savannah bug #25588.
-
- * builds/unix/ftconfig.in (FT_MulFix_arm): Use correct syntax for
- `orr' instruction.
-
-2009-02-11 Werner Lemberg <wl@gnu.org>
-
- * src/truetype/ttobjs.c (tt_check_trickyness): Add `DFKaiShu'.
- Reported by David Bevan <dbevan@emtex.com>.
-
-2009-02-09 Werner Lemberg <wl@gnu.org>
-
- Fix Savannah bug #25495.
-
- * src/sfnt/sfobjs.c (sfnt_load_face): Test for bitmap strikes before
- setting metrics and bbox values. This ensures that the check for a
- font with neither a `glyf' table nor bitmap strikes can be performed
- early enough to set metrics and bbox values too.
-
-2009-02-04 Werner Lemberg <wl@gnu.org>
-
- Fix Savannah bug #25480.
-
- * builds/unix/freetype-config.in: For --ftversion, don't use $prefix
- but $includedir.
-
-2009-01-31 Werner Lemberg <wl@gnu.org>
-
- Minor docmaker improvements.
-
- * src/tools/docmaker/content.py (DocBlock::__init__): Ignore empty
- code blocks.
-
-2009-01-25 Werner Lemberg <wl@gnu.org>
-
- Fix SCANCTRL handling in TTFs.
- Problem reported by Alexey Kryukov <anagnost@yandex.ru>.
-
- * src/truetype/ttinterp.c (Ins_SCANCTRL): Fix threshold handling.
-
-2009-01-23 Werner Lemberg <wl@gnu.org>
-
- Move FT_Get_FSType_Flags to a separate file.
- Problem reported by Mickey Gabel <mickey@monfort.co.il>.
-
- * src/base/ftobjs.c (FT_Get_FSType_Flags): Move to...
- * src/base/ftfstype.c: This new file.
-
- * modules.cfg (BASE_EXTENSION): Add ftfstype.c.
-
- * docs/INSTALL.ANY: Updated.
-
- * builds/mac/*.txt, builds/amiga/*makefile*,
- builds/win32/{visualc,visualce}/freetype.*, builds/symbian/*:
- Updated.
-
-2009-01-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * builds/unix/ftsystem.c (FT_Stream_Open): Fix 2 error
- messages ending without "\n".
-
-2009-01-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Fix Savannah bug #25347.
-
- * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Rewind
- the stream to the original position passed to this function,
- when ft_lookup_PS_in_sfnt_stream() failed.
- (Mac_Read_sfnt_Resource): Rewind the stream to the head of
- sfnt resource body, when open_face_PS_from_sfnt_stream()
- failed.
-
-2009-01-19 Michael Lotz <mmlr@mlotz.ch>
-
- Fix Savannah bug #25355.
-
- * include/freetype/config/ftconfig.h (FT_MulFix_i386): Make
- assembler code work with gcc 2.95.3 (as used by the Haiku project).
- Add `cc' register to the clobber list.
-
-2009-01-18 Werner Lemberg <wl@gnu.org>
-
- Protect FT_Get_Next_Char.
-
- * src/sfnt/ttcmap.c (tt_cmap4_set_range): Apply fix similar to
- change from 2008-07-22.
-
- Patch from Ronen Ghoshal <rghoshal@emtex.com>.
-
-2009-01-18 Werner Lemberg <wl@gnu.org>
-
- Implement FT_Get_Name_Index for SFNT driver.
-
- * src/sfnt/sfdriver.c (sfnt_get_name_index): New function.
- (sfnt_service_glyph_dict): Use it.
-
- Problem reported by Truc Truong <tructv@necsv.com>.
-
-2009-01-18 Werner Lemberg <wl@gnu.org>
-
- * include/freetype/ftstroke.h (FT_Outline_GetInsideBorder): Fix
- documentation. Problem reported by Truc Truong <tructv@necsv.com>.
-
- * docs/CHANGES: Updated.
-
-2009-01-14 Werner Lemberg <wl@gnu.org>
-
- * Version 2.3.8 released.
- =========================
-
-
- Tag sources with `VER-2-3-8'.
-
- * docs/VERSION.DLL: Update documentation and bump version number to
- 2.3.8.
-
- * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
- builds/win32/visualc/freetype.dsp,
- builds/win32/visualc/freetype.vcproj,
- builds/win32/visualce/index.html,
- builds/win32/visualce/freetype.dsp,
- builds/win32/visualce/freetype.vcproj: s/2.3.7/2.3.8/, s/237/238/.
-
- * include/freetype/freetype.h (FREETYPE_PATCH): Set to 8.
-
- * builds/unix/configure.raw (version_info): Set to 9:19:3.
-
- * docs/release: Updated.
-
-2009-01-14 Werner Lemberg <wl@gnu.org>
-
- * builds/toplevel.mk (dist): Compress better.
-
-2009-01-13 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftobjs.c (FT_Get_FSType_Flags): Cast for compilation
- with C++.
-
-2009-01-13 Werner Lemberg <wl@gnu.org>
-
- Don't use stdlib.h and friends directly.
- Reported by Mickey Gabel <mickey@monfort.co.il>.
-
- * src/base/ftdbgmem.c: s/<stdlib.h>/FT_CONFIG_STANDARD_LIBRARY_H/.
-
- * src/gzip/ftgzip.c, src/lzw/ftlzw.c, src/raster/ftmisc.h:
- s/<string.h>/FT_CONFIG_STANDARD_LIBRARY_H/.
-
- * src/autofit/aftypes.h, src/autofit/afhints.c,
- src/pshinter/pshalgo.c: s/<stdio.h>/FT_CONFIG_STANDARD_LIBRARY_H/
-
- * src/lzw/ftlzw.c, src/base/ftdbgmem.c: Don't include stdio.h.
-
-2009-01-12 Werner Lemberg <wl@gnu.org>
-
- Avoid compiler warnings.
-
- * */*: s/do ; while ( 0 )/do { } while ( 0 )/.
- Reported by Sean McBride <sean@rogue-research.com>.
-
-2009-01-12 Werner Lemberg <wl@gnu.org>
-
- Fix stdlib dependencies.
-
- Problem reported by Mickey Gabel <mickey@monfort.co.il>.
-
- * include/freetype/config/ftstdlib.h (ft_exit): Removed. Unused.
-
- * src/autofit/afhints.c, src/base/ftlcdfil.c, src/smooth/ftsmooth.c:
- s/memcpy/ft_memcpy/.
- * src/psaux/t1decode.c: s/memset/ft_memset/, s/memcpy/ft_memcpy/.
-
-2009-01-11 Werner Lemberg <wl@gnu.org>
-
- * docs/formats.txt: Add link to PCF specification.
-
- * include/freetype/ftbdf.h (FT_Get_BDF_Property): Improve
- documentation.
-
-2009-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftadvanc.c (_ft_face_scale_advances, FT_Get_Advance,
- FT_Get_Advances): Change the type of load_flags from FT_UInt32 to
- FT_Int32, to match with the flags for FT_Load_Glyph().
- * src/cff/cffdrivr.c (cff_get_advances): Ditto.
- * src/truetype/ttdriver.c (tt_get_advances): Ditto.
- * include/freetype/ftadvanc.h (FT_Get_Advance, FT_Get_Advances):
- Ditto.
- * include/freetype/internal/ftdriver.h (FT_Face_GetAdvancesFunc):
- Ditto.
-
-2009-01-09 Daniel Zimmermann <netzimme@aol.com>
-
- * src/gxvalid/gxvmort.c (gxv_mort_feature_validate): Fix wrong
- length check. From Savannah patch #6682.
-
-2009-01-09 Werner Lemberg <wl@gnu.org>
-
- Fix problem with T1_FIELD_{NUM,FIXED}_TABLE2.
-
- * src/psaux/psobjs.c (ps_parser_load_field_table): Don't handle
- `count_offset' if it is zero (i.e., unused). Otherwise, the first
- element of the structure which holds the data is erroneously
- modified. Problem reported by Chi Nguyen <chint@necsv.com>.
-
-2009-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftadvanc.c (_ft_face_scale_advances, FT_Get_Advance,
- FT_Get_Advances): Extend the type of load_flags from FT_UInt to
- FT_UInt32, to pass 32-bit flags on 16bit platforms.
- * src/cff/cffdrivr.c (cff_get_advances): Ditto.
- * src/truetype/ttdriver.c (tt_get_advances): Ditto.
- * include/freetype/ftadvanc.h (FT_Get_Advance, FT_Get_Advances):
- Ditto.
- * include/freetype/internal/ftdriver.h (FT_Face_GetAdvancesFunc):
- Ditto.
-
-2009-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftobjs.c (FT_Done_Library): Issue an error message when
- FT_Done_Face() cannot free all faces. If the list of the opened
- faces includes broken face which FT_Done_Face() cannot free,
- FT_Done_Library() retries FT_Done_Face() and it can fall into
- an endless loop. See the discussion:
- http://lists.gnu.org/archive/html/freetype-devel/2008-09/msg00047.html
- http://lists.gnu.org/archive/html/freetype-devel/2008-10/msg00000.html
-
-2009-01-07 Werner Lemberg <wl@gnu.org>
-
- * docs/CHANGES: Document new key `a' in ftdiff.
-
-2009-01-06 Werner Lemberg <wl@gnu.org>
-
- * autogen.sh: Don't use GNUisms while calling sed. Problem reported
- by Sean McBride.
-
-2009-01-06 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftbitmap.c (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_LCD
- and FT_PIXEL_MODE_LCD_V. Problem reported by Chi Nguyen
- <chint@necsv.com>.
-
-2009-01-06 Diego Pettenò <flameeyes@gmail.com>
-
- * builds/unix/configure.raw: Don't call AC_CANONICAL_BUILD and
- AC_CANONICAL_TARGET and use $host_os only. A nice explanation for
- this change can be found at
- http://blog.flameeyes.eu/s/canonical-target.
-
- From Savannah patch #6712.
-
-2009-01-06 Sean McBride <sean@rogue-research.com>
-
- * src/base/ftdbgmem.c (_debug_mem_dummy): Make it static.
-
- * src/base/ftmac.c: Remove some #undefs.
-
-2008-12-26 Werner Lemberg <wl@gnu.org>
-
- Set `face_index' field in FT_Face for all font formats.
-
- * cff/cffobjs.c (cff_face_init), winfonts/winfnt.c (FNT_Face_Init),
- sfnt/sfobjs.c (sfnt_init_face): Do it.
-
- * docs/CHANGES: Document it.
-
-2008-12-22 Steve Grubb
-
- * builds/unix/ftsystem.c (FT_Stream_Open): Reject zero-length files.
- Patch from Savannah bug #25151.
-
-2008-12-21 Werner Lemberg <wl@gnu.org>
-
- * src/pfr/pfrdrivr.c, src/winfonts/winfnt.c, src/cache/ftcmanag.c,
- src/smooth/ftgrays.c, src/base/ftobjc.s, src/sfobjs.c:
- s/_Err_Bad_Argument/_Err_Invalid_Argument/. The former is for
- errors in the bytecode interpreter only.
-
-2008-12-21 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftpfr.c (FT_Get_PFR_Metrics): Protect against NULL
- arguments.
- Fix return value for non-PFR fonts. Both problems reported by Chi
- Nguyen <chint@necsv.com>.
-
-2008-12-21 anonymous
-
- FT_USE_MODULE declares things as:
-
- extern const FT_Module_Class
-
- (or similar for C++). However, the actual types of the variables
- being declared are often different, e.g., FT_Driver_ClassRec or
- FT_Renderer_Class. (Some are, indeed, FT_Module_Class.)
-
- This works with most C compilers (since those structs begin with an
- FT_Module_Class struct), but technically it's undefined behavior.
-
- To quote the ISO/IEC 9899:TC2 final committee draft, section 6.2.7
- paragraph 2:
-
- All declarations that refer to the same object or function shall
- have compatible type; otherwise, the behavior is undefined.
-
- (And they are not compatible types.)
-
- Most C compilers don't reject (or even detect!) code which has this
- issue, but the GCC LTO development branch compiler does. (It
- outputs the types of the objects while generating .o files, along
- with a bunch of other information, then compares them when doing the
- final link-time code generation pass.)
-
- Patch from Savannah bug #25133.
-
- * src/base/ftinit.c (FT_USE_MODULE): Include variable type.
-
- * builds/amiga/include/freetype/config/ftmodule.h,
- include/freetype/config/ftmodule.h, */module.mk: Updated to declare
- pass correct types to FT_USE_MODULE.
-
-2008-12-21 Hongbo Ni <hongbo@njstar.com>
-
- * src/autofit/aflatin.c (af_latin_hint_edges),
- src/autofit/aflatin2.c (af_latin2_hint_edges), src/autofit/afcjk.c
- (af_cjk_hint_edges): Protect against division by zero. This fixes
- Savannah bug #25124.
-
-2008-12-18 Werner Lemberg <wl@gnu.org>
-
- * docs/CHANGES: Updated.
-
-2008-12-18 Bevan, David <dbevan@emtex.com>
-
- Provide API for accessing embedding and subsetting restriction
- information.
-
- * include/freetype.h (FT_FSTYPE_INSTALLABLE_EMBEDDING,
- FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING,
- FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING, FT_FSTYPE_EDITABLE_EMBEDDING,
- FT_FSTYPE_NO_SUBSETTING, FT_FSTYPE_BITMAP_EMBEDDING_ONLY): New
- macros.
- (FT_Get_FSType_Flags): New function declaration.
-
- * src/base/ftobjs.c (FT_Get_FSType_Flags): New function.
-
- * src/cid/cidtoken.h, src/type1/t1tokens.h, src/type42/t42parse.c
- (t42_keywords): Handle `FSType'.
-
- * include/freetype/t1tables.h (PS_FontInfoRec): Add `fs_type' field.
-
-2008-12-17 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Don't use internal
- macros so that copying the source code into an application works
- out of the box.
-
-2008-12-17 Werner Lemberg <wl@gnu.org>
-
- * include/freetype/ftsynth.h, src/base/ftsynth.c: Move
- FT_GlyphSlot_Own_Bitmap to...
- * include/freetype/ftbitmap.h, src/base/ftbitmap.c: These files.
-
- * docs/CHANGES: Document it.
-
-2008-12-10 Werner Lemberg <wl@gnu.org>
-
- Generalize the concept of `tricky' fonts by introducing
- FT_FACE_FLAG_TRICKY to indicate that the font format's hinting
- engine is necessary for correct rendering.
-
- At the same time, slightly modify the behaviour of tricky fonts:
- FT_LOAD_NO_HINTING is now ignored. To really force raw loading
- of tricky fonts (without hinting), both FT_LOAD_NO_HINTING and
- FT_LOAD_NO_AUTOHINT must be used.
-
- Finally, tricky TrueType fonts always use the bytecode interpreter
- even if the patented code is used.
-
- * include/freetype/freetype.h (FT_FACE_FLAG_TRICKY, FT_IS_TRICKY):
- New macros.
-
- * src/truetype/ttdriver.c (Load_Glyph): Handle new load flags
- semantics as described above.
-
- * src/truetype/ttobjs.c (tt_check_trickyness): New function, using
- code of ...
- (tt_face_init): This function, now simplified and updated to new
- semantics.
-
- * src/base/ftobjs.c (FT_Load_Glyph): Don't use autohinter for tricky
- fonts.
-
- * docs/CHANGES: Document it.
-
-2008-12-09 Werner Lemberg <wl@gnu.org>
-
- Really fix Savannah bug #25010: An SFNT font with neither outlines
- nor bitmaps can be considered as containing space `glyphs' only.
-
- * src/truetype/ttpload.c (tt_face_load_loca): Handle the case where
- a `glyf' table is missing.
-
- * src/truetype/ttgload.c (load_truetype_glyph): Abort if we have no
- `glyf' table but a non-zero `loca' entry.
- (tt_loader_init): Handle missing `glyf' table.
-
- * src/base/ftobjs.c (FT_Load_Glyph): Undo change 2008-12-05.
-
- * src/sfnt/sfobjs.c (sfnt_load_face): A font with neither outlines
- nor bitmaps is scalable.
-
-2008-12-05 Werner Lemberg <wl@nu.org>
-
- * src/autofit/aflatin.c (af_latin_uniranges): Add more ranges. This
- fixes Savannah bug #21190 which also provides a basic patch.
-
-2008-12-05 Werner Lemberg <wl@nu.org>
-
- * include/freetype/freetype.h (FT_LOAD_ADVANCE_ONLY): Use value
- 0x100 instead of 0x10000; the latter value is already occupied by
- FT_LOAD_TARGET_LIGHT. Bug reported by James Cloos.
-
-
- Handle SFNT with neither outlines nor bitmaps. This fixes Savannah
- bug #25010.
-
- * src/base/ftobjs.c (FT_Load_Glyph): Reject fonts with neither
- outlines nor bitmaps.
-
- * src/sfnt/sfobjs.c (sfnt_load_face): Don't return an error if there
- is no table with glyphs.
-
-
- * src/sfnt/ttload.c (tt_face_lookup_table): Improve debugging
- message.
-
-2008-12-01 Werner Lemberg <wl@gnu.org>
-
- GDEF tables need `glyph_count' too for validation. Problem reported
- by Chi Nguyen <chint@necsv.com>.
-
- * src/otvalid/otvgdef.c (otv_GDEF_validate), src/otvalid/otvalid.h
- (otv_GDEF_validate), src/otvalid/otvmod.c (otv_validate): Pass
- `glyph_count'.
-
-2008-11-29 Werner Lemberg <wl@gnu.org>
-
- * src/autofit/afcjk.c, src/base/ftoutln.c, src/base/ftrfork.c,
- src/bdf/bdfdrivr.c, src/gxvalid/gxvmorx.c, src/otvalid/otvmath.c,
- src/pcf/pcfdrivr.c, src/psnames/pstables.h, src/smooth/ftgrays.c,
- src/tools/glnames.py, src/truetype/ttinterp.c, src/type1/t1load.c,
- src/type42/t42objs.c, src/winfonts/winfnt.c: Fix compiler warnings
- (Atari PureC).
-
-2008-11-29 James Cloos <cloos@jhcloos.com>
-
- * src/type/t1load.c (mm_axis_unmap): Revert previous patch and fix
- it correctly by using FT_INT_TO_FIXED (FreeType expects 16.16 values
- in the /BlendDesignMap space).
-
-2008-11-29 James Cloos <cloos@jhcloos.com>
-
- * src/type1/t1load.c (mm_axis_unmap): `blend_points' is FT_Fixed*,
- whereas `design_points' is FT_Long*. Therefore, return blend rather
- than design points.
-
-2008-11-27 Werner Lemberg <wl@gnu.org>
-
- * src/cff/cffparse.c (cff_parse_real): Handle more than nine
- significant digits correctly. This fixes Savannah bug #24953.
-
-2008-11-25 Daniel Zimmermann <netzimme@aol.com>
-
- * src/base/ftstream.c (FT_Stream_ReadFields): Don't access stream
- before the NULL check. From Savannah patch #6681.
-
-2008-11-24 Werner Lemberg <wl@gnu.org>
-
- Fixes from the gnuwin32 port.
-
- * src/base/ftlcdfil.c: s/EXPORT/EXPORT_DEF/.
-
- * src/base/ftotval.c: Include FT_OPENTYPE_VALIDATE_H.
-
- * src/psaux/psobjs.c (ps_table_add): Check `length'.
-
-2008-11-15 Werner Lemberg <wl@gnu.org>
-
- * src/truetype/ttinterp.c (tt_default_graphics_state): The default
- value for `scan_type' is zero, as confirmed by Greg Hitchcock from
- Microsoft. Problem reported by Michal Nowakowski
- <miszka@limes.com.pl>.
-
-2008-11-12 Tor Andersson <tor.andersson@gmail.com>
-
- * src/cff/cffdrivr.c (cff_get_cmap_info): Initialize `format' field.
- This fixes Savannah bug #24819.
-
-2008-11-08 Werner Lemberg <wl@gnu.org>
-
- * src/sfnt/sfobjs.c (sfnt_load_face): Remove #if 0/#endif guards
- since OpenType version 1.5 has been released.
-
- * include/ttnameid.h (TT_NAME_ID_WWS_FAMILY,
- TT_NAME_ID_WWS_SUBFAMILY): New macros for OpenType 1.5.
- (TT_URC_COPTIC, TT_URC_VAI, TT_URC_NKO, TT_URC_BALINESE,
- TT_URC_PHAGSPA, TT_URC_NON_PLANE_0, TT_URC_PHOENICIAN,
- TT_URC_TAI_LE, TT_URC_NEW_TAI_LUE, TT_URC_BUGINESE,
- TT_URC_GLAGOLITIC, TT_URC_YIJING, TT_URC_SYLOTI_NAGRI,
- TT_URC_LINEAR_B, TT_URC_ANCIENT_GREEK_NUMBERS, TT_URC_UGARITIC,
- TT_URC_OLD_PERSIAN, TT_URC_SHAVIAN, TT_URC_OSMANYA,
- TT_URC_CYPRIOT_SYLLABARY, TT_URC_KHAROSHTHI, TT_URC_TAI_XUAN_JING,
- TT_URC_CUNEIFORM, TT_URC_COUNTING_ROD_NUMERALS, TT_URC_SUNDANESE,
- TT_URC_LEPCHA, TT_URC_OL_CHIKI, TT_URC_SAURASHTRA, TT_URC_KAYAH_LI,
- TT_URC_REJANG, TT_URC_CHAM, TT_URC_ANCIENT_SYMBOLS,
- TT_URC_PHAISTOS_DISC, TT_URC_OLD_ANATOLIAN, TT_URC_GAME_TILES): New
- macros for OpenType 1.5.
-
-2008-11-08 Wenlin Institute <wenlin@wenlin.com>
-
- * src/base/ftobjs.c (ft_glyphslot_free_bitmap): Protect against
- slot->internal == NULL. Reported by Graham Asher.
-
-2008-11-08 Werner Lemberg <wl@gnu.org>
-
- * src/sfnt/sfobjs.c (tt_face_get_name): Modified to return an error
- code so that memory allocation problems can be distinguished from
- missing table entries. Reported by Graham Asher.
- (GET_NAME): New macro.
- (sfnt_load_face): Use it.
-
-2008-11-05 Werner Lemberg <wl@gnu.org>
-
- * devel/ftoption.h, include/freetype/config/ftoption.h
- [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Undefine
- TT_CONFIG_OPTION_UNPATENTED_HINTING. This fixes the return value of
- `FT_Get_TrueType_Engine_Type' (and makes it work as documented).
- Reported in bug #441638 of bugzilla.novell.com.
-
- * docs/CHANGES: Document it.
-
-2008-11-03 Werner Lemberg <wl@gnu.org>
-
- * src/type1/t1load.c (parse_subrs): Use an endless loop. There are
- fonts (like HELVI.PFB version 003.001, used on OS/2) which define
- some `subrs' elements more than once. Problem reported by Peter
- Weilbacher <mozilla@weilbacher.org>.
-
-2008-10-15 Graham Asher <graham.asher@btinternet.com>
-
- * src/sfnt/ttpost.c (tt_post_default_names): Add `const'.
-
-2008-10-15 David Turner <david@freetype.org>
-
- * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Disambiguate for
- meddlesome compilers' warning against `for ( ...; ...; ...) ;'.
-
-2008-10-14 Werner Lemberg <wl@gnu.org>
-
- * src/cff/cffobjs.c (cff_face_init): Remove compiler warning.
- Suggested by Bram Tassyns in Savannah patch #6651.
-
-2008-10-12 Graham Asher <graham.asher@btinternet.com>
-
- * src/sfnt/sfobjs.c (sfnt_load_face): Fix computation of
- `underline_position'.
-
-2008-10-12 Werner Lemberg <wl@gnu.org>
-
- * docs/CHANGES: Updated.
-
-2008-10-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Fix Savannah bug #24468.
-
- According to include/freetype/internal/ftobjs.h, the appropriate
- type to interchange single character codepoint is FT_UInt32. It
- should be distinguished from FT_UInt which can be 16bit integer.
-
- * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Change the type
- of the second argument `pcharcode' from FT_UInt* to FT_UInt32*.
- (tt_cmap4_char_map_binary): Ditto.
- (tt_cmap14_get_nondef_chars): Change the type of return value
- from FT_UInt* to FT_UInt32*.
-
-2008-10-08 John Tytgat <John.Tytgat@esko.com>
-
- Fix Savannah bug #24485.
-
- * src/type1/t1load.c (parse_charstrings): Assure that we always have
- a .notdef glyph.
-
-2008-10-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftmac.c: Include FT_TRUETYPE_TAGS_H for multi build.
- * builds/mac/ftmac.c: Ditto.
-
-2008-10-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * include/freetype/tttags.h (TTAG_TYP1, TTAG_typ1): Fix definitions.
- * src/base/ftobjs.c: Include FT_TRUETYPE_TAGS_H.
-
-2008-10-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/sfnt/sfobjs.c (sfnt_open_font): Allow `typ1' version tag in
- the beginning of sfnt container.
- * src/sfnt/ttload.c (check_table_dir): Return
- `SFNT_Err_Table_Missing' when sfnt table directory structure is
- correct but essential tables for TrueType fonts (`head', `bhed' or
- `SING') are missing. Other errors are returned by
- SFNT_Err_Unknown_File_Format.
-
- * src/base/ftobjs.c (FT_Open_Face): When TrueType driver returns
- `FT_Err_Table_Missing', try `open_face_PS_from_sfnt_stream'. It is
- enabled only when old mac font support is configured.
-
-2008-10-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * include/freetype/tttags.h (TTAG_CID, TTAG_FOND, TTAG_LWFN,
- TTAG_POST, TTAG_sfnt, TTAG_TYP1, TTAG_typ1): New tags to simplify
- the repeated calculations of these values in ftobjs.c and ftmac.c.
- * src/base/ftobjs.c: Replace all FT_MAKE_TAG by new tags.
- * src/base/ftmac.c: Ditto.
- * builds/mac/ftmac.c: Ditto.
-
-2008-10-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftobjs.c (ft_lookup_PS_in_sfnt_stream): Remove wrong
- initialization of *is_sfnt_cid.
-
-2008-10-04 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Remove compiler
- warnings.
-
-2008-10-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftobjs.c (ft_lookup_PS_in_sfnt): Replaced by...
- (ft_lookup_PS_in_sfnt_stream): This.
- (open_face_PS_from_sfnt_stream): New function. It checks whether
- the stream is sfnt-wrapped Type1 PS font or sfnt-wrapped CID-keyed
- font, then try to open a face for given face_index.
- (Mac_Read_sfnt_Resource): Replace the combination of
- `ft_lookup_PS_in_sfnt' and `open_face_from_buffer' by
- `open_face_PS_from_sfnt_stream'.
- * src/base/ftmac.c (FT_New_Face_From_SFNT): Ditto.
- * builds/mac/ftmac.c (FT_New_Face_From_SFNT): Ditto.
- * src/base/ftbase.h: Remove `ft_lookup_PS_in_sfnt' and add
- `open_face_PS_from_sfnt_stream'.
-
-2008-10-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftobjs.c (ft_lookup_PS_in_sfnt): Set *is_sfnt_cid to
- FALSE if neither `CID ' nor `TYP1' is found in the sfnt container.
-
-2008-10-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * include/freetype/config/ftconfig.h: Define FT_MACINTOSH when SC or
- MrC compiler of MPW is used. These compilers do not define the
- macro __APPLE__ by themselves.
- * builds/unix/ftconfig.in: Ditto.
- * builds/vms/ftconfig.h: Ditto.
- * src/base/ftbase.c: Use FT_MACINTOSH instead of __APPLE__, to
- include ftmac.c if FreeType 2 is built by MPW.
- * src/base/ftobjs.c: Use FT_MACINTOSH instead of __APPLE__, to
- enable shared functions for ftmac.c if FreeType 2 is built by MPW.
-
- * builds/mac/ftmac.c: Include ftbase.h.
- (memory_stream_close): Removed.
- (new_memory_stream): Ditto.
- (open_face_from_buffer): Removed. Use the implementation in
- ftobjs.c.
- (ft_lookup_PS_in_sfnt): Ditto.
-
- * builds/mac/FreeType.m68k_far.make.txt: Build ftmac.c as an
- included part of ftbase.c, to share the functions in ftobjs.c. The
- rule compiling ftmac.c separately is removed and the rule copying
- ftbase.c from src/base/ftbase.c to builds/mac/ftbase.c is added.
- * builds/mac/FreeType.m68k_cfm.make.txt: Ditto.
- * builds/mac/FreeType.ppc_classic.make.txt: Ditto.
- * builds/mac/FreeType.ppc_carbon.make.txt: Ditto.
-
-2008-10-02 Bram Tassyns <bramt@enfocus.be>
-
- * src/cff/cffgload.c (cff_slot_load): Map CID 0 to GID 0. This
- fixes Savannah bug #24430.
-
-2008-10-02 Werner Lemberg <wl@gnu.org>
-
- * builds/freetype.mk (BASE_H): Rename to...
- (INTERNAL_H): This.
- (FREETYPE_H): Updated.
- * src/base/rules.mk: (BASE_OBJ_S, OBJ_DIR/%.$O): Add BASE_H.
- * src/bdf/rules.mk (BDF_DRV_H): Add bdferror.h.
- * src/cache/rules.mk (CACHE_DRV_H): Add ftccache.h and ftcsbits.h.
- * src/pcf/rules.mk (PCF_DRV_H): Add pcfread.h.
- * src/raster/rules.mk (RASTER_DRV_H): Add ftmisc.h.
- * src/type42/rules.mk (T42_DRV_H): Add t42types.h.
-
-2008-10-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftbase.h: New file to declare the private utility
- functions shared by the sources of base modules. Currently,
- `ft_lookup_PS_in_sfnt' and `open_face_from_buffer' are declared to
- share between ftobjs.c and ftmac.c.
-
- * src/base/rule.mk: Add ftbase.h.
-
- * src/base/ftobjs.c: Include ftbase.h.
- (memory_stream_close): Build on any platform when old MacOS font
- support is enabled.
- (new_memory_stream): Ditto.
- (open_face_from_buffer): Build on any platform when old MacOS font
- support is enabled. The counting of the face in a font file is
- slightly different between Carbon-dependent parser and Carbon-free
- parser. They are merged with the platform-specific conditional.
- (ft_lookup_PS_in_sfnt): Ditto.
-
- * src/base/ftmac.c: Include ftbase.h.
- (memory_stream_close): Removed.
- (new_memory_stream): Ditto.
- (open_face_from_buffer): Removed. Use the implementation in
- ftobjs.c.
- (ft_lookup_PS_in_sfnt): Ditto.
-
-2008-10-02 Werner Lemberg <wl@gnu.org>
-
- * src/sfnt/sfobjs.c (sfnt_load_face): `psnames_error' is only needed
- if TT_CONFIG_OPTION_POSTSCRIPT_NAMES is defined.
-
-2008-10-01 Werner Lemberg <wl@gnu.org>
-
- * src/truetype/ttobjs.c (tt_face_done), src/cff/cffobjs.c
- (cff_face_done), src/pfr/pfrobjs.c (pfr_face_done),
- src/pcf/pcfdrivr.c (PCF_Face_Done), src/cid/cidobjs.c
- (cid_face_done), src/bdf/bdfdrivr. (BDF_Face_Done),
- src/sfnt/sfobjs.c (sfnt_face_done): Protect against face == 0.
- Reported by Graham Asher.
-
-2008-09-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/rules.mk: Add conditional source to BASE_SRC, for `make
- multi' on Mac OS X. If the macro $(ftmac_c) is defined,
- $(BASE_DIR)/$(ftmac_c) is added to BASE_SRC. In a normal build, the
- lack of ftmac.c in BASE_SRC is not serious because ftbase.c includes
- ftmac.c.
- * builds/unix/unix-def.in: Add a macro definition of $(ftmac_c).
- * builds/unix/configure.raw: Add procedure to set up appropriate
- value of $(ftmac_c) with the consideration of the availability of
- Carbon framework.
-
-2008-09-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/Jamfile: Add target for multi build by jam on Mac OS X.
- * src/base/ftobjs.c (FT_New_Face): Fix the condition to include this
- function for MPW building. It is synchronized the condition to
- include ftmac.c source into ftbase.c.
-
-2008-09-22 Werner Lemberg <wl@gnu.org>
-
- * src/cff/cffgload.c (CFF_Operator, cff_argument_counts,
- cff_decoder_parse_charstrings): Handle (invalid)
- `callothersubr' and `pop' instructions.
-
-2008-09-22 John Tytgat <John.Tytgat@esko.com>
-
- Fix Savannah bug #24307.
-
- * include/freetype/internal/t1types.h (CID_FaceRec),
- src/type42/t42types.h (T42_FaceRec): Comment out `afm_data'.
-
-2008-09-21 Werner Lemberg <wl@gnu.org>
-
- * src/smooth/ftgrays.c (gray_raster_render): Don't dereference
- `target_map' if FT_RASTER_FLAG_DIRECT is set. Problem reported by
- Stephan T. Lavavej <stl@nuwen.net>.
-
-2008-09-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/otvalid/Jamfile: Add missing target `otvmath' for multi build
- by jam.
- * src/sfnt/Jamfile: Add missing target `ttmtx' for multi build by
- jam.
-
-2008-09-20 Werner Lemberg <wl@gnu.org>
-
- * src/smooth/ftgrays.c (gray_find_cell): Fix threshold. The values
- passed to this function are already `normalized'. Problem reported
- by Stephan T. Lavavej <stl@nuwen.net>.
-
- * docs/CHANGES: Document it.
-
-2008-09-20 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftoutln.c: Include FT_INTERNAL_DEBUG_H.
- (FT_Outline_Decompose): Decorate with tracing messages.
-
- * src/smooth/ftgrays.c [DEBUG_GRAYS]: Replace with
- FT_DEBUG_LEVEL_TRACE.
- [_STANDALONE_ && FT_DEBUG_LEVEL_TRACE]: Include stdio.h and
- stdarg.h.
-
- (FT_TRACE) [_STANDALONE_]: Remove.
- (FT_Message) [_STANDALONE_ && FT_DEBUG_LEVEL_TRACE]: New function.
- (FT_TRACE5, FT_TRACE7) [_STANDALONE_]: New macros.
- (FT_ERROR) [_STANDALONE_]: Updated.
-
- (gray_hline) [FT_DEBUG_LEVEL_TRACE]: Fix condition.
- Use FT_TRACE7.
- (gray_dump_cells): Make it `static void'.
- (gray_convert_glyph): Use FT_TRACE7.
-
- (FT_Outline_Decompose) [_STANDALONE_]: Synchronize with version in
- ftoutln.c.
-
- * src/base/ftadvanc.c (FT_Get_Advance, FT_Get_Advances): Use
- FT_ERROR_BASE.
-
- * docs/formats.txt: Updated.
-
-2008-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftmac.c: Import sfnt-wrapped Type1 and sfnt-wrapped
- CID-keyed font support.
- * builds/mac/ftmac.c: Ditto.
-
-2008-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Fix double free bug in
- sfnt-wrapped Type1 and sfnt-wrapped CID-keyed font support code.
- `open_face_from_buffer' frees the passed buffer if it cannot open a
- face from the buffer, so the caller must not free it.
-
-2008-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add initial support
- for sfnt-wrapped Type1 and sfnt-wrapped CID-keyed font.
- (ft_lookup_PS_in_sfnt): New function to look up `TYP1' or `CID '
- table in sfnt table directory. It is used before loading TrueType
- font driver.
-
- * docs/CHANGES: Add note about the current status of sfnt-wrapped
- Type1 and sfnt-wrapped CID-keyed font support.
-
-2008-09-18 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftsystem.c (FT_Done_Memory): Use ft_sfree directly for
- orthogonality (ft_free and ft_sfree could belong to different memory
- pools). This fixes Savannah bug #24297.
-
-2008-09-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/cff/cffobjs.c (cff_face_init): Use TTAG_OTTO defined
- in ttags.h instead of numerical value 0x4F54544FL.
-
-2008-09-16 Werner Lemberg <wl@gnu.org>
-
- * src/cff/cffgload.h, src/cff/cffgload.c
- (cff_decoder_set_width_only): Eliminate function call.
-
-2008-09-15 George Williams <gww@silcom.com>
-
- Fix Savannah bug #24179, reported by Bram Tassyns.
-
- * src/type1/t1load.c (mm_axis_unmap, T1_Get_MM_Var): Fix computation
- of default values.
-
-2008-09-15 Werner Lemberg <wl@gnu.org>
-
- * src/tools/glnames.py (main): Surround `ft_get_adobe_glyph_index'
- and `ft_adobe_glyph_list' with FT_CONFIG_OPTION_ADOBE_GLYPH_LIST to
- prevent unconditional definition. This fixes Savannah bug #24241.
-
- * src/psnames/pstables.h: Regenerated.
-
-2008-09-13 Werner Lemberg <wl@gnu.org>
-
- * autogen.sh, builds/unix/configure.raw,
- include/freetype/config/ftconfig.h, builds/unix/ftconfig.in: Minor
- beautifying.
-
- * include/freetype/ftadvanc.h, include/freetype/ftgasp.h,
- include/freetype/ftlcdfil.h: Protect against FreeType 1.
- Some other minor fixes.
-
- * devel/ftoption.h: Synchronize with
- include/freetype/config/ftoption.h.
-
-2008-09-11 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftbase.c: Include ftadvanc.c.
-
-2008-09-11 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * builds/unix/ftconfig.in: Duplicate the cpp computation of
- FT_SIZEOF_{INT|LONG} from include/freetype/config/ftconfig.h.
- (FT_USE_AUTOCONF_SIZEOF_TYPES): New macro. If defined, the cpp
- computation is disabled and the statically configured sizes are
- used. This fixes Savannah bug #21250.
-
- * builds/unix/configure.raw: Add the checks to compare the cpp
- computation results of the bit length of int and long versus the
- sizes detected by running `configure'. If the results are
- different, FT_USE_AUTOCONF_SIZEOF_TYPES is defined to prioritize the
- results.
- New option --{enable|disable}-biarch-config is added to define or
- undefine FT_USE_AUTOCONF_SIZEOF_TYPES manually.
-
-2008-09-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * builds/unix/configure.raw: Clear FT2_EXTRA_LIBS when Carbon or
- ApplicationService framework is missing. Although this value is not
- used in building of FreeType2, it is written in `freetype2.pc' and
- `freetype-config'.
-
-2008-09-01 david turner <david@freetype.org>
-
- * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Accept a negative cmap
- index to mean `use default cached FT_Face's charmap'. This fixes
- Savannah bug #22625.
- * include/freetype/ftcache.h: Document it.
-
-
- Make FT_MulFix an inlined function. This is done to speed up
- FreeType a little (on x86 3% when loading+hinting, 10% when
- rendering, ARM savings are more important though). Disable this by
- undefining FT_CONFIG_OPTION_INLINE_MULFIX.
-
- Use of assembler code can now be controlled with
- FT_CONFIG_OPTION_NO_ASSEMBLER.
-
- * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in
- [!FT_CONFIG_OPTION_NO_ASSEMBLER] (FT_MulFix_arm): New assembler
- implementation.
- [!FT_CONFIG_OPTION_NO_ASSEMBLER] (FT_MulFix_i386): Assembler
- implementation taken from `ftcalc.c'.
- [!FT_CONFIG_OPTION_NO_ASSEMBLER] (FT_MULFIX_ASSEMBLER): New macro
- which is defined to the platform-specific assembler implementation
- of FT_MulFix.
- [FT_CONFIG_OPTION_INLINE_MULFIX && FT_MULFIX_ASSEMBLER]
- (FT_MULFIX_INLINED): New macro.
-
- * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_NO_ASSEMBLER,
- FT_CONFIG_OPTION_INLINE_MULFIX): New macros.
-
- * include/freetype/freetype.h: Updated to handle FT_MULFIX_INLINED.
-
- * src/base/ftcalc.c: Updated to use FT_MULFIX_ASSEMBLER and
- FT_MULFIX_INLINED.
-
-
- Add a new header named FT_ADVANCES_H declaring some new APIs to
- extract the advances of one or more glyphs without necessarily
- loading their outlines. Also provide `fast loaders' for the
- TrueType, Type1, and CFF font drivers (more to come later).
-
- * src/base/ftadvanc.c, include/freetype/ftadvanc.h: New files.
-
- * include/freetype/config/ftheader.h (FT_ADVANCES_H): New macro.
- * include/freetype/freetype.h (FT_LOAD_ADVANCE_ONLY): New macro.
-
- * include/freetype/internal/ftdriver.h (FT_Face_GetAdvancesFunc):
- `flags' and `advances' are now of type `FT_UInt' and `FT_Fixed',
- respectively.
-
- * src/base/Jamfile (_sources), src/base/rules.mk (BASE_SRC): Add
- ftadvanc.c.
-
- * src/cff/cffdrivr.c (cff_get_advances): New function.
- (cff_driver_class): Register it.
-
- * src/cff/cffgload.c (cff_decoder_set_width_only): New function.
- (cff_decoder_parse_charstrings): Handle `width_only'.
- (cff_slot_load): Handle FT_LOAD_ADVANCE_ONLY.
-
- * src/cff/cffgload.h (cff_decoder): New element `width_only'.
- (cff_decoder_set_width_only): New declaration.
-
- * src/truetype/ttdriver.c (tt_get_advances): New function.
- (tt_driver_class): Register it.
-
- * src/truetype/ttgload.c (Get_HMetrics, Get_VMetrics): Renamed to...
- (TT_Get_HMetrics, TT_Get_VMetrics): This.
- Update callers.
- * src/truetype/ttgload.h: Declare them.
-
- * src/type1/t1gload.h, src/type1/t1gload.c (T1_Get_Advances): New
- function.
- * src/type1/t1driver.c (t1_driver_class): Register T1_Get_Advances.
-
-
- Add checks for minimum version of the `autotools' stuff.
-
- * autogen.sh: Implement it.
- (get_major_version, get_minor_version, get_patch_version,
- compare_to_minimum_version, check_tool_version): New auxiliary
- functions.
-
- * README.CVS: Document it.
-
-2008-08-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/sfnt/sfobjs.c (sfnt_open_font): Use TTAG_OTTO defined in
- ttags.h instead of FT_MAKE_TAG( 'O', 'T', 'T', 'O' ).
-
-2008-08-28 Werner Lemberg <wl@gnu.org>
-
- * src/type1/t1load.c (parse_encoding): Protect against infinite
- loop. This fixes Savannah bug #24150 (where a patch has been posted
- too).
-
-2008-08-23 Werner Lemberg <wl@gnu.org>
-
- * src/type/t1afm.c (compare_kern_pairs), src/pxaux/afmparse.c
- (afm_compare_kern_pairs): Fix comparison. This fixes Savannah bug
- #24119.
-
-2008-08-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftobjs.c (FT_Stream_New): Initialize *astream always,
- even if passed library or arguments are invalid. This fixes a bug
- that an uninitialized stream is freed when an invalid library handle
- is passed. Originally proposed by Mike Fabian, 2008/08/18 on
- freetype-devel.
- (FT_Open_Face): Ditto (stream).
- (load_face_in_embedded_rfork): Ditto (stream2).
-
-2008-08-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftmac.c: Add a fallback to guess the availability of the
- `ResourceIndex' type. It is used when built without configure
- (e.g., a build with Jam).
- * builds/mac/ftmac.c: Ditto.
- * builds/unix/configure.raw: Set HAVE_TYPE_RESOURCE_INDEX to 1 or 0
- explicitly, even if `ResourceIndex' is unavailable.
-
-2008-08-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * builds/unix/configure.raw: In checking of Mac OS X features,
- all-in-one header file `Carbon.h' is replaced by the minimum
- header file `CoreServices.h', similar to current src/base/ftmac.c.
-
-2008-08-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/sfnt/ttcmap.c (tt_cmap2_validate): Skip the validation of
- sub-header when its code_count is 0. Many Japanese Dynalab fonts
- include such an empty sub-header (code_count == 0, first_code == 0
- delta == 0, but offset != 0) as the second sub-header in SJIS cmap.
-
-2008-08-04 Werner Lemberg <wl@gnu.org>
-
- * src/type1/t1tokens.h: Handle `ForceBold' keyword. This fixes
- Savannah bug #23995.
-
- * src/cid/cidload.c (parse_expansion_factor): New callback function.
- (cid_field_records): Use it for `ExpansionFactor'.
- * src/cod/cidtoken.h: Handle `ForceBold' keyword.
- Don't handle `ExpansionFactor'.
-
-2008-08-04 Bram Tassyns <bramt@enfocus.be>
-
- * src/cff/cffparse.c (cff_parse_fixed_scaled): Fix thinko which
- resulted in incorrect scaling. This fixes Savannah bug #23973.
-
-2008-08-04 Werner Lemberg <wl@gnu.org>
-
- Be more tolerant w.r.t. invalid entries in SFNT table directory.
-
- * src/sfnt/ttload.c (check_table_dir): Ignore invalid entries and
- adjust table count.
- Add more trace messages.
- (tt_face_load_font_dir): Updated.
-
-2008-07-30 Werner Lemberg <wl@gnu.org>
-
- * src/cff/cffgload.c (cff_decoder_parse_charstrings): No longer
- assume that the first argument on the stack is the bottom-most
- element. Two reasons:
-
- o According to people from Adobe it is missing in the Type 2
- specification that pushing of additional, superfluous arguments
- on the stack is prohibited.
-
- o Acroread in general handles fonts differently, namely by popping
- the number of arguments needed for a particular operand (as a PS
- interpreter would do). In case of buggy fonts this causes a
- different interpretation which of the elements on the stack are
- superfluous and which not.
-
- Since there are CFF subfonts (embedded in PDFs) which rely on
- Acroread's behaviour, FreeType now does the same.
-
-2008-07-27 Werner Lemberg <wl@gnu.org>
-
- Add extra mappings for `Tcommaaccent' and `tcommaaccent'. This
- fixes Savannah bug #23940.
-
- * src/psnames/psmodule.c (WGL_EXTRA_LIST_SIZE): Rename to...
- (EXTRA_GLYPH_LIST_SIZE): This.
- Increase by 2.
- (ft_wgl_extra_unicodes): Rename to...
- (ft_extra_glyph_unicodes): This.
- Add two code values.
- (ft_wgl_extra_glyph_names): Rename to...
- (ft_extra_glyph_names): This.
- Add two glyphs.
- (ft_wgl_extra_glyph_name_offsets): Rename to...
- (ft_extra_glyph_name_offsets): This.
- Add two offsets.
-
- (ps_check_wgl_name, ps_check_wgl_unicode): Rename to...
- (ps_check_extra_glyph_name, ps_check_extra_glyph_unicode): This.
- Updated.
- (ps_unicodes_init): Updated.
-
-2008-07-26 Werner Lemberg <wl@gnu.org>
-
- * src/cff/cffgload.c (cff_decoder_prepare,
- cff_decoder_parse_charstrings): Improve debug output.
-
-2008-07-22 Martin McBride <mmcbride@emtex.com>
-
- * src/sfnt/ttcmap.c (tt_cmap4_validate, tt_cmap4_char_map_linear,
- tt_cmap4_char_map_binary): Handle fonts which treat the last segment
- specially. According to the specification, such fonts would be
- invalid but acroread accepts them.
-
-2008-07-16 Jon Foster <Jon.Foster@cabot.co.uk>
-
- * src/pfr/pfrdrivr.c (pfr_get_advance): Fix off-by-one error.
-
- * src/base/ftcalc.c (FT_MulFix): Fix portability issue.
-
- * src/sfnt/ttpost.c (MAC_NAME) [!FT_CONFIG_OPTION_POSTSCRIPT_NAMES]:
- Fix compiler warning.
-
-2008-07-16 Werner Lemberg <wl@gnu.org>
-
- Handle CID-keyed fonts wrapped in an SFNT (with cmaps) correctly.
-
- * src/cff/cffload.c (cff_font_load): Pass `pure_cff'.
- Invert sids table only if `pure_cff' is set.
- * src/cff/cffload.h: Udpated.
-
- * src/cff/cffobjs.c (cff_face_init): Updated.
- Set FT_FACE_FLAG_CID_KEYED only if pure_cff is set.
-
- * docs/CHANGES: Updated.
-
-2008-07-09 Werner Lemberg <wl@gnu.org>
-
- * src/truetype/ttpload.c (tt_face_load_loca): Handle buggy fonts
- where num_locations < num_glyphs. Problem reported by Ding Li.
-
-2008-07-05 Werner Lemberg <wl@gnu.org>
-
- Since FreeType uses `$(value ...)', we now need GNU make 3.80 or
- newer. This fixes Savannah bug #23648.
-
- * configure: zsh doesn't like ${1+"$@"}.
- Update needed GNU make version.
- * builds/toplevel.mk: Check for `$(eval ...)'.
- * docs/INSTALL.GNU, docs/INSTALL.CROSS, docs/INSTALL.UNIX: Document
- it.
-
-2008-07-04 Werner Lemberg <wl@gnu.org>
-
- * src/raster/ftraster.c (Draw_Sweep): If span is smaller than one
- pixel, only check for dropouts if neither start nor end point lies
- on a pixel center. This fixes Savannah bug #23762.
-
-2008-06-29 Werner Lemberg <wl@gnu.org>
-
- * Version 2.3.7 released.
- =========================
-
-
- Tag sources with `VER-2-3-7'.
-
- * docs/CHANGES, docs/VERSION.DLL: Update documentation and bump
- version number to 2.3.7.
-
- * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
- builds/win32/visualc/freetype.dsp,
- builds/win32/visualc/freetype.vcproj,
- builds/win32/visualce/index.html,
- builds/win32/visualce/freetype.dsp,
- builds/win32/visualce/freetype.vcproj: s/2.3.6/2.3.7/, s/236/237/.
-
- * include/freetype/freetype.h (FREETYPE_PATCH): Set to 7.
-
- * builds/unix/configure.raw (version_info): Set to 9:18:3.
-
- * docs/release: Updated.
-
-2008-06-28 Werner Lemberg <wl@gnu.org>
-
- * src/ftglyph.c (FT_Matrix_Multiply, FT_Matrix_Invert): Move to...
- * src/ftcalc.c: Here. This fixes Savannah bug #23729.
-
-2008-06-27 Werner Lemberg <wl@gnu.org>
-
- * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
- Horizontal_Gray_Sweep_Drop): Test for intersections which
- degenerate to a single point can be ignored; this has been confirmed
- by Greg Hitchcock from Microsoft. (This was commented out code.)
-
-2008-06-26 Werner Lemberg <wl@gnu.org>
-
- Improve navigation in API reference.
-
- * src/tools/docmaker/tohtml.py (html_header_3): Renamed to...
- (html_header_6): This.
- (html_header_3, html_header_3i, html_header_4, html_header_5,
- html_header_5t): New strings.
- (toc_footer_start, toc_footer_end): New strings.
- (HtmlFormatter::html_header): Updated.
- (HtmlFormatter::html_index_header, HtmlFormatter::html_toc_header):
- New strings.
- (HtmlFormatter::index_enter): Use `html_index_header'.
- (HtmlFormatter::index_exit): Print `html_footer'.
- (HtmlFormatter::toc_enter): Use `html_toc_header'.
- (HtmlFormatter::toc_exit): Print proper footer.
-
- Convert ~ to non-breakable space.
-
- * src/tools/docmaker/tohtml.py (make_html_para): Implement it.
- Update header files accordingly.
-
-2008-06-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * builds/unix/configure.raw: Check type `ResourceIndex' explicitly
- and define HAVE_TYPE_RESOURCE_INDEX if it is defined. Mac OS X 10.5
- bundles 10.4u SDK with MAC_OS_X_VERSION_10_5 macro but without
- ResourceIndex type definition. The macro does not inform the type
- availability.
- * src/base/ftmac.c: More parentheses are inserted to clarify the
- conditionals to disable legacy APIs in `10.5 and later' cases. If
- HAVE_TYPE_RESOURCE_INDEX is not defined, ResourceIndex is defined.
-
-2008-06-24 Werner Lemberg <wl@gnu.org>
-
- * src/truetype/ttinterp.c (Ins_SCANTYPE): Don't check rendering
- mode.
-
- * src/raster/ftraster.c (Render_Glyph, Render_Gray_Glyph,
- Draw_Sweep): No-dropout mode is value 2, not value 0.
- (Draw_Sweep): Really skip dropout handling for no-dropout mode.
-
-2008-06-24 Werner Lemberg <wl@gnu.org>
-
- * src/psaux/psobjs.c (t1_builder_close_contour): Don't add contour
- if it consists of one point only. Based on a patch from Savannah
- bug #23683 (from John Tytgat).
-
-2008-06-22 Werner Lemberg <wl@gnu.org>
-
- * src/truetype/ttgload.c (TT_Load_Glyph): Protect bytecode stuff
- with IS_HINTED.
-
- * docs/CHANGES: Updated.
-
-2008-06-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * builds/unix/configure.raw: If CFLAGS has `-isysroot XXX' option
- but LDFLAGS does not, import it to LDFLAGS. The option is used to
- specify non-default SDK on Mac OS X (e.g., universal binary SDK for
- Mac OS X 10.4 on PowerPC platform). Although Apple TechNote 2137
- recommends to add the option only to CFLAGS, LDFLAGS should include
- it because libfreetype.la is built with -no-undefined. This fixes a
- bug reported by Ryan Schmidt in MacPorts,
- http://trac.macports.org/ticket/15331.
-
-2008-06-21 Werner Lemberg <wl@gnu.org>
-
- Enable access to the various dropout rules of the B&W rasterizer.
- Pass dropout rules from the TT bytecode interpreter to the
- rasterizer.
-
- * include/freetype/ftimage.h (FT_OUTLINE_SMART_DROPOUTS,
- FT_OUTLINE_EXCLUDE_STUBS): New flags for for FT_Outline.
-
- * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
- Horizontal_Gray_Sweep_Drop): Use same mode numbers as given in the
- OpenType specification.
- Fix mode 4 computation.
- (Render_Glyph, Render_Gray_Glyph): Handle new outline flags.
-
- * src/truetype/ttgload.c (TT_Load_Glyph) Convert scan conversion
- mode to FT_OUTLINE_XXX flags.
-
- * src/truetype/ttinterp.c (Ins_SCANCTRL): Enable ppem check.
-
-2008-06-19 Werner Lemberg <wl@gnu.org>
-
- * src/cff/cffobjs.c (cff_face_init): Compute final
- `dict->units_per_em' value before assigning it to
- `cffface->units_per_EM'. Otherwise, CFFs without subfonts are
- scaled incorrectly if the font matrix is non-standard. This fixes
- Savannah bug #23630.
-
- * docs/CHANGES: Updated.
-
-2008-06-19 Werner Lemberg <wl@gnu.org>
-
- * src/type/t1objs.c (T1_Face_Init): Slightly improve algorithm fix
- from 2008-06-19.
-
-2008-06-18 Werner Lemberg <wl@gnu.org>
-
- * src/type/t1objs.c (T1_Face_Init): Fix change from 2008-03-21.
- Reported by Peter Weilbacher <mozilla@weilbacher.org>.
-
- * docs/CHANGES: Updated.
-
-2008-06-15 George Williams <gww@silcom.com>
-
- * src/otvalid/otvgpos.c (otv_MarkBasePos_validate): Set
- `valid->extra2' to 1. This is undocumented in the OpenType 1.5
- specification.
-
-2008-06-15 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftcalc.c (FT_MulFix) <asm>: Protect registers correctly
- from clobbering. Patch from Savannah bug report #23556.
-
- * docs/CHANGES: Document it.
-
-2008-06-10 Werner Lemberg <wl@gnu.org>
-
- * autogen.sh: Add option `--install' to libtoolize.
-
-2008-06-10 Werner Lemberg <wl@gnu.org>
-
- * Version 2.3.6 released.
- =========================
-
-
- Tag sources with `VER-2-3-6'.
-
- * docs/CHANGES, docs/VERSION.DLL: Update documentation and bump
- version number to 2.3.6.
-
- * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
- builds/win32/visualc/freetype.dsp,
- builds/win32/visualc/freetype.vcproj,
- builds/win32/visualce/index.html,
- builds/win32/visualce/freetype.dsp,
- builds/win32/visualce/freetype.vcproj: s/2.3.5/2.3.6/, s/235/236/.
-
- * include/freetype/freetype.h (FREETYPE_PATCH): Set to 6.
-
- * builds/unix/configure.raw (version_info): Set to 9:17:3.
-
-
- * include/freetype/internal/psaux.h (T1_BuilderRec): Remove `scale_x'
- and `scale_y'.
- * src/cff/cffgload.h (CFF_Builder): Remove `scale_x' and `scale_y'.
-
-
- * src/cff/cffparse.c: Include FT_INTERNAL_DEBUG_H.
- * src/cff/cffobjs.h: Include FT_INTERNAL_POSTSCRIPT_HINTS_H.
-
-2008-06-10 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftobjs.c (open_face): Check `clazz->init_face' and
- `clazz->done_face'.
-
-2008-06-09 VaDiM <s_sliva@rambler.ru>
-
- Support debugging on WinCE. From Savannah patch #6536; this fixes
- bug #23497.
-
- * builds/win32/ftdebug.c (OutputDebugStringEx): New function/macro
- as a replacement for OutputDebugStringA (which WinCE doesn't have).
- Update all callers.
- (ft_debug_init) [_WIN32_CE]: WinCE apparently doesn't have
- environment variables.
-
-2008-06-09 Werner Lemberg <wl@gnu.org>
-
- * README.CVS: Updated.
-
- * builds/unix/configure.raw, builds/unix/freetype-config.in: Updated
- for newer versions of autoconf and friends.
-
-2008-06-08 Werner Lemberg <wl@gnu.org>
-
- * src/type1/t1parse.h (T1_ParserRec): Make `base_len' and
- `private_len' unsigned.
-
- * src/type1/t1parse.c (read_pfb_tag): Make `asize' unsigned and read
- it as such.
- (T1_New_Parser, T1_Get_Private_Dict): Make `size' unsigned.
-
-
- * src/base/ftstream.c (FT_Stream_Skip): Reject negative values.
-
-
- * src/type1/t1load.c (parse_blend_design_positions): Check `n_axis'
- for sane value.
- Fix typo.
-
-
- * src/psaux/psobjs.c (ps_table_add): Check `idx' correctly.
-
-
- * src/truetype/ttinterp (Ins_SHC): Use BOUNDS() to check
- `last_point'.
-
-
- * src/sfnt/ttload.c (tt_face_load_max_profile): Limit
- `maxTwilightPoints'.
-
-2008-06-06 Werner Lemberg <wl@gnu.org>
-
- * src/truetype/ttinterp.c (Ins_IP): Handle case `org_dist == 0'
- correctly. This fixes glyphs `t' and `h' of Arial Narrow at 12ppem.
-
-2008-06-03 Werner Lemberg <wl@gnu.org>
-
- * include/freetype/ftcache.h (FTC_FaceID): Change type back to
- FT_Pointer. Reported by Ian Britten <britten@caris.com>.
-
-2008-06-02 Werner Lemberg <wl@gnu.org>
-
- Emit header info for defined FreeType objects in reference.
-
- * src/tools/docmaker/content.py (re_header_macro): New regexp.
- (ContentProcessor::__init__): Initialize new dictionary `headers'.
- (DocBlock::__init__): Collect macro header definitions.
-
- * src/tools/docmaker/tohtml.py (header_location_header,
- header_location_footer): New strings.
- (HtmlFormatter::__init__): Pass `headers' dictionary.
- (HtmlFormatter::print_html_field): Don't emit paragraph tags.
- (HtmlFormatter::print_html_field_list): Emit empty paragraph.
- (HtmlFormatter::block_enter): Emit header info.
-
-2008-06-01 Werner Lemberg <wl@gnu.org>
-
- * include/freetype/config/ftheader.h (FT_UNPATENTED_HINTING_H,
- FT_INCREMENTAL_H): Added.
-
-2008-05-28 Werner Lemberg <wl@gnu.org>
-
- * src/tools/docmaker/sources.py (SourceBlock::__init__): While
- looking for markup tags, return immediately as soon a single one is
- found.
-
-2008-05-28 Werner Lemberg <wl@gnu.org>
-
- * src/truetype/ttinterp.c (Ins_MD): The MD instruction also uses
- original, unscaled input values. Confirmed by Greg Hitchcock from
- Microsoft.
-
-2008-05-27 Werner Lemberg <wl@gnu.org>
-
- * src/tools/docmaker/tohtml.py (block_footer_start,
- block_footer_middle): Beautify output.
-
-2008-05-25 Werner Lemberg <wl@gnu.org>
-
- * src/raster/ftraster.c (fc_black_render): Return 0 when we are
- trying to render into a zero-width/height bitmap, not an error code.
-
- * src/truetype/ttgload.c (load_truetype_glyph): Move initialization
- of the graphics state for subglyphs to...
- (TT_Hint_Glyph): This function.
- Hinting instructions for a composite glyph apparently refer to the
- just hinted subglyphs, not the unhinted, unscaled outline. This
- seems to fix Savannah bugs #20973 and (at least partially) #23310.
-
-2008-05-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftmac.c (FT_New_Face_From_Suitcase): Check if valid
- `aface' is returned by FT_New_Face_From_FOND(). The patch was
- proposed by an anonymous reporter of Savannah bug #23204.
-
-2008-05-18 Werner Lemberg <wl@gnu.org>
-
- * src/pshinter/pshalgo.c (ps_hints_apply): Reset scale values after
- correction for pixel boundary. Without this patch, the effect can
- be cumulative under certain circumstances, making glyphs taller and
- taller after each call. This fixes Savannah bug #19976.
-
-2008-05-18 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftdebug.c (FT_Message, FT_Panic): Send output to stderr.
- This fixes Savannah bug #23280.
-
- * docs/CHANGES: Updated.
-
-2008-05-18 David Turner <david@freetype.org>
-
- * src/psnames/psmodule.c (ft_wgl_extra_unicodes,
- ft_wgl_extra_glyph_names, ft_wgl_extra_glyph_name_offsets,
- ps_check_wgl_name, ps_check_wgl_unicode): Use `static' to make
- declarations non-global.
-
- * src/type1/t1load.c: Add missing comment.
-
-2008-05-17 Sam Hocevar <samh>
-
- * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Handle zero-contour
- glyphs correctly. Patch from Savannah bug #23277.
-
-2008-05-16 Werner Lemberg <wl@gnu.org>
-
- * docs/CHANGES: Updated.
-
-2008-05-16 Sergey Tolstov <stolstov@esri.com>
-
- Improve support for WGL4 encoded fonts.
-
- * src/psnames/psmodule.c (WGL_EXTRA_LIST_SIZE): New macro.
- (ft_wgl_extra_unicodes, ft_wgl_extra_glyph_names,
- ft_wgl_extra_glyph_name_offsets): New arrays.
- (ps_check_wgl_name, ps_check_wgl_unicode): New functions.
- (ps_unicodes_init): Use them to add additional Unicode mappings.
-
-2008-05-15 Werner Lemberg <wl@gnu.org>
-
- * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
- <op_closepath>: `closepath' without a path is a no-op, not an error
- (cf. the PS reference manual).
-
- Reported by Martin McBride.
-
-2008-05-15 Werner Lemberg <wl@gnu.org>
-
- * builds/toplevel.mk (CONFIG_GUESS, CONFIG_SUB): Updated.
-
-2008-05-15 Werner Lemberg <wl@gnu.org>
-
- * src/type1/t1load.c (parse_subrs): Accept fonts with a subrs array
- which contains a single but empty entry. This is technically
- invalid (since it must end with `return'), but...
-
- Reported by Martin McBride.
-
-2008-05-14 Werner Lemberg <wl@gnu.org>
-
- Finish fix of scaling bug of CID-keyed CFF subfonts.
-
- * include/freetype/internal/ftcalc.h, src/base/ftcalc.c
- (FT_Matrix_Multiply_Scaled, FT_Vector_Transform_Scaled): New
- functions.
-
- * src/cff/cffobjs.h (CFF_Internal): New struct. It is used to
- provide global hinting data for both the top-font and all subfonts
- (with proper scaling).
-
- * src/cff/cffobjs.c (cff_make_private_dict): New function, using
- code from `cff_size_init'.
- (cff_size_init, cff_size_done, cff_size_select, cff_size_request):
- Use CFF_Internal and handle subfonts.
- (cff_face_init): Handle top-dict and subfont matrices correctly;
- apply some heuristic in case of unlikely matrix concatenation
- results. This has been discussed with people from Adobe (thanks
- goes mainly to David Lemon) who confirm that the CFF specs are fuzzy
- and not correct.
-
- * src/cff/cffgload.h (cff_decoder_prepare): Add `size' argument.
-
- * src/cff/cffgload.c (cff_builder_init): Updated.
- (cff_decoder_prepare): Handle hints globals for subfonts.
- Update all callers.
- (cff_slot_load): Handling scaling of subfonts properly.
-
- * src/cff/cffparse.c (cff_parse_fixed_dynamic): New function.
- (cff_parse_font_matrix): Use it.
-
- * src/cff/cfftypes.h (CFF_FontDictRec): Make `units_per_em'
- FT_ULong.
-
- * docs/CHANGES: Document it.
-
-2008-05-13 Werner Lemberg <wl@gnu.org>
-
- * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
- Handle case `face_index < 0'.
- * docs/CHANGES: Document it.
-
-2008-05-04 Werner Lemberg <wl@gnu.org>
-
- First steps to fix the scaling bug of CID-keyed CFF subfonts,
- reported by Ding Li on 2008/03/28 on freetype-devel.
-
- * src/base/cff/cffparse.c (power_tens): New array.
- (cff_parse_real): Rewritten to introduce a fourth parameter which
- returns the `scaling' of the real number so that we have no
- precision loss. This is not used yet.
- Update all callers.
- (cff_parse_fixed_thousand): Replace with...
- (cff_parse_fixed_scaled): This function. Update all callers.
-
-2008-05-03 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftobjs.c (FT_Load_Glyph): Call the auto-hinter without
- transformation since it recursively calls FT_Load_Glyph. This fixes
- Savannah bug #23143.
-
-2008-04-26 Werner Lemberg <wl@gnu.org>
-
- * include/freetype/internal/psaux.h (T1_BuilderRec): Mark `scale_x'
- and `scale_y' as obsolete since they aren't used.
- * src/psaux/psobjs.c (t1_builder_init): Updated.
-
- * src/cff/cffgload.h (CFF_Builder): Mark `scale_x' and `scale_y' as
- obsolete since they aren't used.
- * src/cff/cffgload.c (cff_builder_init): Updated.
-
-2008-04-14 Werner Lemberg <wl@gnu.org>
-
- * src/pcf/pcfdrivr.c (PCF_Face_Init): Protect call to
- `FT_Stream_OpenLZW' with `FT_CONFIG_OPTION_USE_LZ'. From Savannah
- bug #22909.
-
-2008-04-13 Werner Lemberg <wl@gnu.org>
-
- * src/psaux/psconv.c (PS_Conv_ToFixed): Increase precision if
- integer part is zero.
-
-2008-04-01 Werner Lemberg <wl@gnu.org>
-
- Fix compilation with g++ 4.1 (with both `single' and `multi'
- targets).
-
- * src/base/ftobjs.c (FT_Open_Face): Don't define a variable in block
- which is crossed by a `goto'.
-
- * src/otvalid/otvalid.h (otv_MATH_validate): Add prototype.
-
-2008-03-31 Werner Lemberg <wl@gnu.org>
-
- Fix support for subsetted CID-keyed CFFs.
-
- * include/freetype/freetype.h (FT_FACE_FLAG_CID_KEYED,
- FT_IS_CID_KEYED): New macros.
-
- * src/cff/cffobjs.c (cff_face_init): Set number of glyphs to the
- maximum CID value in CID-keyed CFFs.
- Handle FT_FACE_FLAG_CID_KEYED flag.
-
- * docs/CHANGES: Document it.
-
-
- Fix CFF font matrix calculation and improve precision.
-
- * src/cff/cffparse.c (cff_parse_real): Increase precision if integer
- part is zero.
- (cff_parse_font_matrix): Simplify computation of `units_per_em';
- this prevents overflow also.
-
-
- Support FT_Get_CID_Registry_Ordering_Supplement for PS CID fonts.
-
- * src/cid/cidriver.c: Include FT_SERVICE_CID_H.
- (cid_get_ros): New function.
- (cid_service_cid_info): New service structure.
- (cid_services): Register it.
-
-2008-03-23 Werner Lemberg <wl@gnu.org>
-
- Adjustments for Visual C++ 8.0, as reported by Rainer Deyke.
-
- * builds/compiler/visualc.mk (CFLAGS): Remove /W5.
- (ANSIFLAGS): Add _CRT_SECURE_NO_DEPRECATE.
-
-2008-03-21 Laurence Darby <ldarby>
-
- * src/type1/t1objs.c (T1_Face_Init): Use `/Weight'. Patch from
- Savannah bug #22675.
-
-2008-03-13 Derek Clegg <dclegg@apple.com>
-
- * src/truetype/ttgxvar.c (TT_Get_MM_Var): Fix named style loop.
- Patch from Savannah bug #22541.
-
-2008-03-03 Masatoshi Kimura <VYV03354@nifty.ne.jp>
-
- * src/sfnt/ttcmap.c (tt_cmap14_char_map_nondef_binary,
- tt_cmap14_find_variant): Return correct value.
- (tt_cmap14_variant_chars): Fix check for `di'.
-
-2008-02-29 Wermer Lemberg <wl@gnu.org>
-
- * docs/CHANGES: Updated.
-
-2008-02-29 Wolf
-
- Add build support for symbian platform. From Savannah bug #22440.
-
- * builds/symbian/*: New files.
-
-2008-02-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftmac.c (parse_fond): Fix a bug of PostScript font name
- synthesis. For any face of a specified FOND, always the name for
- the first face was used. Except of a FOND that refers multiple
- Type1 font files, wrong synthesized font names are not used at all,
- so this is an invisible bug. A few limit checks are added too.
-
- * builds/mac/ftmac.c: Ditto.
-
-2008-02-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * builds/unix/configure.raw: Split compiler option to link Carbon
- frameworks to one option for CoreServices framework and another
- option for ApplicationServices framework. The split options can be
- managed by GNU libtool to avoid unrequired duplication when FreeType
- is linked with other applications. Suggested by Daniel Macks,
- Savannah bug #22366.
-
-2008-02-18 Victor Stinner <victor.stinner@haypocalc.com>
-
- * src/truetype/ttinterp.c (Ins_IUP): Check number of points. Fix
- from Savannah bug #22356.
-
-2008-02-17 Jonathan Blow <jon@number-none.com>
-
- * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
- Check for valid callback pointers.
-
-2008-02-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftmac.c (FT_New_Face_From_SFNT): Check the sfnt resource
- handle by its value instead of ResError(), fix provided by Deron
- Kazmaier. According to the Resource Manager Reference,
- GetResource(), Get1Resource(), GetNamedResource(),
- Get1NamedResource() and RGetResource() set noErr but return NULL
- handle when they can not find the requested resource. These
- functions never return undefined values, so it is sufficient to
- check if the handle is not NULL.
-
- * builds/mac/ftmac.c (FT_New_Face_From_SFNT): Ditto.
-
-2008-02-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftbase.c: <ftmac.c> is replaced by "ftmac.c" as other
- inclusion styles. Now it always includes src/base/ftmac.c;
- builds/mac/ftmac.c is never included in any configuration.
-
- * builds/unix/configure.raw: Print warning if configure is executed
- with options to specify Carbon functionalities explicitly.
-
- * docs/INSTALL.MAC: Note that legacy builds/mac/ftmac.c is not
- included automatically and manual replacement is required.
-
-2008-02-11 Werner Lemberg <wl@gnu.org>
-
- * builds/modules.mk (CLOSE_MODULE, REMOVE_MODULE), builds/detect.mk
- (dos_setup), builds/freetype.mk (clean_project_dos,
- distclean_project_dos): Don't use \ but $(SEP). Reported by Duncan
- Murdoch.
-
-2008-01-18 Sylvain Pasche <sylvain.pasche@gmail.com>
-
- * src/base/ftlcdfil.c (_ft_lcd_filter_legacy): Updated comment to
- mention intra-pixel algorithm.
-
- * include/freetype/freetype.h (FT_Render_Mode): Mention that
- FT_Library_SetLcdFilter can be used to reduce fringes.
-
-2008-01-16 Werner Lemberg <wl@gnu.org>
-
- * src/raster/ftraster.c (ft_black_render): Check `outline' before
- using it. Reported by Allan Yang.
-
-2008-01-12 Werner Lemberg <wl@gnu.org>
-
- * src/raster/ftraster.c (FT_CONFIG_OPTION_5_GRAY_LEVELS): Remove.
-
-2008-01-12 Allan Yang, Jian Hua - SH <Allan.Yang@fmc.fujitsu.com>
-
- * src/raster/ftraster.c (ft_black_init)
- [FT_RASTER_OPTION_ANTI_ALIASING]: Fix compilation.
-
-2008-01-10 Werner Lemberg <wl@gnu.org>
-
- * src/truetype/ttgload.c (load_truetype_glyph): Handle the case
- where the number of contours in a simple glyph is zero (and which
- does contain an entry in the `glyf' table). This fixes Savannah bug
- #21990.
-
-2008-01-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Formatting suggested by Sean McBride.
-
- * builds/mac/ftmac.c: Formatting (tab expanded).
- * src/autofit/afindic.c: Ditto.
- * src/base/ftcid.c: Ditto.
- * src/base/ftmac.c: Ditto.
-
-2007-12-30 Werner Lemberg <wl@gnu.org>
-
- * src/smooth/ftgrays.c (gray_raster_render): Check `outline'
- correctly.
-
-2007-12-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Improvement of POSIX resource-fork accessor to load unsorted
- references in a resource. In HelveLTMM (resource-fork PostScript
- Type1 font bundled with Mac OS X since 10.3.x), the appearance order
- of PFB chunks is not sorted; sorting the chunks by reference IDs is
- required.
-
- * include/freetype/internal/ftrfork.h (FT_RFork_Ref): New structure
- type to store a pair of reference ID and offset to the chunk.
-
- * src/base/ftrfork.c (ft_raccess_sort_ref_by_id): New function to
- sort FT_RFork_Ref by their reference IDs.
-
- (FT_Raccess_Get_DataOffsets): Returns an array of offsets that is
- sorted by reference ID.
-
-2007-12-14 Werner Lemberg <wl@gnu.org>
-
- * src/cff/cffparse.c (cff_parse_real): Don't apply `power_ten'
- division too early; otherwise the most significant digit(s) of the
- final result are lost as the value is truncated to an integer. This
- fixes Savannah bug #21794 (where the patch has been posted too).
-
-2007-12-06 Fix <4d876b82@gmail.com>
-
- Pass options from one configure script to another as-is (not
- expanded). This is needed for options like
- --includedir='${prefix}/include'.
-
- * builds/unix/detect.mk, configure: Prevent argument expansion in
- call to the (real) `configure' script.
-
-2007-12-06 Werner Lemberg <wl@gnu.org>
-
- * src/truetype/ttgload.c (load_truetype_glyph): Fix compilation if
- TT_USE_BYTECODE_INTERPRETER isn't defined.
-
-2007-12-06 Werner Lemberg <wl@gnu.org>
-
- There exist CFFs which contain opcodes for the Type 1 operators
- `hsbw' and `closepath' which are both invalid in Type 2 charstrings.
- However, it doesn't harm to support them.
-
- * src/cff/cffgload.c (CFF_Operator): Add `cff_op_hsbw' and
- `cff_op_closepath.'
- (cff_argument_counts): Ditto.
-
- (cff_decoder_parse_charstrings): Handle Type 1 opcodes 9 (closepath)
- and 13 (hsbw) which are invalid in Type 2 charstrings.
-
-2007-12-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftrfork.c (raccess_guess_darwin_newvfs): New function to
- support new pathname syntax `..namedfork/rsrc' to access a resource
- fork on Mac OS X. The legacy syntax `/rsrc' does not work on
- case-sensitive HFS+.
- (raccess_guess_darwin_hfsplus): Fix a bug in the calculation of
- buffer size to store a pathname.
- * include/freetype/internal/ftrfork.h: Increment the number of
- resource fork guessing rule.
-
-2007-12-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * builds/unix/configure.raw: Improve the compile tests to search
- Carbon functions.
- * builds/mac/ftmac.c: Import fixes for Carbon incompatibilities
- proposed by Sean McBride from src/base/ftmac.c (see 2007-11-16).
-
-2007-12-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- The documents and comments for Mac OS X are improved by Sean
- McBride.
-
- * src/base/ftmac.c: Fix a comment.
- * include/freetype/ftmac.h: Ditto.
- * docs/INSTALL.MAC: Improve English and add comment on lowest
- system version specified by MACOSX_DEPLOYMENT_TARGET.
-
-2007-12-04 Werner Lemberg <wl@gnu.org>
-
- * src/cff/cffload.c (cff_subfont_load): Don't use logical OR to
- concatenate error codes.
- * src/sfnt/ttsbit.c (Load_SBit_Range): Ditto.
-
-2007-12-04 Graham Asher <graham.asher@btinternet.com>
-
- * src/truetype/ttobjs.c (tt_face_init): Don't use logical OR to
- concatenate error codes.
-
-2007-12-04 Sean McBride <sean@rogue-research.com>
-
- * src/pfr/pfrgload.c (pfr_glyph_load_compound): Remove compiler
- warning.
-
-2007-11-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Fix MacOS legacy font support by Masatake Yamato on Mac OS X. It is
- not working since 2.3.5. In FT_Open_New(), if FT_New_Stream()
- cannot mmap() the specified file and cannot seek to head of the
- specified file, it returns NULL stream and FT_Open_New() returns the
- error immediately. On MacOS, most legacy MacOS fonts fall into such
- a scenario because their data forks are zero-sized and cannot be
- sought. To proceed to guessing of resource fork fonts, the
- functions for legacy MacOS font must properly handle the NULL stream
- returned by FT_New_Stream().
-
- * src/base/ftobjs.c (IsMacBinary): Return error
- FT_Err_Invalid_Stream_Operation immediately when NULL stream is
- passed.
- (FT_Open_Face): Even when FT_New_Stream() returns an error, proceed
- to fallback. Originally, legacy MacOS font is tested in the cases
- of FT_Err_Invalid_Stream_Operation (occurs when data fork is empty)
- or FT_Err_Unknown_File_Format (occurs when AppleSingle header or
- .dfont header is combined). Now the case of
- FT_Err_Cannot_Open_Stream is included.
-
- * src/base/ftrfork.c (FT_Raccess_Guess): When passed stream is NULL,
- skip FT_Stream_Seek(), which seeks to the head of stream, and
- proceed to unit testing of raccess_guess_XXX(). FT_Stream_Seek()
- for a NULL stream causes a Bus error on Mac OS X.
- (raccess_guess_apple_double): Return FT_Err_Cannot_Open_Stream
- immediately if passed stream is NULL.
- (raccess_guess_apple_single): Ditto.
-
-2007-11-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Fix for Carbon incompatibilities since Mac OS X 10.5,
- proposed by Sean McBride.
-
- * doc/INSTALL.MAC: Comment on MACOSX_DEPLOYMENT_TARGET.
-
- * include/freetype/ftmac.h: Deprecate FT_New_Face_From_FOND and
- FT_GetFilePath_From_Mac_ATS_Name. Since Mac OS X 10.5, calling
- Carbon functions from a forked process is classified as unsafe
- by Apple. All Carbon-dependent functions should be deprecated.
-
- * src/base/ftmac.c: Use essential header files
- <CoreServices/CoreServices.h> and
- <ApplicationServices/ApplicationServices.h> instead of
- all-in-one header file <Carbon/Carbon.h>.
-
- Include <sys/syslimits.h> and replace HFS_MAXPATHLEN by Apple
- genuine macro PATH_MAX.
-
- Add fallback macro for kATSOptionFlagsUnRestrictedScope which
- is not found in Mac OS X 10.0.
-
- Multi-character constants ('POST', 'sfnt' etc) are replaced by
- 64bit constants calculated by FT_MAKE_TAG() macro.
-
- For the index in the segment of resource fork, new portable
- type ResourceIndex is introduced for better compatibility.
- This type is since Mac OS X 10.5, so it is defined as short
- when built on older platforms.
-
- (FT_ATSFontGetFileReference): If build target is only the systems
- 10.5 and newer, it calls Apple genuine ATSFontGetFileReference().
-
- (FT_GetFile_From_Mac_ATS_Name): Return an error if system is 10.5
- and newer or 64bit platform, because legacy type FSSpec type is
- removed completely.
-
- (FT_New_Face_From_FSSpec): Ditto.
-
-2007-11-01 Werner Lemberg <wl@gnu.org>
-
- * src/sfnt/sfobjs.c (sfnt_done_face): Check `sfnt' everywhere. This
- fixes Savannah bug #21485.
-
-2007-10-29 Daniel Svoboda <dasvo@planeta@cz>
-
- * src/winfonts/winfnt.c (FNT_Face_Init): Check first that the driver
- can handle the font at all, then check `face_index'. Otherwise, the
- driver might return the wrong error code. This fixes Savannah bug
- #21468.
-
-2007-10-21 Werner Lemberg <wl@gnu.org>
-
- * src/sfnt/sfobjs.c (sfnt_load_face): Support bit 9 and prepare
- support for bit 8 of the `fsSelection' field in the `OS/2' table.
- MS is already using this; hopefully, this becomes part of OpenType
- 1.5.
- Prepare also support for `name' IDs 21 (WWS_FAMILY) and 22
- (WWS_SUBFAMILY).
-
-2007-10-20 Werner Lemberg <wl@gnu.org>
-
- * src/tools/docmaker/tohtml.py (html_header_2): Fix typo.
- Add `td.left' element to CSS.
- (toc_section_enter): Use it.
-
-2007-10-18 David Turner <david@freetype.org>
-
- * include/freetype/freetype.h, src/base/ftobjs.c: Rename API
- functions related to cmap type 14 support to the
- `FT_Object_ActionName' scheme:
-
- FT_Get_Char_Variant_index -> FT_Face_GetCharVariantIndex
- FT_Get_Char_Variant_IsDefault -> FT_Face_GetCharVariantIsDefault
- FT_Get_Variant_Selectors -> FT_Face_GetVariantSelectors
- FT_Get_Variants_Of_Char -> FT_Face_GetVariantsOfChar
- FT_Get_Chars_Of_Variant -> FT_Face_GetCharsOfVariant
-
- Update documentation accordingly.
-
- * src/sfnt/ttcmap.c: Stronger cmap 14 validation.
- Make the code a little more consistent with FreeType coding
- conventions and modify the cmap14 functions that returned a newly
- allocated array to use a persistent vector from the TT_CMap14 object
- instead.
-
- (TT_CMap14Rec): Provide array and auxiliary data for result.
- (tt_cmap14_done, tt_cmap14_ensure): New functions.
-
- (tt_cmap14_init, tt_cmap14_validate, tt_cmap14_char_map_def_binary,
- tt_cmap14_char_map_nondef_binary, tt_cmap14_find_variant,
- tt_cmap14_char_var_index, tt_cmap14_variants,
- tt_cmap14_char_variants, tt_cmap14_def_char_count,
- tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
- tt_cmap14_variant_chars, tt_cmap14_class_rec): Updated and improved.
-
-2007-10-15 George Williams <gww@silcom.com>
-
- Add support for cmap type 14.
-
- * devel/ftoption.h, include/freetype/config/ftoption.h
- (TT_CONFIG_CMAP_FORMAT_14): New macro.
-
- * include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
- FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
- FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
- support function prototypes.
- (FT_CMap_ClassRec): Add them.
- Update all users.
-
- * include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
- macro.
-
- * include/freetype/freetype.h (FT_Get_Char_Variant_Index,
- FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
- FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
- functions.
-
- * src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
- function.
- (FT_Set_Charmap): Disallow cmaps of type 14.
- (FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
- FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
- FT_Get_Chars_Of_Variant): New API functions.
-
- * src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
-
- (TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
- tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
- tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
- tt_cmap14_find_variant, tt_cmap14_char_var_index,
- tt_cmap14_char_var_isdefault, tt_cmap14_variants,
- tt_cmap14_char_variants, tt_cmap14_def_char_count,
- tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
- tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
- structures for cmap 14 support.
- (tt_cmap_classes): Register tt_cmap14_class_rec.
- (tt_face_build_cmaps): One more error message.
-
- * docs/CHANGES: Mention cmap 14 support.
-
-2007-10-01 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftobjs.c (find_unicode_charmap): If search for a UCS-4
- charmap fails, do the loop again while searching a UCS-2 charmap.
- This favours MS charmaps over Apple ones.
-
-2007-08-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftmac.c: Introduction of abstract `short' data types,
- ResFileRefNum and ResID. These types were introduced for Copland,
- then backported to MPW. The variables exchanged with FileManager
- QuickDraw frameworks are redefined by these data types. Patch was
- proposed by Sean McBride.
- * builds/mac/ftmac.c: Ditto.
-
-2007-08-18 Werner Lemberg <wl@gnu.org>
-
- * src/otvalid/otvcmmn.c (otv_x_y_ux_sy): Skip context glyphs. Found
- by Imran Yousaf. Fixes Savannah bug #20773.
-
- (otv_Lookup_validate): Correct handling of LookupType. Found by
- Imran Yousaf. Fixes Savannah bug #20782.
-
-2007-08-17 George Williams <gww@silcom.com>
-
- * src/otvalid/otvgsub.c (otv_SingleSubst_validate): Fix handling of
- SingleSubstFormat1.
-
-2007-08-11 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * builds/unix/configure.raw: Fix a bug which sets CC_BUILD by
- ${build-gcc} (unchecked) instead of by ${build}-gcc (checked).
- Found by Ryan Hill.
-
-2007-08-11 George Williams <gww@silcom.com>
-
- * src/otvalid/otvcommn.c, src/otvalid/otvcommn.h
- (otv_Coverage_validate): Add fourth argument to pass an expected
- count value. Update all users.
- Check glyph IDs.
- (otv_ClassDef_validate): Check `StartGlyph'.
-
- * src/otvalid/otvgsub.c (otv_SingleSubst_validate): More glyph ID
- checks.
-
- * src/otvalid/otvmath.c (otv_MathConstants_validate): There are only
- 56 constants.
- (otv_GlyphAssembly_validate, otv_MathGlyphConstruction_validate):
- Check glyph IDs.
-
-2007-08-08 Werner Lemberg <wl@gnu.org>
-
- * src/otvalid/otvbase.c, src/otvalid/otvcommn.c,
- src/otvalid/otvgdef.c, src/otvalid/otvgpos.c, src/otvalid/otvgsub.c,
- src/otvalid/otvjstf.c: s/FT_INVALID_DATA/FT_INVALID_FORMAT/ where
- appropriate. Reported by George.
-
- * include/freetype/internal/fttrace.h: Define `trace_otvmath'.
-
- * src/otvalid/rules.mk (OTV_DRV_SRC): Add otvmath.c.
-
- * docs/CHANGES: Updated.
-
-2007-08-08 George Williams <gww@silcom.com>
-
- Add `MATH' validating support to otvalid module.
-
- * include/freetype/tttags.h (TTAG_MATH): New macro.
- * include/freetype/ftotval.h (FT_VALIDATE_MATH): New macro.
- (FT_VALIDATE_OT): Updated.
-
- * src/otvalid/otmath.c: New file.
-
- * src/otvalid/otvalid.c: Include otvmath.c.
- * src/otvalid/otvmod.c (otv_validate): Handle `MATH' table.
-
-2007-08-04 Werner Lemberg <wl@gnu.org>
-
- * builds/unix/configure.raw: Add call to AC_LIBTOOL_WIN32_DLL.
- Fixes Savannah bug #20686.
-
-2007-08-03 Werner Lemberg <wl@gnu.org>
-
- * src/psnames/psmodule.c: Fix usage of
- FT_CONFIG_OPTION_POSTSCRIPT_NAMES macro. Reported by Graham Asher.
-
-2007-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftmac.c (open_face_from_buffer): The argument
- `driver_name' is typed as `const char*' to match with the
- callers in FT_New_Face_From_LWFN and FT_New_Face_From_SFNT.
- This is same with open_face_from_buffer in src/base/ftobjs.c.
- Found and fixed by Sean McBride.
-
-2007-07-28 Werner Lemberg <wl@gnu.org>
-
- * src/raster/ftraster.c (count_table): Make it conditional.
- * src/base/ftobjs.c (FT_New_Library): Check FT_RENDER_POOL_SIZE with
- a preprocessor statement.
-
-2007-07-27 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftoutln.c (FT_Outline_Translate): Check `outline' before
- first usage. From Savannah patch #6115.
-
-2007-07-16 Werner Lemberg <wl@gnu.org>
-
- * docs/CHANGES: Updated.
-
-2007-07-16 Derek Clegg <dclegg@apple.com>
-
- Add new service for getting the ROS from a CID font.
-
- * include/freetype/config/ftheader.h (FT_CID_H): New macro.
- * include/freetype/ftcid.h: New file.
-
- * include/freetype/internal/ftserv.h (FT_SERVIVE_CID_H): New macro.
- * include/freetype/internal/services/svcid.h: New file.
-
- * src/base/ftcid.c: New file.
-
- * src/cff/cffdrivr.c: Include FT_SERVICE_CID_H.
- (cff_get_ros): New function.
- (cff_service_cid_info): New service structure.
- (cff_services): Register it.
-
- * src/cff/cffload.c (cff_font_done): Free registry and ordering.
-
- * src/cff/cfftypes.h (CFF_FontRec): Add `registry' and `ordering'.
-
- * modules.cfg (BASE_EXTENSIONS): Add ftcid.c.
-
-2007-07-11 Derek Clegg <dclegg@apple.com>
-
- Add support for postscript name service to CFF driver.
-
- * src/cff/cffdrivr.c: Include FT_SERVICE_POSTSCRIPT_NAME_H.
- (cff_get_ps_name): New function.
- (cff_service_ps_name): New service structure.
- (cff_services): Register it.
-
-2007-07-07 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftglyph.c (FT_Glyph_Copy): Fix initialization of
- `target'. Reported by Sean McBride.
-
-2007-07-06 Werner Lemberg <wl@gnu.org>
-
- * src/pfr/pfrcmap.c: Include pfrerror.h.
-
- * src/autofit/afindic.c: Add some external declarations to pacify
- `make multi' compilation.
-
- * src/cid/cidgload.c (cid_load_glyph): Pacify compiler.
-
- * src/cff/cffdrivr.c (cff_ps_get_font_info), src/cff/cffobjs.c
- (cff_strcpy), include/freetype/internal/ftmemory.h (FT_MEM_STRDUP),
- src/autofit/aflatin.c (af_latin_hints_compute_edges),
- src/autofit/afcjk.c (af_cjk_hints_compute_edges), src/sfnt/ttmtx.c
- (tt_face_get_metrics), src/base/ftobjs.c (open_face)
- [FT_CONFIG_OPTION_INCREMENTAL]: Fix compilation with C++ compiler.
-
- * docs/release: Mention test compilation targets.
-
-2007-07-04 Werner Lemberg <wl@gnu.org>
-
- * docs/PROBLEMS: Mention that some PS based fonts can't be
- handled correctly by FreeType.
-
- * src/truetype/ttgload.c (load_truetype_glyph): Always allow a
- recursion depth of 1. This was the maximum value in TrueType 1.0,
- and some older fonts don't set this field correctly.
-
- * src/gxvalid/gxvmort1.c
- (gxv_mort_subtable_type1_substTable_validate): Fix tracing message.
-
-2007-07-03 Werner Lemberg <wl@gnu.org>
-
- * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize
- `round' to pacify compiler.
-
-2007-07-02 Werner Lemberg <wl@gnu.org>
-
-
- * Version 2.3.5 released.
- =========================
-
-
- Tag sources with `VER-2-3-5'.
-
- * docs/CHANGES, docs/VERSION.DLL: Update documentation and bump
- version number to 2.3.5.
-
- * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
- builds/win32/visualc/freetype.dsp,
- builds/win32/visualc/freetype.vcproj,
- builds/win32/visualce/index.html,
- builds/win32/visualce/freetype.dsp,
- builds/win32/visualce/freetype.vcproj: s/2.3.4/2.3.5/, s/234/235/.
-
- * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
-
- * builds/unix/configure.raw (version_info): Set to 9:16:3.
-
-2007-07-01 David Turner <david@freetype.org>
-
- * include/freetype/freetype.h, src/base/ftpatent.c
- (FT_Face_SetUnpatentedHinting): New function to dynamically change
- the setting after a face is created.
-
- * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Fix a small bug
- that created distortions in the bytecode interpreter results.
-
-2007-06-30 David Turner <david@freetype.org>
-
- * src/truetype/ttinterp.c (Ins_IUP): Add missing variable
- initialization.
-
- * src/autofit/aflatin.c (af_latin_metric_init_blues): Get rid of an
- infinite loop in the case of degenerate fonts.
-
-2007-06-26 Rahul Bhalerao <b.rahul.pm@gmail.com>
-
- Add autofit module for Indic scripts. This currently just reuses
- the CJK-specific functions.
-
- * include/freetype/config/ftoption.h (AF_CONFIG_OPTION_INDIC): New
- macro.
- * devel/ftoption.h: Synchronize with
- include/freetype/config/ftoption.h.
-
- * src/autofit/afindic.c, src/autofit/afindic.h: New files.
-
- * src/autofit/afglobal.c, src/autofit/aftypes.h,
- src/autofit/autofit.c: Updated.
-
- * src/autofit/Jamfile (_sources), * src/autofit/rules.mk
- (AUTOF_DRV_SRC): Updated.
-
-2007-06-23 David Turner <david@freetype.org>
-
- * src/truetype/ttgload.c (TT_Load_Simple): Fix change from
- 2007-06-16 that prevented the TrueType module from loading most
- glyphs.
-
-2007-06-20 Werner Lemberg <wl@gnu.org>
-
- * src/cff/cffgload.c (cff_slot_load): Fix logic of 2007-05-28
- change.
-
-2007-06-19 Werner Lemberg <wl@gnu.org>
-
- * src/type1/t1load.c (parse_encoding): Handle one more error.
-
-2007-06-19 Dmitry Timoshkov <dmitry@codeweavers.com>
-
- * src/winfonts/winfnt.c (fnt_face_get_dll_font): Return error
- FNT_Err_Invalid_File_Format if file format was recognized but
- the file doesn't contain any FNT(NE) or RT_FONT(PE) resources.
- Add verbose debug logs to make it easier to debug failing load
- attempts.
- (FNT_Face_Init): A single FNT font can't contain more than 1 face,
- so return an error if requested face index is > 0.
- Do not do further attempt to load fonts if a previous attempt has
- failed but returned error FNT_Err_Invalid_File_Format, i.e., the
- file format has been recognized but no fonts found in the file.
-
-2007-07-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftmac.c: Apply patches proposed by Sean McBride.
- (FT_GetFile_From_Mac_Name): Insert FT_UNUSED macros to fix
- the compiler warnings against unused arguments.
- (FT_ATSFontGetFileReference): Ditto.
- (FT_GetFile_From_Mac_ATS_Name): Ditto.
- (FT_New_Face_From_FSSpec): Ditto.
- (lookup_lwfn_by_fond): Fix wrong comment.
- Replace `const StringPtr' by more appropriate type
- `ConstStr255Param'.
- FSRefMakePathPath always returns UTF8 POSIX pathname in
- Mach-O, thus HFS pathname support is dropped.
- (count_faces): Remove HLock and HUnlock which is not
- required on Mac OS X anymore.
- (FT_New_Face_From_SFNT): Ditto.
- (FT_New_Face_From_FOND): Ditto.
- * builds/mac/ftmac.c: Synchronize to src/base/ftmac.c,
- except of HFS pathname support and HLock/HUnlock.
- They are required on classic CFM environment.
-
-2007-06-18 Werner Lemberg <wl@gnu.org>
-
- * src/psaux/psobjs.c (ps_parser_skip_PS_token): Remove incorrect
- assertion.
- (ps_parser_to_bytes): Fix error message.
-
- * src/type42/t42objs.c (T42_Open_Face): Handle one more error.
- * src/type42/t42parse.c (t42_parse_sfnts): s/alloc/allocated/.
- Don't allow mixed binary and hex strings.
- Handle string_size == 0 and string_buf == 0.
- (t42_parse_encoding): Handle one more error.
-
-2007-06-18 Werner Lemberg <wl@gnu.org>
-
- * src/psaux/psobjs.c (ps_tofixedarray, ps_tocoordarray): Fix exit
- logic.
- (ps_parser_load_field) <T1_FIELD_TYPE_BBOX>: Skip delimiters
- correctly.
- (ps_parser_load_field_table): Use `fields->array_max' instead of
- T1_MAX_TABLE_ELEMENTS to limit the number of arguments.
-
- * src/cff/cffgload.c (cff_decoder_prepare): Fix change from
- 2007-06-06.
-
-2007-06-17 Werner Lemberg <wl@gnu.org>
-
- * src/tools/ftrandom.c (font_size): New global variable.
- (TestFace): Use it.
- (main): Handle new option `--size' to set `font_size'.
- (Usage): Updated.
-
- * src/winfonts/winfnt.c (fnt_face_get_dll_font): Exit in case of
- invalid font.
- (FNT_Load_Glyph): Protect against invalid bitmap width.
-
-2007-06-16 David Turner <david@freetype.org>
-
- * src/smooth/ftgrays.c (gray_find_cell, gray_set_cell, gray_hline):
- Prevent integer overflows when rendering very large outlines.
-
- * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check the
- well-formedness of the contours array when loading a glyph.
-
- * src/truetype/ttinterp.c (TT_Load_Context): Initialize `zp0', `zp1',
- and `zp2'.
- (Ins_IP): Check argument ranges to reject bogus operations properly.
- (IUP_WorkerRec): Add `max_points' member.
- (_iup_worker_interpolate): Check argument ranges.
- (Ins_IUP): Ignore empty outlines.
-
-2007-06-16 Dmitry Timoshkov <dmitry@codeweavers.com>
-
- * src/winfonts/winfnt.h: Add necessary structures for PE resource
- parsing.
- (WinPE32_HeaderRec): New structure.
- (WinPE32_SectionRec): New structure.
- (WinPE_RsrcDirRec): New structure.
- (WinPE_RsrcDirEntryRec): New structure.
- (WinPE_RsrcDataEntryRec): New structure.
- (FNT_FontRec): Remove unused `size_shift' field.
-
- * src/winfonts/winfnt.c (fnt_face_get_dll_font): Add support for
- loading bitmap .fon files in PE format.
-
-2007-06-15 Dmitry Timoshkov <dmitry@codeweavers.com>
-
- * builds/win32/ftdebug.c: Unify debug level handling with other
- platforms.
-
-2007-06-14 Dmitry Timoshkov <dmitry@codeweavers.com>
-
- * builds/win32/ftdebug.c (FT_Message): Send debug output to the
- console as well as to the debugger.
-
-2007-06-14 Werner Lemberg <wl@gnu.org>
-
- * src/autofit/aflatin.c (af_latin_uniranges): Expand structure to
- cover all ranges which could possibly be handled by the aflatin
- module (since the default fallback for unknown ranges is now the
- afcjk module). It might be necessary to fine-tune this further by
- splitting off modules for Greek, Cyrillic, or other blocks.
-
-2007-06-11 David Turner <david@freetype.org>
-
- * src/autofit/aflatin.c (af_latin_hints_link_segments): Fix
- incorrect segment linking computation. This was the root cause of
- Savannah bug #19565.
-
-
- * src/autofit/* [FT_OPTION_AUTOFIT2]: Some very experimental changes
- to improve the Latin auto-hinter. Note that the new code is
- disabled by default since it is not stabilized yet.
-
- * src/autofit/aflatin2.c, src/autofit/aflatin2.h: New files
- (disabled currently).
-
- * src/autofit/afhints.c: Remove dead code.
- (af_axis_hints_new_edge): Add argument to handle segment directions.
- (af_edge_flags_to_string): New function.
- (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Handle
- option flags.
- (af_glyph_hints_reload): Add argument to handle inflections.
- Simplify.
- (af_direction_compute): Fine tuning.
- (af_glyph_hints_align_edge_points): Fix logic.
- (af_glyph_hints_align_strong_points): Do linear search for small
- edge counts.
- (af_glyph_hints_align_weak_points): Skip any touched neighbors.
- (af_iup_shift): Handle zero `delta'.
-
- * src/autofit/afhints.h: Updated.
- (AF_SORT_SEGMENTS): New macro (disabled).
- (AF_AxisHintsRec) [AF_SORT_SEGMENTS]: New member `mid_segments'.
-
- * src/autofit/afglobal.c (af_face_globals_get_metrics): Add
- argument to pass option flags for handling scripts.
- * src/autofit/afglobal.h: Updated.
-
- * src/autofit/afcjk.c: Updated.
- * src/autofit/aflatin.c: Updated.
- (af_latin_metrics_scale_dim): Don't reduce scale by 2%.
-
- (af_latin_hints_compute_segments) [AF_HINT_METRICS]: Remove dead code.
- (af_latin_hints_compute_edges) [AF_HINT_METRICS]: Remove dead code.
- Don't set `edge->dir'
- (af_latin_hint_edges): Add more logging.
-
- * src/autofit/afloader.c: Updated.
-
-2007-06-11 Werner Lemberg <wl@gnu.org>
-
- * docs/CHANGES: Document FT_Face_CheckTrueTypePatents.
-
-2007-06-10 David Turner <david@freetype.org>
-
- * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Slight speed-up to
- the TrueType glyph loader.
-
- * include/freetype/config/ftoption.h: Clarify documentation
- regarding unpatented hinting.
-
-
- Add new `FT_Face_CheckTrueTypePatents' API.
-
- * include/freetype/freetype.h (FT_Face_CheckTrueTypePatents): New
- declaration.
-
- * include/freetype/internal/services/svttglyf.h,
- src/base/ftpatent.c: New files.
-
- * include/freetype/internal/ftserv.h (FT_SERVICE_TRUETYPE_GLYF_H):
- New macro.
-
- * src/truetype/ttdriver.c: Include FT_SERVICE_TRUETYPE_GLYF_H and
- `ttpload.h'.
- (tt_service_truetype_glyf): New service structure.
- (tt_services): Register it.
-
- * modules.cfg (BASE_EXTENSIONS), src/base/Jamfile (_sources): Add
- `ftpatent.c'.
-
-2007-06-08 Werner Lemberg <wl@gnu.org>
-
- * src/sfnt/sfobjs.c (sfnt_load_face): Undo change from 2007-04-28.
- Fonts without a cmap must be handled correctly by FreeType (anything
- else would be a bug).
-
-
- * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
- [FT_DEBUG_LEVEL_TRACE]: Improve tracing message.
-
-2007-06-07 Werner Lemberg <wl@gnu.org>
-
- * src/sfnt/ttsbit0.c (tt_sbit_decoder_init,
- tt_sbit_decoder_load_image): Protect against integer overflows.
-
-
- * src/pfr/pfrgload.c (pfr_glyph_load_simple): More bounding checks
- for `x_control' and `y_control'.
-
-2007-06-06 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftoutln.c (FT_Outline_Decompose): Check `last'.
-
-
- * src/pfr/pfrcmap.c (pfr_cmap_init): Convert assertion into normal
- FreeType error.
-
-
- * src/winfonts/winfnt.c (fnt_face_get_dll_font): Do a rough check of
- `font_count'.
-
-
- * src/type1/t1load.c (parse_font_matrix): Check `temp_scale'.
-
-
- * src/cff/cffgload.c (cff_decoder_prepare): Change return type to
- `FT_Error'.
- Check `fd_index'.
- (cff_slot_load): Updated.
- * src/cff/cffgload.h: Updated.
-
-2007-06-05 Werner Lemberg <wl@gnu.org>
-
- * src/pfr/pfrgload.c (pfr_glyph_done): Comment out unused code.
- (pfr_glyph_load_simple): Convert assertion into normal FreeType
- error.
- Check `idx'.
- (pfr_glyph_load_compound, pfr_glyph_curve_to, pfr_glyph_line_to):
- Convert assertion into normal FreeType error.
-
- * src/pfr/pfrtypes.h (PFR_GlyphRec): Comment out unused code.
-
-
- * src/winfonts/winfnt.c (FNT_Face_Init): Check `family_size'.
-
-
- * src/psaux/psobjs.c (ps_tocoordarray, ps_tofixedarray): Return -1
- in case of parsing error.
- (ps_parser_load_field): Updated.
-
- * src/type1/t1load.c (parse_font_matrix): Updated.
-
-2007-06-04 Werner Lemberg <wl@gnu.org>
-
- * src/cid/cidgload.c (cid_load_glyph): Check `fd_select'.
-
- * src/tools/ftrandom/Makefile: Depend on `libfreetype.a'.
-
-2007-06-03 Werner Lemberg <wl@gnu.org>
-
- * src/tools/ftrandom/*: Add the `ftrandom' test program written by
- George Williams (with some modifications).
-
-2007-06-03 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftobjs.c (destroy_charmaps), src/type1/t1objs.c
- (T1_Face_Done), src/winfonts/winfnt.c (FNT_Face_Done): Check for
- face == NULL. Suggested by Graham Asher.
-
-2007-06-03 Ismail Dönmez <ismail@pardus.org.tr>
-
- * src/base/ftobjs.c (FT_Request_Metrics): Fix compiler warning.
-
-2007-06-02 Werner Lemberg <wl@gnu.org>
-
- * include/freetype/fterrdef.h (FT_Err_Corrupted_Font_Header,
- FT_Err_Corrupted_Font_Glyphs): New error codes for BDF files.
-
- * src/bdf/bdflib.c (bdf_load_font): Use them.
-
- * src/bdf/bdflib.c (_bdf_parse_start): Check `FONT' better.
-
-2007-06-01 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftobjs.c (FT_Request_Metrics), src/cache/ftccmap.c
- (FTC_CMapCache_Lookup): Remove unused code.
-
-2007-06-01 Sean McBride <sean@rogue-research.com>
-
- * src/truetype/ttinterp.c (Null_Vector, NULL_Vector): Removed,
- unused.
-
-2007-06-01 Werner Lemberg <wl@gnu.org>
-
- * src/cid/cidparse.c (cid_parser_new): Don't continue second search
- pass for `StartData' if an error has occurred.
- Exit properly if no `StartData' has been seen at all.
-
- * builds/unix/ftsystem.c (FT_Stream_Open): Don't use ULONG_MAX but
- LONG_MAX to avoid compiler warning. Suggested by Sean McBride.
-
-2007-05-30 Werner Lemberg <wl@gnu.org>
-
- * src/type1/t1load.c (parse_subrs, parse_charstrings): Protect
- against too small binary data strings.
-
- * src/bdf/bdflib.c (_bdf_parse_glyphs): Check `STARTCHAR' better.
-
-2007-05-28 David Turner <david@freetype.org>
-
- * src/cff/cffgload.c (cff_slot_load): Do not apply the identity
- transformation. This significantly reduces the loading time of CFF
- glyphs.
-
- * docs/CHANGES: Updated.
-
- * src/autofit/afglobal.c (AF_SCRIPT_LIST_DEFAULT): Change default
- hinting script to CJK, since it works well with more scripts than
- latin. Thanks to Rahul Bhalerao <b.rahul.pm@gmail.com> for pointing
- this out!
-
-2007-05-25 Werner Lemberg <wl@gnu.org>
-
- * docs/CHANGES: Updated.
-
-2007-05-24 Werner Lemberg <wl@gnu.org>
-
- * src/truetype/ttobjs.h (tt_size_ready_bytecode): Move declaration
- into TT_USE_BYTECODE_INTERPRETER preprocessor block.
-
-2007-05-24 Graham Asher <graham.asher@btinternet.com>
-
- * src/truetype/ttobjs.c (tt_size_ready_bytecode)
- [!TT_USE_BYTECODE_INTERPRETER]: Removed. Unused.
-
-2007-05-22 David Turner <david@freetype.org>
-
- * src/truetype/ttgload.c (load_truetype_glyph): Fix last change to
- avoid crashes in case the bytecode interpreter is not used.
-
-
- Avoid heap blowup with very large .Z font files. This fixes
- Savannah bug #19910.
-
- * src/lzw/ftzopen.h (FT_LzwStateRec): Remove `in_cursor',
- `in_limit', `pad', `pad_bits', and `in_buff' members.
- Add `buf_tab', `buf_offset', `buf_size', `buf_clear', and
- `buf_total' members.
-
- * src/lzw/ftzopen.c (ft_lzwstate_get_code): Rewritten. It now takes
- only one argument.
- (ft_lzwstate_refill, ft_lzwstate_reset, ft_lzwstate_io): Updated.
-
-2007-05-20 Ismail Dönmez <ismail@pardus.org.tr>
-
- * src/pshinter/pshrec.c (ps_mask_table_set_bits): Add `const'.
- (ps_dimension_set_mask_bits): Remove `const'.
-
-2007-05-19 Werner Lemberg <wl@gnu.org>
-
- * src/sfnt/ttmtx.c (tt_face_get_metrics)
- [!FT_CONFIG_OPTION_OLD_INTERNALS]: Another type-punning fix.
-
-2007-05-19 Derek Clegg <dclegg@apple.com>
-
- Savannah patch #5929.
-
- * include/freetype/tttables.h, src/base/ftobjcs.c
- (FT_Get_CMap_Format): New function.
-
- * include/freetype/internal/services/svttcmap.c (TT_CMapInfo): Add
- `format' member.
- * src/sfnt/ttcmap.c (tt_cmap{0,2,4,6,8,10,12}_get_info): Set
- cmap_info->format.
-
-2007-05-19 Werner Lemberg <wl@gnu.org>
-
- * src/truetype/ttgload.c (load_truetype_glyph): Save graphics state
- before handling subglyphs so that it can be reinitialized each time.
- This fixes Savannah bug #19859.
-
-2007-05-16 Werner Lemberg <wl@gnu.org>
-
- * src/cache/ftccache.c (ftc_node_mru_link, ftc_node_mru_unlink),
- src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP), src/cache/ftcglyph.h
- (FTC_GCACHE_LOOKUP_CMP), src/pshinter/pshmod.c (ps_hinter_init),
- src/sfnt/ttmtx.c (tt_face_load_hmtx, tt_face_load_hhea,
- tt_face_get_metrics): Fix type-punning issues.
-
-2007-05-15 David Turner <david@freetype.org>
-
- * include/freetype/config/ftstdlib.h,
- include/freetype/internal/ftobjs.h: As suggested by Graham Asher,
- ensure that ft_isalnum, ft_isdigit, etc., use hard-coded values
- instead on relying on the locale-dependent functions provided by
- <ctypes.h>.
-
-2007-05-15 Graham Asher <graham.asher@btinternet.com>
-
- * src/autofit/afcjk.c (af_cjk_hints_compute_edges): Remove unused
- variable.
- * src/autofit/afloader.c (af_loader_load_g): Ditto.
-
- * src/base/ftobjs.c (ft_validator_error): Use `ft_jmp_buf'.
- (open_face_from_buffer): Initialize `stream'.
- (FT_Request_Metrics): Remove unused variable.
- Remove redundant `break' statements.
- (FT_Get_Track_Kerning): Remove unused variable.
-
- * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs,
- afm_parse_kern_data): Remove redundant
- `break' statements.
- (afm_parser_parse): Ditto.
- Don't use uninitialized variables.
-
- * src/psnames/psmodule.c (VARIANT_BIT): Define as unsigned long.
- Use `|' operator instead of `^' to set it.
- Update all users.
-
- * src/sfnt/ttcmap.c (tt_face_build_cmaps): Use `ft_jmp_buf'.
- * src/sfnt/ttkern.c (tt_face_load_kern): Remove unused variable.
-
- * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Remove redundant
- comparison.
- (TT_Process_Simple_Glyph): Use FT_UInt for `n_points' and `i'.
- (TT_Load_Glyph): Remove unused variable.
-
-2007-05-13 Derek Clegg <dclegg@apple.com>
-
- * src/base/ftobjs.c (FT_New_Library): Only allocate rendering pool
- if FT_RENDER_POOL_SIZE is > 0. From Savannah patch #5928.
-
-2007-05-11 David Turner <david@freetype.org>
-
- * src/cache/ftbasic.c, include/freetype/ftcache.h
- (FTC_ImageCache_LookupScaler, FTC_SBit_Cache_LookupScaler): Two new
- functions that allow us to look up glyphs using an FTC_Scaler object
- to specify the size, making it possible to use fractional pixel
- sizes.
-
- * src/truetype/ttobjs.c (tt_size_ready_bytecode): Set
- `size->cvt_ready'. Reported by Boris Letocha.
-
-2007-05-09 Graham Asher <graham.asher@btinternet.com>
-
- * src/truetype/ttinterp.c (Ins_IP), src/autofit/aflatin.c
- (af_latin_metrics_scale_dim): Fix compiler warnings.
-
-2007-05-06 Werner Lemberg <wl@gnu.org>
-
- * builds/win32/visualce/freetype.sln: Removed, as requested by
- Vincent.
-
-2007-05-04 Vincent RICHOMME <richom.v@free.fr>
-
- * builds/win32/visualce/*: Add Visual C++ project files for Pocket
- PC targets.
-
- * docs/CHANGES: Document them.
-
-2007-05-04 <harry@kdevelop.org>
-
- * builds/unix/ftsystem.c (FT_Stream_Open): Handle return value 0 of
- mmap (which might happen on some RTOS). From Savannah patch #5909.
-
-2007-05-03 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftobjs.c (FT_Set_Char_Size): Simplify code.
- * include/freetype/freetype.h (FT_Set_Char_Size): Update
- documentation.
-
-2007-04-28 Victor Stinner <victor.stinner@inl.fr>
-
- * src/sfnt/sfobjs.c (sfnt_load_face): Check error code after loading
- `cmap'.
-
-2007-04-27 Werner Lemberg <wl@gnu.org>
-
- * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check for negative
- number of points in contours. Problem reported by Victor Stinner
- <victor.stinner@haypocalc.com>.
- (TT_Process_Simple_Glyph): Synchronize variable types.
-
-2007-04-26 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftglyph.c (FT_Glyph_Copy): Always set second argument to
- zero in case of error. This fixes Savannah bug #19689.
-
-2007-04-25 Boris Letocha <b.letocha@cz.gmc.net>
-
- * src/truetype/ttobjs.c: Fix a typo that created a speed regression
- in the TrueType bytecode loader.
-
-2007-04-10 Martin Horak <horakm@centrum.cz>
-
- * src/sfnt/sfobjs.c (sfnt_load_face) [FT_CONFIG_OPTION_INCREMENTAL]:
- Ignore `hhea' table. This fixes Savannah bug #19261.
-
-2007-04-09 Werner Lemberg <wl@gnu.org>
-
-
- * Version 2.3.4 released.
- =========================
-
-
- Tag sources with `VER-2-3-4'.
-
- * docs/CHANGES, docs/VERSION.DLL: Update documentation and bump
- version number to 2.3.4.
-
- * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
- builds/win32/visualc/freetype.dsp,
- builds/win32/visualc/freetype.vcproj: s/2.3.3/2.3.4/, s/233/234/.
-
- * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
-
- * builds/unix/configure.raw (version_info): Set to 9:15:3.
-
-2007-04-09 Martin Horak <horakm@centrum.cz>
-
- * src/truetype/ttgload.c (load_truetype_glyph): Save and restore
- memory stream to avoid a crash with the incremental memory
- interface (Savannah bug #19260).
-
-2007-04-06 David Turner <david@freetype.org>
-
- * src/base/ftbimap.c (ft_bitmap_assure_buffer): Fix buffer-overwrite bug
- (Savannah bug #19536).
-
-2007-04-04 Werner Lemberg <wl@gnu.org>
-
-
- * Version 2.3.3 released.
- =========================
-
-
- Tag sources with `VER-2-3-3'.
-
- * docs/CHANGES: Mention CVE-2007-1351.
-
-2007-04-03 David Turner <david@freetype.org>
-
- * src/base/ftobjs.c (FT_Set_Char_Size): As suggested by James Cloos,
- if one of the resolution values is 0, treat it as if it were the
- same as the other value.
-
-2007-04-02 David Turner <david@freetype.org>
-
- Add special code to detect `extra-light' fonts and do not snap their
- stem widths too much to avoid bizarre hinting effects.
-
- * src/autofit/aflatin.h (AF_LatinAxisRec): Add `standard_width' and
- `extra_light' members.
-
- * src/autofit/aflatin.c (af_latin_metrics_init_widths): Initialize
- them.
- (af_latin_metrics_scale_dim): Set `extra_light'.
- (af_latin_compute_stem_width): Use `extra_light'.
-
-2007-03-28 David Turner <david@freetype.org>
-
- * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Fix zero-ing of the
- padding.
-
-2007-03-28 Werner Lemberg <wl@gnu.org>
-
- * src/bdf/bdflib.c (setsbit, sbitset): Handle values >= 128
- gracefully.
- (_bdf_set_default_spacing): Increase `name' buffer size to 256 and
- issue an error for longer names. This fixes CVE-2007-1351.
- (_bdf_parse_glyphs): Limit allowed number of glyphs in font to the
- number of code points in Unicode.
-
- * builds/win32/visualc/index.html,
- builds/win32/visualc/freetype.dsp,
- builds/win32/visualc/freetype.vcproj, README: s/2.3.2/2.3.3/,
- s/232/233/.
-
- * docs/CHANGES: Mention ftdiff.
-
-2007-03-26 David Turner <david@freetype.org>
-
- * src/truetype/ttinterp.c [FIX_BYTECODE]: Remove it and
- corresponding code.
- (Ins_MD): Last regression fix.
-
- * src/autofit/aflatin.c (af_latin_metrics_init_blues): Fix blues
- computations in order to ignore single-point contours. These are
- never rasterized and correspond in certain fonts to mark-attach
- points that are very far from the glyph's real outline, ruining the
- computation.
-
- * src/autofit/afloader.c (af_loader_load_g): In the case of
- monospaced fonts, always set `rsb_delta' and `lsb_delta' to 0.
- Otherwise code that uses them will most certainly ruin the fixed
- advance property.
-
- * docs/CHANGES, docs/VERSION.DLL, README, Jamfile (RefDoc): Update
- documentation and bump version number to 2.3.3.
-
- * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
-
- * builds/unix/configure.raw (version_info): Set to 9:14:3.
-
-2007-03-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * builds/unix/ftconfig.in: Disable Carbon framework dependency on
- 64bit ABI on Mac OS X 10.4.x (ppc & i386). Found by Sean McBride.
- * builds/vms/ftconfig.h: Ditto.
- * include/freetype/config/ftconfig.h: Ditto.
-
-2007-03-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * builds/unix/ftsystem.c (FT_Stream_Open): Temporary fix to prevent
- 32bit unsigned long overflow by 64bit filesize on LP64 platform, as
- proposed by Sean McBride:
- http://lists.gnu.org/archive/html/freetype-devel/2007-03/msg00032.html
-
-2007-03-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * builds/unix/ftconfig.in: Suppress SGI compiler's warning against
- setjmp, proposed by Sean McBride:
- http://lists.gnu.org/archive/html/freetype-devel/2007-03/msg00032.html
-
-2007-03-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * builds/unix/configure.raw: Dequote `OS_INLINE' in comment of
- conftest.c, to avoid unexpected shell evaluation. Possibly it is a
- bug or undocumented behaviour of autoconf.
-
-2007-03-18 David Turner <david@freetype.org>
-
- * src/truetype/ttinterp.c (Ins_MDRP): Another bytecode regression
- fix; testing still needed.
-
- * src/truetype/ttinterp.c (Ins_MD): Another bytecode regression fix.
-
-2007-03-17 David Turner <david@freetype.org>
-
- * src/truetype/ttinterp.c (Ins_IP): Fix wrong handling of the
- (undocumented) twilight zone special case.
-
-2007-03-09 Werner Lemberg <wl@gnu.org>
-
-
- * Version 2.3.2 released.
- =========================
-
-
- Tag sources with `VER-2-3-2'.
-
- * builds/win32/visualc/index.html,
- builds/win32/visualc/freetype.dsp,
- builds/win32/visualc/freetype.vcproj, README: s/2.3.1/2.3.2/,
- s/231/232/.
-
-2007-03-08 David Turner <david@freetype.org>
-
- * docs/CHANGES, docs/VERSION.DLL: Updated for upcoming release.
-
- * builds/unix/configure.raw (version_info): Set to 9:13:3.
-
- * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
-
- * README, Jamfile (RefDoc): s/2.3.1/2.3.2/.
-
- * src/base/ftutil.c (ft_mem_strcpyn): Fix a bug that prevented the
- function to work properly, over-writing user-provided buffers in
- some cases. Reported by James Cloos <cloos@jhcloos.com>.
-
-
-2007-03-05 Werner Lemberg <wl@gnu.org>
-
- * include/freetype/config/ftstdlib.h (ft_strstr): New wrapper
- macro for `strstr'.
-
- * src/truetype/ttobjs.c (tt_face_init): Use ft_strstr for scanning
- `trick_names', as suggested by Ivan Nincic.
-
-2007-03-05 David Turner <david@freetype.org>
-
- * src/base/ftinit.c (FT_Init_FreeType): Fix a small memory leak in
- case FT_Init_FreeType fails for some reason. Problem reported by
- Maximilian Schwerin <maximilian.schwerin@buelowssiege.de>.
-
- * src/truetype/ttobs.c (tt_size_init_bytecode): Clear the `x_ppem'
- and `y_ppem' fields of the `TT_Size.metrics' structure, not those of
- `TT_Size.root.metrics'. Problem reported by Daniel Glöckner
- <daniel-gl@gmx.net>.
-
- * src/type1/t1afm.c (T1_Read_PFM): Read kerning values as 16-bit
- signed values, not unsigned ones. Problem reported by Johannes
- Walther <joh_walt@yahoo.de>.
-
-2007-02-21 David Turner <david@freetype.org>
-
- * src/pshinter/pshalgo.c (psh_hint_align): Fix a bug in the hinting
- of small and ghost stems in the Postscript interpreter.
-
-2007-02-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftmac.c (FT_GetFileRef_From_Mac_ATS_Name): Fix memory
- leak, patch by "Jjgod Jiang" <gzjjgod@gmail.com>.
- * builds/mac/ftmac.c (FT_GetFileRef_From_Mac_ATS_Name): Ditto.
-
-2007-02-16 Werner Lemberg <wl@gnu.org>
-
- * src/truetype/ttinterp.c (Ins_MD): Remove unused variable.
- * src/autofit/aflatin.c (af_latin_hints_link_segments): Ditto.
-
-2007-02-14 David Turner <david@freetype.org>
-
- It seems that the following changes fix most of the known
- interpreter problems with my fonts, but more testing is needed,
- though.
-
- * src/truetype/ttinterp.c (FIX_BYTECODE): Activate.
- (TT_MulFix14): Rewrite.
- (Ins_MD, Ins_MDRP, Ins_IP) [FIX_BYTECODE]: Improved and updated.
- (Ins_MIRP): Ditto.
-
-2007-02-12 Werner Lemberg <wl@gnu.org>
-
- * src/truetype/ttinterp.c (Project_x, Project_y): Remove compiler
- warnings.
-
- * src/pcf/pcfread.c (pcf_interpret_style), src/bdf/bdfdrivr.c
- (bdf_interpret_style): Ditto.
-
-2007-02-12 David Turner <david@freetype.org>
-
- Simplify projection and dual-projection code interface.
-
- * src/truetype/ttinterp.h (TT_Project_Func): Use `FT_Pos', not
- FT_Vector' as argument type.
- * src/truetype/ttinterp.c (CUR_Func_project, CUR_Func_dualproj):
- Updated.
- (CUR_fast_project, CUR_fast_dualproj): New macros.
- (Project, Dual_Project, Project_x, Project_y): Updated.
- (Ins_GC, Ins_SCFS, Ins_MDAP, Ins_MIAP, Ins_IP): Use new `fast'
- macros.
-
-
- * src/autofit/afloader.c (af_loader_load_g): Improve spacing
- adjustments for the non-light auto-hinted modes. Gets rid of
- `inter-letter spacing is too wide' problems.
-
- * src/autofit/aflatin.c (af_latin_hints_link_segments,
- af_latin_hints_compute_edges): Slight optimization of the segment
- linker and better handling of serif segments to get rid of broken
- `9' in Arial at 9pt (96dpi).
-
-
- Introduce new string functions and the corresponding macros to get
- rid of various uses of strcpy and other `evil' functions, as well as
- to simplify a few things.
-
- * include/freetype/internal/ftmemory.h (ft_mem_strdup, ft_mem_dup,
- ft_mem_strcpyn): New declarations.
- (FT_MEM_STRDUP, FT_STRDUP, FT_MEM_DUP, FT_DUP, FT_STRCPYN): New
- macros.
- * src/base/ftutil.c (ft_mem_dup, ft_mem_strdup, ft_mem_strcpyn): New
- functions.
-
- * src/bfd/bfddrivr.c (bdf_interpret_style, BDF_Face_Init),
- src/bdf/bdflib.c (_bdf_add_property), src/pcf/pcfread.c
- (pcf_get_properties, pcf_interpret_style, pcf_load_font),
- src/cff/cffdrivr.c (cff_get_glyph_name), src/cff/cffload.c
- (cff_index_get_sid_string), src/cff/cffobjs.c (cff_strcpy),
- src/sfnt/sfdriver.c (sfnt_get_glyph_name), src/type1/t1driver.c
- (t1_get_glyph_name), src/type42/t42drivr.c (t42_get_glyph_name,
- t42_get_name_index): Use new functions and simplify code.
-
- * builds/mac/ftmac.c (FT_FSPathMakeSpec): Don't use FT_MIN.
-
-2007-02-11 Werner Lemberg <wl@gnu.org>
-
- * src/autofit/afloader.c (af_loader_load_g): Don't change width for
- non-spacing glyphs.
-
-2007-02-07 Tom Parker <palfrey@tevp.net>
-
- * src/cff/cffdrivr.c (cff_get_name_index): Protect against NULL
- pointer.
-
-2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * include/freetype/ftmac.h (FT_DEPRECATED_ATTRIBUTE):
- Introduce __attribute((deprecated))__ to warn functions
- which use non-ANSI data types in its interfaces.
- (FT_GetFile_From_Mac_Name): Deprecated, using FSSpec.
- (FT_GetFile_From_Mac_ATS_Name): Deprecated, using FSSpec.
- (FT_New_Face_From_FSSpec): Deprecated, using FSSpec.
- (FT_New_Face_From_FSRef): Deprecated, using FSRef.
-
- * src/base/ftmac.c: Predefine FT_DEPRECATED_ATTRIBUTE as void
- to avoid warning in building FreeType.
- * builds/mac/ftmac.c: Ditto.
-
-2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftbase.c: Fix to use builds/mac/ftmac.c, if configured
- `--with-fsspec' etc. Replace #include "ftmac.c" with
- #include <ftmac.c>.
-
-2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * include/freetype/ftmac.h (FT_GetFilePath_From_Mac_ATS_Name):
- Introduced as replacement of FT_GetFile_From_Mac_ATS_Name.
- * src/base/ftmac.c (FT_GetFilePath_From_Mac_ATS_Name): Ditto.
- (FT_GetFile_From_Mac_ATS_Name): Rewritten as wrapper of
- FT_GetFilePath_From_Mac_ATS_Name.
- * builds/mac/ftmac.c: Ditto.
-
-2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * include/freetype/ftmac.h: Fixed wrong comment: FSSpec of
- FT_GetFile_From_Mac_Name, FT_GetFile_From_Mac_ATS_Name are
- for passing to FT_New_Face_From_FSSpec.
-
-2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * builds/unix/configure.raw: Check whether Mac OS X system headers
- can be built under ANSI C mode.
-
- * src/base/ftmac.c (OS_INLINE): Redefine OS_INLINE by a version
- compatible to ANSI C in case system headers are ANSI C incompatible.
- * builds/mac/ftmac.c (OS_INLINE): Ditto.
-
-2007-02-01 Werner Lemberg <wl@gnu.org>
-
- * include/freetype/ttnameid.h (TT_MS_LANGID_DZONGHKA_BHUTAN):
- Explain why applications shouldn't use it. Found by Alexei.
-
-2007-02-01 Alexei Podtelezhnikov <apodtele@gmail.com>
-
- * builds/unix/freetype2.m4 (AC_CHECK_FT2): Fix spelling of warning
- message.
-
- * src/gxvalid/gxvmort1.c
- (gxv_mort_subtable_type1_substTable_validate): Fix debugging
- message.
-
-2007-01-31 Werner Lemberg <wl@gnu.org>
-
-
- * Version 2.3.1 released.
- =========================
-
-
- Tag sources with `VER-2-3-1-FINAL'.
-
- * builds/win32/visualc/freetype.dsp,
- builds/win32/visualc/freetype.vcproj: s/230/231/.
- * builds/win32/visualc/index.html: s/221/231/.
-
- * vms_make.com: Add `ftgasp'.
-
-2007-01-30 David Turner <david@freetype.org>
-
- Tag sources with VER-2-3-1 to prepare release.
-
- * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
-
- * docs/VERSION.DLL, docs/release, README, Jamfile (RefDoc):
- s/2.3.0/2.3.1/.
-
- * builds/unix/configure.raw (version_info): Set to 9:12:3.
-
-
- * src/autofit/aftypes.h (AF_USE_WARPER), src/autofit/afloader.c
- (af_loader_load_g): Disable the warper (i.e., the light hinting
- improvements) to make a 2.3.1 bugfix release before introducing a
- new feature. This should give us more time to tune and improve the
- warper for the next release.
-
- * docs/CHANGES: Update accordingly.
-
-2007-01-25 David Turner <david@freetype.org>
-
- For light auto-hinting, improve glyph advance widths and resurrect
- normal/full hinting to its normal quality.
-
- * src/autofit/afhints.h (AF_GlyphHintsRec): New members `xmin_delta'
- and `xmax_delta'.
- * src/autofit/afhints.c (af_glyph_hints_reload): Reset `xmin_delta'
- and `xmax_delta'.
-
- * src/autofit/afloader.c (af_loader_load_g) <AF_USE_WARPER>: Replace
- preprocessor conditional with if-clause, handling both light and
- normal mode.
-
- * src/autofit/afwarp.c (AF_WarpScore): Fine-tune again.
- (af_warper_compute): Handle `xmin_delta' and `xmax_delta'.
-
-2007-01-25 Werner Lemberg <wl@gnu.org>
-
- * docs/release: Updated -- Savannah uses a new uploading scheme.
-
-2007-01-25 David Turner <david@freetype.org>
-
- * src/cff/cffload.c (cff_index_get_pointers): Improve previous fix.
-
- * src/cff/cffgload.c (cff_decoder_parse_charstrings)
- <cff_op_callsubr, cff_op_callgsubr>: Fix sanity check for empty
- functions.
-
- * docs/CHANGES: Document light auto-hinting improvement.
-
-2007-01-25 Werner Lemberg <wl@gnu.org>
-
- * src/cff/cffload.c (cff_index_get_pointers): Handle last entry
- correctly in a sanity check. Since this function is only used to
- load local and global functions, any charstring that called the last
- local/global function would fail otherwise. This fixes Savannah bug
- #18867.
-
- * docs/CHANGES: Document it.
-
-2007-01-23 David Turner <david@freetype.org>
-
- * src/truetype/ttobjs.c (tt_size_ready_bytecode): Fix typo that
- prevented compilation when disabling both the unpatented and the
- bytecode interpreter in the TrueType font driver.
-
-
- Fix and enable the warper to improve `light' hinting mode. This is
- not necessarily a final version, but it seems to work well.
-
- * src/autofit/aflatin.c (af_latin_hints_init) [AF_USE_WARPER]:
- Disable code.
- (af_latin_hints_apply) [AF_USE_WARPER]: Handle FT_RENDER_MODE_LIGHT.
- * src/autofit/aftypes.h: Activate AF_USE_WARPER.
-
- * src/autofit/afwarp.c (AF_WarpScore): Tune table.
- (af_warper_compute_line_best): Fix array size of `scores'.
- (af_warper_compute): Better handling of border cases.
- * src/autofit/afwarp.h (AF_WarperRec): Remove unused members `X1'
- and `X2'.
-
-2007-01-21 Werner Lemberg <wl@gnu.org>
-
- * ChangeLog: Split off older entries into...
- * ChangeLog.22: This new file.
-
-2007-01-21 Werner Lemberg <wl@gnu.org>
-
- * docs/CHANGES: Document SHZ fix.
-
-2007-01-21 George Williams <gww@silcom.com>
-
- * src/truetype/ttinterp.c (Ins_SHZ): SHZ doesn't move phantom
- points.
-
-2007-01-21 Werner Lemberg <wl@gnu.org>
-
- * src/sfnt/ttmtx.c (tt_face_get_metrics)
- [!FT_CONFIG_OPTION_OLD_INTERNALS]: Fix limit check.
-
-2007-01-17 Werner Lemberg <wl@gnu.org>
-
-
- * Version 2.3.0 released.
- =========================
-
-
- Tag sources with `VER-2-3-0-FINAL'.
-
-2007-01-17 Werner Lemberg <wl@gnu.org>
-
- * docs/release: Updated.
-
-2007-01-16 David Turner <david@freetype.org>
-
- * src/autofit/aflatin.c (af_latin_hints_compute_segments),
- src/cff/cffdriver.c (cff_ps_get_font_info), src/truetype/ttobjs.c
- (tt_face_init), src/truetype/ttinterp.c (Ins_SHC): Fix compiler
- warnings.
-
-2007-01-15 Detlef Würkner <TetiSoft@apg.lahn.de>
-
- * builds/amiga/makefile, builds/amiga/makefile.os4,
- builds/amiga/smakefile: Add `ftgasp.c' and `ftlcdfil.c'.
-
- * builds/amiga/include/freetype/config/ftconfig.h: Synchronize.
-
-2007-01-14 Detlef Würkner <TetiSoft@apg.lahn.de>
-
- Fix various compiler warnings.
-
- * src/truetype/ttdriver.c (tt_size_select), src/cff/cffobjs.h,
- src/cff/cffobjs.c (cff_size_request), src/type42/t42objs.h:
- s/index/strike_index/.
- * src/base/ftobjs.c (FT_Match_Size): s/index/size_index/.
-
- * src/gxvalid/gxvmorx5.c
- (gxv_morx_subtable_type5_InsertList_validate): s/index/table_index/.
-
- * src/truetype/ttinterp.c (Compute_Point_Displacement),
- src/pcf/pcfread.c (pcf_seek_to_table_type): Avoid possibly
- uninitialized variables.
-
-2007-01-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * docs/CHANGES, docs/INSTALL.MAC: Improvements.
-
-2007-01-13 Werner Lemberg <wl@gnu.org>
-
- * src/type1/t1afm.c (T1_Read_Metrics): MS Windows allows PFM
- versions up to 0x3FF without complaining.
-
-2007-01-13 Derek Clegg <dclegg@apple.com>
-
- Add FT_Get_PS_Font_Info interface to CFF driver.
-
- * src/cff/cfftypes.h: Include FT_TYPE1_TABLES_H.
- (CFF_FontRec): Add `font_info' field.
-
- * src/cff/cffload.c: Include FT_TYPE1_TABLES_H.
- (cff_font_done): Free font->font_info if necessary.
-
- * src/cff/cffdrvr.c (cff_ps_get_font_info): New function.
- (cff_service_ps_info): Register cff_ps_get_font_info.
-
-2007-01-13 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix compilation
- with C++ compiler.
-
- * src/autofit/afhints.c (af_glyph_hints_dump_segments,
- af_glyph_hints_dump_edges): Ditto.
-
- * src/base/rules.mk (BASE_SRC): Remove ftgasp.c (it's already in
- `modules.cfg').
-
- * src/sfnt/ttsbit0.h: Remove.
-
- * src/sfnt/rules.mk (SFNT_DRV_SRC): Don't include ttsbit0.c.
-
-2007-01-12 David Turner <david@freetype.org>
-
- * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Fix memory stomping
- bug in the bitmap emboldener if the pitch of the source bitmap is
- much larger than its width.
-
- * src/truetype/ttinterp.c (Update_Max): Fix aliasing-related
- compilation warning.
-
-2007-01-12 Werner Lemberg <wl@gnu.org>
-
- * builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from
- `automake' CVS module from sources.redhat.com.
-
-2007-01-11 Werner Lemberg <wl@gnu.org>
-
- * src/type1/t1load.c (is_space): Removed.
- (parse_encoding, parse_charstrings): Use IS_PS_DELIM.
- (parse_charstrings): Use IS_PS_TOKEN.
-
-
- * autogen.sh: Avoid bash specific syntax.
-
-2007-01-11 David Turner <david@freetype.org>
-
- * docs/CHANGES: Small update.
-
- * builds/unix/configure.raw (version_info): Set to 9:11:3.
-
- * src/base/ftobjs.c (IsMacResource): Fix a small bug that caused a
- crash with some Mac OS X .dfont files. Submitted by Masatake
- Yamato.
-
- * autogen.sh: Small fix to get it working on Mac OS X properly:
- The issue is that GNU libtool is called `glibtool' on this platform,
- and we must call `glibtoolize', since `libtoolize' doesn't exist.
-
-2007-01-10 David Turner <david@freetype.org>
-
- * all-sources: Tag all sources with VER-2-3-0-RC1 and
- VER-2-3-0.
-
- * Jamfile (RefDoc), README, builds/win32/visualc/freetype.dsp,
- builds/win32/visualc/freetype.vcproj, docs/VERSION.DLL: Update
- version number to 2.3.0.
-
- * include/freetype/freetype.h (FREETYPE_MINOR): Set to 3.
- (FREETYPE_PATCH): Set to 0.
-
- * include/freetype/ftchapters.h, include/freetype/ftgasp.h,
- include/freetype/ftlcdfil.h: Update reference documentation with
- GASP support and LCD filtering sections.
-
- * src/pshinter/pshalgo.c (psh_glyph_compute_inflections): Fix a typo
- which created an endless loop with some malformed font files.
-
-2007-01-10 Derek Clegg <dclegg@apple.com>
-
- * src/type1/t1load.c (T1_Get_MM_Var): Always return fixed point
- values.
-
-2007-01-08 David Turner <david@freetype.org>
-
- * docs/CHANGES: Updated.
-
- * include/freetype/ftgasp.h, src/base/ftgasp.c: New files which add
- a new API `FT_Get_Gasp' to return entries of the `gasp' table
- corresponding to a given character pixel size.
-
- * src/sfnt/ttload.c (tt_face_load_gasp): Add version check for the
- `gasp' table, in order to avoid potential problems with later
- versions.
-
- * include/freetype/config/ftheader.h (FT_GASP_H): New macro for
- <freetype/ftgasp.h>.
-
- * src/base/rules.mk (BASE_SRC), src/base/Jamfile (_sources),
- modules.cfg (BASE_EXTENSIONS), builds/win32/visualc/freetype.dsp,
- builds/win32/visualc/freetype.vcproj: Add src/base/ftgasp.c to the
- default build.
-
-2007-01-07 Werner Lemberg <wl@gnu.org>
-
- * src/cid/cidparse.c (cid_parser_new): Improve error message for
- Type 11 fonts.
- Scan for `/sfnts' token.
-
-2007-01-07 Werner Lemberg <wl@gnu.org>
-
- * src/cid/cidparse.c (cid_parser_new): Reject Type 11 fonts.
-
-2007-01-06 Werner Lemberg <wl@gnu.org>
-
- * src/cff/cffload.c (cff_index_init): Remove unused variable.
- (cff_index_read_offset): s/perror/errorp/ to avoid global shadowing.
-
-2007-01-04 David Turner <david@freetype.org>
-
- * src/pfr/pfrobjs.c (pfr_face_init): Detect non-scalable fonts
- correctly. This fixes Savannah bug #17876.
-
-
- Do not allocate interpreter-specific tables in memory if we are not
- going to load glyphs with the bytecode interpreter anyway.
-
- * src/truetype/ttgload.c (tt_loader_init): Load execution context
- only if glyph is hinted.
- Updated.
- * src/truetype/ttobjs.h (TT_SizeRec): Add members `bytecode_ready'
- and `cvs_ready'.
- Add `tt_size_ready_bytecode' declaration.
- * src/truetype/ttobjs.c (tt_size_done_bytecode,
- tt_size_init_bytecode, tt_size_ready_bytecode): New functions.
- (tt_size_init): Move most code into `tt_size_init_bytecode'.
- (tt_size_done): Move most code into `tt_size_done_bytecode'.
- (tt_size_reset): Move some code to `tt_size_ready_bytecode'.
-
-
- Don't extract the metrics table from the SFNT font file. Instead,
- reparse it on each glyph load. The runtime difference is not
- noticeable, and it can save a lot of heap memory when memory-mapped
- files are not used.
-
- * include/freetype/internal/tttypes.h (TT_FaceRec): Add members
- `horz_metrics_offset' and `vert_metrics_ofset'.
- * src/sfnt/ttmtx.c (tt_face_load_hmtx, tt_face_get_metrics):
- Updated.
-
-
- * src/sfnt/ttcmap.c (tt_cmap4_validate): Slight optimization.
-
-
- Do not load the CFF index offsets into memory, since this wastes a
- *lot* of heap memory with large Asian CFF fonts. There is no
- significant performance loss.
-
- * src/cff/cffload.h: Add `cff_charset_cid_to_gindex' declaration.
- * src/cff/cfftypes.h (CFF_IndexRec): Add fields `start' and
- `data_size'.
- (CFF_CharsetRec): Add field `num_glyphs'.
-
- * src/cff/cffload.c (cff_index_read_offset, cff_index_load_offsets,
- cff_charset_cid_to_gindex): New functions.
- (cff_new_index): Renamed to...
- (cff_index_init): This. Update all callers.
- Updated -- some code has been moved to `cff_index_load_offsets'.
- (cff_done_index): Renamed to...
- (cff_index_done): This. Update all callers.
- (cff_index_get_pointers, cff_index_access_element): Updated to use
- stream offsets.
- (cff_charset_compute_cids): Set `num_glyphs' field.
- (cff_encoding_load): Updated.
-
- * src/cff/cffgload.c (cff_slot_load): Updated.
-
-2007-01-04 David Turner <david@freetype.org>
-
- * docs/INSTALL.UNIX: Simplify some parts, add reference to
- autogen.sh and pointer to README.CVS.
-
- * README.CVS: Add common problem description and solution
- when running autogen.sh.
-
- * docs/INSTALL: Add reference to MacOS X.
-
- * docs/MAKEPP, docs/INSTALL.MAC: New documentation files.
-
- * docs/TODO: Remove obsolete items.
-
- * src/raster/ftraster.c: (TRaster_Instance): Replace it with...
- (TWorker): This.
- Remove `count_table' and `memory'.
- Make `grays' a pointer.
- (TRaster): New structure.
- (count_table): New static array.
- (RAS_ARGS, RAS_ARG, RAS_VARS, RAS_VAR, FT_UNUSED_RASTER, cur_ras,
- Vertical_Gray_Sweep_Step, ft_black_new, ft_black_done,
- ft_black_set_mode, ft_black_render): Updated.
- (ft_black_init): Don't initialize `count_table'.
- (ft_black_reset): Use the render pool. This saves about 6KB of
- heap space for each FT_Library instance.
-
- * src/smooth/ftgrays.c (TRaster): Replaced with...
- (TWorker): This.
- Remove `memory'.
- (TRaster): New structure.
-
- (RAS_ARG_, RAS_ARG, RAS_VAR_, RAS_VAR, ras, gray_render_line,
- gray_move_to, gray_line_to, gray_conic_to, gray_cubic_to,
- gray_render_span, gray_raster_render): Updated.
- (gray_raster_reset): Use the render pool. This saves about 6KB of
- heap space for each FT_Library instance.
-
- * src/sfnt/sfobjs.c, src/sfnt/ttkern.c, src/sfnt/ttkern.h,
- src/sfnt/ttmtx.c, src/sfnt/ttsbit.c, src/sfnt/ttsbit.h,
- src/truetype/ttpload.c, include/freetype/config/ftoption.h: Remove
- FT_OPTIMIZE_MEMORY macro (and code for !FT_OPTIMIZE_MEMORY) since
- the optimization is no longer experimental.
-
- * src/pshinter/pshalgo.c (psh_glyph_interpolate_normal_points):
- Remove a typo that results in no hinting and a memory leak with some
- large Asian CFF fonts.
-
- * src/base/ftobjs.c (FT_Done_Library): Remove a subtle memory leak
- which happens when FT_Done_Library is called with still opened
- CFF_Faces in it. We need to close all faces before destroying the
- modules, or else some bad things (memory leaks) may happen.
-
-2007-01-02 Werner Lemberg <wl@gnu.org>
-
- * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt0_pairs_validate):
- Remove compiler warning.
-
-2007-01-02 David Turner <david@freetype.org>
-
- * src/sfnt/sfobjs.c: Add documentation comment.
-
-2006-12-31 Masatake YAMATO <jet@gyve.org>
-
- * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt0_pairs_validate): New
- function.
- Check uniqueness of the gid pairs.
- (gxv_kern_subtable_fmt0_validate): Move some code to
- `gxv_kern_subtable_fmt0_pairs_validate'.
-
-2006-12-22 David Turner <david@freetype.org>
-
- * src/autofit/aflatin.c, src/truetype/ttgload.c: Remove compiler
- warnings.
-
- * builds/win32/visualc/freetype.vcproj: Add _CRT_SECURE_NO_DEPRECATE
- to avoid deprecation warnings with Visual C++ 8.
-
-2006-12-16 Anders Kaseorg <anders@kaseorg.com>
-
- * src/base/ftlcdfil.c (FT_Library_SetLcdFilter)
- [FT_FORCE_LIGHT_LCD_FILTER]: Fix typo.
-
-2006-12-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * include/freetype/internal/services/svotval.h: Add `volatile' to
- sync with the modification by Jens Claudius on 2006-08-22; cf.
- http://cvs.savannah.gnu.org/viewcvs/freetype/freetype2/src/otvalid/otvmod.c?r1=1.4&r2=1.5
-
-2006-12-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftmac.c: Specialized for Mac OS X only.
- * builds/unix/ftconfig.in: Fixed for ppc64 missing Carbon framework.
- * builds/unix/configure.raw: Ditto. When explicit switches for
- FSSpec/FSRef/QuickDraw/ATS availability are given to configure,
- builds/mac/ftmac.c is used instead of default src/base/ftmac.c.
-
-2006-12-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * builds/mac/ftmac.c: Copied src/base/ftmac.c for legacy system.
- * builds/mac/FreeType.m68k_cfm.make.txt: Fix to use builds/mac/ftmac.c
- instead of src/base/ftmac.c
- * builds/mac/FreeType.ppc_carbon.make.txt: Ditto.
- * builds/mac/FreeType.ppc_classic.make.txt: Ditto.
- * builds/mac/FreeType.m68k_far.make.txt: Ditto, and exclude gxvalid.c
- that cannot be built at present.
-
-2006-12-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftobjs.c: Improvement of resource fork handler for
- POSIX, cf.
- http://lists.gnu.org/archive/html/freetype-devel/2006-10/msg00025.html
- (Mac_Read_sfnt_Resource): Count only `sfnt' resource of suitcase font
- format or .dfont, to simulate the face index number counted by ftmac.c.
- (IsMacResource): Return the number of scalable faces correctly.
-
-2006-12-10 Werner Lemberg <wl@gnu.org>
-
- * builds/toplevel.mk (version): Protect against `distclean' target.
-
-2006-12-09 Werner Lemberg <wl@gnu.org>
-
- * builds/*/*def.mk, builds/*/detect.mk (CAT): Define to either `cat'
- or `type'.
-
- * builds/freetype.mk (version): Extracted from freetype.h, using
- GNU make's built-in string functions.
- (refdoc): Use $(version) instead of static version number.
-
-2006-12-08 Werner Lemberg <wl@gnu.org>
-
- * builds/toplevel.mk (dist): Extract version number from freetype.h.
-
-2006-12-08 Vladimir Volovich <vvv@vsu.ru>
-
- * src/tools/apinames.c (State): Remove final comma in structure --
- xlc v5 under AIX 4.3 doesn't like this.
-
-2006-12-07 David Turner <david@freetype.org>
-
- * src/autofit/afloader.c (af_loader_load_g): Small adjustment
- to the spacing of auto-fitted glyphs. This only impacts rare
- cases (e.g., Arial Bold at rather small character sizes).
-
-2006-12-03 Werner Lemberg <wl@gnu.org>
-
- * src/sfnt/rules.mk (SFNT_DRV_SRC): Add ttsbit0.c.
-
-2006-12-01 Werner Lemberg <wl@gnu.org>
-
- * src/sfnt/sfobjs.c (tt_face_get_name): All Unicode strings are
- encoded in UTF-16BE. Patch from Rajeev Pahuja <rpahuja@esri.com>.
- (tt_name_entry_ascii_from_ucs4): Removed.
-
-
- * include/freetype/ftxf86.h: Fix and extend comment so that it
- appears in the documentation.
-
- * include/freetype/ftchapters.h: Add `font_format' section.
-
-
- * src/tools/docmaker/tohtml.py (HtmlFormatter::index_exit): Add link
- to TOC in index page.
-
-2006-11-28 David Turner <david@freetype.org>
-
- * src/smooth/ftgrays.c (gray_raster_render): Return 0 when we are
- trying to render into a zero-width/height bitmap, not an error code.
-
- * src/truetype/ttobjs.c (tt_face_init): Fix typo in previous patch.
-
- * src/smooth/ftgrays.c: Remove hard-coded error values; use FreeType
- ones instead.
-
- * src/autofit/afhints.c (af_glyph_hints_dump_segments): Remove unused
- variable.
-
-2006-11-26 Pierre Hanser <hanser@club-internet.fr>
-
- * src/truetype/ttobjs.c (tt_face_init): Protect against NULL pointer.
-
-2006-11-25 David Turner <david@freetype.org>
-
- * src/autofit/afhints.c (af_glyph_hints_dump_points,
- af_glyph_hints_dump_segments, af_glyph_hints_dumpedges) [!AF_DEBUG]:
- Add stubs to link the `ftgrid' test program when debugging is
- disabled in the auto-hinter.
-
-2006-11-23 David Turner <david@freetype.org>
-
- * src/autofit/afhints.c, src/autofit/afhints.h, src/autofit/aflatin.c,
- src/autofit/aftypes.h: Miscellaneous auto-hinter improvements.
-
- * src/autofit/afhints.c (af_glyph_hints_dump_segments) [AF_DEBUG]:
- Emit more sensible information.
-
- * src/autofit/afhints.h (AF_SegmentRec): Add `height' member.
-
- * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Improve
- rounding of blue values.
- (af_latin_hints_compute_segments): Hint segment heights.
- (af_latin_hints_link_segments): Reduce `len_score' value.
- (af_latin_hints_compute_edges): Increase `segment_length_threshold'
- value and use `height' member for comparisons.
- (af_latin_hint_edges): Extend logging message.
- Improve handling of remaining edges.
-
-2006-11-22 Werner Lemberg <wl@gnu.org>
-
- Fix Savannah bug #15553.
-
- * src/truetype/ttgload.c (tt_loader_init): Re-execute the CVT
- program after a change from mono to grayscaling (and vice versa).
- Use correct constant for comparison to get `exec->grayscale'.
-
-2006-11-18 Werner Lemberg <wl@gnu.org>
-
- Because FT_Load_Glyph expects CID values for CID-keyed fonts, the
- test for a valid glyph index must be deferred to the font drivers.
- This patch fixes Savannah bug #18301.
-
- * src/base/ftobjs.c (FT_Load_Glyph): Don't check `glyph_index'.
- * src/bdf/bdfdrivr.c (BDF_Glyph_Load), src/cff/cffgload.c
- (cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph),
- src/pcf/pcfdrivr.c (PCF_Glyph_Load), src/pfr/pfrobjs.c
- (pfr_slot_load), src/truetype/ttdriver.c (Load_Glyph),
- src/type1/t1gload.c (T1_Load_Glyph), src/winfonts/winfnt.c
- (FNT_Load_Glyph): Check validity of `glyph_index'.
-
-2006-11-13 David Turner <david@freetype.org>
-
- * src/truetype/ttinterp.c (FIX_BYTECODE): Undefine. The interpreter
- `enhancements' are still too buggy for general use.
-
- * src/base/ftlcdfil.c: Add support for FT_FORCE_LIGHT_LCD_FILTER and
- FT_FORCE_LEGACY_LCD_FILTER at compile time. Define these macros
- when building the library to change the default LCD filter to be
- used. This is only useful for experimentation.
-
- * include/freetype/ftlcdfil.h: Update documentation.
-
-2006-11-10 David Turner <david@freetype.org>
-
- * src/smooth/ftsmooth.c: API change for the LCD
- filter. The FT_LcdFilter value is an enumeration describing which
- filter to apply, with new values FT_LCD_FILTER_LIGHT and
- FT_LCD_FILTER_LEGACY (the latter implements the LibXft original
- algorithm which produces strong color fringes for everything
- except very-well hinted text).
-
- * include/freetype/ftlcdfil.h (FT_Library_SetLcdFilter): Change
- second parameter to an enum type.
-
- * src/base/ftlcdfil.c (USE_LEGACY): Define.
- (_ft_lcd_filter): Rename to...
- (_ft_lcd_filter_fir): This.
- Update parameters.
- (_ft_lcd_filter_legacy) [USE_LEGACY]: New filter function.
- (FT_Library_Set_LcdFilter): Update parameters.
- Handle new filter modes.
-
- * include/internal/ftobjs.h: Include FT_LCD_FILTER_H.
- (FT_Bitmap_LcdFilterFunc): Change third argument to `FT_Library'.
- (FT_LibraryRec) [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Add filtering
- callback and update other fields.
-
- * src/smooth/ftsmooth.c (ft_smooth_render_generic)
- [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Update.
- Other minor improvements.
-
- * src/autofit/aflatin.c: Various tiny improvements that drastically
- improve the handling of serif fonts and of LCD/LCD_V hinting modes.
- (af_latin_hints_compute_edges): Fix typo.
- (af_latin_compute_stem_width): Take better care of diagonal stems.
-
-2006-11-09 David Turner <david@freetype.org>
-
- * src/pshinter/pshalgo.c (psh_glyph_compute_inflections): Fix
- typo which created a variable-used-before-initialized bug.
-
-2006-11-07 Zhe Su <james.su@gmail.com>
-
- * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Handle vertical layout
- also.
-
-2006-11-03 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftcalc.c: Don't use `long long' but `FT_Int64'.
-
-2006-11-02 David Turner <david@freetype.org>
-
- Add a few tweaks to better handle serif fonts.
- Add more debugging messages.
-
- * src/autofit/aflatin.c (af_latin_hints_compute_edges): Ignore
- segments that are less than 1.5 pixels high. This gets rid of
- *many* corner cases with serifs.
- (af_latin_align_linked_edge): Add logging message.
- (af_latin_hint_edges): Use AF_HINTS_DO_BLUES.
- Add logging messages.
- Handle AF_EDGE_FLAG flag specially.
-
- * src/autofit/afmodule.c [AF_DEBUG]: Add _af_debug,
- _af_debug_disable_blue_hints, and _af_debug_hints variables.
-
- * src/autofit/aftypes.h (AF_LOG) [AF_DEBUG]: Use _af_debug.
- Update external declarations.
- (af_corner_orientation, af_corner_is_flat): Replaced by...
-
- * include/freetype/internal/ftcalc.h (ft_corner_orientation,
- ft_corner_is_flat): These declarations.
-
- * src/autofit/afangles.c (af_corner_orientation, af_corner_is_flat):
- Comment out. Replaced by...
-
- * src/base/ftcalc.h (ft_corner_orientation, ft_corner_is_flat):
- These functions. Update all callers.
- (FT_Add64) [!FT_LONG64]: Simplify.
-
- * src/autofit/afhints.c: Include FT_INTERNAL_CALC_H.
- (af_direction_compute): Add a missing FT_ABS call. This bug caused
- production of garbage by missing lots of segments.
-
- * src/autofit/afhints.h (AF_HINTS_DO_BLUES): New macro.
-
- * src/autofit/afloader.c (af_loader_init, af_loader_done)
- [AF_DEBUG]: Set _af_debug_hints.
-
-
- * src/pshinter/pshalgo.c: Include FT_INTERNAL_CALC_H.
- (psh_corner_is_flat, psh_corner_orientation): Use ft_corner_is_flat
- and ft_corner_orientation.
-
-
- * src/gzip/inftrees.c (huft_build): Remove compiler warning.
-
-2006-10-24 Werner Lemberg <wl@gnu.org>
-
- * src/cff/cffload.c (cff_encoding_load): Remove unused variable.
-
- * src/base/ftobjs.c (FT_Select_Charmap): Disallow FT_ENCODING_NONE
- as argument.
-
-2006-10-23 Zhe Su <zsu@novell.com>
-
- * src/base/ftoutln.c (FT_Outline_Get_Orientation): Re-implement to
- better deal with broken Asian fonts with strange glyphs, having
- self-intersections and other peculiarities. The used algorithm is
- based on the nonzero winding rule.
-
-2006-10-23 David Turner <david@freetype.org>
-
- Speed up the CFF font loader. With some large CFF fonts,
- FT_Open_Face is now more than three times faster.
-
- * src/cff/cffload.c (cff_get_offset): Removed.
- (cff_new_index): Inline functionality of `cff_get_offset'.
- (cff_charset_compute_cids, cff_charset_free_cids): New functions.
- (cff_charset_done): Call `cff_charset_free_cids'.
- (cff_charset_load): Call `cff_charset_compute_cids'.
- (cff_encoding_load) <Populate>: Ditto, to replace inefficient loop.
-
- * src/sfnt/ttmtx.c (tt_face_load_hmtx): Replace calls to FT_GET_XXX
- with FT_NEXT_XXX.
-
-
- Speed up the Postscript hinter, with more than 100% speed increase
- on my machine.
-
- * src/pshinter/pshalgo.c (psh_corner_is_flat,
- psh_corner_orientation): New functions.
- (psh_glyph_compute_inflections): Merge loops for efficiency.
- Use `psh_corner_orientation'.
- (psh_glyph_init): Use `psh_corner_is_flat'.
- (psh_hint_table_find_strong_point): Renamed to...
- (psh_hint_table_find_strong_points): This.
- Rewrite, adding argument to handle all points at once.
- Update all callers.
- (PSH_MAX_STRONG_INTERNAL): New macro.
- (psh_glyph_interpolate_normal_points): Rewrite for efficiency.
-
-2006-10-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftmac.c (FT_New_Face_From_FOND): Initialize variable
- `error' with FT_Err_Ok.
-
-2006-10-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * docs/INSTALL.CROSS: New document file for cross-building.
-
- * builds/unix/configure.raw: Preliminary cross-building support.
- Find native C compiler and pass it by CC_BUILD, and
- find suffix for native executable and pass it by EXEEXT_BUILD.
- Also suffix for target executable is passed by EXEEXT.
-
- * builds/unix/unix-cc.in (CCraw_build, E_BUILD): New variables to
- build `apinames' which runs on building system. They are set by
- CC_BUILD and EXEEXT_BUILD.
-
- * builds/exports.mk (APINAMES_EXE): Change the extension for
- apinames from the suffix for target (E) to that for building host
- (E_BUILD).
-
-2006-10-12 Werner Lemberg <wl@gnu.org>
-
- * docs/INSTALL.UNX, docs/UPGRADE.UNX: Renamed to...
- * docs/INSTALL.UNIX, docs/UPGRADE.UNIX: This. Update all documents
- which reference those files.
-
-2006-10-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * builds/unix/configure.raw (FT2_EXTRA_LIBS): New variable. It is
- embedded in freetype2.pc and freetype-config. Use it to record
- Carbon dependency of MacOSX.
-
- * builds/unix/freetype2.in: Embed FT2_EXTRA_LIBS.
-
- * builds/unix/freetype-config.in: Ditto.
-
-2006-10-11 Werner Lemberg <wl@gnu.org>
-
- * devel/ftoption.h (FT_CONFIG_OPTION_SUBPIXEL_RENDERING): Define for
- development.
-
-2006-10-03 Jens Claudius <jens.claudius@yahoo.com>
-
- * include/freetype/config/ftstdlib.h: Cast away volatileness from
- argument to ft_setjmp.
-
- * include/freetype/internal/ftvalid.h: Add comment that
- ft_validator_run must not be used.
-
-2006-10-01 Werner Lemberg <wl@gnu.org>
-
- * src/base/ftbase.c: Undo change from 2006-09-30.
-
- * src/base/rules.mk (BASE_SRC): Remove `ftlcdfil.c'.
-
-2006-09-30 David Turner <david@freetype.org>
-
- * include/freetype/internal/ftobjs.h (FT_Face_InternalRec):
- s/unpatented_hinting/ignore_unpatented_hinter/.
- Update all callers.
-
- * src/base/ftobjs.c (FT_Load_Glyph): Refine the algorithm whether
- auto-hinting shall be used or not.
-
- * src/truetype/ttobjs.c (tt_face_init): Ditto.
-
-2006-09-30 Werner Lemberg <wl@gnu.org>
-
- * src/base/rules.mk (BASE_SRC): Remove `ftapi.c' (which is no longer
- in use).
-
- * src/base/ftbase.c: Include `ftlcdfil.c'.
-
-2006-09-29 Werner Lemberg <wl@gnu.org>
-
- * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Fix algorithm for
- overlapping segments. Bug reported by Stefan Koch.
-
-2006-09-28 David Turner <david@freetype.org>
-
- Fix a bug in the automatic unpatented hinting support which prevents
- normal bytecode hinting to work properly.
-
- * include/freetype/internal/ftobjs.h (FT_Face_InternalRec):
- s/force_autohint/unpatented_hinting/. Update all callers.
-
- * src/base/ftobjs.c (FT_Load_Glyph): Updated code.
-
- * src/autofit/aftypes.h (AF_DEBUG): Undefine to get rid of traces.
-
-2006-09-27 David Turner <david@freetype.org>
-
- * include/freetype/freetype.h (FT_FREETYPE_PATCH): Set to 2.
-
-
- Add a new API to support color filtering of subpixel glyph bitmaps.
- In a default build, the function `FT_Library_SetLcdFilter' returns
- `FT_Err_Unimplemented_Feature'; you need to #define
- FT_CONFIG_OPTION_SUBPIXEL_RENDERING in ftoption.h to compile the
- real implementation.
-
- * include/freetype/ftlcdfil.h, src/base/ftlcdfil.c: New files.
-
- * include/freetype/internal/ftobjs.h (FT_Bitmap_LcdFilterFunc): New
- typedef.
- (FT_LibraryRec) [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: New members
- `lcd_filter_weights' and `lcd_filter'.
-
- * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove arguments
- `hmul' and `vmul'.
-
- Handle subpixel rendering.
- Simplify function.
- (ft_smooth_render_lcd): Use `FT_RENDER_MODE_LCD'.
- (ft_smooth_render_lcd_v): Use `FT_RENDER_MODE_LCD_V'.
-
- * include/freetype/config/ftheader.h (FT_LCD_FILTER_H): New macro,
- pointing to <freetype/ftlcdfil.h>.
-
- * src/base/Jamfile (_sources), src/base/rules.mk (BASE_SRC),
- vms_make.com: Add `ftlcdfil.c' to the list of compiled source files.
-
- * modules.cfg (BASE_EXTENSIONS): Add ftlcdfil.c.
-
-2006-09-26 David Bustin
-
- * src/pfr/pfrobjs.c (pfr_face_get_kerning): Skip adjustment bytes
- correctly. Reported as Savannah bug #17843.
-
-2006-09-26 David Turner <david@freetype.org>
-
- * src/autofit/afhints.h (AF_HINTS_DO_HORIZONTAL,
- AF_HINTS_DO_VERTICAL, AF_HINTS_DO_ADVANCE): New macros to disable
- horizontal and vertical hinting for the purpose of debugging the
- auto-fitter.
-
- * src/autofit/afmodule.c (_af_debug_disable_horz_hints,
- _af_debug_disable_vert_hints) [AF_DEBUG]: New global variables.
-
- * src/autofit/aftypes.h [AF_DEBUG]: Declare above variables.
-
- * include/freetype/config/ftoption.h, devel/ftoption.h
- (FT_CONFIG_OPTION_SUBPIXEL_RENDERING): New macro to control whether
- we want to compile LCD-optimized rendering code (à la ClearType) or
- not. The macro *must* be disabled in default builds of the library
- for patent reasons.
-
- * src/smooth/ftsmooth.c (ft_smooth_render_generic): Disable
- LCD-specific rendering when FT_CONFIG_OPTION_SUBPIXEL_RENDERING
- isn't defined at compile time. This only changes the content of the
- rendered glyph to match the one of normal gray-level rendering,
- hence clients should not need to be modified.
-
- * docs/CHANGES: Updated.
-
-2006-09-18 Garrick Meeker <garrick@digitalanarchy.com>
-
- * src/base/ftmac.c (FT_New_Face_From_FOND): Fall back to SFNT if
- LWFN fails and both are available.
-
-2006-09-11 David Turner <david@freetype.org>
-
- * src/sfnt/sfobjs.c (tt_face_get_name): Support some fonts which
- report their English names through an Apple Roman
- (platform,encoding) pair, with language_id != English.
-
- If the font uses another name entry with language_id == English, it
- will be selected correctly, though.
-
- * src/truetype/ttobjs.c (tt_face_init): Add unpatented hinting
- selection for `mingli.ttf'.
-
-2006-09-05 Werner Lemberg <wl@gnu.org>
-
- * src/truetype/ttpload.c (tt_face_load_hdmx): Handle `record_size'
- values which have the upper two bytes set to 0xFF instead of 0x00
- (as it happens in at least two CJKV fonts, `HAN NOM A.ttf' and
- `HAN NOM B.ttf').
-
- * src/smooth/ftgrays.c [GRAYS_USE_GAMMA]: Really remove all code.
-
-2006-09-05 David Turner <david@freetype.org>
-
- Minor source cleanups and optimizations.
-
- * src/smooth/ftgrays.c (GRAYS_COMPACT): Removed.
- (TRaster): Remove `count_ex' and `count_ey'.
- (gray_find_cell): Remove 2nd and 3rd argument.
- (gray_alloc_cell): Merged with `gray_find_cell'.
- (gray_record_cell): Simplify.
- (gray_set_cell): Rewrite.
- (gray_start_cell): Apply offsets to `ras.ex' and `ras.ey'.
- (gray_render_span): Don't use FT_MEM_SET for small values.
- (gray_dump_cells) [DEBUG_GRAYS]: New function.
- (gray_sweep): Avoid buffer overwrites when to drawing the end of a
- bitmap scanline.
- (gray_convert_glyph): Fix speed-up.
-
-2006-09-04 David Turner <david@freetype.org>
-
- * src/smooth/ftgrays.c (gray_convert_glyphs): Make it work with
- 64bit processors.
-
-2006-09-03 Werner Lemberg <wl@gnu.org>
-
- * devel/ftoption.h: Synchronize with
- include/freetype/config/ftoption.h.
-
- * src/smooth/ftgrays.c (gray_record_cell): Remove shadowing
- variable declaration.
- (gray_convert_glyph): Fix compiler warnings.
-
-2006-09-01 David Turner <david@freetype.org>
-
- * src/truetype/ttobjs.c (tt_face_init): Update the TrueType loader
- to recognize a few fonts that require the automatic unpatented
- loader.
-
- * src/smooth/ftgrays.c: Optmize the performance of the anti-aliased
- rasterizer. The speed improvement is between 15% and 25%, depending
- on the font data.
-
- (GRAYS_USE_GAMMA, GRAYS_COMPACT): Removed, and all associated code.
- (TCell): Redefine.
- (TRaster): New members `buffer', `buffer_size', `ycells', `ycount'.
- (gray_init_cells): Updated.
- (gray_find_cell, gray_alloc_cell): New functions.
- (gray_record_cell): Rewritten to use `gray_find_cell' and
- `gray_alloc_cell'.
- (PACK, LESS_THAN, SWAP_CELLS, DEBUG_SORT, QUICK_SORT, SHELL_SORT,
- QSORT_THRESHOLD):
- Removed.
- (gray_shell_sort, gray_quick_sort, gray_check_sort,
- gray_dump_cells): Removed.
- (gray_sweep): Rewritten.
- (gray_convert_glyph): Rewrite code which used one of the sorting
- functions.
- (gray_raster_render): Updated.
-
-2006-08-29 Dr. Werner Fink <werner@suse.de>
-
- * configure: Make it possible to handle configure options which
- have strings containing spaces.
-
-2006-08-27 David Turner <david@freetype.org>
-
- * include/freetype/config/ftoption.h (TT_USE_BYTECODE_INTERPRETER):
- New macro, defined if either TT_CONFIG_OPTION_BYTECODE_INTERPRETER
- or TT_CONFIG_OPTION_UNPATENTED_HINTING is defined.
-
- * include/freetype/internal/ftcalc.h, src/base/ftcalc.c,
- src/truetype/truetype.c, src/truetype/ttdriver.c,
- src/truetype/ttgload.c, src/truetype/ttgload.h,
- src/truetype/ttinterp.c, src/truetype/ttobjs.c,
- src/truetype/ttobjs.h, src/truetype/ttpload.c, src/type42/t42drivr.c:
- s/TT_CONFIG_OPTION_BYTECODE_INTERPRETER/TT_USE_BYTECODE_INTERPRETER/.
-
- * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New
- member `force_autohint'.
-
- * src/base/ftobjs.c (FT_Load_Glyph): Use `force_autohint'.
-
- * src/truetype/ttobjs.c (tt_face_init): Prepare code for testing
- against a list of font names which need the bytecode interpreter.
-
-2006-08-27 Jens Claudius <jens.claudius@yahoo.com>
-
- Fix miscellaneous compiler warnings.
-
- * include/freetype/internal/ftobjs.h: Close comment with `*/' to
- avoid `/* in comment' compiler warning.
-
- * src/base/ftdbgmem.c (ft_mem_table_get_source): Turn cast
- `(FT_UInt32)(void*)' into `(FT_UInt32)(FT_PtrDist)(void*)' since on
- 64-bit platforms void* is larger than FT_UInt32.
-
- * src/base/ftobjs.c (t_validator_error): Cast away
- volatileness of argument to ft_longjmp. Spotted by Werner
- `Putzfrau' Lemberg.
-
- * src/bdf/bdflib.c (bdf_load_font): Initialize local
- variable `lineno'.
-
- * src/gxvalid/gxvmod.c (classic_kern_validate): Mark local variable
- `error' as volatile.
-
-2006-08-27 Werner Lemberg <wl@gnu.org>
-
- * builds/unix/ftconfig.in: Synchronize with main ftconfig.h.
- Reported by Jens.
-
-2006-08-22 Jens Claudius <jens.claudius@yahoo.com>
-
- Fix for previous commit, which caused many compiler warnings/errors
- about addresses of volatile objects passed as function arguments as
- non-volatile pointers.
-
- * include/freetype/internal/ftvalid.h: Make FT_Validator typedef a
- pointer to a volatile object.
-
- * src/gxvalid/gxvmod.c (gxv_load_table): Make function argument
- `table' a pointer to a volatile object.
-
- * src/otvalid/otvmod.c (otv_load_table): Make function argument
- `table' a pointer to a volatile object.
-
-2006-08-18 Jens Claudius <jens.claudius@yahoo.com>
-
- * src/gxvalid/gxvmod.c (GXV_TABLE_DECL): Mark local variable `_sfnt'
- as volatile since it must keep its value across a call to ft_setjmp.
- (gxv_validate): Same for local variables `memory' and `valid'.
- (classic_kern_validate): Same for local variables `memory',
- `ckern', and `valid'.
-
- * src/otvalid/otvmod.c (otv_validate): Same for function parameter
- `face' and local variables `base', `gdef', `gpos', `gsub', `jstf',
- and 'valid'.
-
- * src/sfnt/ttcmap.c (tt_face_build_cmaps): Same for local variable
- `cmap'.
-
-2006-08-16 David Turner <david@freetype.org>
-
- * src/cid/cidgload.c (cid_slot_load_glyph): Remove compiler
- warnings.
-
- * src/base/ftobjs.c (ft_validator_run): Disable function; it is
- buggy by design. Always return -1.
-
-
- Improvements to native TrueType hinting. This is a first try,
- controlled by the FIX_BYTECODE macro in src/truetype/ttinterp.c.
-
- * include/freetype/internal/ftgloadr.h (FT_GlyphLoadRec): Add member
- `extra_points2'.
-
- * include/freetype/internal/tttypes.h (TT_GlyphZoneRec): Add member
- `orus'.
-
- * src/base/ftgloadr.c (FT_GlyphLoader_Reset,
- FT_GlyphLoader_Adjust_Points, FT_GlyphLoader_CreateExtra,
- FT_GlyphLoader_CheckPoints, FT_GlyphLoader_CopyPoints): Updated to
- handle `extra_points2'.
-
- * src/truetype/ttgload.c (tt_prepare_zone): Handle `orus'.
- Remove compiler warning.
- (cur_to_arg): Remove macro.
- (TT_Hint_Glyph): Updated.
- (TT_Process_Simple_Glyph): Handle `orus'.
-
- * src/truetype/ttinterp.c (FIX_BYTECODE): New macro.
- (Ins_MD, Ins_MDRP, Ins_IP) [FIX_BYTECODE]: Handle `orus'.
- (LOC_Ins_IUP): Renamed to...
- (IUP_WorkerRec): This.
- Add `orus' member.
- (Shift): Renamed to...
- (_iup_worker_shift): This.
- Updated.
- (Interp): Renamed to...
- (_iup_worker_interpolate): This.
- Updated to handle `orus'.
- (Ins_IUP): Updated.
-
- * src/truetype/ttobjs.c (tt_glyphzone_done, tt_glyphzone_new):
- Handle `orus'.
-
-2006-08-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * modules.cfg (BASE_EXTENSIONS): Compile in ftgxval.c by default to
- build ftvalid in ft2demos. This has been inadvertedly changed
- 2006-08-13.
-
-2006-08-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- `ft_validator_run' wrapping `setjmp' can cause a crash, as found by
- Jens:
- http://lists.gnu.org/archive/html/freetype-devel/2006-08/msg00004.htm.
-
- * src/otvalid/otvmod.c: Replace `ft_validator_run' by `ft_setjmp'.
- It reverts the change introduced on 2005-08-20.
-
- * src/gxvalid/gxvmod.c: Ditto.
-
-2006-08-13 Jens Claudius <jens.claudius@yahoo.com>
-
- * finclude/freetype/internal/psaux.h: (T1_TokenType): Add
- T1_TOKEN_TYPE_KEY.
- (T1_FieldRec): Add `dict'.
- (T1_FIELD_DICT_FONTDICT, T1_FIELD_DICT_PRIVATE): New macros.
- (T1_NEW_XXX, T1_FIELD_XXX): Update to take the dictionary where a PS
- keyword is expected as an additional argument.
-
- * src/cid/cidload.c: (cid_field_records): Adjust invocations of
- T1_FIELD_XXX.
-
- * src/cid/cidtoken.h: Adjust invocations of T1_FIELD_XXX.
-
- * src/psaux/psobjs.c: Add macro FT_COMPONENT for tracing.
- (ps_parser_to_token): Report a PostScript key as T1_TOKEN_TYPE_KEY,
- not T1_TOKEN_TYPE_ANY.
- (ps_parser_load_field): Make sure a token that should be a string or
- name is really a string or name.
- Avoid memory leak if a keyword has been already encountered and its
- value is overwritten.
- * src/type1/t1load.c: (t1_keywords): Adjust invocations of
- T1_FIELD_XXX.
- (parse_dict): Ignore keywords that occur in the wrong dictionary
- (e.g., in `Private' instead of `FontDict').
-
- * src/type1/t1tokens.h: Adjust invocations of T1_FIELD_XXX.
-
- * src/type42/t42parse.c: (t42_keywords): Adjust invocations of
- T1_FIELD_XXX.
-
-2006-07-18 Jens Claudius <jens.claudius@yahoo.com>
-
- Move creation of field `buildchar' of T1_DecoderRec out of
- `t1_decoder_init' and let the caller of `t1_decoder_init' take care
- of it.
-
- Call the finisher for T1_Decoder in `cid_face_compute_max_advance'
- and `T1_Compute_Max_Advance'.
-
- * include/freetype/internal/psaux.h (T1_DecoderRec): Remove field
- `face', add `len_buildchar'.
-
- * include/freetype/internal/t1types.h (T1_FaceRec): Add field
- `buildchar'.
-
- * src/cid/cidgload.c (cid_face_compute_max_advance): Call finisher
- for T1_Decoder.
- (cid_slot_load_glyph): Do not ignore failure when initializing the
- T1_Decoder.
-
- * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Updated.
- (t1_decoder_init): Remove initialization of fields `buildchar' and
- `len_buildchar'.
- (t1_decoder_done): Remove deallocation of field `buildchar'.
-
- * freetype/src/type1/t1gload.c (T1_Compute_Max_Advance): Initialize
- T1_Decoder's `buildchar' and `len_buildchar'; call finisher for
- T1_Decoder.
- (T1_Load_Glyph): Initialize T1_Decoder's `buildchar' and
- `len_buildchar'; make sure to call finisher for T1_Decoder even in
- case of error.
-
- * src/type1/t1load.c (T1_Open_Face): Allocate new field `buildchar'
- of T1_FaceRec.
-
- * src/type1/t1objs.c (T1_Face_Done): Free new field `buildchar' of
- T1_FaceRec.
-
-2006-07-14 Jens Claudius <jens.claudius@yahoo.com>
-
- * include/freetype/internal/psaux.h: New macros IS_PS_NEWLINE,
- IS_PS_SPACE, IS_PS_SPECIAL, IS_PS_DELIM, IS_PS_DIGIT, IS_PS_XDIGIT,
- and IS_PS_BASE85 (from src/psaux/psconv.h).
- (T1_FieldLocation): Add T1_FIELD_LOCATION_LOADER,
- T1_FIELD_LOCATION_FACE, and T1_FIELD_LOCATION_BLEND.
- (T1_DecoderRec): New fields `buildchar' and `face'.
- (IS_PS_TOKEN): New macro.
-
- * include/freetype/internal/t1types.h (T1_FaceRec): New fields
- `ndv_idx', `cdv_idx', and `len_buildchar'.
-
- * include/freetype/t1tables.h (PS_BlendRec): New fields
- `default_design_vector' and `num_default_design_vector'.
-
- * src/psaux/psconv.h: Move macros IS_PS_NEWLINE, IS_PS_SPACE,
- IS_PS_SPECIAL, IS_PS_DELIM, IS_PS_DIGIT, IS_PS_XDIGIT, and
- IS_PS_BASE85 to include/freetype/internal/psaux.h.
-
- * src/psaux/psobjs.c (ps_parser_to_token_array): Allow `token'
- argument to be NULL if we want only to count the number of tokens.
- (ps_tocoordarray): Allow `coords' argument to be NULL if we just
- want to skip the array.
- (ps_tofixedarray): Allow `values' argument to be NULL if we just
- want to skip the array.
-
- * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add support
- for (partially commented out) othersubrs 19-25, 27, and 28.
- (t1_decoder_init): Initialize new fields `face' and `buildchar'.
- (t1_decoder_done): Release new field `buildchar'.
-
- * src/type1/t1load.c (parse_buildchar, parse_private): New
- functions.
- (t1_keywords): Register them.
- (t1_allocate_blend): Updated.
- (t1_load_keyword): Handle field types T1_FIELD_LOCATION_LOADER,
- T1_FIELD_LOCATION_FACE and T1_FIELD_LOCATION_BLEND.
- (parse_dict): Remove `keyword_flags' argument.
- Use new macro IS_PS_TOKEN.
- Changed function so that later PostScript definitions override
- earlier ones.
- (t1_init_loader): Initialize new field `keywords_encountered'.
- (T1_Open_Face): Initialize new fields `ndv_idx', `cdv_idx', and
- `len_buildchar'.
- Remove `keywords_flags'.
-
- * src/type1/t1load.h (T1_LoaderRect): New field
- `keywords_encountered'.
- (T1_PRIVATE, T1_FONTDIR_AFTER_PRIVATE): New macros.
-
- * src/type1/t1tokens.h [!T1_CONFIG_OPTION_NO_MM_SUPPORT]: New
- entries for parsing /NDV, /CDV, and /DesignVector.
-
-2006-07-07 Werner Lemberg <wl@gnu.org>
-
- Add many checks to protect against malformed PCF files.
-
- * src/pcf/pcfdrivr.c (PCF_Face_Done): Protect against NULL pointers.
- (PCF_Face_Init): Add calls to PCF_Face_Done in case of errors.
-
- * src/pcf/pcfread.c (pcf_read_TOC): Protect against malformed table
- data and check that tables don't overlap (using a simple
- bubblesort).
- (PCF_METRIC_SIZE, PCF_COMPRESSED_METRIC_SIZE, PCF_PROPERTY_SIZE):
- New macros which give the size of data structures in the data
- stream.
- (pcf_get_properties): Use rough estimates to get array size limits.
- Assign `face->nprops' and `face->properties' earlier so that a call
- to PCF_Face_Done can do the clean-up in case of error.
- Protect against invalid string offsets.
- (pcf_get_metrics): Clean up code.
- Adjust tracing message levels.
- Use rough estimate to get array size limit.
- (pcf_get_bitmaps): Clean up code.
- Adjust tracing message levels.
- Use rough estimates to get offset limits.
- (pcf_get_encodings): Adjust tracing message level.
- (pcf_get_accel): Clean up code.
-
-2006-06-26 Werner Lemberg <wl@gnu.org>
-
- * src/bdf/bdfdrivr.c (BDF_Face_Init): Handle fonts correctly which
- don't have a POINT_SIZE property. This fixes Savannah bug #16914.
-
-2006-06-26 Jens Claudius <jens.claudius@yahoo.com>
-
- * src/psaux/t1decode.c (T1_Operator, t1_args_count): Add opcode 15.
- (t1_decoder_parse_charstrings): Operator with
- opcode 15 pops its two arguments.
- Handle the case where the pops of an othersubr may be part of a
- subroutine.
- Handle unknown othersubrs gracefully: count their operands and let
- the following pop operators push the operands as the results onto
- the Type1 stack.
- Improve handling of setcurrentpoint opcode.
-
-2006-06-25 Jens Claudius <jens.claudius@yahoo.com>
-
- The Type 1 parser now skips over top-level procedures as required
- for a `Simplified Parser'. This makes the parser more robust as it
- doesn't poke around in PostScript code. Additionally, it makes the
- FontDirectory hackery in src/type1/t1load.c unnecessary.
-
- * src/psaux/psobjs.c (IS_OCTAL_DIGIT): New macro.
- (skip_literal_string): Add FT_Error as return value.
- Handle escapes better.
- (skip_string): Add FT_Error as return value.
- Don't set `parser->error' but return error code directly.
- (skip_procedure): New function.
- (ps_parser_skip_PS_token): Handle procedures.
- Update code.
- (ps_parser_to_token): Update code.
- (ps_parser_load_field_table): Handle bbox entries also.
-
- * src/type1/t1load.c (parse_dict): Remove FontDirectory hackery.
- Add commented-out code for synthetic fonts.
-
-2006-06-24 Eugeniy Meshcheryakov <eugen@univ.kiev.ua>
-
- Fix two hinting bugs as reported in
- http://lists.gnu.org/archive/html/freetype-devel/2006-06/msg00057.html.
-
- * include/freetype/internal/tttypes.h (TT_GlyphZoneRec): Add
- `first_point' member.
-
- * src/truetype/ttgload.c (tt_prepare_zone): Initialize
- `first_point'.
- (TT_Process_Composite_Glyph): Always untouch points.
-
- * src/truetype/ttinterp.c (Ins_SHC): Fix computation of
- `first_point' and `last_point' in case of composite glyphs.
- (Ins_IUP): Fix computation of `end_point'.
-
-2006-06-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Insert EndianS16_BtoN and EndianS32_BtoN as workaround for Intel
- Mac. The original patch was written by David Sachitano and Lawrence
- Coopet, and modified by Sean McBride for MPW compatibility. Only
- required data are converted; unused data are left in big endian.
-
- * src/base/ftmac.c: Include <Endian.h> for byteorder macros for non
- Mac OS X platforms.
- (OS_INLINE): Undefine before definition.
- (count_faces_sfnt): Insert EndianS16_BtoN to parse the header of
- FontAssociation table in FOND resource.
- (count_faces_scalable): Insert EndianS16_BtoN to parse the header
- and fontSize at each entry of FontAssociation table in FOND
- resource.
- (parse_fond): Insert EndianS16_BtoN and EndianS32_BtoN to parse
- ffStylOff of FamilyRecord header of FOND resource, the header,
- fontSize, fontID at each entry of FontAssociation table, and
- StyleMapping table.
- (count_faces): Call `HUnlock' after all FOND utilization.
-
-2006-06-08 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Public API of TrueTypeGX, OpenType, and classic kern table validator
- should return `FT_Err_Unimplemented_Feature' if validation service
- is unavailable (disabled in `modules.cfg'). It is originally
- suggested by David Turner, cf.
- http://lists.gnu.org/archive/html/freetype-devel/2005-11/msg00078.html
-
- * src/base/ftgxval.c (FT_TrueTypeGX_Validate): Return
- FT_Err_Unimplemented_Feature if TrueTypeGX validation service is
- unavailable.
- (FT_ClassicKern_Validate): Return FT_Err_Unimplemented_Feature if
- classic kern table validation service is unavailable.
-
- * src/base/ftotval.c (FT_OpenType_Validate): Return
- FT_Err_Unimplemented_Feature if OpenType validation service is
- unavailable.
-
-2006-06-08 Werner Lemberg <wl@gnu.org>
-
- * src/bdf/bdflib.c (bdf_load_font): Fix memory leaks in case of
- errors.
-
-2006-06-07 David Turner <david@freetype.org>
-
- * src/type1/t1afm.c (KERN_INDEX): Make it more robust.
- (T1_Read_Metrics): Fix memory leak which happened when the metrics
- file doesn't have kerning pairs. This fixes Savannah bug #16768.
-
-2006-06-06 David Turner <david@freetype.org>
-
- Fix memory leak described in Savannah bug #16759.
-
- We change `ps_unicodes_init' so that it also takes a
- `free_glyph_name' callback to release the glyph names returned by
- `get_glyph_name'
-
- * include/freetype/internal/services/svpscmap.h (PS_Glyph_NameFunc):
- Renamed to ...
- (PS_GetGlyphNameFunc): This.
- (PS_FreeGlyphNameFunc): New typedef.
- (PS_Unicodes_InitFunc): Add variable for PS_FreeGlyphNameFunc.
-
- * src/cff/cffcmap.c (cff_sid_to_glyph_name): Use `TT_Face' for first
- argument.
- (cff_sid_free_glyph_name): New function.
- (cff_cmap_unicode_init): Updated.
-
- * src/psaux/t1cmap.c (t1_cmap_unicode_init): Updated.
-
- * src/psnames/psmodule.c (ps_unicodes_init): Add variable for
- PS_FreeGlyphNameFunc and use it.
-
-
-2006-06-04 David Turner <david@freetype.org>
-
- * src/base/ftutil.c (ft_mem_qrealloc): Fix the function to accept
- `item_size == 0' as well -- though this sounds weird, it can
- theoretically happen. This fixes Savannah bug #16669.
-
- * src/pfr/pfrobjs.c (pfr_face_init): Fix the computation
- of `face->num_glyphs' which missed the last glyph, due to
- the offset-by-1 computation, since the PFR format doesn't
- guarantee that glyph index 0 corresponds to the `missing
- glyph. This fixes Savannah bug #16668.
-
-2006-05-25 Werner Lemberg <wl@gnu.org>
-
- * builds/unix/unix-cc.in (LINK_LIBRARY): Don't comment out
- `-no-undefined'. Reported by Christian Biesinger.
-
-2006-05-19 Brian Weed <bw@imaginengine.com>
-
- * builds/win32/visualc/freetype.dsp: Release libraries no longer
- have debug information, and debug libraries use `C7 compatible'
- debug info.
-
-2006-05-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- Apply patch by Derek Clegg to fix two memory leaks in the MacOS
- resource fork handler. This fixes Savannah bug #16631.
-
- * src/base/ftobjs.c (load_face_in_embedded_rfork): Replace
- `FT_Stream_Close' by `FT_Stream_Free' to fix memory leak.
-
- * src/base/ftrfrk.c (raccess_guess_linux_double_from_file_name):
- Replace `FT_Stream_Close' by `FT_Stream_Free' to fix memory leak.
-
-2006-05-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * build/unix/configure.raw: Add a fallback to disable Carbon
- dependency, if configured with no options on Mac OS X.
-
-2006-05-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-
- * src/base/ftmac.c (open_face_from_buffer): Deallocate stream when
- its content cannot be parsed as supported font. This fixes
- the second part of Savannah bug #16590.
-
-2006-05-18 Werner Lemberg <wl@gnu.org>
-
- * src/truetype/ttgload.c (TT_Load_Composite_Glyph)
- [FT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Make it compilable again.
-
-2006-05-17 David Turner <david@freetype.org>
-
- This is a major patch used to drastically improve the performance of
- loading glyphs. This both speeds up loading the glyph vectors
- themselves and the auto-fitter module.
-
- We now use inline assembler code with GCC to implement `FT_MulFix',
- which is probably the most important function related to the
- engine's performance.
-
- The resulting speed-up is about 25%.
-
-
- * include/freetype/internal/tttypes.h (TT_LoaderRec): Add fields
- `cursor' and `limit'.
-
- * src/autofit/afangles.c (af_corner_is_flat, af_corner_orientation):
- New functions.
- (AF_ATAN_BITS, af_arctan, af_angle_atan): Comment out.
- [TEST]: Remove.
-
- * src/autofit/afcjk.c (AF_Script_UniRangeRec): Comment out test
- code.
-
- * src/autofit/afhints.c (af_axis_hints_new_segment): Don't call
- `FT_ZERO'
- (af_direction_compute, af_glyph_hints_compute_inflections): Rewritten.
- (af_glyph_hints_reload: Rewrite recognition of weak points.
-
- * src/autofit/aflatin.c (af_latin_hints_compute_segments): Move
- constant values out of the loops.
-
- * src/autofit/aftypes.h: Updated.
-
- * src/base/ftcalc.c (FT_MulFix): Use inline assembler code.
-
- * src/base/ftoutln.c (FT_Outline_Get_Orientation): Use vector
- product to get orientation.
-
- * src/gzip/ftgzip.c (ft_get_uncompressed_size): New function.
- (FT_Stream_OpenGzip): Use it to handle small files directly in
- memory.
-
- * src/psaux/psconv.c (PS_Conv_ASCIIHexDecode, PS_ConvEexecDecode):
- Improve performance.
-
- * src/truetype/ttgload.c (TT_Access_Glyph_Frame): Set `cursor' and
- `limit'.
-
- (TT_Load_Glyph_Header, TT_Load_Simple_Glyph,
- TT_Load_Composite_Glyph): Updated. Add threshold to protect against
- exceedingly large values of number of contours. Speed up by
- reducing the number of loops.
-
- * src/type1/t1gload.c (T1_Load_Glyph): Don't apply unit matrix.
-
-
- * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Change the threshold
- used to detect rogue clients from 4 to 16. This is to prevent some
- segmentation faults with fonts like `KozMinProVI-Regular.otf' which
- comes from the Japanese Adobe Reader Asian Font pack.
-
-2007-05-17 Werner Lemberg <wl@gnu.org>
-
- * src/cff/cffload.c (cff_font_done): Deallocate subfont array. This
- fixes the first part of Savannah bug #16590.
-
-2006-05-16 Werner Lemberg <wl@gnu.org>
-
- * docs/PROBLEMS: Updated icl issues.
+ (load_truetype_glyph): Use tt_get_metrics_incr_overrides.
----------------------------------------------------------------------------
-Copyright 2006, 2007, 2008, 2009, 2010 by
+Copyright 2010 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,
# FreeType 2 top Jamfile.
#
-# Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by
+# Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
actions RefDoc
{
- python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.3.12 --output=$(DOC_DIR) $(FT2_INCLUDE)/freetype/*.h $(FT2_INCLUDE)/freetype/config/*.h
+ python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.4.4 --output=$(DOC_DIR) $(FT2_INCLUDE)/freetype/*.h $(FT2_INCLUDE)/freetype/config/*.h
}
RefDoc refdoc ;
is called `libttf'. They are *not* compatible!
- FreeType 2.3.12
- ===============
+ FreeType 2.4.4
+ ==============
Please read the docs/CHANGES file, it contains IMPORTANT
INFORMATION.
and download one of the following files.
- freetype-doc-2.3.12.tar.bz2
- freetype-doc-2.3.12.tar.gz
- ftdoc2312.zip
+ freetype-doc-2.4.4.tar.bz2
+ freetype-doc-2.4.4.tar.gz
+ ftdoc244.zip
Bugs
\r
----------------------------------------------------------------------\r
\r
-Copyright 2005, 2006, 2007, 2008, 2009 by\r
+Copyright 2005, 2006, 2007, 2008, 2009, 2010 by\r
David Turner, Robert Wilhelm, and Werner Lemberg.\r
\r
This file is part of the FreeType project, and may only be used,\r
and accept it fully.\r
\r
\r
---- end of README.CVS ---\r
+--- end of README.git ---\r
#!/bin/sh
#
-# Copyright 2002, 2003, 2004, 2005, 2006, 2008, 2009 by
+# Copyright 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
done
fi
-# build a dummy Makefile if we are not building in the source tree
+# build a dummy Makefile if we are not building in the source tree;
+# we use inodes to avoid issues with symbolic links
+inode_src=`ls -id $abs_ft2_dir | awk '{print $1}'`
+inode_dst=`ls -id $abs_curr_dir | awk '{print $1}'`
-if test "$abs_curr_dir" != "$abs_ft2_dir"; then
- mkdir reference
+if test $inode_src -ne $inode_dst; then
+ if test ! -d reference; then
+ mkdir reference
+ fi
if test ! -r $abs_curr_dir/modules.cfg; then
echo "Copying \`modules.cfg'"
cp $abs_ft2_dir/modules.cfg $abs_curr_dir
echo "OBJ_DIR := $abs_curr_dir" >> Makefile
echo "OBJ_BUILD := \$(OBJ_DIR)" >> Makefile
echo "DOC_DIR := \$(OBJ_DIR)/reference" >> Makefile
- echo "LIBTOOL := \$(OBJ_DIR)/libtool" >> Makefile
+ echo "FT_LIBTOOL_DIR := \$(OBJ_DIR)" >> Makefile
echo "ifndef FT2DEMOS" >> Makefile
echo " include \$(TOP_DIR)/Makefile" >> Makefile
echo "else" >> Makefile
/*************************************************************************/
/* */
/* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */
- /* a bytecode interpreter in the TrueType driver. Note that there are */
- /* important patent issues related to the use of the interpreter. */
+ /* a bytecode interpreter in the TrueType driver. */
/* */
/* By undefining this, you will only compile the code necessary to load */
/* TrueType glyphs without hinting. */
/* */
/* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */
/* of the TrueType bytecode interpreter is used that doesn't implement */
- /* any of the patented opcodes and algorithms. Note that the */
- /* TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* if you define */
- /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, either define */
- /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
+ /* any of the patented opcodes and algorithms. The patents related to */
+ /* TrueType hinting have expired worldwide since May 2010; this option */
+ /* is now deprecated. */
+ /* */
+ /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* */
+ /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */
+ /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
/* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */
/* */
/* This macro is only useful for a small number of font files (mostly */
* is recommended to disable the macro since it reduces the library's code
* size and activates a few memory-saving optimizations as well.
*/
-/* #define FT_CONFIG_OPTION_OLD_INTERNALS */
+/* #define FT_CONFIG_OPTION_OLD_INTERNALS xxx */
+
+
+ /*
+ * To detect legacy cache-lookup call from a rogue client (<= 2.1.7),
+ * we restrict the number of charmaps in a font. The current API of
+ * FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API
+ * takes charcode only. To determine the passed value is for cmap_index
+ * or charcode, the possible cmap_index is restricted not to exceed
+ * the minimum possible charcode by a rogue client. It is also very
+ * unlikely that a rogue client is interested in Unicode values 0 to 15.
+ *
+ * NOTE: The original threshold was 4 deduced from popular number of
+ * cmap subtables in UCS-4 TrueType fonts, but now it is not
+ * irregular for OpenType fonts to have more than 4 subtables,
+ * because variation selector subtables are available for Apple
+ * and Microsoft platforms.
+ */
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+#define FT_MAX_CHARMAP_CACHEABLE 15
+#endif
/*
--- /dev/null
+Index: src/base/ftbitmap.c
+===================================================================
+--- src/base/ftbitmap.c (Revision 51535)
++++ src/base/ftbitmap.c (Arbeitskopie)
+@@ -451,15 +451,15 @@
+ {
+ FT_Int val = ss[0]; /* avoid a byte->int cast on each line */
+
++ tt[0] = (FT_Byte)( ( val & 0x80 ) ? 0xff : 0);
++ tt[1] = (FT_Byte)( ( val & 0x40 ) ? 0xff : 0);
++ tt[2] = (FT_Byte)( ( val & 0x20 ) ? 0xff : 0);
++ tt[3] = (FT_Byte)( ( val & 0x10 ) ? 0xff : 0);
++ tt[4] = (FT_Byte)( ( val & 0x08 ) ? 0xff : 0);
++ tt[5] = (FT_Byte)( ( val & 0x04 ) ? 0xff : 0);
++ tt[6] = (FT_Byte)( ( val & 0x02 ) ? 0xff : 0);
++ tt[7] = (FT_Byte)( ( val & 0x01 ) ? 0xff : 0);
+
+- tt[0] = (FT_Byte)( ( val & 0x80 ) >> 7 );
+- tt[1] = (FT_Byte)( ( val & 0x40 ) >> 6 );
+- tt[2] = (FT_Byte)( ( val & 0x20 ) >> 5 );
+- tt[3] = (FT_Byte)( ( val & 0x10 ) >> 4 );
+- tt[4] = (FT_Byte)( ( val & 0x08 ) >> 3 );
+- tt[5] = (FT_Byte)( ( val & 0x04 ) >> 2 );
+- tt[6] = (FT_Byte)( ( val & 0x02 ) >> 1 );
+- tt[7] = (FT_Byte)( val & 0x01 );
+
+ tt += 8;
+ ss += 1;
+@@ -474,7 +474,7 @@
+
+ for ( ; j > 0; j-- )
+ {
+- tt[0] = (FT_Byte)( ( val & 0x80 ) >> 7);
++ tt[0] = (FT_Byte)( ( val & 0x80 ) ? 0xff : 0);
+ val <<= 1;
+ tt += 1;
+ }
#endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */
-#if defined( i386 )
+#if defined( __i386__ )
#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
/* documentation is in freetype.h */
/* supply font data incrementally as the document is parsed, such */
/* as the Ghostscript interpreter for the PostScript language. */
/* */
-/* #define FT_CONFIG_OPTION_INCREMENTAL */
+#define FT_CONFIG_OPTION_INCREMENTAL
/*************************************************************************/
/*************************************************************************/
/* */
/* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */
- /* a bytecode interpreter in the TrueType driver. Note that there are */
- /* important patent issues related to the use of the interpreter. */
+ /* a bytecode interpreter in the TrueType driver. */
/* */
/* By undefining this, you will only compile the code necessary to load */
/* TrueType glyphs without hinting. */
/* Do not #undef this macro here, since the build system might */
/* define it for certain configurations only. */
/* */
-/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
/*************************************************************************/
/* */
/* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */
/* of the TrueType bytecode interpreter is used that doesn't implement */
- /* any of the patented opcodes and algorithms. Note that the */
- /* TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* if you define */
- /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, either define */
- /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
+ /* any of the patented opcodes and algorithms. The patents related to */
+ /* TrueType hinting have expired worldwide since May 2010; this option */
+ /* is now deprecated. */
+ /* */
+ /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* */
+ /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */
+ /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
/* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */
/* */
/* This macro is only useful for a small number of font files (mostly */
/* ... */
/* } */
/* */
-//#define TT_CONFIG_OPTION_UNPATENTED_HINTING
+/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */
/*************************************************************************/
#define FT_CONFIG_OPTION_OLD_INTERNALS
+ /*
+ * To detect legacy cache-lookup call from a rogue client (<= 2.1.7),
+ * we restrict the number of charmaps in a font. The current API of
+ * FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API
+ * takes charcode only. To determine the passed value is for cmap_index
+ * or charcode, the possible cmap_index is restricted not to exceed
+ * the minimum possible charcode by a rogue client. It is also very
+ * unlikely that a rogue client is interested in Unicode values 0 to 15.
+ *
+ * NOTE: The original threshold was 4 deduced from popular number of
+ * cmap subtables in UCS-4 TrueType fonts, but now it is not
+ * irregular for OpenType fonts to have more than 4 subtables,
+ * because variation selector subtables are available for Apple
+ * and Microsoft platforms.
+ */
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+#define FT_MAX_CHARMAP_CACHEABLE 15
+#endif
+
+
/*
* This macro is defined if either unpatented or native TrueType
* hinting is requested by the definitions above.
/* Each new face object created with this function also owns a */
/* default @FT_Size object, accessible as `face->size'. */
/* */
+ /* See the discussion of reference counters in the description of */
+ /* @FT_Reference_Face. */
+ /* */
FT_EXPORT( FT_Error )
FT_Open_Face( FT_Library library,
const FT_Open_Args* args,
FT_Open_Args* parameters );
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Reference_Face */
+ /* */
+ /* <Description> */
+ /* A counter gets initialized to~1 at the time an @FT_Face structure */
+ /* is created. This function increments the counter. @FT_Done_Face */
+ /* then only destroys a face if the counter is~1, otherwise it simply */
+ /* decrements the counter. */
+ /* */
+ /* This function helps in managing life-cycles of structures which */
+ /* reference @FT_Face objects. */
+ /* */
+ /* <Input> */
+ /* face :: A handle to a target face object. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0~means success. */
+ /* */
+ /* <Since> */
+ /* 2.4.2 */
+ /* */
+ FT_EXPORT( FT_Error )
+ FT_Reference_Face( FT_Face face );
+
+
/*************************************************************************/
/* */
/* <Function> */
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* See the discussion of reference counters in the description of */
+ /* @FT_Reference_Face. */
+ /* */
FT_EXPORT( FT_Error )
FT_Done_Face( FT_Face face );
*
* @return:
* The index into the array of character maps within the face to which
- * `charmap' belongs.
+ * `charmap' belongs. If an error occurs, -1 is returned.
*
*/
FT_EXPORT( FT_Int )
*
*/
#define FREETYPE_MAJOR 2
-#define FREETYPE_MINOR 3
-#define FREETYPE_PATCH 12
+#define FREETYPE_MINOR 4
+#define FREETYPE_PATCH 4
/*************************************************************************/
/* 1~if this is a TrueType font that uses one of the patented */
/* opcodes, 0~otherwise. */
/* */
+ /* <Note> */
+ /* Since May 2010, TrueType hinting is no longer patented. */
+ /* */
/* <Since> */
/* 2.3.5 */
/* */
/* an SFNT font, or if the unpatented hinter is not compiled in this */
/* instance of the library. */
/* */
+ /* <Note> */
+ /* Since May 2010, TrueType hinting is no longer patented. */
+ /* */
/* <Since> */
/* 2.3.5 */
/* */
/* */
/* FreeType Cache subsystem (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
* interpret them in any way.
*
* Second, the cache calls, only when needed, a client-provided function
- * to convert a @FTC_FaceID into a new @FT_Face object. The latter is
+ * to convert an @FTC_FaceID into a new @FT_Face object. The latter is
* then completely managed by the cache, including its termination
- * through @FT_Done_Face.
+ * through @FT_Done_Face. To monitor termination of face objects, the
+ * finalizer callback in the `generic' field of the @FT_Face object can
+ * be used, which might also be used to store the @FTC_FaceID of the
+ * face.
*
* Clients are free to map face IDs to anything else. The most simple
* usage is to associate them to a (pathname,face_index) pair that is
/* */
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+ /* these macros are incompatible with LLP64, should not be used */
+
#define FT_POINTER_TO_ULONG( p ) ( (FT_ULong)(FT_Pointer)(p) )
#define FTC_FACE_ID_HASH( i ) \
((FT_UInt32)(( FT_POINTER_TO_ULONG( i ) >> 3 ) ^ \
( FT_POINTER_TO_ULONG( i ) << 7 ) ) )
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
/*************************************************************************/
/*************************************************************************/
/* reference-counted. A node with a count of~0 might be flushed */
/* out of a full cache whenever a lookup request is performed. */
/* */
- /* If you lookup nodes, you have the ability to `acquire' them, i.e., */
- /* to increment their reference count. This will prevent the node */
- /* from being flushed out of the cache until you explicitly `release' */
- /* it (see @FTC_Node_Unref). */
+ /* If you look up nodes, you have the ability to `acquire' them, */
+ /* i.e., to increment their reference count. This will prevent the */
+ /* node from being flushed out of the cache until you explicitly */
+ /* `release' it (see @FTC_Node_Unref). */
/* */
/* See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup. */
/* */
(d1)->width == (d2)->width && \
(d1)->flags == (d2)->flags )
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+ /* this macro is incompatible with LLP64, should not be used */
+
#define FTC_IMAGE_TYPE_HASH( d ) \
(FT_UFast)( FTC_FACE_ID_HASH( (d)->face_id ) ^ \
( (d)->width << 8 ) ^ (d)->height ^ \
( (d)->flags << 4 ) )
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+
/*************************************************************************/
/* */
(f1)->pix_width == (f2)->pix_width && \
(f1)->pix_height == (f2)->pix_height )
+ /* this macro is incompatible with LLP64, should not be used */
#define FTC_FONT_HASH( f ) \
(FT_UInt32)( FTC_FACE_ID_HASH((f)->face_id) ^ \
((f)->pix_width << 8) ^ \
/* */
/* FreeType error codes (specification). */
/* */
-/* Copyright 2002, 2004, 2006, 2007 by */
+/* Copyright 2002, 2004, 2006, 2007, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
"argument stack underflow" )
FT_ERRORDEF_( Ignore, 0xA2, \
"ignore" )
+ FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, \
+ "no Unicode glyph name found" )
+
/* BDF errors */
"`FONT' field missing" )
FT_ERRORDEF_( Missing_Size_Field, 0xB2, \
"`SIZE' field missing" )
- FT_ERRORDEF_( Missing_Chars_Field, 0xB3, \
+ FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3, \
+ "`FONTBOUNDINGBOX' field missing" )
+ FT_ERRORDEF_( Missing_Chars_Field, 0xB4, \
"`CHARS' field missing" )
- FT_ERRORDEF_( Missing_Startchar_Field, 0xB4, \
+ FT_ERRORDEF_( Missing_Startchar_Field, 0xB5, \
"`STARTCHAR' field missing" )
- FT_ERRORDEF_( Missing_Encoding_Field, 0xB5, \
+ FT_ERRORDEF_( Missing_Encoding_Field, 0xB6, \
"`ENCODING' field missing" )
- FT_ERRORDEF_( Missing_Bbx_Field, 0xB6, \
+ FT_ERRORDEF_( Missing_Bbx_Field, 0xB7, \
"`BBX' field missing" )
- FT_ERRORDEF_( Bbx_Too_Big, 0xB7, \
+ FT_ERRORDEF_( Bbx_Too_Big, 0xB8, \
"`BBX' too big" )
- FT_ERRORDEF_( Corrupted_Font_Header, 0xB8, \
+ FT_ERRORDEF_( Corrupted_Font_Header, 0xB9, \
"Font header corrupted or missing fields" )
- FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xB9, \
+ FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA, \
"Font glyphs corrupted or missing fields" )
/* flow. In all cases, the pitch is an offset to add */
/* to a bitmap pointer in order to go down one row. */
/* */
+ /* Note that `padding' means the alignment of a */
+ /* bitmap to a byte border, and FreeType functions */
+ /* normally align to the smallest possible integer */
+ /* value. */
+ /* */
/* For the B/W rasterizer, `pitch' is always an even */
/* number. */
/* */
+ /* To change the pitch of a bitmap (say, to make it a */
+ /* multiple of 4), use @FT_Bitmap_Convert. */
+ /* Alternatively, you might use callback functions to */
+ /* directly render to the application's surface; see */
+ /* the file `example2.cpp' in the tutorial for a */
+ /* demonstration. */
+ /* */
/* buffer :: A typeless pointer to the bitmap buffer. This */
/* value should be aligned on 32-bit boundaries in */
/* most cases. */
/* FreeType API for color filtering of subpixel bitmap glyphs */
/* (specification). */
/* */
-/* Copyright 2006, 2007, 2008 by */
+/* Copyright 2006, 2007, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/****************************************************************************
*
- * @func:
+ * @enum:
* FT_LcdFilter
*
* @description:
FT_Library_SetLcdFilter( FT_Library library,
FT_LcdFilter filter );
+
+ /**************************************************************************
+ *
+ * @func:
+ * FT_Library_SetLcdFilterWeights
+ *
+ * @description:
+ * Use this function to override the filter weights selected by
+ * @FT_Library_SetLcdFilter. By default, FreeType uses the quintuple
+ * (0x00, 0x55, 0x56, 0x55, 0x00) for FT_LCD_FILTER_LIGHT, and (0x10,
+ * 0x40, 0x70, 0x40, 0x10) for FT_LCD_FILTER_DEFAULT and
+ * FT_LCD_FILTER_LEGACY.
+ *
+ * @input:
+ * library ::
+ * A handle to the target library instance.
+ *
+ * weights ::
+ * A pointer to an array; the function copies the first five bytes and
+ * uses them to specify the filter weights.
+ *
+ * @return:
+ * FreeType error code. 0~means success.
+ *
+ * @note:
+ * Due to *PATENTS* covering subpixel rendering, this function doesn't
+ * do anything except returning `FT_Err_Unimplemented_Feature' if the
+ * configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not
+ * defined in your build of the library, which should correspond to all
+ * default builds of FreeType.
+ *
+ * This function must be called after @FT_Library_SetLcdFilter to have
+ * any effect.
+ *
+ * @since:
+ * 2.4.0
+ */
+ FT_EXPORT( FT_Error )
+ FT_Library_SetLcdFilterWeights( FT_Library library,
+ unsigned char *weights );
+
/* */
/* */
/* Generic list support for FreeType (specification). */
/* */
-/* Copyright 1996-2001, 2003, 2007 by */
+/* Copyright 1996-2001, 2003, 2007, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* user :: A user-supplied field which is passed as the last */
/* argument to the destructor. */
/* */
+ /* <Note> */
+ /* This function expects that all nodes added by @FT_List_Add or */
+ /* @FT_List_Insert have been dynamically allocated. */
+ /* */
FT_EXPORT( void )
FT_List_Finalize( FT_List list,
FT_List_Destructor destroy,
/* */
/* FreeType modules public interface (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
FT_Module module );
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Reference_Library */
+ /* */
+ /* <Description> */
+ /* A counter gets initialized to~1 at the time an @FT_Library */
+ /* structure is created. This function increments the counter. */
+ /* @FT_Done_Library then only destroys a library if the counter is~1, */
+ /* otherwise it simply decrements the counter. */
+ /* */
+ /* This function helps in managing life-cycles of structures which */
+ /* reference @FT_Library objects. */
+ /* */
+ /* <Input> */
+ /* library :: A handle to a target library object. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0~means success. */
+ /* */
+ /* <Since> */
+ /* 2.4.2 */
+ /* */
+ FT_EXPORT( FT_Error )
+ FT_Reference_Library( FT_Library library );
+
+
/*************************************************************************/
/* */
/* <Function> */
/* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module) */
/* instead of @FT_Init_FreeType to initialize the FreeType library. */
/* */
+ /* Don't use @FT_Done_FreeType but @FT_Done_Library to destroy a */
+ /* library instance. */
+ /* */
/* <Input> */
/* memory :: A handle to the original memory object. */
/* */
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* See the discussion of reference counters in the description of */
+ /* @FT_Reference_Library. */
+ /* */
FT_EXPORT( FT_Error )
FT_New_Library( FT_Memory memory,
FT_Library *alibrary );
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* See the discussion of reference counters in the description of */
+ /* @FT_Reference_Library. */
+ /* */
FT_EXPORT( FT_Error )
FT_Done_Library( FT_Library library );
*
* FT_TRUETYPE_ENGINE_TYPE_PATENTED ::
* The library implements a bytecode interpreter that covers
- * the full instruction set of the TrueType virtual machine.
- * See the file `docs/PATENTS' for legal aspects.
+ * the full instruction set of the TrueType virtual machine (this
+ * was governed by patents until May 2010, hence the name).
*
* @since:
* 2.2
/* */
/* FreeType renderer modules public interface (specification). */
/* */
-/* Copyright 1996-2001, 2005, 2006 by */
+/* Copyright 1996-2001, 2005, 2006, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* raster_class :: For @FT_GLYPH_FORMAT_OUTLINE renderers only. */
/* This is a pointer to its raster's class. */
/* */
- /* raster :: For @FT_GLYPH_FORMAT_OUTLINE renderers only. */
- /* This is a pointer to the corresponding raster */
- /* object, if any. */
- /* */
typedef struct FT_Renderer_Class_
{
FT_Module_Class root;
/* */
/* FreeType low-level system interface definition (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2005 by */
+/* Copyright 1996-2001, 2002, 2005, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
*
* @note:
* This function might be called to perform a seek or skip operation
- * with a `count' of~0.
+ * with a `count' of~0. A non-zero return value then indicates an
+ * error.
*
*/
typedef unsigned long
* The stream's input function.
*
* close ::
- * The stream;s close function.
+ * The stream's close function.
*
* memory ::
* The memory manager to use to preload frames. This is set
/* */
/* The FreeType memory management macros (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007 by */
+/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
/*
- * C++ refuses to handle statements like p = (void*)anything; where `p'
- * is a typed pointer. Since we don't have a `typeof' operator in
- * standard C++, we have to use ugly casts.
+ * C++ refuses to handle statements like p = (void*)anything, with `p' a
+ * typed pointer. Since we don't have a `typeof' operator in standard
+ * C++, we have to use a template to emulate it.
*/
#ifdef __cplusplus
-#define FT_ASSIGNP( p, val ) *((void**)&(p)) = (val)
+
+ extern "C++"
+ template <typename T> inline T*
+ cplusplus_typeof( T*,
+ void *v )
+ {
+ return static_cast <T*> ( v );
+ }
+
+#define FT_ASSIGNP( p, val ) (p) = cplusplus_typeof( (p), (val) )
+
#else
+
#define FT_ASSIGNP( p, val ) (p) = (val)
+
#endif
/* */
/* The FreeType private base classes (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* in the case when the unpatented hinter is compiled within the */
/* library. */
/* */
+ /* refcount :: */
+ /* A counter initialized to~1 at the time an @FT_Face structure is */
+ /* created. @FT_Reference_Face increments this counter, and */
+ /* @FT_Done_Face only destroys a face if the counter is~1, */
+ /* otherwise it simply decrements it. */
+ /* */
typedef struct FT_Face_InternalRec_
{
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
#endif
FT_Bool ignore_unpatented_hinter;
+ FT_UInt refcount;
} FT_Face_InternalRec;
/* */
/* debug_hooks :: XXX */
/* */
+ /* lcd_filter :: If subpixel rendering is activated, the */
+ /* selected LCD filter mode. */
+ /* */
+ /* lcd_extra :: If subpixel rendering is activated, the number */
+ /* of extra pixels needed for the LCD filter. */
+ /* */
+ /* lcd_weights :: If subpixel rendering is activated, the LCD */
+ /* filter weights, if any. */
+ /* */
+ /* lcd_filter_func :: If subpixel rendering is activated, the LCD */
+ /* filtering callback function. */
+ /* */
/* pic_container :: Contains global structs and tables, instead */
/* of defining them globallly. */
/* */
-
+ /* refcount :: A counter initialized to~1 at the time an */
+ /* @FT_Library structure is created. */
+ /* @FT_Reference_Library increments this counter, */
+ /* and @FT_Done_Library only destroys a library */
+ /* if the counter is~1, otherwise it simply */
+ /* decrements it. */
+ /* */
typedef struct FT_LibraryRec_
{
FT_Memory memory; /* library's memory manager */
FT_PIC_Container pic_container;
#endif
+ FT_UInt refcount;
+
} FT_LibraryRec;
* MacOS systems (even if they contain a Microsoft charmap as well).
*
* TT_PLATFORM_ISO ::
- * This value was used to specify Unicode charmaps. It is however
+ * This value was used to specify ISO/IEC 10646 charmaps. It is however
* now deprecated. See @TT_ISO_ID_XXX for a list of corresponding
* `encoding_id' values.
*
/* Basic SFNT/TrueType tables definitions and interface */
/* (specification only). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* */
typedef enum FT_Sfnt_Tag_
{
- ft_sfnt_head = 0,
- ft_sfnt_maxp = 1,
- ft_sfnt_os2 = 2,
- ft_sfnt_hhea = 3,
- ft_sfnt_vhea = 4,
- ft_sfnt_post = 5,
- ft_sfnt_pclt = 6,
+ ft_sfnt_head = 0, /* TT_Header */
+ ft_sfnt_maxp = 1, /* TT_MaxProfile */
+ ft_sfnt_os2 = 2, /* TT_OS2 */
+ ft_sfnt_hhea = 3, /* TT_HoriHeader */
+ ft_sfnt_vhea = 4, /* TT_VertHeader */
+ ft_sfnt_post = 5, /* TT_Postscript */
+ ft_sfnt_pclt = 6, /* TT_PCLT */
sfnt_max /* internal end mark */
/* error, or if the corresponding table was not found *OR* loaded */
/* from the file. */
/* */
+ /* Use a typecast according to `tag' to access the structure */
+ /* elements. */
+ /* */
/* <Note> */
/* The table is owned by the face object and disappears with it. */
/* */
/* */
/* Auto-fitter hinting routines for CJK script (body). */
/* */
-/* Copyright 2006, 2007, 2008, 2009 by */
+/* Copyright 2006, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
FT_UNUSED( metrics );
- error = af_glyph_hints_reload( hints, outline, 0 );
+ error = af_glyph_hints_reload( hints, outline );
if ( error )
goto Exit;
/* */
/* Auto-fitter routines to compute global hinting values (body). */
/* */
-/* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
for ( nn = 0; nn < globals->glyph_count; nn++ )
{
- if ( gscripts[nn] == AF_SCRIPT_LIST_NONE )
- gscripts[nn] = AF_SCRIPT_LIST_DEFAULT;
+ if ( ( gscripts[nn] & ~AF_DIGIT ) == AF_SCRIPT_LIST_NONE )
+ {
+ gscripts[nn] &= ~AF_SCRIPT_LIST_NONE;
+ gscripts[nn] |= AF_SCRIPT_LIST_DEFAULT;
+ }
}
}
{
FT_Error error;
FT_Memory memory;
- AF_FaceGlobals globals;
+ AF_FaceGlobals globals = NULL;
memory = face->memory;
/* */
/* Auto-fitter hinting routines (body). */
/* */
-/* Copyright 2003, 2004, 2005, 2006, 2007, 2009 by */
+/* Copyright 2003, 2004, 2005, 2006, 2007, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
}
- /* compute all inflex points in a given glyph */
-
- static void
- af_glyph_hints_compute_inflections( AF_GlyphHints hints )
- {
- AF_Point* contour = hints->contours;
- AF_Point* contour_limit = contour + hints->num_contours;
-
-
- /* do each contour separately */
- for ( ; contour < contour_limit; contour++ )
- {
- AF_Point point = contour[0];
- AF_Point first = point;
- AF_Point start = point;
- AF_Point end = point;
- AF_Point before;
- AF_Point after;
- FT_Pos in_x, in_y, out_x, out_y;
- AF_Angle orient_prev, orient_cur;
- FT_Int finished = 0;
-
-
- /* compute first segment in contour */
- first = point;
-
- start = end = first;
- do
- {
- end = end->next;
- if ( end == first )
- goto Skip;
-
- in_x = end->fx - start->fx;
- in_y = end->fy - start->fy;
-
- } while ( in_x == 0 && in_y == 0 );
-
- /* extend the segment start whenever possible */
- before = start;
- do
- {
- do
- {
- start = before;
- before = before->prev;
- if ( before == first )
- goto Skip;
-
- out_x = start->fx - before->fx;
- out_y = start->fy - before->fy;
-
- } while ( out_x == 0 && out_y == 0 );
-
- orient_prev = ft_corner_orientation( in_x, in_y, out_x, out_y );
-
- } while ( orient_prev == 0 );
-
- first = start;
-
- in_x = out_x;
- in_y = out_y;
-
- /* now process all segments in the contour */
- do
- {
- /* first, extend current segment's end whenever possible */
- after = end;
- do
- {
- do
- {
- end = after;
- after = after->next;
- if ( after == first )
- finished = 1;
-
- out_x = after->fx - end->fx;
- out_y = after->fy - end->fy;
-
- } while ( out_x == 0 && out_y == 0 );
-
- orient_cur = ft_corner_orientation( in_x, in_y, out_x, out_y );
-
- } while ( orient_cur == 0 );
-
- if ( ( orient_prev + orient_cur ) == 0 )
- {
- /* we have an inflection point here */
- do
- {
- start->flags |= AF_FLAG_INFLECTION;
- start = start->next;
-
- } while ( start != end );
-
- start->flags |= AF_FLAG_INFLECTION;
- }
-
- start = end;
- end = after;
-
- orient_prev = orient_cur;
- in_x = out_x;
- in_y = out_y;
-
- } while ( !finished );
-
- Skip:
- ;
- }
- }
-
-
FT_LOCAL_DEF( void )
af_glyph_hints_init( AF_GlyphHints hints,
FT_Memory memory )
FT_LOCAL_DEF( FT_Error )
af_glyph_hints_reload( AF_GlyphHints hints,
- FT_Outline* outline,
- FT_Bool get_inflections )
+ FT_Outline* outline )
{
FT_Error error = AF_Err_Ok;
AF_Point points;
{
FT_Vector* vec = outline->points;
char* tag = outline->tags;
- AF_Point first = points;
AF_Point end = points + outline->contours[0];
AF_Point prev = end;
FT_Int contour_index = 0;
- FT_UNUSED( first );
for ( point = points; point < point_limit; point++, vec++, tag++ )
{
point->fx = (FT_Short)vec->x;
{
if ( ++contour_index < outline->n_contours )
{
- first = point + 1;
- end = points + outline->contours[contour_index];
- prev = end;
+ end = points + outline->contours[contour_index];
+ prev = end;
}
}
}
}
}
- /* compute inflection points -- */
- /* disabled due to no longer perceived benefits */
- if ( 0 && get_inflections )
- af_glyph_hints_compute_inflections( hints );
-
Exit:
return error;
}
/* */
/* Auto-fitter hinting routines (specification). */
/* */
-/* Copyright 2003, 2004, 2005, 2006, 2007, 2008 by */
+/* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
FT_LOCAL( FT_Error )
af_glyph_hints_reload( AF_GlyphHints hints,
- FT_Outline* outline,
- FT_Bool get_inflections );
+ FT_Outline* outline );
FT_LOCAL( void )
af_glyph_hints_save( AF_GlyphHints hints,
/* */
/* Auto-fitter hinting routines for latin script (body). */
/* */
-/* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
af_glyph_hints_rescale( hints, (AF_ScriptMetrics)dummy );
- error = af_glyph_hints_reload( hints, &face->glyph->outline, 0 );
+ error = af_glyph_hints_reload( hints, &face->glyph->outline );
if ( error )
goto Exit;
/* compare to standard width */
- if ( axis->width_count > 0 )
- {
- delta = dist - axis->widths[0].cur;
+ delta = dist - axis->widths[0].cur;
- if ( delta < 0 )
- delta = -delta;
+ if ( delta < 0 )
+ delta = -delta;
- if ( delta < 40 )
- {
- dist = axis->widths[0].cur;
- if ( dist < 48 )
- dist = 48;
+ if ( delta < 40 )
+ {
+ dist = axis->widths[0].cur;
+ if ( dist < 48 )
+ dist = 48;
- goto Done_Width;
- }
+ goto Done_Width;
}
if ( dist < 3 * 64 )
int dim;
- error = af_glyph_hints_reload( hints, outline, 1 );
+ error = af_glyph_hints_reload( hints, outline );
if ( error )
goto Exit;
/* */
/* Auto-fitter hinting routines for latin script (body). */
/* */
-/* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
af_glyph_hints_rescale( hints, (AF_ScriptMetrics)dummy );
- error = af_glyph_hints_reload( hints, &face->glyph->outline, 0 );
+ error = af_glyph_hints_reload( hints, &face->glyph->outline );
if ( error )
goto Exit;
FT_Pos fitted = ( scaled + 40 ) & ~63;
#if 1
- if ( scaled != fitted ) {
+ if ( scaled != fitted )
+ {
scale = FT_MulDiv( scale, fitted, scaled );
AF_LOG(( "== scaled x-top = %.2g fitted = %.2g, scaling = %.4g\n", scaled/64.0, fitted/64.0, (fitted*1.0)/scaled ));
}
int dim;
- error = af_glyph_hints_reload( hints, outline, 1 );
+ error = af_glyph_hints_reload( hints, outline );
if ( error )
goto Exit;
/* */
/* The FreeType position independent code services for autofit module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2010 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
}
}
+
FT_Error
- autofit_module_class_pic_init( FT_Library library )
+ autofit_module_class_pic_init( FT_Library library )
{
- FT_PIC_Container* pic_container = &library->pic_container;
- FT_UInt ss;
- FT_Error error = FT_Err_Ok;
- AFModulePIC* container;
- FT_Memory memory = library->memory;
+ FT_PIC_Container* pic_container = &library->pic_container;
+ FT_UInt ss;
+ FT_Error error = AF_Err_Ok;
+ AFModulePIC* container;
+ FT_Memory memory = library->memory;
+
/* allocate pointer, clear and set global container pointer */
if ( FT_ALLOC ( container, sizeof ( *container ) ) )
return error;
- FT_MEM_SET( container, 0, sizeof(*container) );
+ FT_MEM_SET( container, 0, sizeof ( *container ) );
pic_container->autofit = container;
/* initialize pointer table - this is how the module usually expects this data */
FT_Face *aface );
+#ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
+ /* Mac OS X/Darwin kernel often changes recommended method to access */
+ /* the resource fork and older methods makes the kernel issue the */
+ /* warning of deprecated method. To calm it down, the methods based */
+ /* on Darwin VFS should be grouped and skip the rest methods after */
+ /* the case the resource is opened but found to lack a font in it. */
+ FT_LOCAL( FT_Bool )
+ raccess_rule_by_darwin_vfs( FT_UInt rule_index );
+#endif /* FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK */
+
+
FT_END_HEADER
#endif /* __FTBASE_H__ */
typedef struct FT_MemTableRec_* FT_MemTable;
-#define FT_MEM_VAL( addr ) ((FT_ULong)(FT_Pointer)( addr ))
+#define FT_MEM_VAL( addr ) ((FT_PtrDist)(FT_Pointer)( addr ))
/*
* This structure holds statistics for a single allocation/release
for ( i = 0; i < table->size; i++ )
{
FT_MemNode node, next, *pnode;
- FT_ULong hash;
+ FT_PtrDist hash;
node = table->buckets[i];
ft_mem_table_get_nodep( FT_MemTable table,
FT_Byte* address )
{
- FT_ULong hash;
+ FT_PtrDist hash;
FT_MemNode *pnode, node;
/* */
/* The FreeType glyph loader (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006 by */
+/* Copyright 2002, 2003, 2004, 2005, 2006, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
FT_GlyphLoader_New( FT_Memory memory,
FT_GlyphLoader *aloader )
{
- FT_GlyphLoader loader;
+ FT_GlyphLoader loader = NULL;
FT_Error error;
/* */
/* FreeType convenience functions to handle glyphs (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2007, 2008 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2007, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
{
FT_Memory memory = library->memory;
FT_Error error;
- FT_Glyph glyph;
+ FT_Glyph glyph = NULL;
*aglyph = 0;
/* */
/* FreeType API for validating TrueTyepGX/AAT tables (body). */
/* */
-/* Copyright 2004, 2005, 2006 by */
+/* Copyright 2004, 2005, 2006, 2010 by */
/* Masatake YAMATO, Redhat K.K, */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
FT_TrueTypeGX_Free( FT_Face face,
FT_Bytes table )
{
- FT_Memory memory = FT_FACE_MEMORY( face );
+ FT_Memory memory;
+ if ( !face )
+ return;
+
+ memory = FT_FACE_MEMORY( face );
+
FT_FREE( table );
}
FT_ClassicKern_Free( FT_Face face,
FT_Bytes table )
{
- FT_Memory memory = FT_FACE_MEMORY( face );
+ FT_Memory memory;
+
+
+ if ( !face )
+ return;
+
+ memory = FT_FACE_MEMORY( face );
FT_FREE( table );
#undef FT_USE_MODULE
#define FT_USE_MODULE( type, x ) MODULE_CLASS_##x,
- enum {
+ enum
+ {
#include FT_CONFIG_MODULES_H
FT_NUM_MODULE_CLASSES
};
/* */
/* FreeType API for color filtering of subpixel bitmap glyphs (body). */
/* */
-/* Copyright 2006, 2008, 2009 by */
+/* Copyright 2006, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
FT_EXPORT_DEF( FT_Error )
- FT_Library_SetLcdFilter( FT_Library library,
- FT_LcdFilter filter )
+ FT_Library_SetLcdFilterWeights( FT_Library library,
+ unsigned char *weights )
+ {
+ if ( !library || !weights )
+ return FT_Err_Invalid_Argument;
+
+ ft_memcpy( library->lcd_weights, weights, 5 );
+
+ return FT_Err_Ok;
+ }
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Library_SetLcdFilter( FT_Library library,
+ FT_LcdFilter filter )
{
static const FT_Byte light_filter[5] =
- { 0, 85, 86, 85, 0 };
+ { 0x00, 0x55, 0x56, 0x55, 0x00 };
/* the values here sum up to a value larger than 256, */
/* providing a cheap gamma correction */
static const FT_Byte default_filter[5] =
{ 0x10, 0x40, 0x70, 0x40, 0x10 };
- if ( library == NULL )
+ if ( !library )
return FT_Err_Invalid_Argument;
switch ( filter )
}
library->lcd_filter = filter;
- return 0;
+
+ return FT_Err_Ok;
}
#else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+ FT_EXPORT_DEF( FT_Error )
+ FT_Library_SetLcdFilterWeights( FT_Library library,
+ unsigned char *weights )
+ {
+ FT_UNUSED( library );
+ FT_UNUSED( weights );
+
+ return FT_Err_Unimplemented_Feature;
+ }
+
+
FT_EXPORT_DEF( FT_Error )
FT_Library_SetLcdFilter( FT_Library library,
FT_LcdFilter filter )
#include FT_TRUETYPE_TABLES_H
#include FT_TRUETYPE_TAGS_H
#include FT_TRUETYPE_IDS_H
-#include FT_OUTLINE_H
#include FT_SERVICE_SFNT_H
#include FT_SERVICE_POSTSCRIPT_NAME_H
if ( !args )
return FT_Err_Invalid_Argument;
- memory = library->memory;
+ memory = library->memory;
if ( FT_NEW( stream ) )
goto Exit;
static FT_Error
ft_glyphslot_init( FT_GlyphSlot slot )
{
- FT_Driver driver = slot->face->driver;
- FT_Driver_Class clazz = driver->clazz;
- FT_Memory memory = driver->root.memory;
- FT_Error error = FT_Err_Ok;
- FT_Slot_Internal internal;
+ FT_Driver driver = slot->face->driver;
+ FT_Driver_Class clazz = driver->clazz;
+ FT_Memory memory = driver->root.memory;
+ FT_Error error = FT_Err_Ok;
+ FT_Slot_Internal internal = NULL;
slot->library = driver->root.library;
( cur[0]->platform_id == TT_PLATFORM_APPLE_UNICODE &&
cur[0]->encoding_id == TT_APPLE_ID_UNICODE_32 ) )
{
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ if ( cur - first > FT_MAX_CHARMAP_CACHEABLE )
+ {
+ FT_ERROR(( "find_unicode_charmap: UCS-4 cmap is found "
+ "at too late position (%d)\n", cur - first ));
+ continue;
+ }
+#endif
face->charmap = cur[0];
return FT_Err_Ok;
}
{
if ( cur[0]->encoding == FT_ENCODING_UNICODE )
{
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ if ( cur - first > FT_MAX_CHARMAP_CACHEABLE )
+ {
+ FT_ERROR(( "find_unicode_charmap: UCS-2 cmap is found "
+ "at too late position (%d)\n", cur - first ));
+ continue;
+ }
+#endif
face->charmap = cur[0];
return FT_Err_Ok;
}
if ( cur[0]->platform_id == TT_PLATFORM_APPLE_UNICODE &&
cur[0]->encoding_id == TT_APPLE_ID_VARIANT_SELECTOR &&
FT_Get_CMap_Format( cur[0] ) == 14 )
+ {
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ if ( cur - first > FT_MAX_CHARMAP_CACHEABLE )
+ {
+ FT_ERROR(( "find_unicode_charmap: UVS cmap is found "
+ "at too late position (%d)\n", cur - first ));
+ continue;
+ }
+#endif
return cur[0];
+ }
}
return NULL;
goto Exit;
if ( FT_READ_USHORT( flags ) )
goto Exit;
- rlen -= 2; /* the flags are part of the resource */
+ FT_TRACE3(( "POST fragment[%d]: offsets=0x%08x, rlen=0x%08x, flags=0x%04x\n",
+ i, offsets[i], rlen, flags ));
+
+ /* postpone the check of rlen longer than buffer until FT_Stream_Read() */
+ if ( ( flags >> 8 ) == 0 ) /* Comment, should not be loaded */
+ continue;
+
+ /* the flags are part of the resource, so rlen >= 2. */
+ /* but some fonts declare rlen = 0 for empty fragment */
+ if ( rlen > 2 )
+ rlen -= 2;
+ else
+ rlen = 0;
+
if ( ( flags >> 8 ) == type )
len += rlen;
else
{
+ if ( pfb_lenpos + 3 > pfb_len + 2 )
+ goto Exit2;
pfb_data[pfb_lenpos ] = (FT_Byte)( len );
pfb_data[pfb_lenpos + 1] = (FT_Byte)( len >> 8 );
pfb_data[pfb_lenpos + 2] = (FT_Byte)( len >> 16 );
if ( ( flags >> 8 ) == 5 ) /* End of font mark */
break;
+ if ( pfb_pos + 6 > pfb_len + 2 )
+ goto Exit2;
pfb_data[pfb_pos++] = 0x80;
type = flags >> 8;
pfb_data[pfb_pos++] = 0;
}
+ error = FT_Err_Cannot_Open_Resource;
+ if ( pfb_pos > pfb_len || pfb_pos + rlen > pfb_len )
+ goto Exit2;
+
error = FT_Stream_Read( stream, (FT_Byte *)pfb_data + pfb_pos, rlen );
+ if ( error )
+ goto Exit2;
pfb_pos += rlen;
}
+ if ( pfb_pos + 2 > pfb_len + 2 )
+ goto Exit2;
pfb_data[pfb_pos++] = 0x80;
pfb_data[pfb_pos++] = 3;
+ if ( pfb_lenpos + 3 > pfb_len + 2 )
+ goto Exit2;
pfb_data[pfb_lenpos ] = (FT_Byte)( len );
pfb_data[pfb_lenpos + 1] = (FT_Byte)( len >> 8 );
pfb_data[pfb_lenpos + 2] = (FT_Byte)( len >> 16 );
char * file_names[FT_RACCESS_N_RULES];
FT_Long offsets[FT_RACCESS_N_RULES];
FT_Error errors[FT_RACCESS_N_RULES];
+ FT_Bool is_darwin_vfs, vfs_rfork_has_no_font = FALSE; /* not tested */
FT_Open_Args args2;
FT_Stream stream2 = 0;
for ( i = 0; i < FT_RACCESS_N_RULES; i++ )
{
+ is_darwin_vfs = raccess_rule_by_darwin_vfs( i );
+ if ( is_darwin_vfs && vfs_rfork_has_no_font )
+ {
+ FT_TRACE3(( "Skip rule %d: darwin vfs resource fork"
+ " is already checked and"
+ " no font is found\n", i ));
+ continue;
+ }
+
if ( errors[i] )
{
FT_TRACE3(( "Error[%d] has occurred in rule %d\n", errors[i], i ));
i, args2.pathname, offsets[i] ));
error = FT_Stream_New( library, &args2, &stream2 );
+ if ( is_darwin_vfs && error == FT_Err_Cannot_Open_Stream )
+ vfs_rfork_has_no_font = TRUE;
+
if ( error )
{
FT_TRACE3(( "failed\n" ));
if ( !error )
break;
+ else if ( is_darwin_vfs )
+ vfs_rfork_has_no_font = TRUE;
}
for (i = 0; i < FT_RACCESS_N_RULES; i++)
FT_Error error;
FT_Driver driver;
FT_Memory memory;
- FT_Stream stream = 0;
- FT_Face face = 0;
- FT_ListNode node = 0;
+ FT_Stream stream = NULL;
+ FT_Face face = NULL;
+ FT_ListNode node = NULL;
FT_Bool external_stream;
FT_Module* cur;
FT_Module* limit;
internal->transform_delta.x = 0;
internal->transform_delta.y = 0;
+
+ internal->refcount = 1;
}
if ( aface )
}
+ /* documentation is in freetype.h */
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Reference_Face( FT_Face face )
+ {
+ face->internal->refcount++;
+
+ return FT_Err_Ok;
+ }
+
+
/* documentation is in freetype.h */
FT_EXPORT_DEF( FT_Error )
error = FT_Err_Invalid_Face_Handle;
if ( face && face->driver )
{
- driver = face->driver;
- memory = driver->root.memory;
-
- /* find face in driver's list */
- node = FT_List_Find( &driver->faces_list, face );
- if ( node )
+ face->internal->refcount--;
+ if ( face->internal->refcount > 0 )
+ error = FT_Err_Ok;
+ else
{
- /* remove face object from the driver's list */
- FT_List_Remove( &driver->faces_list, node );
- FT_FREE( node );
+ driver = face->driver;
+ memory = driver->root.memory;
- /* now destroy the object proper */
- destroy_face( memory, face, driver );
- error = FT_Err_Ok;
+ /* find face in driver's list */
+ node = FT_List_Find( &driver->faces_list, face );
+ if ( node )
+ {
+ /* remove face object from the driver's list */
+ FT_List_Remove( &driver->faces_list, node );
+ FT_FREE( node );
+
+ /* now destroy the object proper */
+ destroy_face( memory, face, driver );
+ error = FT_Err_Ok;
+ }
}
}
+
return error;
}
{
if ( cur[0]->encoding == encoding )
{
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ if ( cur - face->charmaps > FT_MAX_CHARMAP_CACHEABLE )
+ {
+ FT_ERROR(( "FT_Select_Charmap: requested charmap is found (%d), "
+ "but in too late position to cache\n",
+ cur - face->charmaps ));
+ continue;
+ }
+#endif
face->charmap = cur[0];
return 0;
}
{
if ( cur[0] == charmap )
{
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ if ( cur - face->charmaps > FT_MAX_CHARMAP_CACHEABLE )
+ {
+ FT_ERROR(( "FT_Set_Charmap: requested charmap is found (%d), "
+ "but in too late position to cache\n",
+ cur - face->charmaps ));
+ continue;
+ }
+#endif
face->charmap = cur[0];
return 0;
}
FT_Int i;
+ if ( !charmap || !charmap->face )
+ return -1;
+
for ( i = 0; i < charmap->face->num_charmaps; i++ )
if ( charmap->face->charmaps[i] == charmap )
break;
FT_ASSERT( i < charmap->face->num_charmaps );
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ if ( i > FT_MAX_CHARMAP_CACHEABLE )
+ {
+ FT_ERROR(( "FT_Get_Charmap_Index: requested charmap is found (%d), "
+ "but in too late position to cache\n",
+ i ));
+ return -i;
+ }
+#endif
return i;
}
}
result = cmap->clazz->char_index( cmap, (FT_UInt32)charcode );
}
- return result;
+ return result;
}
FT_UInt gindex = 0;
- if ( face && face->charmap )
+ if ( face && face->charmap && face->num_glyphs )
{
gindex = FT_Get_Char_Index( face, 0 );
- if ( gindex == 0 )
+ if ( gindex == 0 || gindex >= (FT_UInt)face->num_glyphs )
result = FT_Get_Next_Char( face, 0, &gindex );
}
- if ( agindex )
+ if ( agindex )
*agindex = gindex;
return result;
FT_UInt gindex = 0;
- if ( face && face->charmap )
+ if ( face && face->charmap && face->num_glyphs )
{
FT_UInt32 code = (FT_UInt32)charcode;
FT_CMap cmap = FT_CMAP( face->charmap );
- gindex = cmap->clazz->char_next( cmap, &code );
+ do {
+ gindex = cmap->clazz->char_next( cmap, &code );
+ } while ( gindex >= (FT_UInt)face->num_glyphs );
+
result = ( gindex == 0 ) ? 0 : code;
}
FT_Library library = module->library;
FT_Memory memory = library->memory;
FT_Error error;
- FT_ListNode node;
+ FT_ListNode node = NULL;
if ( FT_NEW( node ) )
/* allocate raster object if needed */
if ( clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&
- clazz->raster_class->raster_new )
+ clazz->raster_class->raster_new )
{
error = clazz->raster_class->raster_new( memory, &render->raster );
if ( error )
/* release raster object, if any */
- if ( render->raster )
+ if ( render->clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&
+ render->raster )
render->clazz->raster_class->raster_done( render->raster );
/* remove from list */
FT_Library library;
- if ( !slot )
+ if ( !slot || !slot->face )
return FT_Err_Invalid_Argument;
library = FT_FACE_LIBRARY( slot->face );
FT_Renderer renderer = FT_RENDERER( module );
- if ( renderer->raster )
+ if ( renderer->clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&
+ renderer->raster )
renderer->clazz->raster_class->raster_done( renderer->raster );
}
/*************************************************************************/
+ /* documentation is in ftmodapi.h */
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Reference_Library( FT_Library library )
+ {
+ library->refcount++;
+
+ return FT_Err_Ok;
+ }
+
+
/* documentation is in ftmodapi.h */
FT_EXPORT_DEF( FT_Error )
FT_New_Library( FT_Memory memory,
FT_Library *alibrary )
{
- FT_Library library = 0;
+ FT_Library library = NULL;
FT_Error error;
library->version_minor = FREETYPE_MINOR;
library->version_patch = FREETYPE_PATCH;
+ library->refcount = 1;
+
/* That's ok now */
*alibrary = library;
if ( !library )
return FT_Err_Invalid_Library_Handle;
+ library->refcount--;
+ if ( library->refcount > 0 )
+ goto Exit;
+
memory = library->memory;
/* Discard client-data */
if ( library->generic.finalizer )
library->generic.finalizer( library );
- /* Close all faces in the library. If we don't do
- * this, we can have some subtle memory leaks.
+ /*
+ * Close all faces in the library. If we don't do this, we can have
+ * some subtle memory leaks.
+ *
* Example:
*
* - the cff font driver uses the pshinter module in cff_size_done
* - if the pshinter module is destroyed before the cff font driver,
* opened FT_Face objects managed by the driver are not properly
* destroyed, resulting in a memory leak
+ *
+ * Some faces are dependent on other faces, like Type42 faces that
+ * depend on TrueType faces synthesized internally.
+ *
+ * The order of drivers should be specified in driver_name[].
*/
{
- FT_UInt n;
+ FT_UInt m, n;
+ const char* driver_name[] = { "type42", NULL };
- for ( n = 0; n < library->num_modules; n++ )
+ for ( m = 0;
+ m < sizeof ( driver_name ) / sizeof ( driver_name[0] );
+ m++ )
{
- FT_Module module = library->modules[n];
- FT_List faces;
+ for ( n = 0; n < library->num_modules; n++ )
+ {
+ FT_Module module = library->modules[n];
+ const char* module_name = module->clazz->module_name;
+ FT_List faces;
- if ( ( module->clazz->module_flags & FT_MODULE_FONT_DRIVER ) == 0 )
- continue;
+ if ( driver_name[m] &&
+ ft_strcmp( module_name, driver_name[m] ) != 0 )
+ continue;
- faces = &FT_DRIVER(module)->faces_list;
- while ( faces->head )
- {
- FT_Done_Face( FT_FACE( faces->head->data ) );
- if ( faces->head )
- FT_TRACE0(( "FT_Done_Library: failed to free some faces\n" ));
+ if ( ( module->clazz->module_flags & FT_MODULE_FONT_DRIVER ) == 0 )
+ continue;
+
+ FT_TRACE7(( "FT_Done_Library: close faces for %s\n", module_name ));
+
+ faces = &FT_DRIVER( module )->faces_list;
+ while ( faces->head )
+ {
+ FT_Done_Face( FT_FACE( faces->head->data ) );
+ if ( faces->head )
+ FT_TRACE0(( "FT_Done_Library: failed to free some faces\n" ));
+ }
}
}
}
#endif
FT_FREE( library );
+
+ Exit:
return FT_Err_Ok;
}
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Error )
FT_Get_SubGlyph_Info( FT_GlyphSlot glyph,
FT_UInt sub_index,
FT_Error error = FT_Err_Invalid_Argument;
- if ( glyph != NULL &&
+ if ( glyph &&
+ glyph->subglyphs &&
glyph->format == FT_GLYPH_FORMAT_COMPOSITE &&
sub_index < glyph->num_subglyphs )
{
/* */
/* FreeType API for validating OpenType tables (body). */
/* */
-/* Copyright 2004, 2006, 2008 by */
+/* Copyright 2004, 2006, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
FT_OpenType_Free( FT_Face face,
FT_Bytes table )
{
- FT_Memory memory = FT_FACE_MEMORY( face );
+ FT_Memory memory;
+ if ( !face )
+ return;
+
+ memory = FT_FACE_MEMORY( face );
+
FT_FREE( table );
}
int i;
FT_Pos ray_y[3];
- FT_Orientation result[3];
+ FT_Orientation result[3] =
+ { FT_ORIENTATION_NONE, FT_ORIENTATION_NONE, FT_ORIENTATION_NONE };
if ( !outline || outline->n_points <= 0 )
/* */
/* FreeType API for accessing PFR-specific data (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2008 by */
+/* Copyright 2002, 2003, 2004, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
static FT_Service_PfrMetrics
ft_pfr_check( FT_Face face )
{
- FT_Service_PfrMetrics service;
+ FT_Service_PfrMetrics service = NULL;
- FT_FACE_LOOKUP_SERVICE( face, service, PFR_METRICS );
+ if ( face )
+ FT_FACE_LOOKUP_SERVICE( face, service, PFR_METRICS );
return service;
}
/* */
/* Embedded resource forks accessor (body). */
/* */
-/* Copyright 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */
/* Masatake YAMATO and Redhat K.K. */
/* */
/* FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are */
const char *insertion );
+ typedef enum FT_RFork_Rule_ {
+ FT_RFork_Rule_invalid = -2,
+ FT_RFork_Rule_uknown, /* -1 */
+ FT_RFork_Rule_apple_double,
+ FT_RFork_Rule_apple_single,
+ FT_RFork_Rule_darwin_ufs_export,
+ FT_RFork_Rule_darwin_newvfs,
+ FT_RFork_Rule_darwin_hfsplus,
+ FT_RFork_Rule_vfat,
+ FT_RFork_Rule_linux_cap,
+ FT_RFork_Rule_linux_double,
+ FT_RFork_Rule_linux_netatalk
+ } FT_RFork_Rule;
+
+ /* For fast translation between rule index and rule type,
+ * the macros FT_RFORK_xxx should be kept consistent with
+ * the raccess_guess_funcs table
+ */
+ typedef struct raccess_guess_rec_ {
+ raccess_guess_func func;
+ FT_RFork_Rule type;
+ } raccess_guess_rec;
+
+ static raccess_guess_rec raccess_guess_table[FT_RACCESS_N_RULES] =
+ {
+ { raccess_guess_apple_double, FT_RFork_Rule_apple_double, },
+ { raccess_guess_apple_single, FT_RFork_Rule_apple_single, },
+ { raccess_guess_darwin_ufs_export, FT_RFork_Rule_darwin_ufs_export, },
+ { raccess_guess_darwin_newvfs, FT_RFork_Rule_darwin_newvfs, },
+ { raccess_guess_darwin_hfsplus, FT_RFork_Rule_darwin_hfsplus, },
+ { raccess_guess_vfat, FT_RFork_Rule_vfat, },
+ { raccess_guess_linux_cap, FT_RFork_Rule_linux_cap, },
+ { raccess_guess_linux_double, FT_RFork_Rule_linux_double, },
+ { raccess_guess_linux_netatalk, FT_RFork_Rule_linux_netatalk, },
+ };
+
FT_BASE_DEF( void )
FT_Raccess_Guess( FT_Library library,
FT_Stream stream,
FT_Long i;
- raccess_guess_func funcs[FT_RACCESS_N_RULES] =
- {
- raccess_guess_apple_double,
- raccess_guess_apple_single,
- raccess_guess_darwin_ufs_export,
- raccess_guess_darwin_newvfs,
- raccess_guess_darwin_hfsplus,
- raccess_guess_vfat,
- raccess_guess_linux_cap,
- raccess_guess_linux_double,
- raccess_guess_linux_netatalk,
- };
-
for ( i = 0; i < FT_RACCESS_N_RULES; i++ )
{
new_names[i] = NULL;
if ( errors[i] )
continue ;
- errors[i] = (funcs[i])( library, stream, base_name,
- &(new_names[i]), &(offsets[i]) );
+ errors[i] = (raccess_guess_table[i].func)( library,
+ stream, base_name,
+ &(new_names[i]),
+ &(offsets[i]) );
}
return;
}
+ static FT_RFork_Rule
+ raccess_get_rule_type_from_rule_index( FT_UInt rule_index )
+ {
+ if ( rule_index >= FT_RACCESS_N_RULES )
+ return FT_RFork_Rule_invalid;
+
+ return raccess_guess_table[rule_index].type;
+ }
+
+
+ FT_LOCAL_DEF( FT_Bool )
+ raccess_rule_by_darwin_vfs( FT_UInt rule_index )
+ {
+ switch( raccess_get_rule_type_from_rule_index( rule_index ) )
+ {
+ case FT_RFork_Rule_darwin_newvfs:
+ case FT_RFork_Rule_darwin_hfsplus:
+ return TRUE;
+
+ default:
+ return FALSE;
+ }
+ }
+
+
static FT_Error
raccess_guess_apple_double( FT_Library library,
FT_Stream stream,
const char *original_name,
const char *insertion )
{
- char* new_name;
+ char* new_name = NULL;
const char* tmp;
const char* slash;
size_t new_length;
/* */
/* I/O stream support (body). */
/* */
-/* Copyright 2000-2001, 2002, 2004, 2005, 2006, 2008, 2009 by */
+/* Copyright 2000-2001, 2002, 2004, 2005, 2006, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* allocate the frame in memory */
FT_Memory memory = stream->memory;
+
+ /* simple sanity check */
+ if ( count > stream->size )
+ {
+ FT_ERROR(( "FT_Stream_EnterFrame:"
+ " frame size (%lu) larger than stream size (%lu)\n",
+ count, stream->size ));
+
+ error = FT_Err_Invalid_Stream_Operation;
+ goto Exit;
+ }
+
#ifdef FT_DEBUG_MEMORY
/* assume _ft_debug_file and _ft_debug_lineno are already set */
stream->base = (unsigned char*)ft_mem_qalloc( memory, count, &error );
{
/* check current and new position */
if ( stream->pos >= stream->size ||
- stream->pos + count > stream->size )
+ stream->size - stream->pos < count )
{
FT_ERROR(( "FT_Stream_EnterFrame:"
" invalid i/o; pos = 0x%lx, count = %lu, size = 0x%lx\n",
if ( slot->format != FT_GLYPH_FORMAT_OUTLINE &&
- slot->format != FT_GLYPH_FORMAT_BITMAP )
+ slot->format != FT_GLYPH_FORMAT_BITMAP )
return;
/* some reasonable strength */
xstr = xstr * 2;
ystr = xstr;
}
- else if ( slot->format == FT_GLYPH_FORMAT_BITMAP )
+ else /* slot->format == FT_GLYPH_FORMAT_BITMAP */
{
/* round to full pixels */
xstr &= ~63;
/* */
/* ANSI-specific FreeType low-level system interface (body). */
/* */
-/* Copyright 1996-2001, 2002, 2006, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2006, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* count :: The number of bytes to read from the stream. */
/* */
/* <Return> */
- /* The number of bytes actually read. */
+ /* The number of bytes actually read. If `count' is zero (this is, */
+ /* the function is used for seeking), a non-zero return value */
+ /* indicates an error. */
/* */
FT_CALLBACK_DEF( unsigned long )
ft_ansi_stream_io( FT_Stream stream,
FT_FILE* file;
+ if ( !count && offset > stream->size )
+ return 1;
+
file = STREAM_FILE( stream );
if ( stream->pos != offset )
if ( !stream )
return FT_Err_Invalid_Stream_Handle;
+ stream->descriptor.pointer = NULL;
+ stream->pathname.pointer = (char*)filepathname;
+ stream->base = 0;
+ stream->pos = 0;
+ stream->read = NULL;
+ stream->close = NULL;
+
file = ft_fopen( filepathname, "rb" );
if ( !file )
{
ft_fseek( file, 0, SEEK_END );
stream->size = ft_ftell( file );
+ if ( !stream->size )
+ {
+ FT_ERROR(( "FT_Stream_Open:" ));
+ FT_ERROR(( " opened `%s' but zero-sized\n", filepathname ));
+ ft_fclose( file );
+ return FT_Err_Cannot_Open_Stream;
+ }
ft_fseek( file, 0, SEEK_SET );
stream->descriptor.pointer = file;
- stream->pathname.pointer = (char*)filepathname;
- stream->pos = 0;
-
stream->read = ft_ansi_stream_io;
stream->close = ft_ansi_stream_close;
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_OBJECTS_H
#include FT_BDF_H
+#include FT_TRUETYPE_IDS_H
#include FT_SERVICE_BDF_H
#include FT_SERVICE_XFREE86_NAME_H
charmap.face = FT_FACE( face );
charmap.encoding = FT_ENCODING_NONE;
- charmap.platform_id = 0;
- charmap.encoding_id = 0;
+ /* initial platform/encoding should indicate unset status? */
+ charmap.platform_id = TT_PLATFORM_APPLE_UNICODE;
+ charmap.encoding_id = TT_APPLE_ID_DEFAULT;
if ( unicode_charmap )
{
charmap.encoding = FT_ENCODING_UNICODE;
- charmap.platform_id = 3;
- charmap.encoding_id = 1;
+ charmap.platform_id = TT_PLATFORM_MICROSOFT;
+ charmap.encoding_id = TT_MS_ID_UNICODE_CS;
}
error = FT_CMap_New( &bdf_cmap_class, NULL, &charmap, NULL );
charmap.face = FT_FACE( face );
charmap.encoding = FT_ENCODING_ADOBE_STANDARD;
- charmap.platform_id = 7;
- charmap.encoding_id = 0;
+ charmap.platform_id = TT_PLATFORM_ADOBE;
+ charmap.encoding_id = TT_ADOBE_ID_STANDARD;
error = FT_CMap_New( &bdf_cmap_class, NULL, &charmap, NULL );
/*
* Copyright 2000 Computing Research Labs, New Mexico State University
- * Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+ * Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
* Francesco Zappa Nardelli
*
* Permission is hereby granted, free of charge, to any person obtaining a
}
+ /* An empty string for empty fields. */
+
+ static const char empty[1] = { 0 }; /* XXX eliminate this */
+
+
static char *
_bdf_list_join( _bdf_list_t* list,
int c,
if ( i + 1 < list->used )
dp[j++] = (char)c;
}
- dp[j] = 0;
+ if ( dp != empty )
+ dp[j] = 0;
*alen = j;
return dp;
}
- /* An empty string for empty fields. */
-
- static const char empty[1] = { 0 }; /* XXX eliminate this */
-
-
static FT_Error
_bdf_list_split( _bdf_list_t* list,
char* separators,
{
if ( refill )
{
- bytes = (ptrdiff_t)FT_Stream_TryRead( stream, (FT_Byte*)buf + cursor,
- (FT_ULong)(buf_size - cursor) );
+ bytes = (ptrdiff_t)FT_Stream_TryRead(
+ stream, (FT_Byte*)buf + cursor,
+ (FT_ULong)( buf_size - cursor ) );
avail = cursor + bytes;
cursor = 0;
refill = 0;
{
error = (*cb)( buf + start, end - start, lineno,
(void*)&cb, client_data );
+ /* Redo if we have encountered CHARS without properties. */
+ if ( error == -1 )
+ error = (*cb)( buf + start, end - start, lineno,
+ (void*)&cb, client_data );
if ( error )
break;
}
/* If the property happens to be a comment, then it doesn't need */
/* to be added to the internal hash table. */
- if ( ft_memcmp( name, "COMMENT", 7 ) != 0 ) {
+ if ( ft_memcmp( name, "COMMENT", 7 ) != 0 )
+ {
/* Add the property to the font property table. */
error = hash_insert( fp->name,
font->props_used,
error = BDF_Err_Invalid_File_Format;
Exit:
+ if ( error && ( p->flags & _BDF_GLYPH ) )
+ FT_FREE( p->glyph_name );
+
return error;
}
/* Check for the start of the properties. */
if ( ft_memcmp( line, "STARTPROPERTIES", 15 ) == 0 )
{
+ if ( !( p->flags & _BDF_FONT_BBX ) )
+ {
+ /* Missing the FONTBOUNDINGBOX field. */
+ FT_ERROR(( "_bdf_parse_start: " ERRMSG1, lineno, "FONTBOUNDINGBOX" ));
+ error = BDF_Err_Missing_Fontboundingbox_Field;
+ goto Exit;
+ }
+
error = _bdf_list_split( &p->list, (char *)" +", line, linelen );
if ( error )
goto Exit;
/* Check for the FONTBOUNDINGBOX field. */
if ( ft_memcmp( line, "FONTBOUNDINGBOX", 15 ) == 0 )
{
- if ( !(p->flags & _BDF_SIZE ) )
+ if ( !( p->flags & _BDF_SIZE ) )
{
/* Missing the SIZE field. */
FT_ERROR(( "_bdf_parse_start: " ERRMSG1, lineno, "SIZE" ));
goto Exit;
}
+ /* Allowing multiple `FONT' lines (which is invalid) doesn't hurt... */
+ FT_FREE( p->font->name );
+
if ( FT_NEW_ARRAY( p->font->name, slen + 1 ) )
goto Exit;
FT_MEM_COPY( p->font->name, s, slen + 1 );
goto Exit;
}
+ /* Check for the CHARS field -- font properties are optional */
+ if ( ft_memcmp( line, "CHARS", 5 ) == 0 )
+ {
+ char nbuf[128];
+
+
+ if ( !( p->flags & _BDF_FONT_BBX ) )
+ {
+ /* Missing the FONTBOUNDINGBOX field. */
+ FT_ERROR(( "_bdf_parse_start: " ERRMSG1, lineno, "FONTBOUNDINGBOX" ));
+ error = BDF_Err_Missing_Fontboundingbox_Field;
+ goto Exit;
+ }
+
+ /* Add the two standard X11 properties which are required */
+ /* for compiling fonts. */
+ p->font->font_ascent = p->font->bbx.ascent;
+ ft_sprintf( nbuf, "%hd", p->font->bbx.ascent );
+ error = _bdf_add_property( p->font, (char *)"FONT_ASCENT", nbuf );
+ if ( error )
+ goto Exit;
+ FT_TRACE2(( "_bdf_parse_properties: " ACMSG1, p->font->bbx.ascent ));
+
+ p->font->font_descent = p->font->bbx.descent;
+ ft_sprintf( nbuf, "%hd", p->font->bbx.descent );
+ error = _bdf_add_property( p->font, (char *)"FONT_DESCENT", nbuf );
+ if ( error )
+ goto Exit;
+ FT_TRACE2(( "_bdf_parse_properties: " ACMSG2, p->font->bbx.descent ));
+
+ p->font->modified = 1;
+
+ *next = _bdf_parse_glyphs;
+
+ /* A special return value. */
+ error = -1;
+ goto Exit;
+ }
+
error = BDF_Err_Invalid_File_Format;
Exit:
bdf_font_t* *font )
{
unsigned long lineno = 0; /* make compiler happy */
- _bdf_parse_t *p;
+ _bdf_parse_t *p = NULL;
FT_Memory memory = extmemory;
FT_Error error = BDF_Err_Ok;
/* Make sure the comments are NULL terminated if they exist. */
memory = p->font->memory;
- if ( p->font->comments_len > 0 ) {
+ if ( p->font->comments_len > 0 )
+ {
if ( FT_RENEW_ARRAY( p->font->comments,
p->font->comments_len,
p->font->comments_len + 1 ) )
hash_free( &(font->proptbl), memory );
/* Free up the user defined properties. */
- for (prop = font->user_props, i = 0;
- i < font->nuser_props; i++, prop++ )
+ for ( prop = font->user_props, i = 0;
+ i < font->nuser_props; i++, prop++ )
{
FT_FREE( prop->name );
if ( prop->format == BDF_ATOM )
/* */
/* The FreeType basic cache interface (body). */
/* */
-/* Copyright 2003, 2004, 2005, 2006, 2007, 2009 by */
+/* Copyright 2003, 2004, 2005, 2006, 2007, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
FTC_BasicQueryRec query;
FTC_Node node = 0; /* make compiler happy */
FT_Error error;
- FT_UInt32 hash;
+ FT_PtrDist hash;
/* some argument checks are delayed to FTC_Cache_Lookup */
FTC_BasicQueryRec query;
FTC_Node node = 0; /* make compiler happy */
FT_Error error;
- FT_UInt32 hash;
+ FT_PtrDist hash;
/* some argument checks are delayed to FTC_Cache_Lookup */
FT_Error error;
FTC_BasicQueryRec query;
FTC_Node node = 0; /* make compiler happy */
- FT_UInt32 hash;
+ FT_PtrDist hash;
if ( anode )
FT_Error error;
FTC_BasicQueryRec query;
FTC_Node node = 0; /* make compiler happy */
- FT_UInt32 hash;
+ FT_PtrDist hash;
if ( anode )
if ( !desc )
- return FT_Err_Invalid_Argument;
+ return FTC_Err_Invalid_Argument;
ftc_image_type_from_old_desc( &type0, desc );
/* */
/* The FreeType internal cache interface (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */
+/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
static void
FTC_Cache_Clear( FTC_Cache cache )
{
- if ( cache )
+ if ( cache && cache->buckets )
{
FTC_Manager manager = cache->manager;
FT_UFast i;
static void
ftc_cache_add( FTC_Cache cache,
- FT_UInt32 hash,
+ FT_PtrDist hash,
FTC_Node node )
{
node->hash = hash;
FT_LOCAL_DEF( FT_Error )
FTC_Cache_NewNode( FTC_Cache cache,
- FT_UInt32 hash,
+ FT_PtrDist hash,
FT_Pointer query,
FTC_Node *anode )
{
FT_LOCAL_DEF( FT_Error )
FTC_Cache_Lookup( FTC_Cache cache,
- FT_UInt32 hash,
+ FT_PtrDist hash,
FT_Pointer query,
FTC_Node *anode )
{
FTC_Node* bucket;
FTC_Node* pnode;
FTC_Node node;
- FT_Error error = 0;
+ FT_Error error = FTC_Err_Ok;
FTC_Node_CompareFunc compare = cache->clazz.node_compare;
if ( cache == NULL || anode == NULL )
- return FT_Err_Invalid_Argument;
+ return FTC_Err_Invalid_Argument;
idx = hash & cache->mask;
if ( idx < cache->p )
/* */
/* FreeType internal cache interface (specification). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */
+/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
FT_BEGIN_HEADER
+#define _FTC_FACE_ID_HASH( i ) \
+ ((FT_PtrDist)(( (FT_PtrDist)(i) >> 3 ) ^ ( (FT_PtrDist)(i) << 7 )))
+
/* handle to cache object */
typedef struct FTC_CacheRec_* FTC_Cache;
{
FTC_MruNodeRec mru; /* circular mru list pointer */
FTC_Node link; /* used for hashing */
- FT_UInt32 hash; /* used for hashing too */
+ FT_PtrDist hash; /* used for hashing too */
FT_UShort cache_index; /* index of cache the node belongs to */
FT_Short ref_count; /* reference count for this node */
#ifndef FTC_INLINE
FT_LOCAL( FT_Error )
FTC_Cache_Lookup( FTC_Cache cache,
- FT_UInt32 hash,
+ FT_PtrDist hash,
FT_Pointer query,
FTC_Node *anode );
#endif
FT_LOCAL( FT_Error )
FTC_Cache_NewNode( FTC_Cache cache,
- FT_UInt32 hash,
+ FT_PtrDist hash,
FT_Pointer query,
FTC_Node *anode );
FT_BEGIN_STMNT \
FTC_Node *_bucket, *_pnode, _node; \
FTC_Cache _cache = FTC_CACHE(cache); \
- FT_UInt32 _hash = (FT_UInt32)(hash); \
+ FT_PtrDist _hash = (FT_PtrDist)(hash); \
FTC_Node_CompareFunc _nodcomp = (FTC_Node_CompareFunc)(nodecmp); \
FT_UFast _idx; \
\
\
- error = 0; \
+ error = FTC_Err_Ok; \
node = NULL; \
_idx = _hash & _cache->mask; \
if ( _idx < _cache->p ) \
#define FTC_CACHE_TRYLOOP_END() \
- if ( !error || error != FT_Err_Out_Of_Memory ) \
+ if ( !error || error != FTC_Err_Out_Of_Memory ) \
break; \
\
_try_done = FTC_Manager_FlushN( _try_manager, _try_count ); \
/* */
/* FreeType CharMap cache (body) */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* compute a query/node hash */
#define FTC_CMAP_HASH( faceid, index, charcode ) \
- ( FTC_FACE_ID_HASH( faceid ) + 211 * (index) + \
+ ( _FTC_FACE_ID_HASH( faceid ) + 211 * (index) + \
( (charcode) / FTC_CMAP_INDICES_MAX ) )
/* the charmap query */
FTC_CMapQuery query = (FTC_CMapQuery)ftcquery;
FT_Error error;
FT_Memory memory = cache->memory;
- FTC_CMapNode node;
+ FTC_CMapNode node = NULL;
FT_UInt nn;
FTC_Node node;
FT_Error error;
FT_UInt gindex = 0;
- FT_UInt32 hash;
+ FT_PtrDist hash;
FT_Int no_cmap_change = 0;
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
/*
- * Detect a call from a rogue client that thinks it is linking
- * to FreeType 2.1.7. This is possible because the third parameter
- * is then a character code, and we have never seen any font with
- * more than a few charmaps, so if the index is very large...
- *
- * It is also very unlikely that a rogue client is interested
- * in Unicode values 0 to 15.
- *
- * NOTE: The original threshold was 4, but we found a font from the
- * Adobe Acrobat Reader Pack, named `KozMinProVI-Regular.otf',
- * which contains more than 5 charmaps.
+ * If cmap_index is greater than the maximum number of cachable
+ * charmaps, we assume the request is from a legacy rogue client
+ * using old internal header. See include/config/ftoption.h.
*/
- if ( cmap_index >= 16 && !no_cmap_change )
+ if ( cmap_index > FT_MAX_CHARMAP_CACHEABLE && !no_cmap_change )
{
FTC_OldCMapDesc desc = (FTC_OldCMapDesc) face_id;
/* something rotten can happen with rogue clients */
if ( (FT_UInt)( char_code - FTC_CMAP_NODE( node )->first >=
FTC_CMAP_INDICES_MAX ) )
- return 0;
+ return 0; /* XXX: should return appropriate error */
gindex = FTC_CMAP_NODE( node )->indices[char_code -
FTC_CMAP_NODE( node )->first];
if ( error )
goto Exit;
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ /* something rotten can happen with rogue clients */
+ if ( cmap_index > FT_MAX_CHARMAP_CACHEABLE )
+ return 0; /* XXX: should return appropriate error */
+#endif
+
if ( (FT_UInt)cmap_index < (FT_UInt)face->num_charmaps )
{
FT_CharMap old, cmap = NULL;
FT_LOCAL_DEF( FT_Error )
FTC_GCache_Lookup( FTC_GCache cache,
- FT_UInt32 hash,
+ FT_PtrDist hash,
FT_UInt gindex,
FTC_GQuery query,
FTC_Node *anode )
#ifndef FTC_INLINE
FT_LOCAL( FT_Error )
FTC_GCache_Lookup( FTC_GCache cache,
- FT_UInt32 hash,
+ FT_PtrDist hash,
FT_UInt gindex,
FTC_GQuery query,
FTC_Node *anode );
/* */
/* FreeType Image cache (body). */
/* */
-/* Copyright 2000-2001, 2003, 2004, 2006 by */
+/* Copyright 2000-2001, 2003, 2004, 2006, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
{
FT_Memory memory = cache->memory;
FT_Error error;
- FTC_INode inode;
+ FTC_INode inode = NULL;
if ( !FT_NEW( inode ) )
/* */
/* FreeType Cache Manager (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009 by */
+/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
* the face_id as well
*/
FTC_MruList_RemoveSelection( &manager->faces,
- (FTC_MruNode_CompareFunc)NULL,
+ ftc_face_node_compare,
face_id );
for ( nn = 0; nn < manager->num_caches; nn++ )
(a)->y_res == (b)->y_res ) ) )
#define FTC_SCALER_HASH( q ) \
- ( FTC_FACE_ID_HASH( (q)->face_id ) + \
+ ( _FTC_FACE_ID_HASH( (q)->face_id ) + \
(q)->width + (q)->height*7 + \
( (q)->pixel ? 0 : ( (q)->x_res*33 ^ (q)->y_res*61 ) ) )
/* */
/* Simple MRU list-cache (specification). */
/* */
-/* Copyright 2000-2001, 2003, 2004, 2005, 2006 by */
+/* Copyright 2000-2001, 2003, 2004, 2005, 2006, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
FTC_MruNode _first, _node; \
\
\
- error = 0; \
+ error = FTC_Err_Ok; \
_first = *(_pfirst); \
_node = NULL; \
\
/* */
/* FreeType sbits manager (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2009 by */
+/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
!CHECK_CHAR( slot->bitmap_top ) ||
!CHECK_CHAR( xadvance ) ||
!CHECK_CHAR( yadvance ) )
+ {
+ FT_TRACE2(( "ftc_snode_load:"
+ " glyph too large for small bitmap cache\n"));
goto BadGlyph;
+ }
sbit->width = (FT_Byte)bitmap->width;
sbit->height = (FT_Byte)bitmap->rows;
sbit->width = 255;
sbit->height = 0;
sbit->buffer = NULL;
- error = 0;
+ error = FTC_Err_Ok;
if ( asize )
*asize = 0;
}
total = clazz->family_get_count( family, cache->manager );
if ( total == 0 || gindex >= total )
{
- error = FT_Err_Invalid_Argument;
+ error = FTC_Err_Invalid_Argument;
goto Exit;
}
/* */
/* CFF character mapping table (cmap) support (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006, 2007 by */
+/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/*************************************************************************/
FT_CALLBACK_DEF( const char* )
- cff_sid_to_glyph_name( TT_Face face,
- FT_UInt idx )
+ cff_sid_to_glyph_name( TT_Face face,
+ FT_UInt idx )
{
- CFF_Font cff = (CFF_Font)face->extra.data;
- CFF_Charset charset = &cff->charset;
- FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames;
- FT_UInt sid = charset->sids[idx];
-
-
- return cff_index_get_sid_string( &cff->string_index, sid, psnames );
- }
-
-
- FT_CALLBACK_DEF( void )
- cff_sid_free_glyph_name( TT_Face face,
- const char* gname )
- {
- FT_Memory memory = FT_FACE_MEMORY( face );
+ CFF_Font cff = (CFF_Font)face->extra.data;
+ CFF_Charset charset = &cff->charset;
+ FT_UInt sid = charset->sids[idx];
- FT_FREE( gname );
+ return cff_index_get_sid_string( cff, sid );
}
/* can't build Unicode map for CID-keyed font */
+ /* because we don't know glyph names. */
if ( !charset->sids )
- return CFF_Err_Invalid_Argument;
+ return CFF_Err_No_Unicode_Glyph_Name;
return psnames->unicodes_init( memory,
unicodes,
cff->num_glyphs,
(PS_GetGlyphNameFunc)&cff_sid_to_glyph_name,
- (PS_FreeGlyphNameFunc)&cff_sid_free_glyph_name,
+ (PS_FreeGlyphNameFunc)NULL,
(FT_Pointer)face );
}
/* */
/* OpenType font driver implementation (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_SFNT_H
#include FT_SERVICE_CID_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
#include FT_SERVICE_POSTSCRIPT_INFO_H
#include FT_SERVICE_POSTSCRIPT_NAME_H
#include FT_SERVICE_TT_CMAP_H
FT_Pointer buffer,
FT_UInt buffer_max )
{
- CFF_Font font = (CFF_Font)face->extra.data;
- FT_Memory memory = FT_FACE_MEMORY( face );
- FT_String* gname;
- FT_UShort sid;
- FT_Service_PsCMaps psnames;
- FT_Error error;
+ CFF_Font font = (CFF_Font)face->extra.data;
+ FT_String* gname;
+ FT_UShort sid;
+ FT_Error error;
- FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
- if ( !psnames )
+ if ( !font->psnames )
{
FT_ERROR(( "cff_get_glyph_name:"
" cannot get glyph name from CFF & CEF fonts\n"
sid = font->charset.sids[glyph_index];
/* now, lookup the name itself */
- gname = cff_index_get_sid_string( &font->string_index, sid, psnames );
+ gname = cff_index_get_sid_string( font, sid );
if ( gname )
FT_STRCPYN( buffer, gname, buffer_max );
- FT_FREE( gname );
error = CFF_Err_Ok;
Exit:
CFF_Font cff;
CFF_Charset charset;
FT_Service_PsCMaps psnames;
- FT_Memory memory = FT_FACE_MEMORY( face );
FT_String* name;
FT_UShort sid;
FT_UInt i;
- FT_Int result;
cff = (CFF_FontRec *)face->extra.data;
sid = charset->sids[i];
if ( sid > 390 )
- name = cff_index_get_name( &cff->string_index, sid - 391 );
+ name = cff_index_get_string( cff, sid - 391 );
else
name = (FT_String *)psnames->adobe_std_strings( sid );
if ( !name )
continue;
- result = ft_strcmp( glyph_name, name );
-
- if ( sid > 390 )
- FT_FREE( name );
-
- if ( !result )
+ if ( !ft_strcmp( glyph_name, name ) )
return i;
}
PS_FontInfoRec* afont_info )
{
CFF_Font cff = (CFF_Font)face->extra.data;
- FT_Error error = FT_Err_Ok;
+ FT_Error error = CFF_Err_Ok;
if ( cff && cff->font_info == NULL )
{
- CFF_FontRecDict dict = &cff->top_font.font_dict;
- PS_FontInfoRec *font_info;
- FT_Memory memory = face->root.memory;
- FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames;
+ CFF_FontRecDict dict = &cff->top_font.font_dict;
+ PS_FontInfoRec *font_info;
+ FT_Memory memory = face->root.memory;
if ( FT_ALLOC( font_info, sizeof ( *font_info ) ) )
goto Fail;
- font_info->version = cff_index_get_sid_string( &cff->string_index,
- dict->version,
- psnames );
- font_info->notice = cff_index_get_sid_string( &cff->string_index,
- dict->notice,
- psnames );
- font_info->full_name = cff_index_get_sid_string( &cff->string_index,
- dict->full_name,
- psnames );
- font_info->family_name = cff_index_get_sid_string( &cff->string_index,
- dict->family_name,
- psnames );
- font_info->weight = cff_index_get_sid_string( &cff->string_index,
- dict->weight,
- psnames );
+ font_info->version = cff_index_get_sid_string( cff,
+ dict->version );
+ font_info->notice = cff_index_get_sid_string( cff,
+ dict->notice );
+ font_info->full_name = cff_index_get_sid_string( cff,
+ dict->full_name );
+ font_info->family_name = cff_index_get_sid_string( cff,
+ dict->family_name );
+ font_info->weight = cff_index_get_sid_string( cff,
+ dict->weight );
font_info->italic_angle = dict->italic_angle;
font_info->is_fixed_pitch = dict->is_fixed_pitch;
font_info->underline_position = (FT_Short)dict->underline_position;
if ( cff )
{
- CFF_FontRecDict dict = &cff->top_font.font_dict;
- FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames;
+ CFF_FontRecDict dict = &cff->top_font.font_dict;
if ( dict->cid_registry == 0xFFFFU )
if ( registry )
{
if ( cff->registry == NULL )
- cff->registry = cff_index_get_sid_string( &cff->string_index,
- dict->cid_registry,
- psnames );
+ cff->registry = cff_index_get_sid_string( cff,
+ dict->cid_registry );
*registry = cff->registry;
}
if ( ordering )
{
if ( cff->ordering == NULL )
- cff->ordering = cff_index_get_sid_string( &cff->string_index,
- dict->cid_ordering,
- psnames );
+ cff->ordering = cff_index_get_sid_string( cff,
+ dict->cid_ordering );
*ordering = cff->ordering;
}
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_SFNT_H
#include FT_OUTLINE_H
-#include FT_INTERNAL_POSTSCRIPT_HINTS_H
#include "cffobjs.h"
#include "cffload.h"
/* initialize Type2 decoder */
decoder->cff = cff;
- decoder->num_globals = cff->num_global_subrs;
+ decoder->num_globals = cff->global_subrs_index.count;
decoder->globals = cff->global_subrs;
decoder->globals_bias = cff_compute_bias(
cff->top_font.font_dict.charstring_type,
goto Exit;
}
- FT_TRACE4(( "glyph index %d (subfont %d):\n", glyph_index, fd_index ));
+ FT_TRACE3(( "glyph index %d (subfont %d):\n", glyph_index, fd_index ));
sub = cff->subfonts[fd_index];
}
#ifdef FT_DEBUG_LEVEL_TRACE
else
- FT_TRACE4(( "glyph index %d:\n", glyph_index ));
+ FT_TRACE3(( "glyph index %d:\n", glyph_index ));
#endif
- decoder->num_locals = sub->num_local_subrs;
+ decoder->num_locals = sub->local_subrs_index.count;
decoder->locals = sub->local_subrs;
decoder->locals_bias = cff_compute_bias(
decoder->cff->top_font.font_dict.charstring_type,
charstring_len );
decoder->seac = FALSE;
+ cff_free_glyph_data( face, &charstring, charstring_len );
+
if ( error )
goto Exit;
-
- cff_free_glyph_data( face, &charstring, charstring_len );
}
/* Save the left bearing, advance and glyph width of the base */
charstring_len );
decoder->seac = FALSE;
+ cff_free_glyph_data( face, &charstring, charstring_len );
+
if ( error )
goto Exit;
-
- cff_free_glyph_data( face, &charstring, charstring_len );
}
/* Restore the left side bearing, advance and glyph width */
decoder->num_hints += num_args / 2;
}
+ /* In a valid charstring there must be at least one byte */
+ /* after `hintmask' or `cntrmask' (e.g., for a `return' */
+ /* instruction). Additionally, there must be space for */
+ /* `num_hints' bits. */
+
+ if ( ( ip + ( ( decoder->num_hints + 7 ) >> 3 ) ) >= limit )
+ goto Syntax_Error;
+
if ( hinter )
{
if ( op == cff_op_hintmask )
FT_UInt maskbyte;
- FT_TRACE4(( " (maskbytes: " ));
+ FT_TRACE4(( " (maskbytes:" ));
for ( maskbyte = 0;
- maskbyte < (FT_UInt)(( decoder->num_hints + 7 ) >> 3);
+ maskbyte < (FT_UInt)( ( decoder->num_hints + 7 ) >> 3 );
maskbyte++, ip++ )
- FT_TRACE4(( "0x%02X", *ip ));
+ FT_TRACE4(( " 0x%02X", *ip ));
FT_TRACE4(( ")\n" ));
}
#else
ip += ( decoder->num_hints + 7 ) >> 3;
#endif
- if ( ip >= limit )
- goto Syntax_Error;
args = stack;
break;
/* subsequent `pop' operands should add the arguments, */
/* this is the implementation described for `unknown' other */
/* subroutines in the Type1 spec. */
+ /* */
+ /* XXX Fix return arguments (see discussion below). */
args -= 2 + ( args[-2] >> 16 );
+ if ( args < stack )
+ goto Stack_Underflow;
break;
case cff_op_pop:
FT_TRACE4(( " pop (invalid op)\n" ));
+ /* XXX Increasing `args' is wrong: After a certain number of */
+ /* `pop's we get a stack overflow. Reason for doing it is */
+ /* code like this (actually found in a CFF font): */
+ /* */
+ /* 17 1 3 callothersubr */
+ /* pop */
+ /* callsubr */
+ /* */
+ /* Since we handle `callothersubr' as a no-op, and */
+ /* `callsubr' needs at least one argument, `pop' can't be a */
+ /* no-op too as it basically should be. */
+ /* */
+ /* The right solution would be to provide real support for */
+ /* `callothersubr' as done in `t1decode.c', however, given */
+ /* the fact that CFF fonts with `pop' are invalid, it is */
+ /* questionable whether it is worth the time. */
args++;
break;
return CFF_Err_Unimplemented_Feature;
}
- decoder->top = args;
+ decoder->top = args;
+
+ if ( decoder->top - stack >= CFF_MAX_OPERANDS )
+ goto Stack_Overflow;
} /* general operator processing */
/* this scaling is only relevant if the PS hinter isn't active */
if ( cff->num_subfonts )
{
- FT_Byte fd_index = cff_fd_select_get( &cff->fd_select,
- glyph_index );
+ FT_ULong top_upm, sub_upm;
+ FT_Byte fd_index = cff_fd_select_get( &cff->fd_select,
+ glyph_index );
+
+ if ( fd_index >= cff->num_subfonts )
+ fd_index = cff->num_subfonts - 1;
- FT_ULong top_upm = cff->top_font.font_dict.units_per_em;
- FT_ULong sub_upm = cff->subfonts[fd_index]->font_dict.units_per_em;
+ top_upm = cff->top_font.font_dict.units_per_em;
+ sub_upm = cff->subfonts[fd_index]->font_dict.units_per_em;
font_matrix = cff->subfonts[fd_index]->font_dict.font_matrix;
/* now load the unscaled outline */
error = cff_get_glyph_data( face, glyph_index,
&charstring, &charstring_len );
- if ( !error )
- {
- error = cff_decoder_prepare( &decoder, size, glyph_index );
- if ( !error )
- {
- error = cff_decoder_parse_charstrings( &decoder,
- charstring,
- charstring_len );
+ if ( error )
+ goto Glyph_Build_Finished;
+
+ error = cff_decoder_prepare( &decoder, size, glyph_index );
+ if ( error )
+ goto Glyph_Build_Finished;
- cff_free_glyph_data( face, &charstring, charstring_len );
+ error = cff_decoder_parse_charstrings( &decoder,
+ charstring,
+ charstring_len );
+
+ cff_free_glyph_data( face, &charstring, charstring_len );
+ if ( error )
+ goto Glyph_Build_Finished;
#ifdef FT_CONFIG_OPTION_INCREMENTAL
- /* Control data and length may not be available for incremental */
- /* fonts. */
- if ( face->root.internal->incremental_interface )
- {
- glyph->root.control_data = 0;
- glyph->root.control_len = 0;
- }
- else
+ /* Control data and length may not be available for incremental */
+ /* fonts. */
+ if ( face->root.internal->incremental_interface )
+ {
+ glyph->root.control_data = 0;
+ glyph->root.control_len = 0;
+ }
+ else
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
- /* We set control_data and control_len if charstrings is loaded. */
- /* See how charstring loads at cff_index_access_element() in */
- /* cffload.c. */
- {
- CFF_Index csindex = &cff->charstrings_index;
+ /* We set control_data and control_len if charstrings is loaded. */
+ /* See how charstring loads at cff_index_access_element() in */
+ /* cffload.c. */
+ {
+ CFF_Index csindex = &cff->charstrings_index;
- if ( csindex->offsets )
- {
- glyph->root.control_data = csindex->bytes +
- csindex->offsets[glyph_index] - 1;
- glyph->root.control_len = charstring_len;
- }
- }
+ if ( csindex->offsets )
+ {
+ glyph->root.control_data = csindex->bytes +
+ csindex->offsets[glyph_index] - 1;
+ glyph->root.control_len = charstring_len;
}
}
- /* save new glyph tables */
- cff_builder_done( &decoder.builder );
+ Glyph_Build_Finished:
+ /* save new glyph tables, if no error */
+ if ( !error )
+ cff_builder_done( &decoder.builder );
+ /* XXX: anything to do for broken glyph entry? */
}
#ifdef FT_CONFIG_OPTION_INCREMENTAL
/* */
/* OpenType and CFF data/program tables loader (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_STREAM_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
#include FT_TRUETYPE_TAGS_H
#include FT_TYPE1_TABLES_H
if ( offsize < 1 || offsize > 4 )
{
- error = FT_Err_Invalid_Table;
+ error = CFF_Err_Invalid_Table;
goto Exit;
}
}
- /* allocate a table containing pointers to an index's elements */
+ /* Allocate a table containing pointers to an index's elements. */
+ /* The `pool' argument makes this function convert the index */
+ /* entries to C-style strings (this is, NULL-terminated). */
static FT_Error
cff_index_get_pointers( CFF_Index idx,
- FT_Byte*** table )
+ FT_Byte*** table,
+ FT_Byte** pool )
{
- FT_Error error = CFF_Err_Ok;
- FT_Memory memory = idx->stream->memory;
- FT_ULong n, offset, old_offset;
+ FT_Error error = CFF_Err_Ok;
+ FT_Memory memory = idx->stream->memory;
FT_Byte** t;
+ FT_Byte* new_bytes = NULL;
- *table = 0;
+ *table = NULL;
if ( idx->offsets == NULL )
{
goto Exit;
}
- if ( idx->count > 0 && !FT_NEW_ARRAY( t, idx->count + 1 ) )
+ if ( idx->count > 0 &&
+ !FT_NEW_ARRAY( t, idx->count + 1 ) &&
+ ( !pool || !FT_ALLOC( new_bytes,
+ idx->data_size + idx->count ) ) )
{
- old_offset = 1;
- for ( n = 0; n <= idx->count; n++ )
+ FT_ULong n, cur_offset;
+ FT_ULong extra = 0;
+ FT_Byte* org_bytes = idx->bytes;
+
+
+ /* at this point, `idx->offsets' can't be NULL */
+ cur_offset = idx->offsets[0] - 1;
+
+ /* sanity check */
+ if ( cur_offset >= idx->data_size )
+ {
+ FT_TRACE0(( "cff_index_get_pointers:"
+ " invalid first offset value %d set to zero\n",
+ cur_offset ));
+ cur_offset = 0;
+ }
+
+ if ( !pool )
+ t[0] = org_bytes + cur_offset;
+ else
+ t[0] = new_bytes + cur_offset;
+
+ for ( n = 1; n <= idx->count; n++ )
{
- /* at this point, `idx->offsets' can't be NULL */
- offset = idx->offsets[n];
- if ( !offset )
- offset = old_offset;
+ FT_ULong next_offset = idx->offsets[n] - 1;
- /* two sanity checks for invalid offset tables */
- else if ( offset < old_offset )
- offset = old_offset;
- else if ( offset - 1 >= idx->data_size && n < idx->count )
- offset = old_offset;
+ /* empty slot + two sanity checks for invalid offset tables */
+ if ( next_offset == 0 ||
+ next_offset < cur_offset ||
+ ( next_offset >= idx->data_size && n < idx->count ) )
+ next_offset = cur_offset;
- t[n] = idx->bytes + offset - 1;
+ if ( !pool )
+ t[n] = org_bytes + next_offset;
+ else
+ {
+ t[n] = new_bytes + next_offset + extra;
+
+ if ( next_offset != cur_offset )
+ {
+ FT_MEM_COPY( t[n - 1], org_bytes + cur_offset, t[n] - t[n - 1] );
+ t[n][0] = '\0';
+ t[n] += 1;
+ extra++;
+ }
+ }
- old_offset = offset;
+ cur_offset = next_offset;
}
*table = t;
+
+ if ( pool )
+ *pool = new_bytes;
}
Exit:
}
}
+ /* XXX: should check off2 does not exceed the end of this entry; */
+ /* at present, only truncate off2 at the end of this stream */
+ if ( off2 > stream->size + 1 ||
+ idx->data_offset > stream->size - off2 + 1 )
+ {
+ FT_ERROR(( "cff_index_access_element:"
+ " offset to next entry (%d)"
+ " exceeds the end of stream (%d)\n",
+ off2, stream->size - idx->data_offset + 1 ));
+ off2 = stream->size - idx->data_offset + 1;
+ }
+
/* access element */
if ( off1 && off2 > off1 )
{
}
+ /* get an entry from Name INDEX */
FT_LOCAL_DEF( FT_String* )
- cff_index_get_name( CFF_Index idx,
- FT_UInt element )
+ cff_index_get_name( CFF_Font font,
+ FT_UInt element )
{
+ CFF_Index idx = &font->name_index;
FT_Memory memory = idx->stream->memory;
FT_Byte* bytes;
FT_ULong byte_len;
}
+ /* get an entry from String INDEX */
+ FT_LOCAL_DEF( FT_String* )
+ cff_index_get_string( CFF_Font font,
+ FT_UInt element )
+ {
+ return ( element < font->num_strings )
+ ? (FT_String*)font->strings[element]
+ : NULL;
+ }
+
+
FT_LOCAL_DEF( FT_String* )
- cff_index_get_sid_string( CFF_Index idx,
- FT_UInt sid,
- FT_Service_PsCMaps psnames )
+ cff_index_get_sid_string( CFF_Font font,
+ FT_UInt sid )
{
/* value 0xFFFFU indicates a missing dictionary entry */
if ( sid == 0xFFFFU )
- return 0;
+ return NULL;
/* if it is not a standard string, return it */
if ( sid > 390 )
- return cff_index_get_name( idx, sid - 391 );
+ return cff_index_get_string( font, sid - 391 );
/* CID-keyed CFF fonts don't have glyph names */
- if ( !psnames )
- return 0;
-
- /* that's a standard string, fetch a copy from the PSName module */
- {
- FT_String* name = 0;
- const char* adobe_name = psnames->adobe_std_strings( sid );
-
+ if ( !font->psnames )
+ return NULL;
- if ( adobe_name )
- {
- FT_Memory memory = idx->stream->memory;
- FT_Error error;
-
-
- (void)FT_STRDUP( name, adobe_name );
-
- FT_UNUSED( error );
- }
-
- return name;
- }
+ /* this is a standard string */
+ return (FT_String *)font->psnames->adobe_std_strings( sid );
}
FT_UInt num_glyphs,
FT_Memory memory )
{
- FT_Error error = FT_Err_Ok;
+ FT_Error error = CFF_Err_Ok;
FT_UInt i;
FT_Long j;
FT_UShort max_cid = 0;
goto Exit;
for ( i = 0; i < num_glyphs; i++ )
+ {
if ( charset->sids[i] > max_cid )
max_cid = charset->sids[i];
- max_cid++;
+ }
- if ( FT_NEW_ARRAY( charset->cids, max_cid ) )
+ if ( FT_NEW_ARRAY( charset->cids, (FT_ULong)max_cid + 1 ) )
goto Exit;
/* When multiple GIDs map to the same CID, we choose the lowest */
FT_UInt result = 0;
- if ( cid < charset->max_cid )
+ if ( cid <= charset->max_cid )
result = charset->cids[cid];
return result;
goto Exit;
for ( j = 1; j < num_glyphs; j++ )
- {
- FT_UShort sid = FT_GET_USHORT();
-
-
- /* this constant is given in the CFF specification */
- if ( sid < 65000L )
- charset->sids[j] = sid;
- else
- {
- FT_TRACE0(( "cff_charset_load:"
- " invalid SID value %d set to zero\n", sid ));
- charset->sids[j] = 0;
- }
- }
+ charset->sids[j] = FT_GET_USHORT();
FT_FRAME_EXIT();
}
goto Exit;
}
- /* check whether the range contains at least one valid glyph; */
- /* the constant is given in the CFF specification */
- if ( glyph_sid >= 65000L ) {
- FT_ERROR(( "cff_charset_load: invalid SID range\n" ));
- error = CFF_Err_Invalid_File_Format;
- goto Exit;
- }
-
/* try to rescue some of the SIDs if `nleft' is too large */
- if ( nleft > 65000L - 1L || glyph_sid >= 65000L - nleft ) {
- FT_ERROR(( "cff_charset_load: invalid SID range trimmed\n" ));
- nleft = ( FT_UInt )( 65000L - 1L - glyph_sid );
+ if ( glyph_sid > 0xFFFFL - nleft )
+ {
+ FT_ERROR(( "cff_charset_load: invalid SID range trimmed"
+ " nleft=%d -> %d\n", nleft, 0xFFFFL - glyph_sid ));
+ nleft = ( FT_UInt )( 0xFFFFL - glyph_sid );
}
/* Fill in the range of sids -- `nleft + 1' glyphs. */
if ( gid != 0 )
{
encoding->codes[j] = (FT_UShort)gid;
-
- if ( encoding->count < j + 1 )
- encoding->count = j + 1;
+ encoding->count = j + 1;
}
else
{
if ( error )
goto Exit;
- font->num_local_subrs = font->local_subrs_index.count;
error = cff_index_get_pointers( &font->local_subrs_index,
- &font->local_subrs );
+ &font->local_subrs, NULL );
if ( error )
goto Exit;
}
FT_Memory memory = stream->memory;
FT_ULong base_offset;
CFF_FontRecDict dict;
+ CFF_IndexRec string_index;
FT_ZERO( font );
+ FT_ZERO( &string_index );
font->stream = stream;
font->memory = memory;
/* read the name, top dict, string and global subrs index */
if ( FT_SET_ERROR( cff_index_init( &font->name_index,
- stream, 0 ) ) ||
+ stream, 0 ) ) ||
FT_SET_ERROR( cff_index_init( &font->font_dict_index,
- stream, 0 ) ) ||
- FT_SET_ERROR( cff_index_init( &font->string_index,
- stream, 0 ) ) ||
+ stream, 0 ) ) ||
+ FT_SET_ERROR( cff_index_init( &string_index,
+ stream, 1 ) ) ||
FT_SET_ERROR( cff_index_init( &font->global_subrs_index,
- stream, 1 ) ) )
+ stream, 1 ) ) ||
+ FT_SET_ERROR( cff_index_get_pointers( &string_index,
+ &font->strings,
+ &font->string_pool ) ) )
goto Exit;
+ font->num_strings = string_index.count;
+
/* well, we don't really forget the `disabled' fonts... */
font->num_faces = font->name_index.count;
if ( face_index >= (FT_Int)font->num_faces )
goto Exit;
}
- /* explicit the global subrs */
- font->num_global_subrs = font->global_subrs_index.count;
- font->num_glyphs = font->charstrings_index.count;
+ font->num_glyphs = font->charstrings_index.count;
error = cff_index_get_pointers( &font->global_subrs_index,
- &font->global_subrs ) ;
+ &font->global_subrs, NULL );
if ( error )
goto Exit;
/* get the font name (/CIDFontName for CID-keyed fonts, */
/* /FontName otherwise) */
- font->font_name = cff_index_get_name( &font->name_index, face_index );
+ font->font_name = cff_index_get_name( font, face_index );
Exit:
+ cff_index_done( &string_index );
+
return error;
}
cff_index_done( &font->global_subrs_index );
- cff_index_done( &font->string_index );
cff_index_done( &font->font_dict_index );
cff_index_done( &font->name_index );
cff_index_done( &font->charstrings_index );
CFF_Done_FD_Select( &font->fd_select, font->stream );
- if (font->font_info != NULL)
- {
- FT_FREE( font->font_info->version );
- FT_FREE( font->font_info->notice );
- FT_FREE( font->font_info->full_name );
- FT_FREE( font->font_info->family_name );
- FT_FREE( font->font_info->weight );
- FT_FREE( font->font_info );
- }
+ FT_FREE( font->font_info );
- FT_FREE( font->registry );
- FT_FREE( font->ordering );
-
- FT_FREE( font->global_subrs );
FT_FREE( font->font_name );
+ FT_FREE( font->global_subrs );
+ FT_FREE( font->strings );
+ FT_FREE( font->string_pool );
}
/* */
/* OpenType & CFF data/program tables loader (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2007, 2008 by */
+/* Copyright 1996-2001, 2002, 2003, 2007, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
#include <ft2build.h>
#include "cfftypes.h"
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
FT_BEGIN_HEADER
FT_LOCAL( FT_String* )
- cff_index_get_name( CFF_Index idx,
- FT_UInt element );
+ cff_index_get_string( CFF_Font font,
+ FT_UInt element );
FT_LOCAL( FT_String* )
- cff_index_get_sid_string( CFF_Index idx,
- FT_UInt sid,
- FT_Service_PsCMaps psnames );
+ cff_index_get_sid_string( CFF_Font font,
+ FT_UInt sid );
FT_LOCAL( FT_Error )
cff_index_forget_element( CFF_Index idx,
FT_Byte** pbytes );
+ FT_LOCAL( FT_String* )
+ cff_index_get_name( CFF_Font font,
+ FT_UInt element );
+
FT_LOCAL( FT_UInt )
cff_charset_cid_to_gindex( CFF_Charset charset,
/* */
/* OpenType objects manager (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
#include FT_TRUETYPE_IDS_H
#include FT_TRUETYPE_TAGS_H
#include FT_INTERNAL_SFNT_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
-#include FT_INTERNAL_POSTSCRIPT_HINTS_H
#include "cffobjs.h"
#include "cffload.h"
#include "cffcmap.h"
{
CFF_Face face = (CFF_Face)size->root.face;
CFF_Font font = (CFF_Font)face->extra.data;
- PSHinter_Service pshinter = (PSHinter_Service)font->pshinter;
+ PSHinter_Service pshinter = font->pshinter;
FT_Module module;
{
CFF_Face face = (CFF_Face)slot->face;
CFF_Font font = (CFF_Font)face->extra.data;
- PSHinter_Service pshinter = (PSHinter_Service)font->pshinter;
+ PSHinter_Service pshinter = font->pshinter;
if ( pshinter )
}
+ /* Strip all subset prefixes of the form `ABCDEF+'. Usually, there */
+ /* is only one, but font names like `APCOOG+JFABTD+FuturaBQ-Bold' */
+ /* have been seen in the wild. */
+
+ static void
+ remove_subset_prefix( FT_String* name )
+ {
+ FT_Int32 idx = 0;
+ FT_Int32 length = strlen( name ) + 1;
+ FT_Bool continue_search = 1;
+
+
+ while ( continue_search )
+ {
+ if ( length >= 7 && name[6] == '+' )
+ {
+ for ( idx = 0; idx < 6; idx++ )
+ {
+ /* ASCII uppercase letters */
+ if ( !( 'A' <= name[idx] && name[idx] <= 'Z' ) )
+ continue_search = 0;
+ }
+
+ if ( continue_search )
+ {
+ for ( idx = 7; idx < length; idx++ )
+ name[idx - 7] = name[idx];
+ }
+ }
+ else
+ continue_search = 0;
+ }
+ }
+
+
FT_LOCAL_DEF( FT_Error )
cff_face_init( FT_Stream stream,
FT_Face cffface, /* CFF_Face */
FT_Library library = cffface->driver->root.library;
-#if 0
- FT_FACE_FIND_GLOBAL_SERVICE( face, sfnt, SFNT );
- FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_NAMES );
- FT_FACE_FIND_GLOBAL_SERVICE( face, pshinter, POSTSCRIPT_HINTER );
-
- if ( !sfnt )
- goto Bad_Format;
-#else
sfnt = (SFNT_Service)FT_Get_Module_Interface(
library, "sfnt" );
if ( !sfnt )
pshinter = (PSHinter_Service)FT_Get_Module_Interface(
library, "pshinter" );
-#endif
/* create input stream from resource */
if ( FT_STREAM_SEEK( 0 ) )
goto Exit;
cff->pshinter = pshinter;
- cff->psnames = (void*)psnames;
+ cff->psnames = psnames;
cffface->face_index = face_index;
/* compute number of glyphs */
if ( dict->cid_registry != 0xFFFFU )
- cffface->num_glyphs = cff->charset.max_cid;
+ cffface->num_glyphs = cff->charset.max_cid + 1;
else
cffface->num_glyphs = cff->charstrings_index.count;
(FT_Short)( dict->underline_thickness >> 16 );
/* retrieve font family & style name */
- cffface->family_name = cff_index_get_name( &cff->name_index,
- face_index );
-
+ cffface->family_name = cff_index_get_name( cff, face_index );
if ( cffface->family_name )
{
- char* full = cff_index_get_sid_string( &cff->string_index,
- dict->full_name,
- psnames );
+ char* full = cff_index_get_sid_string( cff,
+ dict->full_name );
char* fullp = full;
char* family = cffface->family_name;
- char* family_name = 0;
+ char* family_name = NULL;
+ remove_subset_prefix( cffface->family_name );
+
if ( dict->family_name )
{
- family_name = cff_index_get_sid_string( &cff->string_index,
- dict->family_name,
- psnames);
+ family_name = cff_index_get_sid_string( cff,
+ dict->family_name );
if ( family_name )
family = family_name;
}
}
break;
}
-
- if ( family_name )
- FT_FREE( family_name );
- FT_FREE( full );
}
}
else
{
char *cid_font_name =
- cff_index_get_sid_string( &cff->string_index,
- dict->cid_font_name,
- psnames );
+ cff_index_get_sid_string( cff,
+ dict->cid_font_name );
/* do we have a `/FontName' for a CID-keyed font? */
if ( cid_font_name )
- cffface->family_name = cid_font_name;
+ cffface->family_name = cff_strcpy( memory, cid_font_name );
}
if ( style_name )
flags |= FT_STYLE_FLAG_ITALIC;
{
- char *weight = cff_index_get_sid_string( &cff->string_index,
- dict->weight,
- psnames );
+ char *weight = cff_index_get_sid_string( cff,
+ dict->weight );
if ( weight )
if ( !ft_strcmp( weight, "Bold" ) ||
!ft_strcmp( weight, "Black" ) )
flags |= FT_STYLE_FLAG_BOLD;
- FT_FREE( weight );
}
/* double check */
{
cmap = cffface->charmaps[nn];
- /* Windows Unicode (3,1)? */
- if ( cmap->platform_id == 3 && cmap->encoding_id == 1 )
+ /* Windows Unicode? */
+ if ( cmap->platform_id == TT_PLATFORM_MICROSOFT &&
+ cmap->encoding_id == TT_MS_ID_UNICODE_CS )
goto Skip_Unicode;
- /* Deprecated Unicode platform id? */
- if ( cmap->platform_id == 0 )
- goto Skip_Unicode; /* Standard Unicode (deprecated) */
+ /* Apple Unicode platform id? */
+ if ( cmap->platform_id == TT_PLATFORM_APPLE_UNICODE )
+ goto Skip_Unicode; /* Apple Unicode */
}
/* since CID-keyed fonts don't contain glyph names, we can't */
if ( pure_cff && cff->top_font.font_dict.cid_registry != 0xFFFFU )
goto Exit;
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ if ( nn + 1 > FT_MAX_CHARMAP_CACHEABLE )
+ {
+ FT_ERROR(( "cff_face_init: no Unicode cmap is found, "
+ "and too many subtables (%d) to add synthesized cmap\n",
+ nn ));
+ goto Exit;
+ }
+#endif
+
/* we didn't find a Unicode charmap -- synthesize one */
cmaprec.face = cffface;
- cmaprec.platform_id = 3;
- cmaprec.encoding_id = 1;
+ cmaprec.platform_id = TT_PLATFORM_MICROSOFT;
+ cmaprec.encoding_id = TT_MS_ID_UNICODE_CS;
cmaprec.encoding = FT_ENCODING_UNICODE;
nn = (FT_UInt)cffface->num_charmaps;
- FT_CMap_New( &FT_CFF_CMAP_UNICODE_CLASS_REC_GET, NULL, &cmaprec, NULL );
+ error = FT_CMap_New( &FT_CFF_CMAP_UNICODE_CLASS_REC_GET, NULL,
+ &cmaprec, NULL );
+ if ( error && FT_Err_No_Unicode_Glyph_Name != error )
+ goto Exit;
+ error = FT_Err_Ok;
/* if no Unicode charmap was previously selected, select this one */
if ( cffface->charmap == NULL && nn != (FT_UInt)cffface->num_charmaps )
cffface->charmap = cffface->charmaps[nn];
Skip_Unicode:
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ if ( nn > FT_MAX_CHARMAP_CACHEABLE )
+ {
+ FT_ERROR(( "cff_face_init: Unicode cmap is found, "
+ "but too many preceding subtables (%d) to access\n",
+ nn - 1 ));
+ goto Exit;
+ }
+#endif
if ( encoding->count > 0 )
{
FT_CMap_Class clazz;
cmaprec.face = cffface;
- cmaprec.platform_id = 7; /* Adobe platform id */
+ cmaprec.platform_id = TT_PLATFORM_ADOBE; /* Adobe platform id */
if ( encoding->offset == 0 )
{
clazz = &FT_CFF_CMAP_ENCODING_CLASS_REC_GET;
}
- FT_CMap_New( clazz, NULL, &cmaprec, NULL );
+ error = FT_CMap_New( clazz, NULL, &cmaprec, NULL );
}
}
}
/* */
/* CFF token stream parser (body) */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
FT_UInt nib;
FT_UInt phase;
- FT_Long result, number, rest, exponent;
+ FT_Long result, number, exponent;
FT_Int sign = 0, exponent_sign = 0;
FT_Long exponent_add, integer_length, fraction_length;
if ( scaling )
- *scaling = 0;
+ *scaling = 0;
result = 0;
number = 0;
- rest = 0;
exponent = 0;
exponent_add = 0;
integer_length = 0;
fraction_length = 0;
- FT_UNUSED( rest );
-
/* First of all, read the integer part. */
phase = 4;
goto Exit;
/* Remove non-significant digits. */
- if ( integer_length < 0 ) {
+ if ( integer_length < 0 )
+ {
number /= power_tens[-integer_length];
fraction_length += integer_length;
}
+ /* this can only happen if exponent was non-zero */
+ if ( fraction_length == 10 )
+ {
+ number /= 10;
+ fraction_length -= 1;
+ }
+
/* Convert into 16.16 format. */
if ( fraction_length > 0 )
{
clazz[i].count_offset = 0;
*output_class = clazz;
- return FT_Err_Ok;
+ return CFF_Err_Ok;
}
/* */
/* The FreeType position independent code services for cff module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2010 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
}
}
+
FT_Error
- cff_driver_class_pic_init( FT_Library library )
+ cff_driver_class_pic_init( FT_Library library )
{
- FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = FT_Err_Ok;
- CffModulePIC* container;
- FT_Memory memory = library->memory;
+ FT_PIC_Container* pic_container = &library->pic_container;
+ FT_Error error = CFF_Err_Ok;
+ CffModulePIC* container;
+ FT_Memory memory = library->memory;
+
/* allocate pointer, clear and set global container pointer */
if ( FT_ALLOC ( container, sizeof ( *container ) ) )
return error;
- FT_MEM_SET( container, 0, sizeof(*container) );
+ FT_MEM_SET( container, 0, sizeof ( *container ) );
pic_container->cff = container;
/* initialize pointer table - this is how the module usually expects this data */
/* Basic OpenType/CFF type definitions and interface (specification */
/* only). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2006, 2007, 2008 by */
+/* Copyright 1996-2001, 2002, 2003, 2006, 2007, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_TYPE1_TABLES_H
+#include FT_INTERNAL_SERVICE_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
+#include FT_INTERNAL_POSTSCRIPT_HINTS_H
FT_BEGIN_HEADER
CFF_PrivateRec private_dict;
CFF_IndexRec local_subrs_index;
- FT_UInt num_local_subrs;
- FT_Byte** local_subrs;
+ FT_Byte** local_subrs; /* array of pointers into Local Subrs INDEX data */
} CFF_SubFontRec, *CFF_SubFont;
CFF_IndexRec name_index;
CFF_IndexRec top_dict_index;
- CFF_IndexRec string_index;
CFF_IndexRec global_subrs_index;
CFF_EncodingRec encoding;
CFF_IndexRec local_subrs_index;
FT_String* font_name;
- FT_UInt num_global_subrs;
+
+ /* array of pointers into Global Subrs INDEX data */
FT_Byte** global_subrs;
+ /* array of pointers into String INDEX data stored at string_pool */
+ FT_UInt num_strings;
+ FT_Byte** strings;
+ FT_Byte* string_pool;
+
CFF_SubFontRec top_font;
FT_UInt num_subfonts;
CFF_SubFont subfonts[CFF_MAX_CID_FONTS];
CFF_FDSelectRec fd_select;
/* interface to PostScript hinter */
- void* pshinter;
+ PSHinter_Service pshinter;
/* interface to Postscript Names service */
- void* psnames;
+ FT_Service_PsCMaps psnames;
/* since version 2.3.0 */
PS_FontInfoRec* font_info; /* font info dictionary */
FT_Int32 load_flags )
{
CID_GlyphSlot glyph = (CID_GlyphSlot)cidglyph;
- CID_Size size = (CID_Size)cidsize;
FT_Error error;
T1_DecoderRec decoder;
CID_Face face = (CID_Face)cidglyph->face;
cidglyph->format = FT_GLYPH_FORMAT_OUTLINE;
- if ( size && cidsize->metrics.y_ppem < 24 )
+ if ( cidsize->metrics.y_ppem < 24 )
cidglyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION;
/* apply the font matrix */
/* */
/* CID objects manager (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
cid_size_init( FT_Size cidsize ) /* CID_Size */
{
CID_Size size = (CID_Size)cidsize;
- FT_Error error = 0;
+ FT_Error error = CID_Err_Ok;
PSH_Globals_Funcs funcs = cid_size_get_globals_funcs( size );
/* */
/* TrueTypeGX/AAT common tables validation (body). */
/* */
-/* Copyright 2004, 2005, 2009 */
+/* Copyright 2004, 2005, 2009, 2010 */
/* by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
nnames = FT_Get_Sfnt_Name_Count( valid->face );
for ( i = 0; i < nnames; i++ )
{
- if ( FT_Get_Sfnt_Name( valid->face, i, &name ) != FT_Err_Ok )
+ if ( FT_Get_Sfnt_Name( valid->face, i, &name ) != GXV_Err_Ok )
continue ;
if ( name.name_id == name_index )
/* parse compressed PCF fonts, as found with many X11 server */
/* distributions. */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006, 2009 by */
+/* Copyright 2002, 2003, 2004, 2005, 2006, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
{
FT_ULong sz = (FT_ULong)size * items;
FT_Error error;
- FT_Pointer p;
+ FT_Pointer p = NULL;
(void)FT_ALLOC( p, sz );
ft_gzip_file_fill_output( FT_GZipFile zip )
{
z_stream* zstream = &zip->zstream;
- FT_Error error = 0;
+ FT_Error error = Gzip_Err_Ok;
zip->cursor = zip->buffer;
ft_gzip_file_io( zip, 0, NULL, 0 );
FT_FREE( zip_buff );
}
- error = 0;
+ error = Gzip_Err_Ok;
}
}
{
FT_LzwState lzw = &zip->lzw;
FT_ULong count;
- FT_Error error = 0;
+ FT_Error error = LZW_Err_Ok;
zip->cursor = zip->buffer;
otv_MathItalicsCorrectionInfo_validate(
table + MathTopAccentAttachment, valid, FALSE );
- if ( ExtendedShapeCoverage ) {
+ if ( ExtendedShapeCoverage )
+ {
OTV_NAME_ENTER( "ExtendedShapeCoverage" );
otv_Coverage_validate( table + ExtendedShapeCoverage, valid, -1 );
OTV_EXIT;
*ot_jstf = (FT_Bytes)jstf;
Exit:
- if ( error ) {
+ if ( error )
+ {
FT_Memory memory = FT_FACE_MEMORY( face );
FT_FREE( gsub );
FT_FREE( jstf );
}
+
{
FT_Memory memory = FT_FACE_MEMORY( face );
#include FT_LZW_H
#include FT_ERRORS_H
#include FT_BDF_H
+#include FT_TRUETYPE_IDS_H
#include "pcf.h"
#include "pcfdrivr.h"
{
prop = &face->properties[i];
- if ( prop ) {
+ if ( prop )
+ {
FT_FREE( prop->name );
if ( prop->isString )
FT_FREE( prop->value.atom );
charmap.face = FT_FACE( face );
charmap.encoding = FT_ENCODING_NONE;
- charmap.platform_id = 0;
- charmap.encoding_id = 0;
+ /* initial platform/encoding should indicate unset status? */
+ charmap.platform_id = TT_PLATFORM_APPLE_UNICODE;
+ charmap.encoding_id = TT_APPLE_ID_DEFAULT;
if ( unicode_charmap )
{
charmap.encoding = FT_ENCODING_UNICODE;
- charmap.platform_id = 3;
- charmap.encoding_id = 1;
+ charmap.platform_id = TT_PLATFORM_MICROSOFT;
+ charmap.encoding_id = TT_MS_ID_UNICODE_CS;
}
error = FT_CMap_New( &pcf_cmap_class, NULL, &charmap, NULL );
FreeType font driver for pcf fonts
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+ 2010 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
face->nmetrics = nmetrics;
+ if ( !nmetrics )
+ return PCF_Err_Invalid_Table;
+
FT_TRACE4(( "pcf_get_metrics:\n" ));
FT_TRACE4(( " number of metrics: %d\n", nmetrics ));
/* */
/* FreeType PFR driver interface (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2006, 2008 by */
+/* Copyright 2002, 2003, 2004, 2006, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
if ( gindex < phys->num_chars )
{
*anadvance = phys->chars[gindex].advance;
- error = 0;
+ error = PFR_Err_Ok;
}
}
/* */
/* FreeType PFR glyph loader (body). */
/* */
-/* Copyright 2002, 2003, 2005, 2007 by */
+/* Copyright 2002, 2003, 2005, 2007, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
FT_Byte* p,
FT_Byte* limit )
{
- FT_Error error = 0;
+ FT_Error error = PFR_Err_Ok;
FT_Memory memory = glyph->loader->memory;
FT_UInt flags, x_count, y_count, i, count, mask;
FT_Int x;
{
PFR_CHECK( 1 );
count = PFR_NEXT_BYTE( p );
- x_count = ( count & 15 );
- y_count = ( count >> 4 );
+ x_count = count & 15;
+ y_count = count >> 4;
}
else
{
case 2: /* horizontal line to */
FT_TRACE6(( "- horizontal line to cx.%d", format_low ));
- if ( format_low > x_count )
+ if ( format_low >= x_count )
goto Failure;
pos[0].x = glyph->x_control[format_low];
pos[0].y = pos[3].y;
case 3: /* vertical line to */
FT_TRACE6(( "- vertical line to cy.%d", format_low ));
- if ( format_low > y_count )
+ if ( format_low >= y_count )
goto Failure;
pos[0].x = pos[3].x;
pos[0].y = glyph->y_control[format_low];
case 0: /* 8-bit index */
PFR_CHECK( 1 );
idx = PFR_NEXT_BYTE( p );
- if ( idx > x_count )
+ if ( idx >= x_count )
goto Failure;
cur->x = glyph->x_control[idx];
FT_TRACE7(( " cx#%d", idx ));
case 0: /* 8-bit index */
PFR_CHECK( 1 );
idx = PFR_NEXT_BYTE( p );
- if ( idx > y_count )
+ if ( idx >= y_count )
goto Failure;
cur->y = glyph->y_control[idx];
FT_TRACE7(( " cy#%d", idx ));
FT_Byte* p,
FT_Byte* limit )
{
- FT_Error error = 0;
+ FT_Error error = PFR_Err_Ok;
FT_GlyphLoader loader = glyph->loader;
FT_Memory memory = loader->memory;
PFR_SubGlyph subglyph;
FT_UInt new_max = ( org_count + count + 3 ) & (FT_UInt)-4;
+ /* we arbitrarily limit the number of subglyphs */
+ /* to avoid endless recursion */
+ if ( new_max > 64 )
+ {
+ error = PFR_Err_Invalid_Table;
+ FT_ERROR(( "pfr_glyph_load_compound:"
+ " too many compound glyphs components\n" ));
+ goto Exit;
+ }
+
if ( FT_RENEW_ARRAY( glyph->subs, glyph->max_subs, new_max ) )
goto Exit;
count = glyph->num_subs - old_count;
+ FT_TRACE4(( "compound glyph with %d elements (offset %lu):\n",
+ count, offset ));
+
/* now, load each individual glyph */
for ( n = 0; n < count; n++ )
{
PFR_SubGlyph subglyph;
+ FT_TRACE4(( "subglyph %d:\n", n ));
+
subglyph = glyph->subs + old_count + n;
old_points = base->n_points;
subglyph->gps_offset,
subglyph->gps_size );
if ( error )
- goto Exit;
+ break;
/* note that `glyph->subs' might have been re-allocated */
subglyph = glyph->subs + old_count + n;
/* proceed to next sub-glyph */
}
+
+ FT_TRACE4(( "end compound glyph with %d elements\n", count ));
}
else
{
+ FT_TRACE4(( "simple glyph (offset %lu)\n", offset ));
+
/* load a simple glyph */
error = pfr_glyph_load_simple( glyph, p, limit );
}
-
-
-
FT_LOCAL_DEF( FT_Error )
pfr_glyph_load( PFR_Glyph glyph,
FT_Stream stream,
/* */
/* FreeType PFR loader (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2007, 2009 by */
+/* Copyright 2002, 2003, 2004, 2005, 2007, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
PFR_ExtraItem item_list,
FT_Pointer item_data )
{
- FT_Error error = 0;
+ FT_Error error = PFR_Err_Ok;
FT_Byte* p = *pp;
FT_UInt num_items, item_type, item_size;
PFR_Strike strike;
FT_UInt flags0;
FT_UInt n, count, size1;
- FT_Error error = 0;
+ FT_Error error = PFR_Err_Ok;
PFR_CHECK( 5 );
FT_Byte* limit,
PFR_PhyFont phy_font )
{
- FT_Error error = 0;
+ FT_Error error = PFR_Err_Ok;
FT_Memory memory = phy_font->memory;
FT_PtrDist len = limit - p;
{
FT_UInt count, num_vert, num_horz;
FT_Int* snaps;
- FT_Error error = 0;
+ FT_Error error = PFR_Err_Ok;
FT_Memory memory = phy_font->memory;
FT_Byte* limit,
PFR_PhyFont phy_font )
{
- PFR_KernItem item;
- FT_Error error = 0;
+ PFR_KernItem item = NULL;
+ FT_Error error = PFR_Err_Ok;
FT_Memory memory = phy_font->memory;
FT_Memory memory,
FT_String* *astring )
{
- FT_Error error = 0;
+ FT_Error error = PFR_Err_Ok;
FT_String* result = NULL;
FT_UInt n, ok;
/* */
/* FreeType PFR object methods (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
+/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
#include "pfrsbit.h"
#include FT_OUTLINE_H
#include FT_INTERNAL_DEBUG_H
+#include FT_TRUETYPE_IDS_H
#include "pfrerror.h"
break;
if ( nn == phy_font->num_chars )
- pfrface->face_flags = 0; /* not scalable */
+ {
+ if ( phy_font->num_strikes > 0 )
+ pfrface->face_flags = 0; /* not scalable */
+ else
+ {
+ FT_ERROR(( "pfr_face_init: font doesn't contain glyphs\n" ));
+ error = PFR_Err_Invalid_File_Format;
+ goto Exit;
+ }
+ }
}
if ( (phy_font->flags & PFR_PHY_PROPORTIONAL) == 0 )
charmap.face = pfrface;
- charmap.platform_id = 3;
- charmap.encoding_id = 1;
+ charmap.platform_id = TT_PLATFORM_MICROSOFT;
+ charmap.encoding_id = TT_MS_ID_UNICODE_CS;
charmap.encoding = FT_ENCODING_UNICODE;
- FT_CMap_New( &pfr_cmap_class_rec, NULL, &charmap, NULL );
+ error = FT_CMap_New( &pfr_cmap_class_rec, NULL, &charmap, NULL );
#if 0
/* Select default charmap */
/* */
/* FreeType PFR bitmap loader (body). */
/* */
-/* Copyright 2002, 2003, 2006, 2009 by */
+/* Copyright 2002, 2003, 2006, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
FT_Long *aadvance,
FT_UInt *aformat )
{
- FT_Error error = 0;
+ FT_Error error = PFR_Err_Ok;
FT_Byte flags;
FT_Char b;
FT_Byte* p = *pdata;
FT_Bool decreasing,
FT_Bitmap* target )
{
- FT_Error error = 0;
+ FT_Error error = PFR_Err_Ok;
PFR_BitWriterRec writer;
/* */
/* AFM parser (body). */
/* */
-/* Copyright 2006, 2007, 2008, 2009 by */
+/* Copyright 2006, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
FT_Byte* base,
FT_Byte* limit )
{
- AFM_Stream stream;
+ AFM_Stream stream = NULL;
FT_Error error;
typedef struct AFM_ValueRec_
{
enum AFM_ValueType_ type;
- union {
+ union
+ {
char* s;
FT_Fixed f;
FT_Int i;
/* */
/* Auxiliary functions for PostScript fonts (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
FT_Error error;
+ /* this might happen in invalid fonts */
+ if ( !outline )
+ {
+ FT_ERROR(( "t1_builder_add_contour: no outline to add points to\n" ));
+ return PSaux_Err_Invalid_File_Format;
+ }
+
if ( !builder->load_points )
{
outline->n_contours++;
if ( builder->parse_state == T1_Parse_Have_Path )
error = PSaux_Err_Ok;
- else if ( builder->parse_state == T1_Parse_Have_Moveto )
+ else
{
builder->parse_state = T1_Parse_Have_Path;
error = t1_builder_add_contour( builder );
#endif
- /* we don't want to touch the source code -- use macro trick */
-#define start_point t1_builder_start_point
-#define check_points t1_builder_check_points
-#define add_point t1_builder_add_point
-#define add_point1 t1_builder_add_point1
-#define add_contour t1_builder_add_contour
-#define close_contour t1_builder_close_contour
-
-
/* compute random seed from stack address of parameter */
seed = (FT_Fixed)( ( (FT_PtrDist)(char*)&seed ^
(FT_PtrDist)(char*)&decoder ^
decoder->flex_state = 1;
decoder->num_flex_vectors = 0;
- if ( start_point( builder, x, y ) ||
- check_points( builder, 6 ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok ||
+ ( error = t1_builder_check_points( builder, 6 ) )
+ != PSaux_Err_Ok )
goto Fail;
break;
/* point without adding any point to the outline */
idx = decoder->num_flex_vectors++;
if ( idx > 0 && idx < 7 )
- add_point( builder,
- x,
- y,
- (FT_Byte)( idx == 3 || idx == 6 ) );
+ t1_builder_add_point( builder,
+ x,
+ y,
+ (FT_Byte)( idx == 3 || idx == 6 ) );
}
break;
}
/* the two `results' are popped by the following setcurrentpoint */
+ top[0] = x;
+ top[1] = y;
known_othersubr_result_cnt = 2;
break;
case op_endchar:
FT_TRACE4(( " endchar\n" ));
- close_contour( builder );
+ t1_builder_close_contour( builder );
/* close hints recording session */
if ( hinter )
/* if there is no path, `closepath' is a no-op */
if ( builder->parse_state == T1_Parse_Have_Path ||
builder->parse_state == T1_Parse_Have_Moveto )
- close_contour( builder );
+ t1_builder_close_contour( builder );
builder->parse_state = T1_Parse_Have_Width;
break;
case op_hlineto:
FT_TRACE4(( " hlineto" ));
- if ( start_point( builder, x, y ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok )
goto Fail;
x += top[0];
case op_hvcurveto:
FT_TRACE4(( " hvcurveto" ));
- if ( start_point( builder, x, y ) ||
- check_points( builder, 3 ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok ||
+ ( error = t1_builder_check_points( builder, 3 ) )
+ != PSaux_Err_Ok )
goto Fail;
x += top[0];
- add_point( builder, x, y, 0 );
+ t1_builder_add_point( builder, x, y, 0 );
x += top[1];
y += top[2];
- add_point( builder, x, y, 0 );
+ t1_builder_add_point( builder, x, y, 0 );
y += top[3];
- add_point( builder, x, y, 1 );
+ t1_builder_add_point( builder, x, y, 1 );
break;
case op_rlineto:
FT_TRACE4(( " rlineto" ));
- if ( start_point( builder, x, y ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok )
goto Fail;
x += top[0];
y += top[1];
Add_Line:
- if ( add_point1( builder, x, y ) )
+ if ( ( error = t1_builder_add_point1( builder, x, y ) )
+ != PSaux_Err_Ok )
goto Fail;
break;
case op_rrcurveto:
FT_TRACE4(( " rrcurveto" ));
- if ( start_point( builder, x, y ) ||
- check_points( builder, 3 ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok ||
+ ( error = t1_builder_check_points( builder, 3 ) )
+ != PSaux_Err_Ok )
goto Fail;
x += top[0];
y += top[1];
- add_point( builder, x, y, 0 );
+ t1_builder_add_point( builder, x, y, 0 );
x += top[2];
y += top[3];
- add_point( builder, x, y, 0 );
+ t1_builder_add_point( builder, x, y, 0 );
x += top[4];
y += top[5];
- add_point( builder, x, y, 1 );
+ t1_builder_add_point( builder, x, y, 1 );
break;
case op_vhcurveto:
FT_TRACE4(( " vhcurveto" ));
- if ( start_point( builder, x, y ) ||
- check_points( builder, 3 ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok ||
+ ( error = t1_builder_check_points( builder, 3 ) )
+ != PSaux_Err_Ok )
goto Fail;
y += top[0];
- add_point( builder, x, y, 0 );
+ t1_builder_add_point( builder, x, y, 0 );
x += top[1];
y += top[2];
- add_point( builder, x, y, 0 );
+ t1_builder_add_point( builder, x, y, 0 );
x += top[3];
- add_point( builder, x, y, 1 );
+ t1_builder_add_point( builder, x, y, 1 );
break;
case op_vlineto:
FT_TRACE4(( " vlineto" ));
- if ( start_point( builder, x, y ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok )
goto Fail;
y += top[0];
goto Syntax_Error;
}
else
+ ...
#endif
- decoder->flex_state = 0;
+
+ x = top[0];
+ y = top[1];
+ decoder->flex_state = 0;
break;
case op_unknown15:
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 */
+/* by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
/* process secondary hints to `selected' points */
if ( num_masks > 1 && glyph->num_points > 0 )
{
- first = mask->end_point;
+ /* the `endchar' op can reduce the number of points */
+ first = mask->end_point > glyph->num_points
+ ? glyph->num_points
+ : mask->end_point;
mask++;
for ( ; num_masks > 1; num_masks--, mask++ )
{
FT_Int count;
- next = mask->end_point;
+ next = mask->end_point > glyph->num_points
+ ? glyph->num_points
+ : mask->end_point;
count = next - first;
if ( count > 0 )
{
point->cur_u = hint->cur_pos + hint->cur_len +
FT_MulFix( delta - hint->org_len, scale );
- else if ( hint->org_len > 0 )
+ else /* hint->org_len > 0 */
point->cur_u = hint->cur_pos +
FT_MulDiv( delta, hint->cur_len,
hint->org_len );
- else
- point->cur_u = hint->cur_pos;
}
psh_point_set_fitted( point );
}
/* PostScript hinter global hinting management (body). */
/* Inspired by the new auto-hinter module. */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2006 by */
+/* Copyright 2001, 2002, 2003, 2004, 2006, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
T1_Private* priv,
PSH_Globals *aglobals )
{
- PSH_Globals globals;
+ PSH_Globals globals = NULL;
FT_Error error;
/* */
/* The FreeType position independent code services for pshinter module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2010 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
}
}
+
FT_Error
- pshinter_module_class_pic_init( FT_Library library )
+ pshinter_module_class_pic_init( FT_Library library )
{
- FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = FT_Err_Ok;
- PSHinterPIC* container;
- FT_Memory memory = library->memory;
+ FT_PIC_Container* pic_container = &library->pic_container;
+ FT_Error error = PSH_Err_Ok;
+ PSHinterPIC* container;
+ FT_Memory memory = library->memory;
+
/* allocate pointer, clear and set global container pointer */
if ( FT_ALLOC ( container, sizeof ( *container ) ) )
return error;
- FT_MEM_SET( container, 0, sizeof(*container) );
+ FT_MEM_SET( container, 0, sizeof ( *container ) );
pic_container->pshinter = container;
/* add call to initialization function when you add new scripts */
if ( count == 0 )
{
+ /* No unicode chars here! */
FT_FREE( table->maps );
if ( !error )
- error = PSnames_Err_Invalid_Argument; /* No unicode chars here! */
+ error = PSnames_Err_No_Unicode_Glyph_Name;
}
- else {
+ else
+ {
/* Reallocate if the number of used entries is much smaller. */
if ( count < num_glyphs / 2 )
{
psnames_get_service( FT_Module module,
const char* service_id )
{
- FT_Library library = module->library;
- FT_UNUSED(library);
+ FT_UNUSED( module );
return ft_service_list_lookup( FT_PSCMAPS_SERVICES_GET, service_id );
}
/* */
/* The FreeType position independent code services for psnames module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2010 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
}
}
+
FT_Error
- psnames_module_class_pic_init( FT_Library library )
+ psnames_module_class_pic_init( FT_Library library )
{
- FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = FT_Err_Ok;
- PSModulePIC* container;
- FT_Memory memory = library->memory;
+ FT_PIC_Container* pic_container = &library->pic_container;
+ FT_Error error = PSnames_Err_Ok;
+ PSModulePIC* container;
+ FT_Memory memory = library->memory;
+
/* allocate pointer, clear and set global container pointer */
if ( FT_ALLOC ( container, sizeof ( *container ) ) )
/* Miscellaneous macros for stand-alone rasterizer (specification */
/* only). */
/* */
-/* Copyright 2005, 2009 by */
+/* Copyright 2005, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
#ifndef __FTMISC_H__
#define __FTMISC_H__
+
/* memset */
#include FT_CONFIG_STANDARD_LIBRARY_H
#define FT_LOCAL_DEF( x ) static x
+
/* from include/freetype2/fttypes.h */
typedef unsigned char FT_Byte;
} FT_MemoryRec;
+
/* from src/ftcalc.c */
-#include <inttypes.h>
+#if ( defined _WIN32 || defined _WIN64 )
+
+ typedef __int64 FT_Int64;
+
+#else
+
+#include "inttypes.h"
typedef int64_t FT_Int64;
+#endif
+
+
static FT_Long
FT_MulDiv( FT_Long a,
FT_Long b,
/* */
/* The FreeType glyph rasterizer (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2005, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2005, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
typedef short Short;
typedef unsigned short UShort, *PUShort;
typedef long Long, *PLong;
- typedef unsigned long ULong;
typedef unsigned char Byte, *PByte;
typedef char Bool;
Int precision_bits; /* precision related variables */
Int precision;
Int precision_half;
- Long precision_mask;
Int precision_shift;
Int precision_step;
Int precision_jitter;
ras.precision = 1 << ras.precision_bits;
ras.precision_half = ras.precision / 2;
ras.precision_shift = ras.precision_bits - Pixel_Bits;
- ras.precision_mask = -ras.precision;
}
if ( overshoot )
ras.cProfile->flags |= Overshoot_Bottom;
- FT_TRACE6(( "New ascending profile = %lx\n", (long)ras.cProfile ));
+ FT_TRACE6(( "New ascending profile = %p\n", ras.cProfile ));
break;
case Descending_State:
if ( overshoot )
ras.cProfile->flags |= Overshoot_Top;
- FT_TRACE6(( "New descending profile = %lx\n", (long)ras.cProfile ));
+ FT_TRACE6(( "New descending profile = %p\n", ras.cProfile ));
break;
default:
if ( h > 0 )
{
- FT_TRACE6(( "Ending profile %lx, start = %ld, height = %ld\n",
- (long)ras.cProfile, ras.cProfile->start, h ));
+ FT_TRACE6(( "Ending profile %p, start = %ld, height = %ld\n",
+ ras.cProfile, ras.cProfile->start, h ));
ras.cProfile->height = h;
if ( overshoot )
return SUCCESS;
else
{
- x1 += FMulDiv( Dx, ras.precision - f1, Dy );
+ x1 += SMulDiv( Dx, ras.precision - f1, Dy );
e1 += 1;
}
}
if ( Dx > 0 )
{
- Ix = ( ras.precision * Dx ) / Dy;
+ Ix = SMulDiv( ras.precision, Dx, Dy);
Rx = ( ras.precision * Dx ) % Dy;
Dx = 1;
}
else
{
- Ix = -( ( ras.precision * -Dx ) / Dy );
+ Ix = SMulDiv( ras.precision, -Dx, Dy) * -1;
Rx = ( ras.precision * -Dx ) % Dy;
Dx = -1;
}
y1 = SCALED( point[-2].y );
x2 = SCALED( point[-1].x );
y2 = SCALED( point[-1].y );
- x3 = SCALED( point[ 0].x );
- y3 = SCALED( point[ 0].y );
if ( flipped )
{
SWAP_( x1, y1 );
SWAP_( x2, y2 );
- SWAP_( x3, y3 );
}
if ( point <= limit )
{
+ x3 = SCALED( point[0].x );
+ y3 = SCALED( point[0].y );
+
+ if ( flipped )
+ SWAP_( x3, y3 );
+
if ( Cubic_To( RAS_VARS x1, y1, x2, y2, x3, y3 ) )
goto Fail;
continue;
PByte p;
- p = bits - e1*ras.target.pitch;
+ p = bits - e1 * ras.target.pitch;
if ( ras.target.pitch > 0 )
p += ( ras.target.rows - 1 ) * ras.target.pitch;
FT_Raster *araster )
{
static TRaster the_raster;
+ FT_UNUSED( memory );
*araster = (FT_Raster)&the_raster;
}
-#else /* _STANDALONE_ */
+#else /* !_STANDALONE_ */
static int
PRaster *araster )
{
FT_Error error;
- PRaster raster;
+ PRaster raster = NULL;
*araster = 0;
}
-#endif /* _STANDALONE_ */
+#endif /* !_STANDALONE_ */
static void
PWorker worker = (PWorker)pool_base;
- raster->buffer = pool_base + ( (sizeof ( *worker ) + 7 ) & ~7 );
- raster->buffer_size = ( ( pool_base + pool_size ) -
- (char*)raster->buffer ) / sizeof ( Long );
+ raster->buffer = pool_base + ( ( sizeof ( *worker ) + 7 ) & ~7 );
+ raster->buffer_size = pool_base + pool_size - (char*)raster->buffer;
raster->worker = worker;
}
else
/* */
/* The FreeType position independent code services for raster module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2010 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
FT_Error
- ft_raster1_renderer_class_pic_init( FT_Library library )
+ ft_raster1_renderer_class_pic_init( FT_Library library )
{
FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = FT_Err_Ok;
- RasterPIC* container;
- FT_Memory memory = library->memory;
+ FT_Error error = Raster_Err_Ok;
+ RasterPIC* container;
+ FT_Memory memory = library->memory;
+
/* since this function also serve raster5 renderer,
it implements reference counting */
- if(pic_container->raster)
+ if ( pic_container->raster )
{
((RasterPIC*)pic_container->raster)->ref_count++;
return error;
/* */
/* High-level SFNT driver interface (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
*acharset_registry = registry.u.atom;
}
else
- error = FT_Err_Invalid_Argument;
+ error = SFNT_Err_Invalid_Argument;
}
}
FT_UNUSED( face_index );
FT_UNUSED( header );
- return FT_Err_Unimplemented_Feature;
+ return SFNT_Err_Unimplemented_Feature;
}
FT_UNUSED( stream );
FT_UNUSED( header );
- return FT_Err_Unimplemented_Feature;
+ return SFNT_Err_Unimplemented_Feature;
}
FT_UNUSED( face );
FT_UNUSED( stream );
- return FT_Err_Unimplemented_Feature;
+ return SFNT_Err_Unimplemented_Feature;
}
* is only there for some rogue clients which would want to call it
* directly (which doesn't make much sense).
*/
- return FT_Err_Unimplemented_Feature;
+ return SFNT_Err_Unimplemented_Feature;
}
FT_UNUSED( cmap );
FT_UNUSED( input );
- return FT_Err_Unimplemented_Feature;
+ return SFNT_Err_Unimplemented_Feature;
}
FT_UNUSED( face );
FT_UNUSED( cmap );
- return 0;
+ return SFNT_Err_Ok;
}
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
/* */
/* The FreeType position independent code services for sfnt module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2010 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
FT_Error
sfnt_module_class_pic_init( FT_Library library )
{
- FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = FT_Err_Ok;
- sfntModulePIC* container;
- FT_Memory memory = library->memory;
+ FT_PIC_Container* pic_container = &library->pic_container;
+ FT_Error error = SFNT_Err_Ok;
+ sfntModulePIC* container;
+ FT_Memory memory = library->memory;
+
/* allocate pointer, clear and set global container pointer */
if ( FT_ALLOC ( container, sizeof ( *container ) ) )
return error;
- FT_MEM_SET( container, 0, sizeof(*container) );
+ FT_MEM_SET( container, 0, sizeof ( *container ) );
pic_container->sfnt = container;
/* initialize pointer table - this is how the module usually expects this data */
/* */
/* SFNT object management (base). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
tt_name_entry_ascii_from_utf16( TT_NameEntry entry,
FT_Memory memory )
{
- FT_String* string;
+ FT_String* string = NULL;
FT_UInt len, code, n;
- FT_Byte* read = (FT_Byte*)entry->string;
+ FT_Byte* read = (FT_Byte*)entry->string;
FT_Error error;
tt_name_entry_ascii_from_other( TT_NameEntry entry,
FT_Memory memory )
{
- FT_String* string;
+ FT_String* string = NULL;
FT_UInt len, code, n;
- FT_Byte* read = (FT_Byte*)entry->string;
+ FT_Byte* read = (FT_Byte*)entry->string;
FT_Error error;
/* According to the OpenType 1.3 specification, only Microsoft or */
/* Apple platform IDs might be used in the `name' table. The */
/* `Unicode' platform is reserved for the `cmap' table, and the */
- /* `Iso' one is deprecated. */
+ /* `ISO' one is deprecated. */
/* */
/* However, the Apple TrueType specification doesn't say the same */
/* thing and goes to suggest that all Unicode `name' table entries */
LOAD_( os2 );
if ( error )
{
- if ( error != SFNT_Err_Table_Missing )
- goto Exit;
-
+ /* we treat the table as missing if there are any errors */
face->os2.version = 0xFFFFU;
}
}
/* */
/* TrueType and OpenType embedded BDF properties (body). */
/* */
-/* Copyright 2005, 2006 by */
+/* Copyright 2005, 2006, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
length < 8 ||
FT_FRAME_EXTRACT( length, bdf->table ) )
{
- error = FT_Err_Invalid_Table;
+ error = SFNT_Err_Invalid_Table;
goto Exit;
}
BadTable:
FT_FRAME_RELEASE( bdf->table );
FT_ZERO( bdf );
- error = FT_Err_Invalid_Table;
+ error = SFNT_Err_Invalid_Table;
goto Exit;
}
{
TT_BDF bdf = &face->bdf;
FT_Size size = FT_FACE(face)->size;
- FT_Error error = 0;
+ FT_Error error = SFNT_Err_Ok;
FT_Byte* p;
FT_UInt count;
FT_Byte* strike;
p = bdf->table + 8;
strike = p + 4 * count;
- error = FT_Err_Invalid_Argument;
+ error = SFNT_Err_Invalid_Argument;
if ( size == NULL || property_name == NULL )
goto Exit;
{
aprop->type = BDF_PROPERTY_TYPE_ATOM;
aprop->u.atom = (const char*)bdf->strings + value;
- error = 0;
+ error = SFNT_Err_Ok;
goto Exit;
}
break;
case 0x02:
aprop->type = BDF_PROPERTY_TYPE_INTEGER;
aprop->u.integer = (FT_Int32)value;
- error = 0;
+ error = SFNT_Err_Ok;
goto Exit;
case 0x03:
aprop->type = BDF_PROPERTY_TYPE_CARDINAL;
aprop->u.cardinal = value;
- error = 0;
+ error = SFNT_Err_Ok;
goto Exit;
default:
/* */
/* TrueType character mapping table (cmap) support (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
FT_Memory memory )
{
FT_UInt32 old_max = cmap->max_results;
- FT_Error error = 0;
+ FT_Error error = SFNT_Err_Ok;
if ( num_results > cmap->max_results )
}
/* and the non-default table (these glyphs are specified here) */
- if ( nondefOff != 0 ) {
+ if ( nondefOff != 0 )
+ {
FT_Byte* ndp = table + nondefOff;
FT_ULong numMappings = TT_NEXT_ULONG( ndp );
FT_ULong i, lastUni = 0;
clazz[i] = NULL;
*output_class = clazz;
- return FT_Err_Ok;
+ return SFNT_Err_Ok;
}
#endif /*FT_CONFIG_OPTION_PIC*/
FT_Byte* limit = table + face->cmap_size;
FT_UInt volatile num_cmaps;
FT_Byte* volatile p = table;
- FT_Library library = FT_FACE_LIBRARY(face);
- FT_UNUSED(library);
+ FT_Library library = FT_FACE_LIBRARY( face );
+
+ FT_UNUSED( library );
- if ( p + 4 > limit )
+ if ( !p || p + 4 > limit )
return SFNT_Err_Invalid_Table;
/* only recognize format 0 */
}
num_cmaps = TT_NEXT_USHORT( p );
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ if ( num_cmaps > FT_MAX_CHARMAP_CACHEABLE )
+ FT_ERROR(( "tt_face_build_cmaps: too many cmap subtables(%d) "
+ "subtable#%d and later are loaded but cannot be searched\n",
+ num_cmaps, FT_MAX_CHARMAP_CACHEABLE + 1 ));
+#endif
for ( ; num_cmaps > 0 && p + 8 <= limit; num_cmaps-- )
{
/* Load the basic TrueType kerning table. This doesn't handle */
/* kerning data within the GPOS table at the moment. */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
num_pairs = FT_NEXT_USHORT( p );
p += 6;
- if ( ( p_next - p ) / 6 < (int)num_pairs ) /* handle broken count */
+ if ( ( p_next - p ) < 6 * (int)num_pairs ) /* handle broken count */
num_pairs = (FT_UInt)( ( p_next - p ) / 6 );
avail |= mask;
num_pairs = FT_NEXT_USHORT( p );
p += 6;
- if ( ( next - p ) / 6 < (int)num_pairs ) /* handle broken count */
+ if ( ( next - p ) < 6 * (int)num_pairs ) /* handle broken count */
num_pairs = (FT_UInt)( ( next - p ) / 6 );
switch ( coverage >> 8 )
/* Load the basic TrueType tables, i.e., tables that can be either in */
/* TTF or OTF fonts (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
{
/* For compatibility with Windows, we consider */
/* zero-length tables the same as missing tables. */
- if ( entry->Tag == tag ) {
+ if ( entry->Tag == tag )
+ {
if ( entry->Length != 0 )
{
FT_TRACE4(( "found table.\n" ));
entry = face->dir_tables;
+ FT_TRACE2(( "\n"
+ " tag offset length checksum\n"
+ " ----------------------------------\n" ));
+
for ( nn = 0; nn < sfnt.num_tables; nn++ )
{
entry->Tag = FT_GET_TAG4();
continue;
else
{
- FT_TRACE2(( " %c%c%c%c - %08lx - %08lx\n",
+ FT_TRACE2(( " %c%c%c%c %08lx %08lx %08lx\n",
(FT_Char)( entry->Tag >> 24 ),
(FT_Char)( entry->Tag >> 16 ),
(FT_Char)( entry->Tag >> 8 ),
(FT_Char)( entry->Tag ),
entry->Offset,
- entry->Length ));
+ entry->Length,
+ entry->CheckSum ));
entry++;
}
}
/* broken fonts like `Keystrokes MT' :-( */
/* */
/* We allocate 64 function entries by default when */
- /* the maxFunctionDefs field is null. */
+ /* the maxFunctionDefs value is smaller. */
- if ( maxProfile->maxFunctionDefs == 0 )
+ if ( maxProfile->maxFunctionDefs < 64 )
maxProfile->maxFunctionDefs = 64;
/* we add 4 phantom points later */
maxProfile->maxTwilightPoints = 0xFFFFU - 4;
}
+
+ /* we arbitrarily limit recursion to avoid stack exhaustion */
+ if ( maxProfile->maxComponentDepth > 100 )
+ {
+ FT_TRACE0(( "tt_face_load_maxp:"
+ " abnormally large component depth (%d) set to 100\n",
+ maxProfile->maxComponentDepth ));
+ maxProfile->maxComponentDepth = 100;
+ }
}
FT_TRACE3(( "numGlyphs: %u\n", maxProfile->numGlyphs ));
/* Postcript name table processing for TrueType and OpenType fonts */
/* (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2006, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_TRUETYPE_TAGS_H
#include "ttpost.h"
static FT_Error
load_format_20( TT_Face face,
- FT_Stream stream )
+ FT_Stream stream,
+ FT_Long post_limit )
{
FT_Memory memory = stream->memory;
FT_Error error;
FT_UInt len;
- if ( FT_READ_BYTE ( len ) ||
- FT_NEW_ARRAY( name_strings[n], len + 1 ) ||
- FT_STREAM_READ ( name_strings[n], len ) )
+ if ( FT_STREAM_POS() >= post_limit )
+ break;
+ else
+ {
+ FT_TRACE6(( "load_format_20: %d byte left in post table\n",
+ post_limit - FT_STREAM_POS() ));
+
+ if ( FT_READ_BYTE( len ) )
+ goto Fail1;
+ }
+
+ if ( (FT_Int)len > post_limit ||
+ FT_STREAM_POS() > post_limit - (FT_Int)len )
+ {
+ FT_ERROR(( "load_format_20:"
+ " exceeding string length (%d),"
+ " truncating at end of post table (%d byte left)\n",
+ len, post_limit - FT_STREAM_POS() ));
+ len = FT_MAX( 0, post_limit - FT_STREAM_POS() );
+ }
+
+ if ( FT_NEW_ARRAY( name_strings[n], len + 1 ) ||
+ FT_STREAM_READ( name_strings[n], len ) )
goto Fail1;
name_strings[n][len] = '\0';
}
+
+ if ( n < num_names )
+ {
+ FT_ERROR(( "load_format_20:"
+ " all entries in post table are already parsed,"
+ " using NULL names for gid %d - %d\n",
+ n, num_names - 1 ));
+ for ( ; n < num_names; n++ )
+ if ( FT_NEW_ARRAY( name_strings[n], 1 ) )
+ goto Fail1;
+ else
+ name_strings[n][0] = '\0';
+ }
}
/* all right, set table fields and exit successfully */
static FT_Error
load_format_25( TT_Face face,
- FT_Stream stream )
+ FT_Stream stream,
+ FT_Long post_limit )
{
FT_Memory memory = stream->memory;
FT_Error error;
FT_Int num_glyphs;
FT_Char* offset_table = 0;
+ FT_UNUSED( post_limit );
+
/* UNDOCUMENTED! This value appears only in the Apple TT specs. */
if ( FT_READ_USHORT( num_glyphs ) )
FT_Stream stream;
FT_Error error;
FT_Fixed format;
+ FT_ULong post_len;
+ FT_Long post_limit;
/* get a stream for the face's resource */
stream = face->root.stream;
/* seek to the beginning of the PS names table */
- error = face->goto_table( face, TTAG_post, stream, 0 );
+ error = face->goto_table( face, TTAG_post, stream, &post_len );
if ( error )
goto Exit;
+ post_limit = FT_STREAM_POS() + post_len;
+
format = face->postscript.FormatType;
/* go to beginning of subtable */
/* now read postscript table */
if ( format == 0x00020000L )
- error = load_format_20( face, stream );
+ error = load_format_20( face, stream, post_limit );
else if ( format == 0x00028000L )
- error = load_format_25( face, stream );
+ error = load_format_25( face, stream, post_limit );
else
error = SFNT_Err_Invalid_File_Format;
/* */
/* TrueType and OpenType embedded bitmap support (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
tt_face_load_eblc( TT_Face face,
FT_Stream stream )
{
- FT_Error error = 0;
+ FT_Error error = SFNT_Err_Ok;
FT_Memory memory = stream->memory;
FT_Fixed version;
FT_ULong num_strikes;
/* */
/* A new `perfect' anti-aliasing renderer (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2000-2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
#include <stdarg.h>
#endif
+#include <stddef.h>
#include <string.h>
#include <setjmp.h>
#include <limits.h>
#define FT_UINT_MAX UINT_MAX
+#define FT_INT_MAX INT_MAX
#define ft_memset memset
#define ft_longjmp longjmp
#define ft_jmp_buf jmp_buf
+typedef ptrdiff_t FT_PtrDist;
+
#define ErrRaster_Invalid_Mode -2
#define ErrRaster_Invalid_Outline -1
shift_, \
delta_ \
};
-
+
#define FT_DEFINE_RASTER_FUNCS( class_, glyph_format_, \
raster_new_, raster_reset_, \
raster_set_mode_, raster_render_, \
int band_size;
int band_shoot;
- int conic_level;
- int cubic_level;
ft_jmp_buf jump_buffer;
FT_Vector* arc;
- dx = DOWNSCALE( ras.x ) + to->x - ( control->x << 1 );
- if ( dx < 0 )
- dx = -dx;
- dy = DOWNSCALE( ras.y ) + to->y - ( control->y << 1 );
- if ( dy < 0 )
- dy = -dy;
+ arc = ras.bez_stack;
+ arc[0].x = UPSCALE( to->x );
+ arc[0].y = UPSCALE( to->y );
+ arc[1].x = UPSCALE( control->x );
+ arc[1].y = UPSCALE( control->y );
+ arc[2].x = ras.x;
+ arc[2].y = ras.y;
+
+ dx = FT_ABS( arc[2].x + arc[0].x - 2 * arc[1].x );
+ dy = FT_ABS( arc[2].y + arc[0].y - 2 * arc[1].y );
if ( dx < dy )
dx = dy;
- level = 1;
- dx = dx / ras.conic_level;
- while ( dx > 0 )
+ if ( dx <= ONE_PIXEL / 4 )
{
- dx >>= 2;
- level++;
+ gray_render_line( RAS_VAR_ arc[0].x, arc[0].y );
+ return;
}
- /* a shortcut to speed things up */
- if ( level <= 1 )
+ level = 0;
+ while ( dx > ONE_PIXEL / 4 )
{
- /* we compute the mid-point directly in order to avoid */
- /* calling gray_split_conic() */
- TPos to_x, to_y, mid_x, mid_y;
-
-
- to_x = UPSCALE( to->x );
- to_y = UPSCALE( to->y );
- mid_x = ( ras.x + to_x + 2 * UPSCALE( control->x ) ) / 4;
- mid_y = ( ras.y + to_y + 2 * UPSCALE( control->y ) ) / 4;
-
- gray_render_line( RAS_VAR_ mid_x, mid_y );
- gray_render_line( RAS_VAR_ to_x, to_y );
-
- return;
+ dx >>= 2;
+ level++;
}
- arc = ras.bez_stack;
levels = ras.lev_stack;
- top = 0;
levels[0] = level;
-
- arc[0].x = UPSCALE( to->x );
- arc[0].y = UPSCALE( to->y );
- arc[1].x = UPSCALE( control->x );
- arc[1].y = UPSCALE( control->y );
- arc[2].x = ras.x;
- arc[2].y = ras.y;
+ top = 0;
while ( top >= 0 )
{
}
Draw:
- {
- TPos to_x, to_y, mid_x, mid_y;
-
-
- to_x = arc[0].x;
- to_y = arc[0].y;
- mid_x = ( ras.x + to_x + 2 * arc[1].x ) / 4;
- mid_y = ( ras.y + to_y + 2 * arc[1].y ) / 4;
-
- gray_render_line( RAS_VAR_ mid_x, mid_y );
- gray_render_line( RAS_VAR_ to_x, to_y );
-
- top--;
- arc -= 2;
- }
+ gray_render_line( RAS_VAR_ arc[0].x, arc[0].y );
+ top--;
+ arc -= 2;
}
return;
const FT_Vector* control2,
const FT_Vector* to )
{
- TPos dx, dy, da, db;
- int top, level;
- int* levels;
FT_Vector* arc;
- dx = DOWNSCALE( ras.x ) + to->x - ( control1->x << 1 );
- if ( dx < 0 )
- dx = -dx;
- dy = DOWNSCALE( ras.y ) + to->y - ( control1->y << 1 );
- if ( dy < 0 )
- dy = -dy;
- if ( dx < dy )
- dx = dy;
- da = dx;
-
- dx = DOWNSCALE( ras.x ) + to->x - 3 * ( control1->x + control2->x );
- if ( dx < 0 )
- dx = -dx;
- dy = DOWNSCALE( ras.y ) + to->y - 3 * ( control1->x + control2->y );
- if ( dy < 0 )
- dy = -dy;
- if ( dx < dy )
- dx = dy;
- db = dx;
-
- level = 1;
- da = da / ras.cubic_level;
- db = db / ras.conic_level;
- while ( da > 0 || db > 0 )
- {
- da >>= 2;
- db >>= 3;
- level++;
- }
-
- if ( level <= 1 )
- {
- TPos to_x, to_y, mid_x, mid_y;
-
-
- to_x = UPSCALE( to->x );
- to_y = UPSCALE( to->y );
- mid_x = ( ras.x + to_x +
- 3 * UPSCALE( control1->x + control2->x ) ) / 8;
- mid_y = ( ras.y + to_y +
- 3 * UPSCALE( control1->y + control2->y ) ) / 8;
-
- gray_render_line( RAS_VAR_ mid_x, mid_y );
- gray_render_line( RAS_VAR_ to_x, to_y );
- return;
- }
-
arc = ras.bez_stack;
arc[0].x = UPSCALE( to->x );
arc[0].y = UPSCALE( to->y );
arc[3].x = ras.x;
arc[3].y = ras.y;
- levels = ras.lev_stack;
- top = 0;
- levels[0] = level;
-
- while ( top >= 0 )
+ for (;;)
{
- level = levels[top];
- if ( level > 1 )
- {
- /* check that the arc crosses the current band */
- TPos min, max, y;
+ /* Check that the arc crosses the current band. */
+ TPos min, max, y;
- min = max = arc[0].y;
- y = arc[1].y;
- if ( y < min ) min = y;
- if ( y > max ) max = y;
- y = arc[2].y;
- if ( y < min ) min = y;
- if ( y > max ) max = y;
- y = arc[3].y;
- if ( y < min ) min = y;
- if ( y > max ) max = y;
- if ( TRUNC( min ) >= ras.max_ey || TRUNC( max ) < 0 )
- goto Draw;
- gray_split_cubic( arc );
- arc += 3;
- top ++;
- levels[top] = levels[top - 1] = level - 1;
- continue;
- }
+ min = max = arc[0].y;
- Draw:
- {
- TPos to_x, to_y, mid_x, mid_y;
+ y = arc[1].y;
+ if ( y < min )
+ min = y;
+ if ( y > max )
+ max = y;
+
+ y = arc[2].y;
+ if ( y < min )
+ min = y;
+ if ( y > max )
+ max = y;
+
+ y = arc[3].y;
+ if ( y < min )
+ min = y;
+ if ( y > max )
+ max = y;
+ if ( TRUNC( min ) >= ras.max_ey || TRUNC( max ) < ras.min_ey )
+ goto Draw;
- to_x = arc[0].x;
- to_y = arc[0].y;
- mid_x = ( ras.x + to_x + 3 * ( arc[1].x + arc[2].x ) ) / 8;
- mid_y = ( ras.y + to_y + 3 * ( arc[1].y + arc[2].y ) ) / 8;
+ /* Decide whether to split or draw. See `Rapid Termination */
+ /* Evaluation for Recursive Subdivision of Bezier Curves' by Thomas */
+ /* F. Hain, at */
+ /* http://www.cis.southalabama.edu/~hain/general/Publications/Bezier/Camera-ready%20CISST02%202.pdf */
- gray_render_line( RAS_VAR_ mid_x, mid_y );
- gray_render_line( RAS_VAR_ to_x, to_y );
- top --;
- arc -= 3;
+ {
+ TPos dx, dy, dx_, dy_;
+ TPos dx1, dy1, dx2, dy2;
+ TPos L, s, s_limit;
+
+
+ /* dx and dy are x and y components of the P0-P3 chord vector. */
+ dx = arc[3].x - arc[0].x;
+ dy = arc[3].y - arc[0].y;
+
+ /* L is an (under)estimate of the Euclidean distance P0-P3. */
+ /* */
+ /* If dx >= dy, then r = sqrt(dx^2 + dy^2) can be overestimated */
+ /* with least maximum error by */
+ /* */
+ /* r_upperbound = dx + (sqrt(2) - 1) * dy , */
+ /* */
+ /* where sqrt(2) - 1 can be (over)estimated by 107/256, giving an */
+ /* error of no more than 8.4%. */
+ /* */
+ /* Similarly, some elementary calculus shows that r can be */
+ /* underestimated with least maximum error by */
+ /* */
+ /* r_lowerbound = sqrt(2 + sqrt(2)) / 2 * dx */
+ /* + sqrt(2 - sqrt(2)) / 2 * dy . */
+ /* */
+ /* 236/256 and 97/256 are (under)estimates of the two algebraic */
+ /* numbers, giving an error of no more than 8.1%. */
+
+ dx_ = FT_ABS( dx );
+ dy_ = FT_ABS( dy );
+
+ /* This is the same as */
+ /* */
+ /* L = ( 236 * FT_MAX( dx_, dy_ ) */
+ /* + 97 * FT_MIN( dx_, dy_ ) ) >> 8; */
+ L = ( dx_ > dy_ ? 236 * dx_ + 97 * dy_
+ : 97 * dx_ + 236 * dy_ ) >> 8;
+
+ /* Avoid possible arithmetic overflow below by splitting. */
+ if ( L > 32767 )
+ goto Split;
+
+ /* Max deviation may be as much as (s/L) * 3/4 (if Hain's v = 1). */
+ s_limit = L * (TPos)( ONE_PIXEL / 6 );
+
+ /* s is L * the perpendicular distance from P1 to the line P0-P3. */
+ dx1 = arc[1].x - arc[0].x;
+ dy1 = arc[1].y - arc[0].y;
+ s = FT_ABS( dy * dx1 - dx * dy1 );
+
+ if ( s > s_limit )
+ goto Split;
+
+ /* s is L * the perpendicular distance from P2 to the line P0-P3. */
+ dx2 = arc[2].x - arc[0].x;
+ dy2 = arc[2].y - arc[0].y;
+ s = FT_ABS( dy * dx2 - dx * dy2 );
+
+ if ( s > s_limit )
+ goto Split;
+
+ /* If P1 or P2 is outside P0-P3, split the curve. */
+ if ( dy * dy1 + dx * dx1 < 0 ||
+ dy * dy2 + dx * dx2 < 0 ||
+ dy * (arc[3].y - arc[1].y) + dx * (arc[3].x - arc[1].x) < 0 ||
+ dy * (arc[3].y - arc[2].y) + dx * (arc[3].x - arc[2].x) < 0 )
+ goto Split;
+
+ /* No reason to split. */
+ goto Draw;
}
- }
- return;
- }
+ Split:
+ gray_split_cubic( arc );
+ arc += 3;
+ continue;
+ Draw:
+ gray_render_line( RAS_VAR_ arc[0].x, arc[0].y );
+
+ if ( arc == ras.bez_stack )
+ return;
+
+ arc -= 3;
+ }
+ }
static int
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{
ras.count_ex = ras.max_ex - ras.min_ex;
ras.count_ey = ras.max_ey - ras.min_ey;
- /* simple heuristic used to speed up the bezier decomposition -- see */
- /* the code in gray_render_conic() and gray_render_cubic() for more */
- /* details */
- ras.conic_level = 32;
- ras.cubic_level = 16;
-
- {
- int level = 0;
-
-
- if ( ras.count_ex > 24 || ras.count_ey > 24 )
- level++;
- if ( ras.count_ex > 120 || ras.count_ey > 120 )
- level++;
-
- ras.conic_level <<= level;
- ras.cubic_level <<= level;
- }
-
/* set up vertical bands */
num_bands = (int)( ( ras.max_ey - ras.min_ey ) / ras.band_size );
if ( num_bands == 0 )
FT_UNUSED( raster );
}
-#else /* _STANDALONE_ */
+#else /* !_STANDALONE_ */
static int
gray_raster_new( FT_Memory memory,
FT_Raster* araster )
{
FT_Error error;
- PRaster raster;
+ PRaster raster = NULL;
*araster = 0;
FT_FREE( raster );
}
-#endif /* _STANDALONE_ */
+#endif /* !_STANDALONE_ */
static void
/* */
/* Anti-aliasing renderer interface (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2009 by */
+/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
cbox.xMax = FT_PIX_CEIL( cbox.xMax );
cbox.yMax = FT_PIX_CEIL( cbox.yMax );
- width = (FT_UInt)( ( cbox.xMax - cbox.xMin ) >> 6 );
- height = (FT_UInt)( ( cbox.yMax - cbox.yMin ) >> 6 );
+ if ( cbox.xMin < 0 && cbox.xMax > FT_INT_MAX + cbox.xMin )
+ {
+ FT_ERROR(( "ft_smooth_render_generic: glyph too large:"
+ " xMin = %d, xMax = %d\n",
+ cbox.xMin >> 6, cbox.xMax >> 6 ));
+ return Smooth_Err_Raster_Overflow;
+ }
+ else
+ width = (FT_UInt)( ( cbox.xMax - cbox.xMin ) >> 6 );
+
+ if ( cbox.yMin < 0 && cbox.yMax > FT_INT_MAX + cbox.yMin )
+ {
+ FT_ERROR(( "ft_smooth_render_generic: glyph too large:"
+ " yMin = %d, yMax = %d\n",
+ cbox.yMin >> 6, cbox.yMax >> 6 ));
+ return Smooth_Err_Raster_Overflow;
+ }
+ else
+ height = (FT_UInt)( ( cbox.yMax - cbox.yMin ) >> 6 );
+
bitmap = &slot->bitmap;
memory = render->root.memory;
/* Required check is ( pitch * height < FT_ULONG_MAX ), */
/* but we care realistic cases only. Always pitch <= width. */
- if ( width > 0xFFFFU || height > 0xFFFFU )
+ if ( width > 0x7FFFU || height > 0x7FFFU )
{
- FT_ERROR(( "ft_smooth_render_generic: glyph too large: %d x %d\n",
+ FT_ERROR(( "ft_smooth_render_generic: glyph too large: %u x %u\n",
width, height ));
return Smooth_Err_Raster_Overflow;
}
/* */
/* The FreeType position independent code services for smooth module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2010 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
FT_Error
- ft_smooth_renderer_class_pic_init( FT_Library library )
+ ft_smooth_renderer_class_pic_init( FT_Library library )
{
- FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = FT_Err_Ok;
- SmoothPIC* container;
- FT_Memory memory = library->memory;
+ FT_PIC_Container* pic_container = &library->pic_container;
+ FT_Error error = Smooth_Err_Ok;
+ SmoothPIC* container;
+ FT_Memory memory = library->memory;
+
/* since this function also serve smooth_lcd and smooth_lcdv renderers,
it implements reference counting */
* accepted if you are using GCC for compilation (and probably by
* other compilers too).
*
- * Author: David Turner, 2005, 2006, 2008, 2009
+ * Author: David Turner, 2005, 2006, 2008, 2009, 2010
*
* This code is explicitly placed into the public domain.
*
{
int nn;
+
switch ( format )
{
case OUTPUT_WINDOWS_DEF:
case OUTPUT_WATCOM_LBC:
{
/* we must omit the .dll suffix from the library name */
- char temp[512];
- char* dot;
+ char temp[512];
+ const char* dot;
+
if ( dll_name == NULL )
{
fprintf( stderr,
- "you must provide a DLL name with the -d option !!\n" );
- exit(4);
+ "you must provide a DLL name with the -d option!\n" );
+ exit( 4 );
}
dot = strchr( dll_name, '.' );
if ( dot != NULL )
{
- int len = (dot - dll_name);
- if ( len > (int)(sizeof(temp)-1) )
- len = sizeof(temp)-1;
+ int len = dot - dll_name;
+
+
+ if ( len > (int)( sizeof( temp ) - 1 ) )
+ len = sizeof ( temp ) - 1;
memcpy( temp, dll_name, len );
temp[len] = 0;
&top_bearing,
&advance_height );
+ loader->left_bearing = left_bearing;
+ loader->advance = advance_width;
+ loader->top_bearing = top_bearing;
+ loader->vadvance = advance_height;
+
+ if ( !loader->linear_def )
+ {
+ loader->linear_def = 1;
+ loader->linear = advance_width;
+ }
+ }
+
+
#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ static void
+ tt_get_metrics_incr_overrides( TT_Loader loader,
+ FT_UInt glyph_index )
+ {
+ TT_Face face = (TT_Face)loader->face;
+
+ FT_Short left_bearing = 0, top_bearing = 0;
+ FT_UShort advance_width = 0, advance_height = 0;
+
+
/* If this is an incrementally loaded font check whether there are */
/* overriding metrics for this glyph. */
if ( face->root.internal->incremental_interface &&
FT_Error error;
- metrics.bearing_x = left_bearing;
+ metrics.bearing_x = loader->left_bearing;
metrics.bearing_y = 0;
- metrics.advance = advance_width;
+ metrics.advance = loader->advance;
metrics.advance_v = 0;
error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
/* GWW: Do I do the same for vertical metrics? */
metrics.bearing_x = 0;
- metrics.bearing_y = top_bearing;
- metrics.advance = advance_height;
+ metrics.bearing_y = loader->top_bearing;
+ metrics.advance = loader->vadvance;
error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
face->root.internal->incremental_interface->object,
#endif /* 0 */
+ loader->left_bearing = left_bearing;
+ loader->advance = advance_width;
+ loader->top_bearing = top_bearing;
+ loader->vadvance = advance_height;
+
+ if ( !loader->linear_def )
+ {
+ loader->linear_def = 1;
+ loader->linear = advance_width;
+ }
}
Exit:
+ return;
+ }
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
- loader->left_bearing = left_bearing;
- loader->advance = advance_width;
- loader->top_bearing = top_bearing;
- loader->vadvance = advance_height;
-
- if ( !loader->linear_def )
- {
- loader->linear_def = 1;
- loader->linear = advance_width;
- }
- }
-
/*************************************************************************/
/* */
FT_UNUSED( glyph_index );
- FT_TRACE5(( "Glyph %ld\n", glyph_index ));
+ FT_TRACE4(( "Glyph %ld\n", glyph_index ));
/* the following line sets the `error' variable through macros! */
if ( FT_STREAM_SEEK( offset ) || FT_FRAME_ENTER( byte_count ) )
if ( cont[0] <= prev_cont )
{
/* unordered contours: this is invalid */
- error = FT_Err_Invalid_Table;
+ error = TT_Err_Invalid_Table;
goto Fail;
}
prev_cont = cont[0];
{
FT_Stream stream = loader->stream;
- FT_UShort n_ins;
+ FT_UShort n_ins, max_ins;
+ FT_ULong tmp;
/* TT_Load_Composite_Glyph only gives us the offset of instructions */
FT_TRACE5(( " Instructions size = %d\n", n_ins ));
/* check it */
- if ( n_ins > ((TT_Face)loader->face)->max_profile.maxSizeOfInstructions )
+ max_ins = ((TT_Face)loader->face)->max_profile.maxSizeOfInstructions;
+ if ( n_ins > max_ins )
{
- FT_TRACE0(( "TT_Process_Composite_Glyph: too many instructions (%d)\n",
- n_ins ));
+ /* acroread ignores this field, so we only do a rough safety check */
+ if ( (FT_Int)n_ins > loader->byte_len )
+ {
+ FT_TRACE1(( "TT_Process_Composite_Glyph: "
+ "too many instructions (%d) for glyph with length %d\n",
+ n_ins, loader->byte_len ));
+ return TT_Err_Too_Many_Hints;
+ }
- return TT_Err_Too_Many_Hints;
+ tmp = loader->exec->glyphSize;
+ error = Update_Max( loader->exec->memory,
+ &tmp,
+ sizeof ( FT_Byte ),
+ (void*)&loader->exec->glyphIns,
+ n_ins );
+ loader->exec->glyphSize = (FT_UShort)tmp;
+ if ( error )
+ return error;
}
else if ( n_ins == 0 )
return TT_Err_Ok;
if ( header_only )
goto Exit;
+ /* must initialize points before (possibly) overriding */
+ /* glyph metrics from the incremental interface */
TT_LOADER_SET_PP( loader );
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ tt_get_metrics_incr_overrides( loader, glyph_index );
+#endif
+
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
if ( ((TT_Face)(loader->face))->doblend )
goto Exit;
}
+ /* must initialize points before (possibly) overriding */
+ /* glyph metrics from the incremental interface */
TT_LOADER_SET_PP( loader );
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ tt_get_metrics_incr_overrides( loader, glyph_index );
+#endif
+
/***********************************************************************/
/***********************************************************************/
/***********************************************************************/
FT_UInt num_base_subgs = gloader->base.num_subglyphs;
FT_Stream old_stream = loader->stream;
+ FT_Int old_byte_len = loader->byte_len;
FT_GlyphLoader_Add( gloader );
num_base_points );
}
- loader->stream = old_stream;
+ loader->stream = old_stream;
+ loader->byte_len = old_byte_len;
/* process the glyph */
loader->ins_pos = ins_pos;
FT_UInt i;
+ FT_TRACE4(( "tt_loader_init: grayscale change,"
+ " re-executing `prep' table\n" ));
+
exec->grayscale = grayscale;
for ( i = 0; i < size->cvt_size; i++ )
glyph->outline = loader.gloader->base.outline;
glyph->outline.flags &= ~FT_OUTLINE_SINGLE_PASS;
- /* In case bit 1 of the `flags' field in the `head' table isn't */
- /* set, translate array so that (0,0) is the glyph's origin. */
- if ( ( face->header.Flags & 2 ) == 0 && loader.pp1.x )
+ /* Translate array so that (0,0) is the glyph's origin. Note */
+ /* that this behaviour is independent on the value of bit 1 of */
+ /* the `flags' field in the `head' table -- at least major */
+ /* applications like Acroread indicate that. */
+ if ( loader.pp1.x )
FT_Outline_Translate( &glyph->outline, -loader.pp1.x, 0 );
}
/* */
/* TrueType GX Font Variation loader */
/* */
-/* Copyright 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, Werner Lemberg, and George Williams. */
/* */
/* This file is part of the FreeType project, and may only be used, */
FT_Int j;
FT_Int first;
FT_Memory memory = stream->memory;
- FT_Error error = TT_Err_Ok;
+ FT_Error error = TT_Err_Ok;
FT_UNUSED( error );
runcnt = runcnt & GX_PT_POINT_RUN_COUNT_MASK;
first = points[i++] = FT_GET_USHORT();
- if ( runcnt < 1 )
+ if ( runcnt < 1 || i + runcnt >= n )
goto Exit;
/* first point not included in runcount */
{
first = points[i++] = FT_GET_BYTE();
- if ( runcnt < 1 )
+ if ( runcnt < 1 || i + runcnt >= n )
goto Exit;
for ( j = 0; j < runcnt; ++j )
ft_var_readpackeddeltas( FT_Stream stream,
FT_Offset delta_cnt )
{
- FT_Short *deltas;
+ FT_Short *deltas = NULL;
FT_UInt runcnt;
FT_Offset i;
FT_UInt j;
FT_Memory memory = stream->memory;
- FT_Error error = TT_Err_Ok;
+ FT_Error error = TT_Err_Ok;
FT_UNUSED( error );
if ( fvar_head.version != (FT_Long)0x00010000L ||
fvar_head.countSizePairs != 2 ||
fvar_head.axisSize != 20 ||
+ /* axisCount limit implied by 16-bit instanceSize */
+ fvar_head.axisCount > 0x3FFE ||
fvar_head.instanceSize != 4 + 4 * fvar_head.axisCount ||
+ /* instanceCount limit implied by limited range of name IDs */
+ fvar_head.instanceCount > 0x7EFF ||
fvar_head.offsetToData + fvar_head.axisCount * 20U +
fvar_head.instanceCount * fvar_head.instanceSize > table_len )
{
if ( FT_NEW( face->blend ) )
goto Exit;
- /* XXX: TODO - check for overflows */
+ /* cannot overflow 32-bit arithmetic because of limits above */
face->blend->mmvar_len =
sizeof ( FT_MM_Var ) +
fvar_head.axisCount * sizeof ( FT_Var_Axis ) +
/* */
/* TrueType bytecode interpreter (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010 */
+/* by David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
/*************************************************************************/
/* */
- /* A simple bounds-checking macro. */
+ /* Two simple bounds-checking macros. */
/* */
-#define BOUNDS( x, n ) ( (FT_UInt)(x) >= (FT_UInt)(n) )
+#define BOUNDS( x, n ) ( (FT_UInt)(x) >= (FT_UInt)(n) )
+#define BOUNDSL( x, n ) ( (FT_ULong)(x) >= (FT_ULong)(n) )
#undef SUCCESS
#define SUCCESS 0
return TT_Err_Ok;
Fail_Memory:
- FT_ERROR(( "Init_Context: not enough memory for 0x%08lx\n",
- (FT_Long)exec ));
+ FT_ERROR(( "Init_Context: not enough memory for %p\n", exec ));
TT_Done_Context( exec );
return error;
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
- static FT_Error
+ FT_LOCAL_DEF( FT_Error )
Update_Max( FT_Memory memory,
FT_ULong* size,
FT_Long multiplier,
exec->storage = size->storage;
exec->twilight = size->twilight;
+
+ /* In case of multi-threading it can happen that the old size object */
+ /* no longer exists, thus we must clear all glyph zone references. */
+ ft_memset( &exec->zp0, 0, sizeof ( exec->zp0 ) );
+ exec->zp1 = exec->zp0;
+ exec->zp2 = exec->zp0;
}
/* XXX: We reserve a little more elements on the stack to deal safely */
};
+#ifdef FT_DEBUG_LEVEL_TRACE
+
+ static
+ const char* const opcode_name[256] =
+ {
+ "SVTCA y",
+ "SVTCA x",
+ "SPvTCA y",
+ "SPvTCA x",
+ "SFvTCA y",
+ "SFvTCA x",
+ "SPvTL ||",
+ "SPvTL +",
+ "SFvTL ||",
+ "SFvTL +",
+ "SPvFS",
+ "SFvFS",
+ "GPV",
+ "GFV",
+ "SFvTPv",
+ "ISECT",
+
+ "SRP0",
+ "SRP1",
+ "SRP2",
+ "SZP0",
+ "SZP1",
+ "SZP2",
+ "SZPS",
+ "SLOOP",
+ "RTG",
+ "RTHG",
+ "SMD",
+ "ELSE",
+ "JMPR",
+ "SCvTCi",
+ "SSwCi",
+ "SSW",
+
+ "DUP",
+ "POP",
+ "CLEAR",
+ "SWAP",
+ "DEPTH",
+ "CINDEX",
+ "MINDEX",
+ "AlignPTS",
+ "INS_$28",
+ "UTP",
+ "LOOPCALL",
+ "CALL",
+ "FDEF",
+ "ENDF",
+ "MDAP[0]",
+ "MDAP[1]",
+
+ "IUP[0]",
+ "IUP[1]",
+ "SHP[0]",
+ "SHP[1]",
+ "SHC[0]",
+ "SHC[1]",
+ "SHZ[0]",
+ "SHZ[1]",
+ "SHPIX",
+ "IP",
+ "MSIRP[0]",
+ "MSIRP[1]",
+ "AlignRP",
+ "RTDG",
+ "MIAP[0]",
+ "MIAP[1]",
+
+ "NPushB",
+ "NPushW",
+ "WS",
+ "RS",
+ "WCvtP",
+ "RCvt",
+ "GC[0]",
+ "GC[1]",
+ "SCFS",
+ "MD[0]",
+ "MD[1]",
+ "MPPEM",
+ "MPS",
+ "FlipON",
+ "FlipOFF",
+ "DEBUG",
+
+ "LT",
+ "LTEQ",
+ "GT",
+ "GTEQ",
+ "EQ",
+ "NEQ",
+ "ODD",
+ "EVEN",
+ "IF",
+ "EIF",
+ "AND",
+ "OR",
+ "NOT",
+ "DeltaP1",
+ "SDB",
+ "SDS",
+
+ "ADD",
+ "SUB",
+ "DIV",
+ "MUL",
+ "ABS",
+ "NEG",
+ "FLOOR",
+ "CEILING",
+ "ROUND[0]",
+ "ROUND[1]",
+ "ROUND[2]",
+ "ROUND[3]",
+ "NROUND[0]",
+ "NROUND[1]",
+ "NROUND[2]",
+ "NROUND[3]",
+
+ "WCvtF",
+ "DeltaP2",
+ "DeltaP3",
+ "DeltaCn[0]",
+ "DeltaCn[1]",
+ "DeltaCn[2]",
+ "SROUND",
+ "S45Round",
+ "JROT",
+ "JROF",
+ "ROFF",
+ "INS_$7B",
+ "RUTG",
+ "RDTG",
+ "SANGW",
+ "AA",
+
+ "FlipPT",
+ "FlipRgON",
+ "FlipRgOFF",
+ "INS_$83",
+ "INS_$84",
+ "ScanCTRL",
+ "SDVPTL[0]",
+ "SDVPTL[1]",
+ "GetINFO",
+ "IDEF",
+ "ROLL",
+ "MAX",
+ "MIN",
+ "ScanTYPE",
+ "InstCTRL",
+ "INS_$8F",
+
+ "INS_$90",
+ "INS_$91",
+ "INS_$92",
+ "INS_$93",
+ "INS_$94",
+ "INS_$95",
+ "INS_$96",
+ "INS_$97",
+ "INS_$98",
+ "INS_$99",
+ "INS_$9A",
+ "INS_$9B",
+ "INS_$9C",
+ "INS_$9D",
+ "INS_$9E",
+ "INS_$9F",
+
+ "INS_$A0",
+ "INS_$A1",
+ "INS_$A2",
+ "INS_$A3",
+ "INS_$A4",
+ "INS_$A5",
+ "INS_$A6",
+ "INS_$A7",
+ "INS_$A8",
+ "INS_$A9",
+ "INS_$AA",
+ "INS_$AB",
+ "INS_$AC",
+ "INS_$AD",
+ "INS_$AE",
+ "INS_$AF",
+
+ "PushB[0]",
+ "PushB[1]",
+ "PushB[2]",
+ "PushB[3]",
+ "PushB[4]",
+ "PushB[5]",
+ "PushB[6]",
+ "PushB[7]",
+ "PushW[0]",
+ "PushW[1]",
+ "PushW[2]",
+ "PushW[3]",
+ "PushW[4]",
+ "PushW[5]",
+ "PushW[6]",
+ "PushW[7]",
+
+ "MDRP[00]",
+ "MDRP[01]",
+ "MDRP[02]",
+ "MDRP[03]",
+ "MDRP[04]",
+ "MDRP[05]",
+ "MDRP[06]",
+ "MDRP[07]",
+ "MDRP[08]",
+ "MDRP[09]",
+ "MDRP[10]",
+ "MDRP[11]",
+ "MDRP[12]",
+ "MDRP[13]",
+ "MDRP[14]",
+ "MDRP[15]",
+
+ "MDRP[16]",
+ "MDRP[17]",
+ "MDRP[18]",
+ "MDRP[19]",
+ "MDRP[20]",
+ "MDRP[21]",
+ "MDRP[22]",
+ "MDRP[23]",
+ "MDRP[24]",
+ "MDRP[25]",
+ "MDRP[26]",
+ "MDRP[27]",
+ "MDRP[28]",
+ "MDRP[29]",
+ "MDRP[30]",
+ "MDRP[31]",
+
+ "MIRP[00]",
+ "MIRP[01]",
+ "MIRP[02]",
+ "MIRP[03]",
+ "MIRP[04]",
+ "MIRP[05]",
+ "MIRP[06]",
+ "MIRP[07]",
+ "MIRP[08]",
+ "MIRP[09]",
+ "MIRP[10]",
+ "MIRP[11]",
+ "MIRP[12]",
+ "MIRP[13]",
+ "MIRP[14]",
+ "MIRP[15]",
+
+ "MIRP[16]",
+ "MIRP[17]",
+ "MIRP[18]",
+ "MIRP[19]",
+ "MIRP[20]",
+ "MIRP[21]",
+ "MIRP[22]",
+ "MIRP[23]",
+ "MIRP[24]",
+ "MIRP[25]",
+ "MIRP[26]",
+ "MIRP[27]",
+ "MIRP[28]",
+ "MIRP[29]",
+ "MIRP[30]",
+ "MIRP[31]"
+ };
+
+#endif /* FT_DEBUG_LEVEL_TRACE */
+
+
static
const FT_Char opcode_length[256] =
{
if ( distance && val < 0 )
val = 0;
}
- else {
+ else
+ {
val = distance - compensation;
if ( val > 0 )
val = 0;
}
-#define DO_JROT \
- if ( args[1] != 0 ) \
- { \
- CUR.IP += args[0]; \
- CUR.step_ins = FALSE; \
+#define DO_JROT \
+ if ( args[1] != 0 ) \
+ { \
+ CUR.IP += args[0]; \
+ if ( CUR.IP < 0 ) \
+ CUR.error = TT_Err_Bad_Argument; \
+ CUR.step_ins = FALSE; \
}
-#define DO_JMPR \
- CUR.IP += args[0]; \
+#define DO_JMPR \
+ CUR.IP += args[0]; \
+ if ( CUR.IP < 0 ) \
+ CUR.error = TT_Err_Bad_Argument; \
CUR.step_ins = FALSE;
-#define DO_JROF \
- if ( args[1] == 0 ) \
- { \
- CUR.IP += args[0]; \
- CUR.step_ins = FALSE; \
+#define DO_JROF \
+ if ( args[1] == 0 ) \
+ { \
+ CUR.IP += args[0]; \
+ if ( CUR.IP < 0 ) \
+ CUR.error = TT_Err_Bad_Argument; \
+ CUR.step_ins = FALSE; \
}
args[0] = FT_PIX_CEIL( args[0] );
-#define DO_RS \
- { \
- FT_ULong I = (FT_ULong)args[0]; \
- \
- \
- if ( BOUNDS( I, CUR.storeSize ) ) \
- { \
- if ( CUR.pedantic_hinting ) \
- { \
- ARRAY_BOUND_ERROR; \
- } \
- else \
- args[0] = 0; \
- } \
- else \
- args[0] = CUR.storage[I]; \
+#define DO_RS \
+ { \
+ FT_ULong I = (FT_ULong)args[0]; \
+ \
+ \
+ if ( BOUNDSL( I, CUR.storeSize ) ) \
+ { \
+ if ( CUR.pedantic_hinting ) \
+ { \
+ ARRAY_BOUND_ERROR; \
+ } \
+ else \
+ args[0] = 0; \
+ } \
+ else \
+ args[0] = CUR.storage[I]; \
}
-#define DO_WS \
- { \
- FT_ULong I = (FT_ULong)args[0]; \
- \
- \
- if ( BOUNDS( I, CUR.storeSize ) ) \
- { \
- if ( CUR.pedantic_hinting ) \
- { \
- ARRAY_BOUND_ERROR; \
- } \
- } \
- else \
- CUR.storage[I] = args[1]; \
+#define DO_WS \
+ { \
+ FT_ULong I = (FT_ULong)args[0]; \
+ \
+ \
+ if ( BOUNDSL( I, CUR.storeSize ) ) \
+ { \
+ if ( CUR.pedantic_hinting ) \
+ { \
+ ARRAY_BOUND_ERROR; \
+ } \
+ } \
+ else \
+ CUR.storage[I] = args[1]; \
}
FT_ULong I = (FT_ULong)args[0]; \
\
\
- if ( BOUNDS( I, CUR.cvtSize ) ) \
+ if ( BOUNDSL( I, CUR.cvtSize ) ) \
{ \
if ( CUR.pedantic_hinting ) \
{ \
FT_ULong I = (FT_ULong)args[0]; \
\
\
- if ( BOUNDS( I, CUR.cvtSize ) ) \
+ if ( BOUNDSL( I, CUR.cvtSize ) ) \
{ \
if ( CUR.pedantic_hinting ) \
{ \
FT_ULong I = (FT_ULong)args[0]; \
\
\
- if ( BOUNDS( I, CUR.cvtSize ) ) \
+ if ( BOUNDSL( I, CUR.cvtSize ) ) \
{ \
if ( CUR.pedantic_hinting ) \
{ \
/* first of all, check the index */
F = args[0];
- if ( BOUNDS( F, CUR.maxFunc + 1 ) )
+ if ( BOUNDSL( F, CUR.maxFunc + 1 ) )
goto Fail;
/* Except for some old Apple fonts, all functions in a TrueType */
/* first of all, check the index */
F = args[1];
- if ( BOUNDS( F, CUR.maxFunc + 1 ) )
+ if ( BOUNDSL( F, CUR.maxFunc + 1 ) )
goto Fail;
/* Except for some old Apple fonts, all functions in a TrueType */
}
def->opc = (FT_Byte)args[0];
- def->start = CUR.IP+1;
+ def->start = CUR.IP + 1;
def->range = CUR.curRange;
def->active = TRUE;
L = (FT_ULong)args[0];
- if ( BOUNDS( L, CUR.zp2.n_points ) )
+ if ( BOUNDSL( L, CUR.zp2.n_points ) )
{
if ( CUR.pedantic_hinting )
{
K = (FT_UShort)args[1];
L = (FT_UShort)args[0];
- if( BOUNDS( L, CUR.zp0.n_points ) ||
- BOUNDS( K, CUR.zp1.n_points ) )
+ if ( BOUNDS( L, CUR.zp0.n_points ) ||
+ BOUNDS( K, CUR.zp1.n_points ) )
{
if ( CUR.pedantic_hinting )
{
static void
Ins_SHZ( INS_ARG )
{
- TT_GlyphZoneRec zp;
- FT_UShort refp;
- FT_F26Dot6 dx,
- dy;
+ TT_GlyphZoneRec zp;
+ FT_UShort refp;
+ FT_F26Dot6 dx,
+ dy;
- FT_UShort last_point, i;
+ FT_UShort last_point, i;
if ( BOUNDS( args[0], 2 ) )
if ( CUR.GS.gep2 == 0 && CUR.zp2.n_points > 0 )
last_point = (FT_UShort)( CUR.zp2.n_points - 1 );
else if ( CUR.GS.gep2 == 1 && CUR.zp2.n_contours > 0 )
+ {
last_point = (FT_UShort)( CUR.zp2.contours[CUR.zp2.n_contours - 1] );
+
+ if ( BOUNDS( last_point, CUR.zp2.n_points ) )
+ {
+ if ( CUR.pedantic_hinting )
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+ }
else
last_point = 0;
cvtEntry = (FT_ULong)args[1];
point = (FT_UShort)args[0];
- if ( BOUNDS( point, CUR.zp0.n_points ) ||
- BOUNDS( cvtEntry, CUR.cvtSize ) )
+ if ( BOUNDS( point, CUR.zp0.n_points ) ||
+ BOUNDSL( cvtEntry, CUR.cvtSize ) )
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
/* XXX: UNDOCUMENTED! cvt[-1] = 0 always */
if ( BOUNDS( point, CUR.zp1.n_points ) ||
- BOUNDS( cvtEntry, CUR.cvtSize + 1 ) ||
+ BOUNDSL( cvtEntry, CUR.cvtSize + 1 ) ||
BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) )
{
if ( CUR.pedantic_hinting )
p1 = (FT_UShort)args[0];
p2 = (FT_UShort)args[1];
- if ( BOUNDS( args[0], CUR.zp1.n_points ) ||
- BOUNDS( args[1], CUR.zp0.n_points ) )
+ if ( BOUNDS( p1, CUR.zp1.n_points ) ||
+ BOUNDS( p2, CUR.zp0.n_points ) )
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
end_point = CUR.pts.contours[contour] - CUR.pts.first_point;
first_point = point;
- if ( CUR.pts.n_points <= end_point )
- end_point = CUR.pts.n_points;
+ if ( BOUNDS ( end_point, CUR.pts.n_points ) )
+ end_point = CUR.pts.n_points - 1;
while ( point <= end_point && ( CUR.pts.tags[point] & mask ) == 0 )
point++;
{
if ( ( CUR.pts.tags[point] & mask ) != 0 )
{
- if ( point > 0 )
- _iup_worker_interpolate( &V,
- cur_touched + 1,
- point - 1,
- cur_touched,
- point );
+ _iup_worker_interpolate( &V,
+ cur_touched + 1,
+ point - 1,
+ cur_touched,
+ point );
cur_touched = point;
}
A = (FT_ULong)CUR.stack[CUR.args + 1];
B = CUR.stack[CUR.args];
- if ( BOUNDS( A, CUR.cvtSize ) )
+ if ( BOUNDSL( A, CUR.cvtSize ) )
{
if ( CUR.pedantic_hinting )
{
call = CUR.callStack + CUR.callTop++;
call->Caller_Range = CUR.curRange;
- call->Caller_IP = CUR.IP+1;
+ call->Caller_IP = CUR.IP + 1;
call->Cur_Count = 1;
call->Cur_Restart = def->start;
{
CUR.opcode = CUR.code[CUR.IP];
+ FT_TRACE7(( " " ));
+ FT_TRACE7(( opcode_name[CUR.opcode] ));
+ FT_TRACE7(( "\n" ));
+
if ( ( CUR.length = opcode_length[CUR.opcode] ) < 0 )
{
if ( CUR.IP + 1 > CUR.codeSize )
*exc = cur;
#endif
+ /* If any errors have occurred, function tables may be broken. */
+ /* Force a re-execution of `prep' and `fpgm' tables if no */
+ /* bytecode debugger is run. */
+ if ( CUR.error && !CUR.instruction_trap )
+ {
+ FT_TRACE1(( " The interpreter returned error 0x%x\n", CUR.error ));
+ exc->size->cvt_ready = FALSE;
+ }
+
return CUR.error;
}
/* */
/* TrueType bytecode interpreter (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
FT_Bool step_ins; /* true if the interpreter must */
/* increment IP after ins. exec */
- FT_Long cvtSize;
+ FT_ULong cvtSize;
FT_Long* cvt;
FT_UInt glyphSize; /* glyph instructions buffer size */
FT_Int range );
+ FT_LOCAL( FT_Error )
+ Update_Max( FT_Memory memory,
+ FT_ULong* size,
+ FT_Long multiplier,
+ void* _pbuff,
+ FT_ULong new_max );
+
+
/*************************************************************************/
/* */
/* <Function> */
/* */
/* Objects manager (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* This list shall be expanded as we find more of them. */
static FT_Bool
- tt_check_trickyness( FT_String* name )
+ tt_check_trickyness_family( FT_String* name )
{
+
#define TRICK_NAMES_MAX_CHARACTERS 16
-#define TRICK_NAMES_COUNT 7
- static const char trick_names[TRICK_NAMES_COUNT][TRICK_NAMES_MAX_CHARACTERS+1] =
+#define TRICK_NAMES_COUNT 8
+
+ static const char trick_names[TRICK_NAMES_COUNT]
+ [TRICK_NAMES_MAX_CHARACTERS + 1] =
{
"DFKaiSho-SB", /* dfkaisb.ttf */
"DFKaiShu",
"DFKai-SB", /* kaiu.ttf */
+ "HuaTianKaiTi?", /* htkt2.ttf */
"HuaTianSongTi?", /* htst3.ttf */
"MingLiU", /* mingliu.ttf & mingliu.ttc */
"PMingLiU", /* mingliu.ttc */
"MingLi43", /* mingli.ttf */
};
- int nn;
+ int nn;
- if ( !name )
- return FALSE;
- /* Note that we only check the face name at the moment; it might */
- /* be worth to do more checks for a few special cases. */
for ( nn = 0; nn < TRICK_NAMES_COUNT; nn++ )
if ( ft_strstr( name, trick_names[nn] ) )
return TRUE;
}
+ /* XXX: This function should be in the `sfnt' module. */
+
+ /* Some PDF generators clear the checksums in the TrueType header table. */
+ /* For example, Quartz ContextPDF clears all entries, or Bullzip PDF */
+ /* Printer clears the entries for subsetted subtables. We thus have to */
+ /* recalculate the checksums where necessary. */
+
+ static FT_UInt32
+ tt_synth_sfnt_checksum( FT_Stream stream,
+ FT_ULong length )
+ {
+ FT_Error error;
+ FT_UInt32 checksum = 0;
+ int i;
+
+
+ if ( FT_FRAME_ENTER( length ) )
+ return 0;
+
+ for ( ; length > 3; length -= 4 )
+ checksum += (FT_UInt32)FT_GET_ULONG();
+
+ for ( i = 3; length > 0; length --, i-- )
+ checksum += (FT_UInt32)( FT_GET_BYTE() << ( i * 8 ) );
+
+ FT_FRAME_EXIT();
+
+ return checksum;
+ }
+
+
+ /* XXX: This function should be in the `sfnt' module. */
+
+ static FT_ULong
+ tt_get_sfnt_checksum( TT_Face face,
+ FT_UShort i )
+ {
+ if ( face->dir_tables[i].CheckSum )
+ return face->dir_tables[i].CheckSum;
+
+ else if ( !face->goto_table )
+ return 0;
+
+ else if ( !face->goto_table( face,
+ face->dir_tables[i].Tag,
+ face->root.stream,
+ NULL ) )
+ return 0;
+
+ return (FT_ULong)tt_synth_sfnt_checksum( face->root.stream,
+ face->dir_tables[i].Length );
+ }
+
+
+ typedef struct tt_sfnt_id_rec_
+ {
+ FT_ULong CheckSum;
+ FT_ULong Length;
+
+ } tt_sfnt_id_rec;
+
+
+ static FT_Bool
+ tt_check_trickyness_sfnt_ids( TT_Face face )
+ {
+#define TRICK_SFNT_IDS_PER_FACE 3
+#define TRICK_SFNT_IDS_NUM_FACES 5
+
+ static const tt_sfnt_id_rec sfnt_id[TRICK_SFNT_IDS_NUM_FACES]
+ [TRICK_SFNT_IDS_PER_FACE] = {
+
+#define TRICK_SFNT_ID_cvt 0
+#define TRICK_SFNT_ID_fpgm 1
+#define TRICK_SFNT_ID_prep 2
+
+ { /* MingLiU 1995 */
+ { 0x05bcf058, 0x000002e4 }, /* cvt */
+ { 0x28233bf1, 0x000087c4 }, /* fpgm */
+ { 0xa344a1ea, 0x000001e1 } /* prep */
+ },
+ { /* MingLiU 1996- */
+ { 0x05bcf058, 0x000002e4 }, /* cvt */
+ { 0x28233bf1, 0x000087c4 }, /* fpgm */
+ { 0xa344a1eb, 0x000001e1 } /* prep */
+ },
+ { /* DFKaiShu */
+ { 0x11e5ead4, 0x00000350 }, /* cvt */
+ { 0x5a30ca3b, 0x00009063 }, /* fpgm */
+ { 0x13a42602, 0x0000007e } /* prep */
+ },
+ { /* HuaTianKaiTi */
+ { 0xfffbfffc, 0x00000008 }, /* cvt */
+ { 0x9c9e48b8, 0x0000bea2 }, /* fpgm */
+ { 0x70020112, 0x00000008 } /* prep */
+ },
+ { /* HuaTianSongTi */
+ { 0xfffbfffc, 0x00000008 }, /* cvt */
+ { 0x0a5a0483, 0x00017c39 }, /* fpgm */
+ { 0x70020112, 0x00000008 } /* prep */
+ }
+ };
+
+ FT_ULong checksum;
+ int num_matched_ids[TRICK_SFNT_IDS_NUM_FACES];
+ int i, j, k;
+
+
+ FT_MEM_SET( num_matched_ids, 0,
+ sizeof( int ) * TRICK_SFNT_IDS_NUM_FACES );
+
+ for ( i = 0; i < face->num_tables; i++ )
+ {
+ checksum = 0;
+
+ switch( face->dir_tables[i].Tag )
+ {
+ case TTAG_cvt:
+ k = TRICK_SFNT_ID_cvt;
+ break;
+
+ case TTAG_fpgm:
+ k = TRICK_SFNT_ID_fpgm;
+ break;
+
+ case TTAG_prep:
+ k = TRICK_SFNT_ID_prep;
+ break;
+
+ default:
+ continue;
+ }
+
+ for ( j = 0; j < TRICK_SFNT_IDS_NUM_FACES; j++ )
+ if ( face->dir_tables[i].Length == sfnt_id[j][k].Length )
+ {
+ if ( !checksum )
+ checksum = tt_get_sfnt_checksum( face, i );
+
+ if ( sfnt_id[j][k].CheckSum == checksum )
+ num_matched_ids[j]++;
+
+ if ( num_matched_ids[j] == TRICK_SFNT_IDS_PER_FACE )
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+ }
+
+
+ static FT_Bool
+ tt_check_trickyness( FT_Face face )
+ {
+ if ( !face )
+ return FALSE;
+
+ /* First, check the face name. */
+ if ( face->family_name )
+ {
+ if ( tt_check_trickyness_family( face->family_name ) )
+ return TRUE;
+ else
+ return FALSE;
+ }
+
+ /* Type42 fonts may lack `name' tables, we thus try to identify */
+ /* tricky fonts by checking the checksums of Type42-persistent */
+ /* sfnt tables (`cvt', `fpgm', and `prep'). */
+ if ( tt_check_trickyness_sfnt_ids( (TT_Face)face ) )
+ return TRUE;
+
+ return FALSE;
+ }
+
+
/*************************************************************************/
/* */
/* <Function> */
if ( error )
goto Exit;
- if ( tt_check_trickyness( ttface->family_name ) )
+ if ( tt_check_trickyness( ttface ) )
ttface->face_flags |= FT_FACE_FLAG_TRICKY;
error = tt_face_load_hdmx( face, stream );
error = TT_Goto_CodeRange( exec, tt_coderange_font, 0 );
if ( !error )
+ {
+ FT_TRACE4(( "Executing `fpgm' table.\n" ));
+
error = face->interpreter( exec );
+ }
}
else
error = TT_Err_Ok;
error = TT_Goto_CodeRange( exec, tt_coderange_cvt, 0 );
if ( !error && !size->debug )
+ {
+ FT_TRACE4(( "Executing `prep' table.\n" ));
+
error = face->interpreter( exec );
+ }
}
else
error = TT_Err_Ok;
/* */
/* The FreeType position independent code services for truetype module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2010 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
}
}
+
FT_Error
- tt_driver_class_pic_init( FT_Library library )
+ tt_driver_class_pic_init( FT_Library library )
{
- FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = FT_Err_Ok;
- TTModulePIC* container;
- FT_Memory memory = library->memory;
+ FT_PIC_Container* pic_container = &library->pic_container;
+ FT_Error error = TT_Err_Ok;
+ TTModulePIC* container;
+ FT_Memory memory = library->memory;
+
/* allocate pointer, clear and set global container pointer */
if ( FT_ALLOC ( container, sizeof ( *container ) ) )
/* */
/* TrueType-specific tables loader (body). */
/* */
-/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
dist = diff;
}
+ if ( entry == limit )
+ {
+ /* `loca' is the last table */
+ dist = stream->size - pos;
+ }
+
if ( new_loca_len <= dist )
{
face->num_locations = face->root.num_glyphs;
}
}
+ /* Check broken location data */
+ if ( pos1 >= face->glyf_len )
+ {
+ FT_TRACE1(( "tt_face_get_location:"
+ " too large offset=0x%08lx found for gid=0x%04lx,"
+ " exceeding the end of glyf table (0x%08lx)\n",
+ pos1, gindex, face->glyf_len ));
+ *asize = 0;
+ return 0;
+ }
+
+ if ( pos2 >= face->glyf_len )
+ {
+ FT_TRACE1(( "tt_face_get_location:"
+ " too large offset=0x%08lx found for gid=0x%04lx,"
+ " truncate at the end of glyf table (0x%08lx)\n",
+ pos2, gindex + 1, face->glyf_len ));
+ pos2 = face->glyf_len;
+ }
+
/* The `loca' table must be ordered; it refers to the length of */
/* an entry as the difference between the current and the next */
/* position. However, there do exist (malformed) fonts which */
FT_Short* limit = cur + face->cvt_size;
- for ( ; cur < limit; cur++ )
+ for ( ; cur < limit; cur++ )
*cur = FT_GET_SHORT();
}
/* */
/* AFM support for Type 1 fonts (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
FT_Stream stream )
{
PSAux_Service psaux;
- FT_Memory memory = stream->memory;
+ FT_Memory memory = stream->memory;
AFM_ParserRec parser;
- AFM_FontInfo fi;
- FT_Error error = T1_Err_Unknown_File_Format;
+ AFM_FontInfo fi = NULL;
+ FT_Error error = T1_Err_Unknown_File_Format;
T1_Font t1_font = &( (T1_Face)t1_face )->type1;
/* */
/* Type 1 font loader (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
if ( cur < limit && ft_isdigit( *cur ) )
{
- *size = T1_ToInt( parser );
+ FT_Long s = T1_ToInt( parser );
+
T1_Skip_PS_Token( parser ); /* `RD' or `-|' or something else */
/* `RD' or `-|' token */
*base = parser->root.cursor + 1;
- parser->root.cursor += *size + 1;
- return !parser->root.error;
+ if ( s >= 0 && s < limit - *base )
+ {
+ parser->root.cursor += s + 1;
+ *size = s;
+ return !parser->root.error;
+ }
}
FT_ERROR(( "read_binary_data: invalid size field\n" ));
temp[2] = FT_DivFix( temp[2], temp_scale );
temp[4] = FT_DivFix( temp[4], temp_scale );
temp[5] = FT_DivFix( temp[5], temp_scale );
- temp[3] = 0x10000L;
+ temp[3] = temp[3] < 0 ? -0x10000L : 0x10000L;
}
matrix->xx = temp[0];
/* OK, we do the following: for each element in the encoding */
/* table, look up the index of the glyph having the same name */
/* the index is then stored in type1.encoding.char_index, and */
- /* a the name to type1.encoding.char_name */
+ /* the name to type1.encoding.char_name */
min_char = 0;
max_char = 0;
charmap.face = root;
/* first of all, try to synthesize a Unicode charmap */
- charmap.platform_id = 3;
- charmap.encoding_id = 1;
+ charmap.platform_id = TT_PLATFORM_MICROSOFT;
+ charmap.encoding_id = TT_MS_ID_UNICODE_CS;
charmap.encoding = FT_ENCODING_UNICODE;
- FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
+ error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
+ if ( error && FT_Err_No_Unicode_Glyph_Name != error )
+ goto Exit;
+ error = FT_Err_Ok;
/* now, generate an Adobe Standard encoding when appropriate */
- charmap.platform_id = 7;
+ charmap.platform_id = TT_PLATFORM_ADOBE;
clazz = NULL;
switch ( type1->encoding_type )
}
if ( clazz )
- FT_CMap_New( clazz, NULL, &charmap, NULL );
+ error = FT_CMap_New( clazz, NULL, &charmap, NULL );
#if 0
/* Select default charmap */
#include "t42error.h"
#include FT_INTERNAL_DEBUG_H
#include FT_LIST_H
+#include FT_TRUETYPE_IDS_H
#undef FT_COMPONENT
charmap.face = root;
/* first of all, try to synthesize a Unicode charmap */
- charmap.platform_id = 3;
- charmap.encoding_id = 1;
+ charmap.platform_id = TT_PLATFORM_MICROSOFT;
+ charmap.encoding_id = TT_MS_ID_UNICODE_CS;
charmap.encoding = FT_ENCODING_UNICODE;
- FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
+ error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
+ if ( error && FT_Err_No_Unicode_Glyph_Name != error )
+ goto Exit;
+ error = FT_Err_Ok;
/* now, generate an Adobe Standard encoding when appropriate */
- charmap.platform_id = 7;
+ charmap.platform_id = TT_PLATFORM_ADOBE;
clazz = NULL;
switch ( type1->encoding_type )
{
case T1_ENCODING_TYPE_STANDARD:
charmap.encoding = FT_ENCODING_ADOBE_STANDARD;
- charmap.encoding_id = 0;
+ charmap.encoding_id = TT_ADOBE_ID_STANDARD;
clazz = cmap_classes->standard;
break;
case T1_ENCODING_TYPE_EXPERT:
charmap.encoding = FT_ENCODING_ADOBE_EXPERT;
- charmap.encoding_id = 1;
+ charmap.encoding_id = TT_ADOBE_ID_EXPERT;
clazz = cmap_classes->expert;
break;
case T1_ENCODING_TYPE_ARRAY:
charmap.encoding = FT_ENCODING_ADOBE_CUSTOM;
- charmap.encoding_id = 2;
+ charmap.encoding_id = TT_ADOBE_ID_CUSTOM;
clazz = cmap_classes->custom;
break;
case T1_ENCODING_TYPE_ISOLATIN1:
charmap.encoding = FT_ENCODING_ADOBE_LATIN_1;
- charmap.encoding_id = 3;
+ charmap.encoding_id = TT_ADOBE_ID_LATIN_1;
clazz = cmap_classes->unicode;
break;
}
if ( clazz )
- FT_CMap_New( clazz, NULL, &charmap, NULL );
+ error = FT_CMap_New( clazz, NULL, &charmap, NULL );
#if 0
/* Select default charmap */
/* */
/* Type 42 font parser (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */
/* Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* as Type42 fonts have no Private dict, */
/* we set the last argument of T1_FIELD_XXX to 0 */
static const
- T1_FieldRec t42_keywords[] = {
+ T1_FieldRec t42_keywords[] =
+ {
#undef FT_STRUCTURE
#define FT_STRUCTURE T1_FontInfo
temp_scale ) >> 16 );
/* we need to scale the values by 1.0/temp_scale */
- if ( temp_scale != 0x10000L ) {
+ if ( temp_scale != 0x10000L )
+ {
temp[0] = FT_DivFix( temp[0], temp_scale );
temp[1] = FT_DivFix( temp[1], temp_scale );
temp[2] = FT_DivFix( temp[2], temp_scale );
}
string_size = T1_ToInt( parser );
+ if ( string_size < 0 )
+ {
+ FT_ERROR(( "t42_parse_sfnts: invalid string size\n" ));
+ error = T42_Err_Invalid_File_Format;
+ goto Fail;
+ }
T1_Skip_PS_Token( parser ); /* `RD' */
if ( parser->root.error )
string_buf = parser->root.cursor + 1; /* one space after `RD' */
- parser->root.cursor += string_size + 1;
- if ( parser->root.cursor >= limit )
+ if ( limit - parser->root.cursor < string_size )
{
FT_ERROR(( "t42_parse_sfnts: too many binary data\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
+ else
+ parser->root.cursor += string_size + 1;
}
if ( !string_buf )
/* */
/* FreeType font driver for Windows FNT/FON files */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* Copyright 2003 Huw D M Davies for Codeweavers */
/* Copyright 2007 Dmitry Timoshkov for Codeweavers */
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_OBJECTS_H
+#include FT_TRUETYPE_IDS_H
#include "winfnt.h"
#include "fnterrs.h"
charmap.encoding = FT_ENCODING_NONE;
- charmap.platform_id = 0;
- charmap.encoding_id = 0;
+ /* initial platform/encoding should indicate unset status? */
+ charmap.platform_id = TT_PLATFORM_APPLE_UNICODE;
+ charmap.encoding_id = TT_APPLE_ID_DEFAULT;
charmap.face = root;
if ( font->header.charset == FT_WinFNT_ID_MAC )
{
charmap.encoding = FT_ENCODING_APPLE_ROMAN;
- charmap.platform_id = 1;
-/* charmap.encoding_id = 0; */
+ charmap.platform_id = TT_PLATFORM_MACINTOSH;
+/* charmap.encoding_id = TT_MAC_ID_ROMAN; */
}
error = FT_CMap_New( fnt_cmap_class,
FT_Int32 load_flags )
{
FNT_Face face = (FNT_Face)FT_SIZE_FACE( size );
- FNT_Font font = face->font;
+ FNT_Font font;
FT_Error error = FNT_Err_Ok;
FT_Byte* p;
FT_Int len;
FT_UNUSED( load_flags );
- if ( !face || !font ||
+ if ( !face )
+ {
+ error = FNT_Err_Invalid_Argument;
+ goto Exit;
+ }
+
+ font = face->font;
+
+ if ( !font ||
glyph_index >= (FT_UInt)( FT_FACE( face )->num_glyphs ) )
{
error = FNT_Err_Invalid_Argument;
retcode = FALSE;
goto i__leave;
}
+ _pei386_runtime_relocator ();
if (dwReason == DLL_PROCESS_ATTACH || dwReason == DLL_THREAD_ATTACH)
{
+ retcode = _CRT_INIT (hDllHandle, dwReason, lpreserved);
+ if (!retcode)
+ goto i__leave;
retcode = DllEntryPoint (hDllHandle, dwReason, lpreserved);
- if (retcode)
- retcode = _CRT_INIT (hDllHandle, dwReason, lpreserved);
if (! retcode)
- goto i__leave;
+ {
+ if (dwReason == DLL_PROCESS_ATTACH)
+ _CRT_INIT (hDllHandle, DLL_PROCESS_DETACH, lpreserved);
+ goto i__leave;
+ }
}
- _pei386_runtime_relocator ();
- if (retcode && dwReason == DLL_PROCESS_ATTACH)
+ if (dwReason == DLL_PROCESS_ATTACH)
__main ();
retcode = DllMain(hDllHandle,dwReason,lpreserved);
- if ((dwReason == DLL_PROCESS_ATTACH) && ! retcode)
+ if (dwReason == DLL_PROCESS_ATTACH && ! retcode)
{
DllMain (hDllHandle, DLL_PROCESS_DETACH, lpreserved);
- _CRT_INIT (hDllHandle, DLL_PROCESS_DETACH, lpreserved);
DllEntryPoint (hDllHandle, DLL_PROCESS_DETACH, lpreserved);
+ _CRT_INIT (hDllHandle, DLL_PROCESS_DETACH, lpreserved);
}
if (dwReason == DLL_PROCESS_DETACH || dwReason == DLL_THREAD_DETACH)
{
+ retcode = DllEntryPoint (hDllHandle, dwReason, lpreserved);
if (_CRT_INIT (hDllHandle, dwReason, lpreserved) == FALSE)
- {
- retcode = FALSE;
- }
- if (retcode)
- {
- retcode = DllEntryPoint (hDllHandle, dwReason, lpreserved);
- }
+ retcode = FALSE;
}
i__leave:
__native_dllmain_reason = UINT_MAX;
add_definitions(-D_NTSYSTEM_)
list(APPEND SOURCE
delete.c
- dwarf386.c
dwarfabbrev.c
dwarfaranges.c
dwarfcfa.c
dwarfpubnames.c
find.c
fromfile.c
- iofile.c
init.c
- initkm.c
initum.c
pe.c
zwfile.c)
void xfree(void *v);
#define werrstr(str, ...) DPRINT(str "\n" ,##__VA_ARGS__)
+//#define werrstr(x, ...) printf("(%s:%d) " x "\n",__FILE__,__LINE__,##__VA_ARGS__)
+
#define malloc(x) RosSymAllocMem(x)
#define mallocz(x,y) RosSymAllocMemZero(x,y)
#define free(x) xfree(x)
typedef struct DwarfBuf DwarfBuf;
typedef struct DwarfExpr DwarfExpr;
typedef struct DwarfSym DwarfSym;
+typedef struct DwarfStack DwarfStack;
+typedef struct DwarfParam DwarfParam;
typedef union DwarfVal DwarfVal;
enum
ulong len;
};
+struct DwarfParam
+{
+ char *name;
+ ulong unit;
+ ulong type;
+ ulong loctype;
+ ulong fde, len;
+ ulong value;
+};
+
/* not for consumer use */
struct DwarfBuf
{
struct DwarfSym
{
- DwarfAttrs attrs;
-
+ DwarfAttrs attrs;
+
/* not for consumer use... */
- DwarfBuf b;
- ulong unit;
- uint uoff;
- ulong aoff;
- int depth;
- int allunits;
- ulong nextunit;
+ uint num;
+ DwarfBuf b;
+ int depth;
+ ulong unit, childoff, nextunit;
+ ulong aoff;
};
-
struct _Pe;
Dwarf *dwarfopen(struct _Pe *elf);
void dwarfclose(Dwarf*);
int dwarfseeksym(Dwarf*, ulong, ulong, DwarfSym*);
int dwarfenum(Dwarf*, DwarfSym*);
int dwarfnextsym(Dwarf*, DwarfSym*);
-int dwarfnextsymat(Dwarf*, DwarfSym*, int);
-int dwarfpctoline(Dwarf*, ulong, char**, char**, char**, char **, ulong*, ulong*, ulong*);
-int dwarfunwind(Dwarf*, ulong, DwarfExpr*, DwarfExpr*, DwarfExpr*, int);
+int dwarfnextsymat(Dwarf*, DwarfSym *parent, DwarfSym *child);
+int dwarfpctoline(Dwarf*, DwarfSym *proc, ulong, char**, char**, ulong *);
+int dwarfgetarg(Dwarf *d, const char *name, DwarfBuf *locbuf, ulong cfa, PROSSYM_REGISTERS registers, ulong *value);
+int dwarfgettype(Dwarf *d, DwarfSym *param, DwarfSym *type);
+
ulong dwarfget1(DwarfBuf*);
ulong dwarfget2(DwarfBuf*);
ulong dwarfget4(DwarfBuf*);
int dwarfgetn(DwarfBuf*, uchar*, int);
uchar *dwarfgetnref(DwarfBuf*, ulong);
char *dwarfgetstring(DwarfBuf*);
-
+int dwarfcomputecfa(Dwarf *d, DwarfExpr *cfa, PROSSYM_REGISTERS registers, ulong *cfaLocation);
+int dwarfregunwind(Dwarf *d, ulong pc, ulong fde, DwarfExpr *cfa, PROSSYM_REGISTERS registers);
+int dwarfargvalue(Dwarf *d, DwarfSym *proc, ulong pc, ulong cfa, PROSSYM_REGISTERS registers, DwarfParam *parameters);
+int dwarfgetparams(Dwarf *d, DwarfSym *s, ulong pc, int pnum, DwarfParam *paramblocks);
typedef struct DwarfAbbrev DwarfAbbrev;
typedef struct DwarfAttr DwarfAttr;
DwarfBlock pubtypes;
DwarfBlock ranges;
DwarfBlock str;
+ DwarfBlock loc;
/* little cache */
struct {
} acache;
};
+struct DwarfStack
+{
+ ulong storage[16]; // own storage
+ ulong *data;
+ ulong length, max;
+};
+
DwarfAbbrev *dwarfgetabbrev(Dwarf*, ulong, ulong);
int dwarfgetinfounit(Dwarf*, ulong, DwarfBlock*);
-extern int dwarf386nregs;
-extern char *dwarf386regs[];
-extern char *dwarf386fp;
-
-#define SYMBOL_SIZE 18
#define MAXIMUM_DWARF_NAME_SIZE 64
-#define MAXIMUM_COFF_SYMBOL_LENGTH 256
static int
loadabbrevs(Dwarf *d, ulong off, DwarfAbbrev **aa)
{
- int nattr, nabbrev;
- DwarfAbbrev *abbrev;
- DwarfAttr *attr;
-
- if(d->acache.off == off && d->acache.na){
- *aa = d->acache.a;
- return d->acache.na;
- }
-
- /* two passes - once to count, then allocate, then a second to copy */
- if(parseabbrevs(d, off, nil, nil, &nabbrev, &nattr) < 0) {
- return -1;
- }
-
- abbrev = malloc(nabbrev*sizeof(DwarfAbbrev) + nattr*sizeof(DwarfAttr));
- attr = (DwarfAttr*)(abbrev+nabbrev);
-
- if(parseabbrevs(d, off, abbrev, attr, nil, nil) < 0){
- free(abbrev);
- return -1;
- }
-
- free(d->acache.a);
- d->acache.a = abbrev;
- d->acache.na = nabbrev;
- d->acache.off = off;
-
- *aa = abbrev;
- return nabbrev;
+ int nattr, nabbrev;
+ DwarfAbbrev *abbrev;
+ DwarfAttr *attr;
+
+ if(d->acache.off == off && d->acache.na){
+ *aa = d->acache.a;
+ return d->acache.na;
+ }
+
+ /* two passes - once to count, then allocate, then a second to copy */
+ if(parseabbrevs(d, off, nil, nil, &nabbrev, &nattr) < 0) {
+ return -1;
+ }
+
+ abbrev = malloc(nabbrev*sizeof(DwarfAbbrev) + nattr*sizeof(DwarfAttr));
+ attr = (DwarfAttr*)(abbrev+nabbrev);
+
+ if(parseabbrevs(d, off, abbrev, attr, nil, nil) < 0){
+ free(abbrev);
+ return -1;
+ }
+
+ free(d->acache.a);
+ d->acache.a = abbrev;
+ d->acache.na = nabbrev;
+ d->acache.off = off;
+
+ *aa = abbrev;
+ return nabbrev;
}
static int
parseabbrevs(Dwarf *d, ulong off, DwarfAbbrev *abbrev, DwarfAttr *attr, int *pnabbrev, int *pnattr)
{
- int i, nabbrev, nattr, haskids;
- ulong num, tag, name, form;
- DwarfBuf b;
-
- if(off >= d->abbrev.len){
- werrstr("bad abbrev section offset 0x%lux >= 0x%lux\n", off, d->abbrev.len);
- return -1;
- }
-
- memset(&b, 0, sizeof b);
- b.p = d->abbrev.data + off;
- b.ep = d->abbrev.data + d->abbrev.len;
-
- nabbrev = 0;
- nattr = 0;
- for(;;){
- if(b.p == nil){
- werrstr("malformed abbrev data");
- return -1;
- }
- num = dwarfget128(&b);
- if(num == 0)
- break;
- tag = dwarfget128(&b);
- haskids = dwarfget1(&b);
- for(i=0;; i++){
- name = dwarfget128(&b);
- form = dwarfget128(&b);
- if(name == 0 && form == 0)
- break;
- if(attr){
- attr[i].name = name;
- attr[i].form = form;
- }
- }
- if(abbrev){
- abbrev->num = num;
- abbrev->tag = tag;
- abbrev->haskids = haskids;
- abbrev->attr = attr;
- abbrev->nattr = i;
- abbrev++;
- attr += i;
- }
- nabbrev++;
- nattr += i;
- }
- if(pnabbrev)
- *pnabbrev = nabbrev;
- if(pnattr)
- *pnattr = nattr;
- return 0;
+ int i, nabbrev, nattr, haskids;
+ ulong num, tag, name, form;
+ DwarfBuf b;
+
+ if(off >= d->abbrev.len){
+ werrstr("bad abbrev section offset 0x%lux >= 0x%lux", off, d->abbrev.len);
+ return -1;
+ }
+
+ memset(&b, 0, sizeof b);
+ b.p = d->abbrev.data + off;
+ b.ep = d->abbrev.data + d->abbrev.len;
+
+ nabbrev = 0;
+ nattr = 0;
+ for(;;){
+ if(b.p == nil){
+ werrstr("malformed abbrev data");
+ return -1;
+ }
+ num = dwarfget128(&b);
+ if(num == 0)
+ break;
+ tag = dwarfget128(&b);
+ DPRINT("num %d tag %x @ %x", num, tag, b.p - d->abbrev.data);
+ haskids = dwarfget1(&b);
+ for(i=0;; i++){
+ name = dwarfget128(&b);
+ form = dwarfget128(&b);
+ assert(form < 0x3000);
+ if(name == 0 && form == 0)
+ break;
+ if(attr){
+ attr[i].name = name;
+ attr[i].form = form;
+ }
+ }
+ if(abbrev){
+ abbrev->num = num;
+ abbrev->tag = tag;
+ abbrev->haskids = haskids;
+ abbrev->attr = attr;
+ abbrev->nattr = i;
+ abbrev++;
+ attr += i;
+ }
+ nabbrev++;
+ nattr += i;
+ }
+ if(pnabbrev)
+ *pnabbrev = nabbrev;
+ if(pnattr)
+ *pnattr = nattr;
+ return 0;
}
static DwarfAbbrev*
findabbrev(DwarfAbbrev *a, int na, ulong num)
{
- int i;
-
- for(i=0; i<na; i++)
- if(a[i].num == num)
- return &a[i];
- werrstr("abbrev not found");
- return nil;
+ int i;
+
+ for(i=0; i<na; i++)
+ if(a[i].num == num)
+ return &a[i];
+ assert(0);
+ werrstr("abbrev not found");
+ return nil;
}
DwarfAbbrev*
dwarfgetabbrev(Dwarf *d, ulong off, ulong num)
{
- DwarfAbbrev *a;
- int na;
-
- if((na = loadabbrevs(d, off, &a)) < 0){
- werrstr("loadabbrevs: %r");
- return nil;
- }
- return findabbrev(a, na, num);
+ DwarfAbbrev *a;
+ int na;
+
+ if((na = loadabbrevs(d, off, &a)) < 0){
+ werrstr("loadabbrevs: %r");
+ return nil;
+ }
+ return findabbrev(a, na, num);
}
-
int
dwarfaddrtounit(Dwarf *d, ulong addr, ulong *unit)
{
- DwarfBuf b;
- int segsize, i;
- ulong len, id, off, base, size;
- uchar *start, *end;
+ DwarfBuf b;
+ int segsize, i;
+ ulong len, id, off, base, size;
+ uchar *start, *end;
- memset(&b, 0, sizeof b);
- b.d = d;
- b.p = d->aranges.data;
- b.ep = b.p + d->aranges.len;
+ memset(&b, 0, sizeof b);
+ b.d = d;
+ b.p = d->aranges.data;
+ b.ep = b.p + d->aranges.len;
- while(b.p < b.ep){
- start = b.p;
- len = dwarfget4(&b);
- if (!len) { b.ep = b.p - 4; return -1; }
- if((id = dwarfget2(&b)) != 2){
- if(b.p == nil){
- underflow:
- werrstr("buffer underflow reading address ranges header");
- }else
- werrstr("bad dwarf version 0x%x in address ranges header", id);
- return -1;
- }
- off = dwarfget4(&b);
- b.addrsize = dwarfget1(&b);
- if(d->addrsize == 0)
- d->addrsize = b.addrsize;
- segsize = dwarfget1(&b);
- USED(segsize); /* what am i supposed to do with this? */
- if(b.p == nil)
- goto underflow;
- if((i = (b.p-start) % (2*b.addrsize)) != 0)
- b.p += 2*b.addrsize - i;
- end = start+4+len;
- while(b.p!=nil && b.p<end){
- base = dwarfgetaddr(&b);
- size = dwarfgetaddr(&b);
- if (!size) continue;
- if(b.p == nil)
- goto underflow;
- if(base <= addr && addr < base+size){
- *unit = off;
- return 0;
- }
- }
- if(b.p == nil)
- goto underflow;
- b.p = end;
- }
- werrstr("address 0x%lux is not listed in dwarf debugging symbols", addr);
- return -1;
+ while(b.p < b.ep){
+ start = b.p;
+ len = dwarfget4(&b);
+ if (!len) { b.ep = b.p - 4; return -1; }
+ if((id = dwarfget2(&b)) != 2){
+ if(b.p == nil){
+ underflow:
+ werrstr("buffer underflow reading address ranges header");
+ }else
+ werrstr("bad dwarf version 0x%x in address ranges header", id);
+ return -1;
+ }
+ off = dwarfget4(&b);
+ b.addrsize = dwarfget1(&b);
+ if(d->addrsize == 0)
+ d->addrsize = b.addrsize;
+ segsize = dwarfget1(&b);
+ USED(segsize); /* what am i supposed to do with this? */
+ if(b.p == nil)
+ goto underflow;
+ if((i = (b.p-start) % (2*b.addrsize)) != 0)
+ b.p += 2*b.addrsize - i;
+ end = start+4+len;
+ while(b.p!=nil && b.p<end){
+ base = dwarfgetaddr(&b);
+ size = dwarfgetaddr(&b);
+ if (!size) continue;
+ if(b.p == nil)
+ goto underflow;
+ if(base <= addr && addr < base+size){
+ *unit = off;
+ return 0;
+ }
+ }
+ if(b.p == nil)
+ goto underflow;
+ b.p = end;
+ }
+ werrstr("address 0x%lux is not listed in dwarf debugging symbols", addr);
+ return -1;
}
-
-
#define NDEBUG
#include <debug.h>
+#include "pe.h"
#include "dwarf.h"
-#define trace 0
+#define trace 1
typedef struct State State;
struct State
memset(r, 0, nr*sizeof(r[0]));
for(i=0; i<nr; i++)
r[i].type = RuleSame;
- if(trace) werrstr("s.init %p-%p, fde %p-%p\n", s.init.p, s.init.ep, fde.p, fde.ep);
+ if(trace) werrstr("s.init %p-%p, fde %p-%p", s.init.p, s.init.ep, fde.p, fde.ep);
b = s.init;
if(dexec(&b, &s, 0) < 0)
goto err;
s.initr = initr;
memmove(initr, r, nr*sizeof(initr[0]));
- if(trace) werrstr("s.loc 0x%lux pc 0x%lux\n", s.loc, pc);
+ if(trace) werrstr("s.loc 0x%lx pc 0x%lx", s.loc, pc);
while(s.loc < pc){
- if(trace) werrstr("s.loc 0x%lux pc 0x%lux\n", s.loc, pc);
+ if(trace) werrstr("s.loc 0x%lx pc 0x%lx", s.loc, pc);
if(dexec(&fde, &s, 1) < 0)
goto err;
}
id = dwarfget4(&b);
if(id == 0xFFFFFFFF){ /* CIE */
vers = dwarfget1(&b);
+ if (trace) werrstr("CIE len %x id %x vers %x", len, id, vers);
if(vers != 1 && vers != 2 && vers != 3){
if(++nbad == 1)
- werrstr("unknown cie version %d (wanted 1-3)\n", vers);
+ werrstr("unknown cie version %d (wanted 1-3)", vers);
continue;
}
aug = dwarfgetstring(&b);
if(aug && *aug){
if(++nbad == 1)
- werrstr("unknown augmentation: %s\n", aug);
+ werrstr("unknown augmentation: %s", aug);
continue;
}
s->iquantum = dwarfget128(&b);
}else{ /* FDE */
base = dwarfgetaddr(&b);
size = dwarfgetaddr(&b);
+ if (trace) werrstr("FDE: base %x-%x (want pc %x)", base, base+size, pc);
fde->p = b.p;
fde->ep = next;
s->loc = base;
return 0;
}
}
- werrstr("cannot find call frame information for pc 0x%lux", pc);
+ werrstr("cannot find call frame information for pc 0x%lx", pc);
return -1;
}
checkreg(State *s, long r)
{
if(r < 0 || r >= s->nr){
- werrstr("bad register number 0x%lux", r);
+ werrstr("bad register number 0x%lx", r);
return -1;
}
return 0;
if(b->p == b->ep){
if(s->initr)
s->loc = s->endloc;
+ werrstr("end dexec");
return 0;
}
c = dwarfget1(b);
if(b->p == nil){
werrstr("ran out of instructions during cfa program");
- if(trace) werrstr("%r\n");
+ if(trace) werrstr("%r");
return -1;
}
- if(trace) werrstr("+ loc=0x%lux op 0x%ux ", s->loc, c);
+ if(trace) werrstr("+ loc=0x%x op 0x%x ", s->loc, c);
switch(c>>6){
case 1: /* advance location */
arg1 = c&0x3F;
advance:
- if(trace) werrstr("loc += %ld\n", arg1*s->iquantum);
+ if(trace) werrstr("loc += %ld", arg1*s->iquantum);
s->loc += arg1 * s->iquantum;
if(locstop)
return 0;
arg1 = c&0x3F;
arg2 = dwarfget128(b);
offset:
- if(trace) werrstr("r%ld += %ld\n", arg1, arg2*s->dquantum);
+ if(trace) werrstr("r%ld += %ld", arg1, arg2*s->dquantum);
if(checkreg(s, arg1) < 0)
return -1;
s->r[arg1].type = RuleCfaOffset;
case 3: /* restore initial setting */
arg1 = c&0x3F;
restore:
- if(trace) werrstr("r%ld = init\n", arg1);
+ if(trace) werrstr("r%ld = init", arg1);
if(checkreg(s, arg1) < 0)
return -1;
s->r[arg1] = s->initr[arg1];
switch(c){
case 0: /* nop */
- if(trace) werrstr("nop\n");
+ if(trace) werrstr("nop");
continue;
case 0x01: /* set location */
s->loc = dwarfgetaddr(b);
- if(trace) werrstr("loc = 0x%lux\n", s->loc);
+ if(trace) werrstr("loc = 0x%lx", s->loc);
if(locstop)
return 0;
continue;
case 0x07: /* undefined */
arg1 = dwarfget128(b);
- if(trace) werrstr("r%ld = undef\n", arg1);
+ if(trace) werrstr("r%ld = undef", arg1);
if(checkreg(s, arg1) < 0)
return -1;
s->r[arg1].type = RuleUndef;
case 0x08: /* same value */
arg1 = dwarfget128(b);
- if(trace) werrstr("r%ld = same\n", arg1);
+ if(trace) werrstr("r%ld = same", arg1);
if(checkreg(s, arg1) < 0)
return -1;
s->r[arg1].type = RuleSame;
case 0x09: /* register */
arg1 = dwarfget128(b);
arg2 = dwarfget128(b);
- if(trace) werrstr("r%ld = r%ld\n", arg1, arg2);
+ if(trace) werrstr("r%ld = r%ld", arg1, arg2);
if(checkreg(s, arg1) < 0 || checkreg(s, arg2) < 0)
return -1;
s->r[arg1].type = RuleRegister;
case 0x0A: /* remember state */
e = malloc(s->nr*sizeof(e[0]));
- if(trace) werrstr("push\n");
+ if(trace) werrstr("push");
if(e == nil)
return -1;
void *newstack = malloc(s->nstack*sizeof(s->stack[0]));
continue;
case 0x0B: /* restore state */
- if(trace) werrstr("pop\n");
+ if(trace) werrstr("pop");
if(s->nstack == 0){
werrstr("restore state underflow");
return -1;
arg1 = dwarfget128(b);
arg2 = dwarfget128(b);
defcfa:
- if(trace) werrstr("cfa %ld(r%ld)\n", arg2, arg1);
+ if(trace) werrstr("cfa %ld(r%ld)", arg2, arg1);
if(checkreg(s, arg1) < 0)
return -1;
s->cfa->type = RuleRegOff;
case 0x0D: /* def cfa register */
arg1 = dwarfget128(b);
- if(trace) werrstr("cfa reg r%ld\n", arg1);
+ if(trace) werrstr("cfa reg r%ld", arg1);
if(s->cfa->type != RuleRegOff){
werrstr("change CFA register but CFA not in register+offset form");
return -1;
case 0x0E: /* def cfa offset */
arg1 = dwarfget128(b);
cfaoffset:
- if(trace) werrstr("cfa off %ld\n", arg1);
+ if(trace) werrstr("cfa off %ld", arg1);
if(s->cfa->type != RuleRegOff){
werrstr("change CFA offset but CFA not in register+offset form");
return -1;
continue;
case 0x0F: /* def cfa expression */
- if(trace) werrstr("cfa expr\n");
+ if(trace) werrstr("cfa expr");
s->cfa->type = RuleLocation;
s->cfa->loc.len = dwarfget128(b);
s->cfa->loc.data = dwarfgetnref(b, s->cfa->loc.len);
case 0x10: /* def reg expression */
arg1 = dwarfget128(b);
- if(trace) werrstr("reg expr r%ld\n", arg1);
+ if(trace) werrstr("reg expr r%ld", arg1);
if(checkreg(s, arg1) < 0)
return -1;
s->r[arg1].type = RuleLocation;
goto cfaoffset;
default: /* unknown */
- werrstr("unknown opcode 0x%ux in cfa program", c);
+ werrstr("unknown opcode 0x%x in cfa program", c);
return -1;
}
}
/* not reached */
}
+int dwarfcomputecfa(Dwarf *d, DwarfExpr *cfa, PROSSYM_REGISTERS registers, ulong *cfaLocation)
+{
+ switch (cfa->type) {
+ case RuleRegOff:
+ *cfaLocation = registers->Registers[cfa->reg] + cfa->offset;
+ werrstr("cfa reg %d (%x) offset %x = %x", cfa->reg, (ulong)registers->Registers[cfa->reg], cfa->offset, cfaLocation);
+ break;
+ default:
+ werrstr("cfa->type %x", cfa->type);
+ return -1;
+ }
+
+ return 0;
+}
+int dwarfregunwind(Dwarf *d, ulong pc, ulong fde, DwarfExpr *cfa, PROSSYM_REGISTERS registers)
+{
+ int i;
+ State s = { };
+ DwarfExpr initr[sizeof(registers->Registers) / sizeof(registers->Registers[0])] = { };
+ DwarfExpr r[sizeof(registers->Registers) / sizeof(registers->Registers[0])] = { };
+ DwarfExpr ra;
+
+ int nr = s.nr = sizeof(registers->Registers) / sizeof(registers->Registers[0]);
+ s.initr = initr;
+ s.r = r;
+ for (i = 0; i < sizeof(r) / sizeof(r[0]); i++) {
+ r[i].type = RuleRegister;
+ r[i].offset = registers->Registers[i];
+ r[i].reg = i;
+ }
+
+ int res = dwarfunwind(d, pc, cfa, &ra, initr, sizeof(initr) / sizeof(initr[0]));
+ if (res == -1) return -1;
+
+ ulong cfaLocation;
+
+ if (dwarfcomputecfa(d, cfa, registers, &cfaLocation) == -1)
+ return -1;
+
+ for (i = 0; i < nr; i++) {
+ switch (r[i].type) {
+ case RuleUndef:
+ werrstr("Undefined register slot %d", i);
+ assert(FALSE);
+ break;
+ case RuleSame:
+ break;
+ case RuleRegister:
+ registers->Registers[i] = registers->Registers[r[i].reg];
+ break;
+ case RuleRegOff: {
+ BOOLEAN success =
+ RosSymCallbacks.MemGetProc
+ (d->pe->fd,
+ ®isters->Registers[i],
+ r[i].offset + registers->Registers[r[i].reg],
+ d->addrsize);
+ if (!success) return -1;
+ } break;
+ case RuleCfaOffset:
+ {
+ BOOLEAN success =
+ RosSymCallbacks.MemGetProc
+ (d->pe->fd,
+ ®isters->Registers[i],
+ r[i].offset + cfaLocation,
+ d->addrsize);
+ werrstr("reg[%d] = %x: cfa offset (cfa %x, offset %x) -> @%x", i, (ulong)registers->Registers[i], cfaLocation, initr[i].offset, r[i].offset + cfaLocation);
+ if (!success) return -1;
+ } break;
+ default:
+ werrstr("We don't yet support cfa rule %d in slot %d", r[i].type, i);
+ assert(FALSE);
+ break;
+ }
+ }
+
+ ulong cfaSpace[4];
+ for (i = 0; i < sizeof(cfaSpace) / sizeof(cfaSpace[0]); i++) {
+ RosSymCallbacks.MemGetProc
+ (d->pe->fd, &cfaSpace[i], cfaLocation + (i * 4), d->addrsize);
+ }
+ werrstr("CFA(%x) [%08x, %08x, %08x, %08x]",
+ cfaLocation, cfaSpace[0], cfaSpace[1], cfaSpace[2], cfaSpace[3]);
+
+ return 0;
+}
return dwarfget8(b);
default:
if(++nbad == 1)
- werrstr("dwarf: unexpected address size %lud in dwarfgetaddr\n", b->addrsize);
+ werrstr("dwarf: unexpected address size %lud in dwarfgetaddr", b->addrsize);
b->p = nil;
return 0;
}
while(b->p<b->ep && *b->p&0x80)
b->p++;
if(++nbad == 1)
- werrstr("dwarf: overflow during parsing of uleb128 integer\n");
+ werrstr("dwarf: overflow during parsing of uleb128 integer");
return c;
}
#include <debug.h>
#include "dwarf.h"
+#include "pe.h"
#include <windef.h>
enum
{
- DwarfAttrSibling = 0x01,
- DwarfAttrLocation = 0x02,
- DwarfAttrName = 0x03,
- DwarfAttrOrdering = 0x09,
- DwarfAttrByteSize = 0x0B,
- DwarfAttrBitOffset = 0x0C,
- DwarfAttrBitSize = 0x0D,
- DwarfAttrStmtList = 0x10,
- DwarfAttrLowpc = 0x11,
- DwarfAttrHighpc = 0x12,
- DwarfAttrLanguage = 0x13,
- DwarfAttrDiscr = 0x15,
- DwarfAttrDiscrValue = 0x16,
- DwarfAttrVisibility = 0x17,
- DwarfAttrImport = 0x18,
- DwarfAttrStringLength = 0x19,
- DwarfAttrCommonRef = 0x1A,
- DwarfAttrCompDir = 0x1B,
- DwarfAttrConstValue = 0x1C,
- DwarfAttrContainingType = 0x1D,
- DwarfAttrDefaultValue = 0x1E,
- DwarfAttrInline = 0x20,
- DwarfAttrIsOptional = 0x21,
- DwarfAttrLowerBound = 0x22,
- DwarfAttrProducer = 0x25,
- DwarfAttrPrototyped = 0x27,
- DwarfAttrReturnAddr = 0x2A,
- DwarfAttrStartScope = 0x2C,
- DwarfAttrStrideSize = 0x2E,
- DwarfAttrUpperBound = 0x2F,
- DwarfAttrAbstractOrigin = 0x31,
- DwarfAttrAccessibility = 0x32,
- DwarfAttrAddrClass = 0x33,
- DwarfAttrArtificial = 0x34,
- DwarfAttrBaseTypes = 0x35,
- DwarfAttrCalling = 0x36,
- DwarfAttrCount = 0x37,
- DwarfAttrDataMemberLoc = 0x38,
- DwarfAttrDeclColumn = 0x39,
- DwarfAttrDeclFile = 0x3A,
- DwarfAttrDeclLine = 0x3B,
- DwarfAttrDeclaration = 0x3C,
- DwarfAttrDiscrList = 0x3D,
- DwarfAttrEncoding = 0x3E,
- DwarfAttrExternal = 0x3F,
- DwarfAttrFrameBase = 0x40,
- DwarfAttrFriend = 0x41,
- DwarfAttrIdentifierCase = 0x42,
- DwarfAttrMacroInfo = 0x43,
- DwarfAttrNamelistItem = 0x44,
- DwarfAttrPriority = 0x45,
- DwarfAttrSegment = 0x46,
- DwarfAttrSpecification = 0x47,
- DwarfAttrStaticLink = 0x48,
- DwarfAttrType = 0x49,
- DwarfAttrUseLocation = 0x4A,
- DwarfAttrVarParam = 0x4B,
- DwarfAttrVirtuality = 0x4C,
- DwarfAttrVtableElemLoc = 0x4D,
- DwarfAttrAllocated = 0x4E,
- DwarfAttrAssociated = 0x4F,
- DwarfAttrDataLocation = 0x50,
- DwarfAttrStride = 0x51,
- DwarfAttrEntrypc = 0x52,
- DwarfAttrUseUTF8 = 0x53,
- DwarfAttrExtension = 0x54,
- DwarfAttrRanges = 0x55,
- DwarfAttrTrampoline = 0x56,
- DwarfAttrCallColumn = 0x57,
- DwarfAttrCallFile = 0x58,
- DwarfAttrCallLine = 0x59,
- DwarfAttrDescription = 0x5A,
- DwarfAttrMax,
-
- FormAddr = 0x01,
- FormDwarfBlock2 = 0x03,
- FormDwarfBlock4 = 0x04,
- FormData2 = 0x05,
- FormData4 = 0x06,
- FormData8 = 0x07,
- FormString = 0x08,
- FormDwarfBlock = 0x09,
- FormDwarfBlock1 = 0x0A,
- FormData1 = 0x0B,
- FormFlag = 0x0C,
- FormSdata = 0x0D,
- FormStrp = 0x0E,
- FormUdata = 0x0F,
- FormRefAddr = 0x10,
- FormRef1 = 0x11,
- FormRef2 = 0x12,
- FormRef4 = 0x13,
- FormRef8 = 0x14,
- FormRefUdata = 0x15,
- FormIndirect = 0x16
+ DwarfAttrSibling = 0x01,
+ DwarfAttrLocation = 0x02,
+ DwarfAttrName = 0x03,
+ DwarfAttrOrdering = 0x09,
+ DwarfAttrByteSize = 0x0B,
+ DwarfAttrBitOffset = 0x0C,
+ DwarfAttrBitSize = 0x0D,
+ DwarfAttrStmtList = 0x10,
+ DwarfAttrLowpc = 0x11,
+ DwarfAttrHighpc = 0x12,
+ DwarfAttrLanguage = 0x13,
+ DwarfAttrDiscr = 0x15,
+ DwarfAttrDiscrValue = 0x16,
+ DwarfAttrVisibility = 0x17,
+ DwarfAttrImport = 0x18,
+ DwarfAttrStringLength = 0x19,
+ DwarfAttrCommonRef = 0x1A,
+ DwarfAttrCompDir = 0x1B,
+ DwarfAttrConstValue = 0x1C,
+ DwarfAttrContainingType = 0x1D,
+ DwarfAttrDefaultValue = 0x1E,
+ DwarfAttrInline = 0x20,
+ DwarfAttrIsOptional = 0x21,
+ DwarfAttrLowerBound = 0x22,
+ DwarfAttrProducer = 0x25,
+ DwarfAttrPrototyped = 0x27,
+ DwarfAttrReturnAddr = 0x2A,
+ DwarfAttrStartScope = 0x2C,
+ DwarfAttrStrideSize = 0x2E,
+ DwarfAttrUpperBound = 0x2F,
+ DwarfAttrAbstractOrigin = 0x31,
+ DwarfAttrAccessibility = 0x32,
+ DwarfAttrAddrClass = 0x33,
+ DwarfAttrArtificial = 0x34,
+ DwarfAttrBaseTypes = 0x35,
+ DwarfAttrCalling = 0x36,
+ DwarfAttrCount = 0x37,
+ DwarfAttrDataMemberLoc = 0x38,
+ DwarfAttrDeclColumn = 0x39,
+ DwarfAttrDeclFile = 0x3A,
+ DwarfAttrDeclLine = 0x3B,
+ DwarfAttrDeclaration = 0x3C,
+ DwarfAttrDiscrList = 0x3D,
+ DwarfAttrEncoding = 0x3E,
+ DwarfAttrExternal = 0x3F,
+ DwarfAttrFrameBase = 0x40,
+ DwarfAttrFriend = 0x41,
+ DwarfAttrIdentifierCase = 0x42,
+ DwarfAttrMacroInfo = 0x43,
+ DwarfAttrNamelistItem = 0x44,
+ DwarfAttrPriority = 0x45,
+ DwarfAttrSegment = 0x46,
+ DwarfAttrSpecification = 0x47,
+ DwarfAttrStaticLink = 0x48,
+ DwarfAttrType = 0x49,
+ DwarfAttrUseLocation = 0x4A,
+ DwarfAttrVarParam = 0x4B,
+ DwarfAttrVirtuality = 0x4C,
+ DwarfAttrVtableElemLoc = 0x4D,
+ DwarfAttrAllocated = 0x4E,
+ DwarfAttrAssociated = 0x4F,
+ DwarfAttrDataLocation = 0x50,
+ DwarfAttrStride = 0x51,
+ DwarfAttrEntrypc = 0x52,
+ DwarfAttrUseUTF8 = 0x53,
+ DwarfAttrExtension = 0x54,
+ DwarfAttrRanges = 0x55,
+ DwarfAttrTrampoline = 0x56,
+ DwarfAttrCallColumn = 0x57,
+ DwarfAttrCallFile = 0x58,
+ DwarfAttrCallLine = 0x59,
+ DwarfAttrDescription = 0x5A,
+ DwarfAttrMax,
+
+ FormAddr = 0x01,
+ FormDwarfBlock2 = 0x03,
+ FormDwarfBlock4 = 0x04,
+ FormData2 = 0x05,
+ FormData4 = 0x06,
+ FormData8 = 0x07,
+ FormString = 0x08,
+ FormDwarfBlock = 0x09,
+ FormDwarfBlock1 = 0x0A,
+ FormData1 = 0x0B,
+ FormFlag = 0x0C,
+ FormSdata = 0x0D,
+ FormStrp = 0x0E,
+ FormUdata = 0x0F,
+ FormRefAddr = 0x10,
+ FormRef1 = 0x11,
+ FormRef2 = 0x12,
+ FormRef4 = 0x13,
+ FormRef8 = 0x14,
+ FormRefUdata = 0x15,
+ FormIndirect = 0x16
};
-static int parseattrs(DwarfBuf*, ulong, DwarfAbbrev*, DwarfAttrs*);
+static int parseattrs(Dwarf *d, DwarfBuf*, ulong, ulong, DwarfAbbrev*, DwarfAttrs*);
static int getulong(DwarfBuf*, int, ulong, ulong*, int*);
static int getuchar(DwarfBuf*, int, uchar*);
-static int getstring(DwarfBuf*, int, char**);
+static int getstring(Dwarf *d, DwarfBuf*, int, char**);
static int getblock(DwarfBuf*, int, DwarfBlock*);
-static int skipform(DwarfBuf*, int);
-static int constblock(Dwarf*, DwarfBlock*, ulong*);
+static int skipform(Dwarf *d, DwarfBuf*, int);
int
dwarflookupnameinunit(Dwarf *d, ulong unit, char *name, DwarfSym *s)
{
- if(dwarfenumunit(d, unit, s) < 0)
- return -1;
-
- dwarfnextsymat(d, s, 0); /* s is now the CompileUnit */
- while(dwarfnextsymat(d, s, 1) == 1)
- if(s->attrs.name && strcmp(s->attrs.name, name) == 0)
- return 0;
- werrstr("symbol '%s' not found", name);
- return -1;
+ DwarfSym compunit = { };
+ if(dwarfenumunit(d, unit, &compunit) < 0)
+ return -1;
+ while(dwarfnextsymat(d, &compunit, s) == 1)
+ if(s->attrs.name && strcmp(s->attrs.name, name) == 0)
+ return 0;
+ werrstr("symbol '%s' not found", name);
+ return -1;
}
-
int
dwarflookupsubname(Dwarf *d, DwarfSym *parent, char *name, DwarfSym *s)
{
- *s = *parent;
- while(dwarfnextsymat(d, s, parent->depth+1))
- if(s->attrs.name && strcmp(s->attrs.name, name) == 0)
- return 0;
- werrstr("symbol '%s' not found", name);
- return -1;
+ *s = *parent;
+ while(dwarfnextsymat(d, parent, s))
+ if(s->attrs.name && strcmp(s->attrs.name, name) == 0)
+ return 0;
+ werrstr("symbol '%s' not found", name);
+ return -1;
}
int
-dwarflookuptag(Dwarf *d, ulong unit, ulong tag, DwarfSym *s)
+dwarflookupchildtag(Dwarf *d, DwarfSym *parent, ulong tag, DwarfSym *s)
{
- if(dwarfenumunit(d, unit, s) < 0) {
- return -1;
- }
+ int rsym = dwarfnextsymat(d, parent, s);
+ while (rsym == 0 && s->attrs.tag != tag) {
+ if (s->attrs.haskids) {
+ DwarfSym p = *s;
+ int csym = dwarflookupchildtag(d, &p, tag, s);
+ if (csym == 0) {
+ return csym;
+ }
+ }
+ rsym = dwarfnextsym(d, s);
+ }
+ return rsym;
+}
- dwarfnextsymat(d, s, 0); /* s is now the CompileUnit */
- if(s->attrs.tag == tag) {
- return 0;
- }
- while(dwarfnextsymat(d, s, 1) == 1)
- if(s->attrs.tag == tag) {
- return 0;
- }
- werrstr("symbol with tag 0x%lux not found", tag);
- return -1;
+int
+dwarflookuptag(Dwarf *d, ulong unit, ulong tag, DwarfSym *s)
+{
+ DwarfSym compunit = { };
+ if (dwarfenumunit(d, unit, &compunit) < 0) {
+ return -1;
+ }
+ do {
+ if (compunit.attrs.tag == tag) {
+ *s = compunit;
+ return 0;
+ }
+ if (dwarflookupchildtag(d, &compunit, tag, s) == 0)
+ return 0;
+ } while(dwarfnextsym(d, &compunit) == 0);
+ werrstr("symbol with tag 0x%lux not found", tag);
+ return -1;
}
int
dwarfseeksym(Dwarf *d, ulong unit, ulong off, DwarfSym *s)
{
- if(dwarfenumunit(d, unit, s) < 0)
- return -1;
- s->b.p = d->info.data + unit + off;
- if(dwarfnextsymat(d, s, 0) != 1)
- return -1;
- return 0;
+ DwarfSym compunit = { };
+ if(dwarfenumunit(d, unit, &compunit) < 0)
+ return -1;
+ s->b.p = d->info.data + unit + off;
+ if(dwarfnextsymat(d, &compunit, s) == -1)
+ return -1;
+ werrstr("dwarfseeksym: unit %x off %x, tag %x", unit, off, s->attrs.tag);
+ return 0;
}
int
dwarflookupfn(Dwarf *d, ulong unit, ulong pc, DwarfSym *s)
{
- if(dwarfenumunit(d, unit, s) < 0)
- return -1;
-
- if(dwarfnextsymat(d, s, 0) != 1)
- return -1;
- /* s is now the CompileUnit */
-
- while(dwarfnextsymat(d, s, 1) == 1){
- if(s->attrs.tag != TagSubprogram)
- continue;
- if(s->attrs.lowpc <= pc && pc < s->attrs.highpc)
- return 0;
- }
- werrstr("fn containing pc 0x%lux not found", pc);
- return -1;
+ DwarfSym compunit = { };
+ if(dwarfenumunit(d, unit, &compunit) < 0)
+ return -1;
+ while(dwarfnextsymat(d, &compunit, s) == 0){
+ if(s->attrs.tag != TagSubprogram)
+ continue;
+ if(s->attrs.lowpc <= pc && pc < s->attrs.highpc)
+ return 0;
+ }
+ werrstr("fn containing pc 0x%lux not found", pc);
+ return -1;
}
int
dwarfenumunit(Dwarf *d, ulong unit, DwarfSym *s)
{
- int i;
- ulong aoff, len;
-
- if(unit >= d->info.len){
- werrstr("dwarf unit address 0x%x >= 0x%x out of range", unit, d->info.len);
- return -1;
- }
- memset(s, 0, sizeof *s);
- memset(&s->b, 0, sizeof s->b);
-
- s->b.d = d;
- s->b.p = d->info.data + unit;
- s->b.ep = d->info.data + d->info.len;
- len = dwarfget4(&s->b);
- s->nextunit = unit + 4 + len;
-
- if(s->b.ep - s->b.p < len){
- badheader:
- werrstr("bad dwarf unit header at unit 0x%lux", unit);
- return -1;
- }
- s->b.ep = s->b.p+len;
- if((i=dwarfget2(&s->b)) != 2)
- goto badheader;
- aoff = dwarfget4(&s->b);
- s->b.addrsize = dwarfget1(&s->b);
- if(d->addrsize == 0)
- d->addrsize = s->b.addrsize;
- if(s->b.p == nil)
- goto badheader;
-
- s->aoff = aoff;
+ int i;
+ ulong aoff, len;
+
+ if(unit >= d->info.len){
+ werrstr("dwarf unit address 0x%x >= 0x%x out of range", unit, d->info.len);
+ return -1;
+ }
+ memset(s, 0, sizeof *s);
+ memset(&s->b, 0, sizeof s->b);
+
+ s->b.d = d;
+ s->b.p = d->info.data + unit;
+ s->b.ep = d->info.data + d->info.len;
+ len = dwarfget4(&s->b);
s->unit = unit;
- s->depth = 0;
- return 0;
-}
-
-int
-dwarfenum(Dwarf *d, DwarfSym *s)
-{
- if(dwarfenumunit(d, 0, s) < 0)
- return -1;
- s->allunits = 1;
- return 0;
+ s->nextunit = unit + 4 + len;
+ s->b.ep = d->info.data + s->nextunit;
+
+ if(s->b.ep - s->b.p < len){
+ badheader:
+ werrstr("bad dwarf unit header at unit 0x%lux end %x start %x len %x", unit, s->b.ep - d->info.data, s->b.p - d->info.data, len);
+ return -1;
+ }
+ s->b.ep = s->b.p+len;
+ if((i=dwarfget2(&s->b)) != 2)
+ goto badheader;
+ aoff = dwarfget4(&s->b);
+ s->b.addrsize = dwarfget1(&s->b);
+ if(d->addrsize == 0)
+ d->addrsize = s->b.addrsize;
+ if(s->b.p == nil)
+ goto badheader;
+
+ s->aoff = aoff;
+
+ return dwarfnextsym(d, s);
}
int
dwarfnextsym(Dwarf *d, DwarfSym *s)
{
- ulong num;
- DwarfAbbrev *a;
-
- if(s->attrs.haskids)
- s->depth++;
-top:
- if(s->b.p >= s->b.ep){
- if(s->allunits && s->nextunit < d->info.len){
- if(dwarfenumunit(d, s->nextunit, s) < 0) {
- return -1;
- }
- s->allunits = 1;
- goto top;
- }
- return 0;
- }
-
- s->uoff = s->b.p - (d->info.data+s->unit);
- num = dwarfget128(&s->b);
- if(num == 0){
- if(s->depth == 0) {
- return 0;
- }
- if(s->depth > 0)
- s->depth--;
- goto top;
- }
-
- a = dwarfgetabbrev(d, s->aoff, num);
- if(a == nil){
- werrstr("getabbrev %ud %ud for %ud,%ud: %r\n", s->aoff, num, s->unit, s->uoff);
- return -1;
- }
- if(parseattrs(&s->b, s->unit, a, &s->attrs) < 0) {
- return -1;
- }
- return 1;
+ ulong num;
+ DwarfAbbrev *a;
+
+ num = dwarfget128(&s->b);
+ s->num = num;
+ if(num == 0){
+ return -1;
+ }
+
+ a = dwarfgetabbrev(d, s->aoff, num);
+ if(a == nil){
+ werrstr("getabbrev %ud %ud for %ud,%ud", s->aoff, num, s->unit);
+ return -1;
+ }
+
+ if(parseattrs(d, &s->b, s->attrs.tag, s->unit, a, &s->attrs) < 0) {
+ return -1;
+ }
+
+ if (s->attrs.haskids) {
+ DwarfSym childSkip = { };
+ s->childoff = s->b.p - d->info.data;
+ int r = dwarfnextsymat(d, s, &childSkip);
+ while (r == 0) {
+ r = dwarfnextsym(d, &childSkip);
+ }
+ s->b = childSkip.b;
+ } else {
+ s->childoff = 0;
+ }
+ return 0;
}
int
-dwarfnextsymat(Dwarf *d, DwarfSym *s, int depth)
+dwarfnextsymat(Dwarf *d, DwarfSym *parent, DwarfSym *child)
{
- int r;
- DwarfSym t;
- uint sib;
-
- if(s->depth == depth && s->attrs.have.sibling){
- sib = s->attrs.sibling;
- if(sib < d->info.len && d->info.data+sib >= s->b.p)
- s->b.p = d->info.data+sib;
- s->attrs.haskids = 0;
- }
-
- /*
- * The funny game with t and s make sure that
- * if we get to the end of a run of a particular
- * depth, we leave s so that a call to nextsymat with depth-1
- * will actually produce the desired guy. We could change
- * the interface to dwarfnextsym instead, but I'm scared
- * to touch it.
- */
- t = *s;
- for(;;){
- if((r = dwarfnextsym(d, &t)) != 1) {
- return r;
- }
- if(t.depth < depth){
- /* went too far - nothing to see */
- return 0;
- }
- *s = t;
- if(t.depth == depth) {
- return 1;
- }
- }
+ uint sib;
+
+ if (!parent->attrs.haskids || !parent->childoff)
+ return -1;
+
+ child->unit = parent->unit;
+ child->aoff = parent->aoff;
+ child->depth = parent->depth + 1;
+ if(child->attrs.have.sibling){
+ sib = child->attrs.sibling;
+ if(sib < d->info.len && d->info.data+sib > child->b.p)
+ child->b.p = d->info.data+sib;
+ else if (sib >= d->info.len) {
+ werrstr("sibling reported as out of bounds %d vs %d", sib, d->info.len);
+ return -1;
+ } else if (d->info.data+sib+parent->unit < child->b.p) {
+ werrstr("subsequent sibling is listed before prev %d vs %d", sib+parent->unit, child->b.p - d->info.data);
+ return -1;
+ }
+ }
+
+ // Uninitialized
+ if (!child->b.d) {
+ child->b = parent->b;
+ child->b.p = parent->childoff + parent->b.d->info.data;
+ }
+
+ return dwarfnextsym(d, child);
}
typedef struct Parse Parse;
struct Parse {
- int name;
- int off;
- int haveoff;
- int type;
+ int name;
+ int off;
+ int haveoff;
+ int type;
};
#define OFFSET(x) offsetof(DwarfAttrs, x), offsetof(DwarfAttrs, have.x)
static Parse plist[] = { /* Font Tab 4 */
- { DwarfAttrAbstractOrigin, OFFSET(abstractorigin), TReference },
- { DwarfAttrAccessibility, OFFSET(accessibility), TConstant },
- { DwarfAttrAddrClass, OFFSET(addrclass), TConstant },
- { DwarfAttrArtificial, OFFSET(isartificial), TFlag },
- { DwarfAttrBaseTypes, OFFSET(basetypes), TReference },
- { DwarfAttrBitOffset, OFFSET(bitoffset), TConstant },
- { DwarfAttrBitSize, OFFSET(bitsize), TConstant },
- { DwarfAttrByteSize, OFFSET(bytesize), TConstant },
- { DwarfAttrCalling, OFFSET(calling), TConstant },
- { DwarfAttrCommonRef, OFFSET(commonref), TReference },
- { DwarfAttrCompDir, OFFSET(compdir), TString },
- { DwarfAttrConstValue, OFFSET(constvalue), TString|TConstant|TBlock },
- { DwarfAttrContainingType, OFFSET(containingtype), TReference },
- { DwarfAttrCount, OFFSET(count), TConstant|TReference },
- { DwarfAttrDataMemberLoc, OFFSET(datamemberloc), TBlock|TConstant|TReference },
- { DwarfAttrDeclColumn, OFFSET(declcolumn), TConstant },
- { DwarfAttrDeclFile, OFFSET(declfile), TConstant },
- { DwarfAttrDeclLine, OFFSET(declline), TConstant },
- { DwarfAttrDeclaration, OFFSET(isdeclaration), TFlag },
- { DwarfAttrDefaultValue, OFFSET(defaultvalue), TReference },
- { DwarfAttrDiscr, OFFSET(discr), TReference },
- { DwarfAttrDiscrList, OFFSET(discrlist), TBlock },
- { DwarfAttrDiscrValue, OFFSET(discrvalue), TConstant },
- { DwarfAttrEncoding, OFFSET(encoding), TConstant },
- { DwarfAttrExternal, OFFSET(isexternal), TFlag },
- { DwarfAttrFrameBase, OFFSET(framebase), TBlock|TConstant },
- { DwarfAttrFriend, OFFSET(friend), TReference },
- { DwarfAttrHighpc, OFFSET(highpc), TAddress },
- { DwarfAttrEntrypc, OFFSET(entrypc), TAddress },
- { DwarfAttrIdentifierCase, OFFSET(identifiercase), TConstant },
- { DwarfAttrImport, OFFSET(import), TReference },
- { DwarfAttrInline, OFFSET(inlined), TConstant },
- { DwarfAttrIsOptional, OFFSET(isoptional), TFlag },
- { DwarfAttrLanguage, OFFSET(language), TConstant },
- { DwarfAttrLocation, OFFSET(location), TBlock|TConstant },
- { DwarfAttrLowerBound, OFFSET(lowerbound), TConstant|TReference },
- { DwarfAttrLowpc, OFFSET(lowpc), TAddress },
- { DwarfAttrMacroInfo, OFFSET(macroinfo), TConstant },
- { DwarfAttrName, OFFSET(name), TString },
- { DwarfAttrNamelistItem, OFFSET(namelistitem), TBlock },
- { DwarfAttrOrdering, OFFSET(ordering), TConstant },
- { DwarfAttrPriority, OFFSET(priority), TReference },
- { DwarfAttrProducer, OFFSET(producer), TString },
- { DwarfAttrPrototyped, OFFSET(isprototyped), TFlag },
- { DwarfAttrRanges, OFFSET(ranges), TReference },
- { DwarfAttrReturnAddr, OFFSET(returnaddr), TBlock|TConstant },
- { DwarfAttrSegment, OFFSET(segment), TBlock|TConstant },
- { DwarfAttrSibling, OFFSET(sibling), TReference },
- { DwarfAttrSpecification, OFFSET(specification), TReference },
- { DwarfAttrStartScope, OFFSET(startscope), TConstant },
- { DwarfAttrStaticLink, OFFSET(staticlink), TBlock|TConstant },
- { DwarfAttrStmtList, OFFSET(stmtlist), TConstant },
- { DwarfAttrStrideSize, OFFSET(stridesize), TConstant },
- { DwarfAttrStringLength, OFFSET(stringlength), TBlock|TConstant },
- { DwarfAttrType, OFFSET(type), TReference },
- { DwarfAttrUpperBound, OFFSET(upperbound), TConstant|TReference },
- { DwarfAttrUseLocation, OFFSET(uselocation), TBlock|TConstant },
- { DwarfAttrVarParam, OFFSET(isvarparam), TFlag },
- { DwarfAttrVirtuality, OFFSET(virtuality), TConstant },
- { DwarfAttrVisibility, OFFSET(visibility), TConstant },
- { DwarfAttrVtableElemLoc, OFFSET(vtableelemloc), TBlock|TReference },
- { }
+ { DwarfAttrAbstractOrigin, OFFSET(abstractorigin), TReference },
+ { DwarfAttrAccessibility, OFFSET(accessibility), TConstant },
+ { DwarfAttrAddrClass, OFFSET(addrclass), TConstant },
+ { DwarfAttrArtificial, OFFSET(isartificial), TFlag },
+ { DwarfAttrBaseTypes, OFFSET(basetypes), TReference },
+ { DwarfAttrBitOffset, OFFSET(bitoffset), TConstant },
+ { DwarfAttrBitSize, OFFSET(bitsize), TConstant },
+ { DwarfAttrByteSize, OFFSET(bytesize), TConstant },
+ { DwarfAttrCalling, OFFSET(calling), TConstant },
+ { DwarfAttrCommonRef, OFFSET(commonref), TReference },
+ { DwarfAttrCompDir, OFFSET(compdir), TString },
+ { DwarfAttrConstValue, OFFSET(constvalue), TString|TConstant|TBlock },
+ { DwarfAttrContainingType, OFFSET(containingtype), TReference },
+ { DwarfAttrCount, OFFSET(count), TConstant|TReference },
+ { DwarfAttrDataMemberLoc, OFFSET(datamemberloc), TBlock|TConstant|TReference },
+ { DwarfAttrDeclColumn, OFFSET(declcolumn), TConstant },
+ { DwarfAttrDeclFile, OFFSET(declfile), TConstant },
+ { DwarfAttrDeclLine, OFFSET(declline), TConstant },
+ { DwarfAttrDeclaration, OFFSET(isdeclaration), TFlag },
+ { DwarfAttrDefaultValue, OFFSET(defaultvalue), TReference },
+ { DwarfAttrDiscr, OFFSET(discr), TReference },
+ { DwarfAttrDiscrList, OFFSET(discrlist), TBlock },
+ { DwarfAttrDiscrValue, OFFSET(discrvalue), TConstant },
+ { DwarfAttrEncoding, OFFSET(encoding), TConstant },
+ { DwarfAttrExternal, OFFSET(isexternal), TFlag },
+ { DwarfAttrFrameBase, OFFSET(framebase), TBlock|TConstant },
+ { DwarfAttrFriend, OFFSET(friend), TReference },
+ { DwarfAttrHighpc, OFFSET(highpc), TAddress },
+ { DwarfAttrEntrypc, OFFSET(entrypc), TAddress },
+ { DwarfAttrIdentifierCase, OFFSET(identifiercase), TConstant },
+ { DwarfAttrImport, OFFSET(import), TReference },
+ { DwarfAttrInline, OFFSET(inlined), TConstant },
+ { DwarfAttrIsOptional, OFFSET(isoptional), TFlag },
+ { DwarfAttrLanguage, OFFSET(language), TConstant },
+ { DwarfAttrLocation, OFFSET(location), TReference|TBlock },
+ { DwarfAttrLowerBound, OFFSET(lowerbound), TConstant|TReference },
+ { DwarfAttrLowpc, OFFSET(lowpc), TAddress },
+ { DwarfAttrMacroInfo, OFFSET(macroinfo), TConstant },
+ { DwarfAttrName, OFFSET(name), TString },
+ { DwarfAttrNamelistItem, OFFSET(namelistitem), TBlock },
+ { DwarfAttrOrdering, OFFSET(ordering), TConstant },
+ { DwarfAttrPriority, OFFSET(priority), TReference },
+ { DwarfAttrProducer, OFFSET(producer), TString },
+ { DwarfAttrPrototyped, OFFSET(isprototyped), TFlag },
+ { DwarfAttrRanges, OFFSET(ranges), TReference },
+ { DwarfAttrReturnAddr, OFFSET(returnaddr), TBlock|TConstant },
+ { DwarfAttrSegment, OFFSET(segment), TBlock|TConstant },
+ { DwarfAttrSibling, OFFSET(sibling), TReference },
+ { DwarfAttrSpecification, OFFSET(specification), TReference },
+ { DwarfAttrStartScope, OFFSET(startscope), TConstant },
+ { DwarfAttrStaticLink, OFFSET(staticlink), TBlock|TConstant },
+ { DwarfAttrStmtList, OFFSET(stmtlist), TConstant },
+ { DwarfAttrStrideSize, OFFSET(stridesize), TConstant },
+ { DwarfAttrStringLength, OFFSET(stringlength), TBlock|TConstant },
+ { DwarfAttrType, OFFSET(type), TReference },
+ { DwarfAttrUpperBound, OFFSET(upperbound), TConstant|TReference },
+ { DwarfAttrUseLocation, OFFSET(uselocation), TBlock|TConstant },
+ { DwarfAttrVarParam, OFFSET(isvarparam), TFlag },
+ { DwarfAttrVirtuality, OFFSET(virtuality), TConstant },
+ { DwarfAttrVisibility, OFFSET(visibility), TConstant },
+ { DwarfAttrVtableElemLoc, OFFSET(vtableelemloc), TBlock|TReference },
+ { }
};
static Parse ptab[DwarfAttrMax];
static int
-parseattrs(DwarfBuf *b, ulong unit, DwarfAbbrev *a, DwarfAttrs *attrs)
+parseattrs(Dwarf *d, DwarfBuf *b, ulong tag, ulong unit, DwarfAbbrev *a, DwarfAttrs *attrs)
{
- int i, f, n, got;
- static int nbad;
- void *v;
-
- /* initialize ptab first time through for quick access */
- if(ptab[DwarfAttrName].name != DwarfAttrName)
- for(i=0; plist[i].name; i++)
- ptab[plist[i].name] = plist[i];
-
- memset(attrs, 0, sizeof *attrs);
- attrs->tag = a->tag;
- attrs->haskids = a->haskids;
-
- for(i=0; i<a->nattr; i++){
- n = a->attr[i].name;
- f = a->attr[i].form;
- if(n < 0 || n >= DwarfAttrMax || ptab[n].name==0){
- if(++nbad == 1)
- werrstr("dwarf parse attrs: unexpected attribute name 0x%x", n);
- continue; //return -1;
- }
- v = (char*)attrs + ptab[n].off;
- got = 0;
- if(f == FormIndirect)
- f = dwarfget128(b);
- if((ptab[n].type&(TConstant|TReference|TAddress))
- && getulong(b, f, unit, v, &got) >= 0)
- ;
- else if((ptab[n].type&TFlag) && getuchar(b, f, v) >= 0)
- got = TFlag;
- else if((ptab[n].type&TString) && getstring(b, f, v) >= 0)
- got = TString;
- else if((ptab[n].type&TBlock) && getblock(b, f, v) >= 0)
- got = TBlock;
- else{
- if(skipform(b, f) < 0){
- if(++nbad == 1)
- werrstr("dwarf parse attrs: cannot skip form %d", f);
- return -1;
- }
- }
- if(got == TBlock && (ptab[n].type&TConstant))
- got = constblock(b->d, v, v);
- *((uchar*)attrs+ptab[n].haveoff) = got;
- }
- return 0;
+ int i, f, n, got;
+ static int nbad;
+ void *v;
+
+ /* initialize ptab first time through for quick access */
+ if(ptab[DwarfAttrName].name != DwarfAttrName)
+ for(i=0; plist[i].name; i++)
+ ptab[plist[i].name] = plist[i];
+
+ memset(attrs, 0, sizeof *attrs);
+ attrs->tag = a->tag;
+ attrs->haskids = a->haskids;
+
+ for(i=0; i<a->nattr; i++){
+ n = a->attr[i].name;
+ f = a->attr[i].form;
+ if(n < 0 || n >= DwarfAttrMax || ptab[n].name==0) {
+ if (skipform(d, b, f) < 0) {
+ if(++nbad == 1)
+ werrstr("dwarf parse attrs: cannot skip form %d", f);
+ return -1;
+ }
+ continue;
+ }
+ v = (char*)attrs + ptab[n].off;
+ got = 0;
+ if(f == FormIndirect)
+ f = dwarfget128(b);
+ if((ptab[n].type&(TConstant|TReference|TAddress))
+ && getulong(b, f, unit, v, &got) >= 0)
+ ;
+ else if((ptab[n].type&TFlag) && getuchar(b, f, v) >= 0)
+ got = TFlag;
+ else if((ptab[n].type&TString) && getstring(d, b, f, v) >= 0)
+ got = TString;
+ else if((ptab[n].type&TBlock) && getblock(b, f, v) >= 0)
+ got = TBlock;
+ else {
+ if(skipform(d, b, f) < 0){
+ if(++nbad == 1)
+ werrstr("dwarf parse attrs: cannot skip form %d", f);
+ return -1;
+ }
+ }
+#if 0
+ if(got == TBlock && (ptab[n].type&TConstant))
+ got = constblock(b->d, v, v);
+#endif
+ *((uchar*)attrs+ptab[n].haveoff) = got;
+ }
+ return 0;
}
static int
getulong(DwarfBuf *b, int form, ulong unit, ulong *u, int *type)
{
- static int nbad;
- uvlong uv;
+ static int nbad;
+ uvlong uv;
- switch(form){
- default:
- return -1;
+ switch(form){
+ default:
+ return -1;
/* addresses */
- case FormAddr:
- *type = TAddress;
- *u = dwarfgetaddr(b);
- return 0;
+ case FormAddr:
+ *type = TAddress;
+ *u = dwarfgetaddr(b);
+ return 0;
/* references */
- case FormRefAddr:
- /* absolute ref in .debug_info */
- *type = TReference;
- *u = dwarfgetaddr(b);
- return 0;
- case FormRef1:
- *u = dwarfget1(b);
- goto relativeref;
- case FormRef2:
- *u = dwarfget2(b);
- goto relativeref;
- case FormRef4:
- *u = dwarfget4(b);
- goto relativeref;
- case FormRef8:
- *u = dwarfget8(b);
- goto relativeref;
- case FormRefUdata:
- *u = dwarfget128(b);
- relativeref:
- *u += unit;
- *type = TReference;
- return 0;
+ case FormRefAddr:
+ /* absolute ref in .debug_info */
+ *type = TReference;
+ *u = dwarfgetaddr(b);
+ return 0;
+ case FormRef1:
+ *u = dwarfget1(b);
+ goto relativeref;
+ case FormRef2:
+ *u = dwarfget2(b);
+ goto relativeref;
+ case FormRef4:
+ *u = dwarfget4(b);
+ goto relativeref;
+ case FormRef8:
+ *u = dwarfget8(b);
+ goto relativeref;
+ case FormRefUdata:
+ *u = dwarfget128(b);
+ relativeref:
+ *u += unit;
+ *type = TReference;
+ return 0;
/* constants */
- case FormData1:
- *u = dwarfget1(b);
- goto constant;
- case FormData2:
- *u = dwarfget2(b);
- goto constant;
- case FormData4:
- *u = dwarfget4(b);
- goto constant;
- case FormData8:
- uv = dwarfget8(b);
- *u = uv;
- if(uv != *u && ++nbad == 1)
- werrstr("dwarf: truncating 64-bit attribute constants");
- goto constant;
- case FormSdata:
- *u = dwarfget128s(b);
- goto constant;
- case FormUdata:
- *u = dwarfget128(b);
- constant:
- *type = TConstant;
- return 0;
- }
+ case FormData1:
+ *u = dwarfget1(b);
+ goto constant;
+ case FormData2:
+ *u = dwarfget2(b);
+ goto constant;
+ case FormData4:
+ *u = dwarfget4(b);
+ goto constant;
+ case FormData8:
+ uv = dwarfget8(b);
+ *u = uv;
+ if(uv != *u && ++nbad == 1)
+ werrstr("dwarf: truncating 64-bit attribute constants");
+ goto constant;
+ case FormSdata:
+ *u = dwarfget128s(b);
+ goto constant;
+ case FormUdata:
+ *u = dwarfget128(b);
+ constant:
+ *type = TConstant;
+ return 0;
+ }
}
static int
getuchar(DwarfBuf *b, int form, uchar *u)
{
- switch(form){
- default:
- return -1;
-
- case FormFlag:
- *u = dwarfget1(b);
- return 0;
- }
+ switch(form){
+ default:
+ return -1;
+
+ case FormFlag:
+ *u = dwarfget1(b);
+ return 0;
+ }
}
static int
-getstring(DwarfBuf *b, int form, char **s)
+getstring(Dwarf *d, DwarfBuf *b, int form, char **s)
{
- static int nbad;
- ulong u;
-
- switch(form){
- default:
- return -1;
-
- case FormString:
- *s = dwarfgetstring(b);
- return 0;
-
- case FormStrp:
- u = dwarfget4(b);
- if(u >= b->d->str.len){
- if(++nbad == 1)
- werrstr("dwarf: bad string pointer 0x%lux in attribute", u);
- /* don't return error - maybe can proceed */
- *s = nil;
- }else
- *s = (char*)b->d->str.data + u;
- return 0;
-
- }
+ static int nbad;
+ ulong u, x;
+
+ switch(form){
+ default:
+ return -1;
+
+ case FormString:
+ x = b->p - d->info.data;
+ *s = dwarfgetstring(b);
+ for (u = 0; (*s)[u]; u++) {
+ assert(isprint((*s)[u]));
+ }
+ return 0;
+
+ case FormStrp:
+ u = dwarfget4(b);
+ if(u >= b->d->str.len){
+ if(++nbad == 1)
+ werrstr("dwarf: bad string pointer 0x%lux in attribute", u);
+ /* don't return error - maybe can proceed */
+ *s = nil;
+ }else
+ *s = (char*)b->d->str.data + u;
+ return 0;
+
+ }
}
static int
getblock(DwarfBuf *b, int form, DwarfBlock *bl)
{
- ulong n;
-
- switch(form){
- default:
- return -1;
- case FormDwarfBlock:
- n = dwarfget128(b);
- goto copyn;
- case FormDwarfBlock1:
- n = dwarfget1(b);
- goto copyn;
- case FormDwarfBlock2:
- n = dwarfget2(b);
- goto copyn;
- case FormDwarfBlock4:
- n = dwarfget4(b);
- copyn:
- bl->data = dwarfgetnref(b, n);
- bl->len = n;
- if(bl->data == nil)
- return -1;
- return 0;
- }
+ ulong n;
+
+ switch(form){
+ default:
+ return -1;
+ case FormDwarfBlock:
+ n = dwarfget128(b);
+ goto copyn;
+ case FormDwarfBlock1:
+ n = dwarfget1(b);
+ goto copyn;
+ case FormDwarfBlock2:
+ n = dwarfget2(b);
+ goto copyn;
+ case FormDwarfBlock4:
+ n = dwarfget4(b);
+ copyn:
+ bl->data = dwarfgetnref(b, n);
+ bl->len = n;
+ if(bl->data == nil)
+ return -1;
+ return 0;
+ }
}
+/* last resort */
static int
-constblock(Dwarf *d, DwarfBlock *bl, ulong *pval)
+skipform(Dwarf *d, DwarfBuf *b, int form)
{
- DwarfBuf b;
-
- memset(&b, 0, sizeof b);
- b.p = bl->data;
- b.ep = bl->data+bl->len;
- b.d = d;
-
- switch(dwarfget1(&b)){
- case OpAddr:
- *pval = dwarfgetaddr(&b);
- return TConstant;
- case OpConst1u:
- *pval = dwarfget1(&b);
- return TConstant;
- case OpConst1s:
- *pval = (schar)dwarfget1(&b);
- return TConstant;
- case OpConst2u:
- *pval = dwarfget2(&b);
- return TConstant;
- case OpConst2s:
- *pval = (s16int)dwarfget2(&b);
- return TConstant;
- case OpConst4u:
- *pval = dwarfget4(&b);
- return TConstant;
- case OpConst4s:
- *pval = (s32int)dwarfget4(&b);
- return TConstant;
- case OpConst8u:
- *pval = (u64int)dwarfget8(&b);
- return TConstant;
- case OpConst8s:
- *pval = (s64int)dwarfget8(&b);
- return TConstant;
- case OpConstu:
- *pval = dwarfget128(&b);
- return TConstant;
- case OpConsts:
- *pval = dwarfget128s(&b);
- return TConstant;
- case OpPlusUconst:
- *pval = dwarfget128(&b);
- return TConstant;
- default:
- return TBlock;
- }
+ int type;
+ DwarfVal val;
+
+ if(getulong(b, form, 0, &val.c, &type) < 0
+ && getuchar(b, form, (uchar*)&val) < 0
+ && getstring(d, b, form, &val.s) < 0
+ && getblock(b, form, &val.b) < 0)
+ return -1;
+ return 0;
}
-/* last resort */
-static int
-skipform(DwarfBuf *b, int form)
+void stackinit(DwarfStack *stack)
+{
+ memset(stack, 0, sizeof(*stack));
+ stack->data = stack->storage;
+ stack->length = 0; stack->max = sizeof(stack->storage) / sizeof(stack->storage[0]);
+}
+
+void stackpush(DwarfStack *stack, ulong value)
{
- int type;
- DwarfVal val;
-
- if(getulong(b, form, 0, &val.c, &type) < 0
- && getuchar(b, form, (uchar*)&val) < 0
- && getstring(b, form, &val.s) < 0
- && getblock(b, form, &val.b) < 0)
- return -1;
- return 0;
+ if (stack->length == stack->max) {
+ ulong *newstack = malloc(sizeof(ulong)*stack->max*2);
+ memcpy(newstack, stack->data, sizeof(ulong)*stack->length);
+ if (stack->data != stack->storage)
+ free(stack->data);
+ stack->data = newstack;
+ stack->max *= 2;
+ }
+ werrstr("stack[%d] = %x", stack->length, value);
+ stack->data[stack->length++] = value;
}
+ulong stackpop(DwarfStack *stack)
+{
+ ASSERT(stack->length > 0);
+ ulong val = stack->data[--stack->length];
+ werrstr("pop stack[%d] -> %x", stack->length, val);
+ return val;
+}
+
+void stackfree(DwarfStack *stack)
+{
+ if (stack->data != stack->storage)
+ free(stack->data);
+}
+
+// Returns -1 on failure
+int dwarfgetarg(Dwarf *d, const char *name, DwarfBuf *buf, ulong cfa, PROSSYM_REGISTERS registers, ulong *result)
+{
+ int ret = 0;
+ DwarfStack stack = { };
+ stackinit(&stack);
+ while (buf->p < buf->ep) {
+ int opcode = dwarfget1(buf);
+ werrstr("opcode %x", opcode);
+ switch (opcode) {
+ case 0:
+ buf->p = buf->ep;
+ break;
+ case OpAddr:
+ if (d->addrsize == 4) {
+ stackpush(&stack, dwarfget4(buf));
+ break;
+ } else {
+ werrstr("%s: we only support 4 byte addrs", name);
+ goto fatal;
+ }
+ case OpConst1s: {
+ signed char c = dwarfget1(buf);
+ stackpush(&stack, c);
+ } break;
+ case OpConst1u:
+ stackpush(&stack, dwarfget1(buf));
+ break;
+ case OpConst2s: {
+ signed short s = dwarfget2(buf);
+ stackpush(&stack, s);
+ } break;
+ case OpConst2u:
+ stackpush(&stack, dwarfget2(buf));
+ break;
+ case OpConst4s: {
+ signed int i = dwarfget4(buf);
+ stackpush(&stack, i);
+ } break;
+ case OpConst4u:
+ stackpush(&stack, dwarfget4(buf));
+ break;
+ case OpConst8s:
+ case OpConst8u:
+ werrstr("const 8 not yet supported");
+ goto fatal;
+ case OpConsts:
+ stackpush(&stack, dwarfget128s(buf));
+ break;
+ case OpConstu:
+ stackpush(&stack, dwarfget128(buf));
+ break;
+ case OpDup: {
+ ulong popped = stackpop(&stack);
+ stackpush(&stack, popped);
+ stackpush(&stack, popped);
+ } break;
+ case OpDrop:
+ stackpop(&stack);
+ break;
+ case OpOver: {
+ if (stack.length < 2) goto fatal;
+ stackpush(&stack, stack.data[stack.length-2]);
+ } break;
+ case OpPick: {
+ ulong arg = dwarfget1(buf);
+ if (arg >= stack.length) goto fatal;
+ arg = stack.data[stack.length-1-arg];
+ stackpush(&stack, arg);
+ } break;
+ case OpSwap: {
+ ulong a = stackpop(&stack), b = stackpop(&stack);
+ stackpush(&stack, b);
+ stackpush(&stack, a);
+ } break;
+ case OpRot: {
+ ulong a = stackpop(&stack), b = stackpop(&stack), c = stackpop(&stack);
+ stackpush(&stack, b);
+ stackpush(&stack, c);
+ stackpush(&stack, a);
+ } break;
+ case OpXderef:
+ case OpXderefSize:
+ werrstr("Xderef not yet supported");
+ goto fatal;
+ case OpAbs: {
+ long a = stackpop(&stack);
+ stackpush(&stack, a < 0 ? -a : a);
+ } break;
+ case OpAnd:
+ stackpush(&stack, stackpop(&stack) & stackpop(&stack));
+ break;
+ case OpDiv: {
+ ulong a = stackpop(&stack), b = stackpop(&stack);
+ stackpush(&stack, b / a);
+ } break;
+ case OpMinus: {
+ ulong a = stackpop(&stack), b = stackpop(&stack);
+ stackpush(&stack, b - a);
+ } break;
+ case OpMod: {
+ ulong a = stackpop(&stack), b = stackpop(&stack);
+ stackpush(&stack, b % a);
+ } break;
+ case OpMul:
+ stackpush(&stack, stackpop(&stack) * stackpop(&stack));
+ break;
+ case OpNeg:
+ stackpush(&stack, -stackpop(&stack));
+ break;
+ case OpNot:
+ stackpush(&stack, ~stackpop(&stack));
+ break;
+ case OpOr:
+ stackpush(&stack, stackpop(&stack) | stackpop(&stack));
+ break;
+ case OpPlus:
+ stackpush(&stack, stackpop(&stack) + stackpop(&stack));
+ break;
+ case OpPlusUconst:
+ stackpush(&stack, stackpop(&stack) + dwarfget128(buf));
+ break;
+ case OpShl: {
+ ulong a = stackpop(&stack), b = stackpop(&stack);
+ stackpush(&stack, b << a);
+ } break;
+ case OpShr: {
+ ulong a = stackpop(&stack), b = stackpop(&stack);
+ stackpush(&stack, b >> a);
+ } break;
+ case OpShra: {
+ ulong a = stackpop(&stack);
+ long b = stackpop(&stack);
+ if (b < 0)
+ b = -(-b >> a);
+ else
+ b = b >> a;
+ stackpush(&stack, b);
+ } break;
+ case OpXor:
+ stackpush(&stack, stackpop(&stack) ^ stackpop(&stack));
+ break;
+ case OpSkip:
+ buf->p += dwarfget2(buf);
+ break;
+ case OpBra: {
+ ulong a = dwarfget2(buf);
+ if (stackpop(&stack))
+ buf->p += a;
+ } break;
+ case OpEq:
+ stackpush(&stack, stackpop(&stack) == stackpop(&stack));
+ break;
+ case OpGe: {
+ ulong a = stackpop(&stack), b = stackpop(&stack);
+ stackpush(&stack, b >= a);
+ } break;
+ case OpGt: {
+ ulong a = stackpop(&stack), b = stackpop(&stack);
+ stackpush(&stack, b > a);
+ } break;
+ case OpLe: {
+ ulong a = stackpop(&stack), b = stackpop(&stack);
+ stackpush(&stack, b <= a);
+ } break;
+ case OpLt: {
+ ulong a = stackpop(&stack), b = stackpop(&stack);
+ stackpush(&stack, b < a);
+ } break;
+ case OpNe:
+ stackpush(&stack, stackpop(&stack) != stackpop(&stack));
+ break;
+ case OpNop:
+ break;
+ case OpDeref: {
+ ulong val, addr = stackpop(&stack);
+ if (!RosSymCallbacks.MemGetProc
+ (d->pe->fd,
+ &val,
+ addr,
+ d->addrsize))
+ goto fatal;
+ stackpush(&stack, val);
+ } break;
+ case OpDerefSize: {
+ ulong val, addr = stackpop(&stack), size = dwarfget1(buf);
+ if (!RosSymCallbacks.MemGetProc
+ (d->pe->fd,
+ &val,
+ addr,
+ size))
+ goto fatal;
+ stackpush(&stack, val);
+ } break;
+ case OpFbreg: {
+ ulong val, addr = cfa, offset = dwarfget128s(buf);
+ werrstr("FBREG cfa %x offset %x", cfa, offset);
+ if (!RosSymCallbacks.MemGetProc
+ (d->pe->fd,
+ &val,
+ addr+offset,
+ d->addrsize))
+ goto fatal;
+ stackpush(&stack, val);
+ } break;
+ case OpPiece:
+ werrstr("OpPiece not supported");
+ goto fatal;
+ default:
+ if (opcode >= OpLit0 && opcode < OpReg0)
+ stackpush(&stack, opcode - OpLit0);
+ else if (opcode >= OpReg0 && opcode < OpBreg0) {
+ ulong reg = opcode - OpReg0;
+ werrstr("REG[%d] value %x", reg, (ulong)registers->Registers[reg]);
+ stackpush(&stack, registers->Registers[reg]);
+ } else if (opcode >= OpBreg0 && opcode < OpRegx) {
+ ulong val,
+ reg = opcode - OpBreg0,
+ addr = registers->Registers[reg],
+ offset = dwarfget128s(buf);
+ werrstr("BREG[%d] reg %x offset %x", reg, addr, offset);
+ if (!RosSymCallbacks.MemGetProc
+ (d->pe->fd,
+ &val,
+ addr + offset,
+ d->addrsize))
+ goto fatal;
+ stackpush(&stack, val);
+ } else {
+ werrstr("opcode %x not supported", opcode);
+ goto fatal;
+ }
+ break;
+ }
+ }
+ if (stack.length < 1) goto fatal;
+ *result = stackpop(&stack);
+ werrstr("%s: value %x", name, *result);
+ goto finish;
+
+fatal:
+ ret = -1;
+
+finish:
+ stackfree(&stack);
+ return ret;
+}
+
+int dwarfargvalue(Dwarf *d, DwarfSym *proc, ulong pc, ulong cfa, PROSSYM_REGISTERS registers, DwarfParam *parameter)
+{
+ int gotarg;
+ DwarfSym unit = { };
+
+ if (dwarfenumunit(d, proc->unit, &unit) == -1)
+ return -1;
+
+ werrstr("lookup in unit %x-%x, pc %x", unit.attrs.lowpc, unit.attrs.highpc, pc);
+ pc -= unit.attrs.lowpc;
+
+ werrstr("paramblock %s -> unit %x type %x fde %x len %d registers %x",
+ parameter->name,
+ parameter->unit,
+ parameter->type,
+ parameter->fde,
+ parameter->len,
+ registers);
+
+ // Seek our range in loc
+ DwarfBuf locbuf;
+ DwarfBuf instream = { };
+
+ locbuf.d = d;
+ locbuf.addrsize = d->addrsize;
+
+ if (parameter->loctype == TConstant) {
+ locbuf.p = d->loc.data + parameter->fde;
+ locbuf.ep = d->loc.data + d->loc.len;
+ ulong start, end, len;
+ do {
+ len = 0;
+ start = dwarfget4(&locbuf);
+ end = dwarfget4(&locbuf);
+ if (start && end) {
+ len = dwarfget2(&locbuf);
+ instream = locbuf;
+ instream.ep = instream.p + len;
+ locbuf.p = instream.ep;
+ }
+ werrstr("ip %x s %x e %x (%x bytes)", pc, start, end, len);
+ } while (start && end && (start > pc || end <= pc));
+ } else if (parameter->loctype == TBlock) {
+ instream = locbuf;
+ instream.p = (void *)parameter->fde;
+ instream.ep = instream.p + parameter->len;
+ } else {
+ werrstr("Wrong block type for parameter %s", parameter->name);
+ return -1;
+ }
+
+ gotarg = dwarfgetarg(d, parameter->name, &instream, cfa, registers, ¶meter->value);
+ if (gotarg == -1)
+ return -1;
+
+ return 0;
+}
+
+int
+dwarfgetparams(Dwarf *d, DwarfSym *s, ulong pc, int pnum, DwarfParam *paramblocks)
+{
+ int ip = 0;
+ DwarfSym param = { };
+ int res = dwarfnextsymat(d, s, ¶m);
+ while (res == 0 && ip < pnum) {
+ if (param.attrs.tag == TagFormalParameter &&
+ param.attrs.have.name &&
+ param.attrs.have.location) {
+ paramblocks[ip].name = malloc(strlen(param.attrs.name)+1);
+ strcpy(paramblocks[ip].name, param.attrs.name);
+ paramblocks[ip].unit = param.unit;
+ paramblocks[ip].type = param.attrs.type;
+ paramblocks[ip].loctype = param.attrs.have.location;
+ paramblocks[ip].len = param.attrs.location.b.len;
+ paramblocks[ip].fde = param.attrs.location.b.data;
+ werrstr("param[%d] block %s -> type %x loctype %x fde %x len %x",
+ ip,
+ paramblocks[ip].name,
+ paramblocks[ip].type,
+ paramblocks[ip].loctype,
+ paramblocks[ip].fde,
+ paramblocks[ip].len);
+ ip++;
+ }
+ res = dwarfnextsymat(d, s, ¶m);
+ }
+ return ip;
+}
|| pe->loadsection(pe, ".debug_aranges", &d->aranges) < 0
|| pe->loadsection(pe, ".debug_line", &d->line) < 0
|| pe->loadsection(pe, ".debug_pubnames", &d->pubnames) < 0
- || pe->loadsection(pe, ".debug_info", &d->info) < 0)
+ || pe->loadsection(pe, ".debug_info", &d->info) < 0
+ || pe->loadsection(pe, ".debug_loc", &d->loc) < 0)
goto err;
pe->loadsection(pe, ".debug_frame", &d->frame);
pe->loadsection(pe, ".debug_ranges", &d->ranges);
free(d->ranges.data);
free(d->str.data);
free(d->info.data);
+ free(d->loc.data);
free(d);
return nil;
}
enum
{
- Isstmt = 1<<0,
- BasicDwarfBlock = 1<<1,
- EndSequence = 1<<2,
- PrologueEnd = 1<<3,
- EpilogueBegin = 1<<4
+ Isstmt = 1<<0,
+ BasicDwarfBlock = 1<<1,
+ EndSequence = 1<<2,
+ PrologueEnd = 1<<3,
+ EpilogueBegin = 1<<4
};
typedef struct State State;
struct State
{
- ulong addr;
- ulong file;
- ulong line;
- ulong column;
- ulong flags;
- ulong isa;
+ ulong addr;
+ ulong file;
+ ulong line;
+ ulong column;
+ ulong flags;
+ ulong isa;
};
int
-dwarfpctoline(Dwarf *d, ulong pc, char **cdir, char **dir, char **file, char **function, ulong *line, ulong *mtime, ulong *length)
+dwarfpctoline(Dwarf *d, DwarfSym *proc, ulong pc, char **file, char **function, ulong *line)
{
- uchar *prog, *opcount, *end, *dirs;
- ulong off, unit, len, vers, x, start, lastline;
- int i, first, firstline, op, a, l, quantum, isstmt, linebase, linerange, opcodebase, nf;
- char *files, *s;
- DwarfBuf b;
- DwarfSym sym;
- State emit, cur, reset;
- uchar **f, **newf;
+ char *cdir;
+ uchar *prog, *opcount, *end, *dirs;
+ ulong off, unit, len, vers, x, start, lastline;
+ int i, first, firstline, op, a, l, quantum, isstmt, linebase, linerange, opcodebase, nf;
+ char *files, *s;
+ DwarfBuf b;
+ DwarfSym sym;
+ State emit, cur, reset;
+ char **f, **newf;
- f = nil;
+ f = nil;
+ memset(proc, 0, sizeof(*proc));
- if(dwarfaddrtounit(d, pc, &unit) < 0
- || dwarflookuptag(d, unit, TagCompileUnit, &sym) < 0)
- return -1;
+ int runit = dwarfaddrtounit(d, pc, &unit);
+ if (runit < 0)
+ return -1;
+ int rtag = dwarflookuptag(d, unit, TagCompileUnit, &sym);
+ if (rtag < 0)
+ return -1;
- if(!sym.attrs.have.stmtlist){
- werrstr("no line mapping information for 0x%x", pc);
- return -1;
- }
- off = sym.attrs.stmtlist;
- if(off >= d->line.len){
- werrstr("bad stmtlist\n");
- goto bad;
- }
+ if(!sym.attrs.have.stmtlist){
+ werrstr("no line mapping information for 0x%x", pc);
+ return -1;
+ }
+ off = sym.attrs.stmtlist;
+ if(off >= d->line.len){
+ werrstr("bad stmtlist");
+ goto bad;
+ }
- if(trace) werrstr("unit 0x%x stmtlist 0x%x", unit, sym.attrs.stmtlist);
+ if(trace) werrstr("unit 0x%x stmtlist 0x%x", unit, sym.attrs.stmtlist);
- memset(&b, 0, sizeof b);
- b.d = d;
- b.p = d->line.data + off;
- b.ep = b.p + d->line.len;
- b.addrsize = sym.b.addrsize; /* should i get this from somewhere else? */
+ memset(&b, 0, sizeof b);
+ b.d = d;
+ b.p = d->line.data + off;
+ b.ep = b.p + d->line.len;
+ b.addrsize = sym.b.addrsize; /* should i get this from somewhere else? */
- len = dwarfget4(&b);
- if(b.p==nil || b.p+len > b.ep || b.p+len < b.p){
- werrstr("bad len\n");
- goto bad;
- }
+ len = dwarfget4(&b);
+ if(b.p==nil || b.p+len > b.ep || b.p+len < b.p){
+ werrstr("bad len");
+ goto bad;
+ }
- b.ep = b.p+len;
- vers = dwarfget2(&b);
- if(vers != 2){
- werrstr("bad dwarf version 0x%x", vers);
- return -1;
- }
+ b.ep = b.p+len;
+ vers = dwarfget2(&b);
+ if(vers != 2){
+ werrstr("bad dwarf version 0x%x", vers);
+ return -1;
+ }
- len = dwarfget4(&b);
- if(b.p==nil || b.p+len > b.ep || b.p+len < b.p){
- werrstr("another bad len\n");
- goto bad;
- }
- prog = b.p+len;
+ len = dwarfget4(&b);
+ if(b.p==nil || b.p+len > b.ep || b.p+len < b.p){
+ werrstr("another bad len");
+ goto bad;
+ }
+ prog = b.p+len;
- quantum = dwarfget1(&b);
- isstmt = dwarfget1(&b);
- linebase = (schar)dwarfget1(&b);
- linerange = (schar)dwarfget1(&b);
- opcodebase = dwarfget1(&b);
+ quantum = dwarfget1(&b);
+ isstmt = dwarfget1(&b);
+ linebase = (schar)dwarfget1(&b);
+ linerange = (schar)dwarfget1(&b);
+ opcodebase = dwarfget1(&b);
- opcount = b.p-1;
- dwarfgetnref(&b, opcodebase-1);
- if(b.p == nil){
- werrstr("bad opcode chart\n");
- goto bad;
- }
+ opcount = b.p-1;
+ dwarfgetnref(&b, opcodebase-1);
+ if(b.p == nil){
+ werrstr("bad opcode chart");
+ goto bad;
+ }
- /* just skip the files and dirs for now; we'll come back */
- dirs = b.p;
- while (b.p && *b.p)
- dwarfgetstring(&b);
- dwarfget1(&b);
+ /* just skip the files and dirs for now; we'll come back */
+ dirs = b.p;
+ while (b.p && *b.p)
+ dwarfgetstring(&b);
+ dwarfget1(&b);
- files = (char*)b.p;
- while(b.p!=nil && *b.p!=0){
- dwarfgetstring(&b);
- dwarfget128(&b);
- dwarfget128(&b);
- dwarfget128(&b);
- }
- dwarfget1(&b);
+ files = (char*)b.p;
+ while(b.p!=nil && *b.p!=0){
+ dwarfgetstring(&b);
+ dwarfget128(&b);
+ dwarfget128(&b);
+ dwarfget128(&b);
+ }
+ dwarfget1(&b);
- /* move on to the program */
- if(b.p == nil || b.p > prog){
- werrstr("bad header\n");
- goto bad;
- }
- b.p = prog;
+ /* move on to the program */
+ if(b.p == nil || b.p > prog){
+ werrstr("bad header");
+ goto bad;
+ }
+ b.p = prog;
- reset.addr = 0;
- reset.file = 1;
- reset.line = 1;
- reset.column = 0;
- reset.flags = isstmt ? Isstmt : 0;
- reset.isa = 0;
+ reset.addr = 0;
+ reset.file = 1;
+ reset.line = 1;
+ reset.column = 0;
+ reset.flags = isstmt ? Isstmt : 0;
+ reset.isa = 0;
- cur = reset;
- emit = reset;
- nf = 0;
- start = 0;
- if(trace) werrstr("program @ %lu ... %.*H opbase = %d\n", b.p - d->line.data, b.ep-b.p, b.p, opcodebase);
- first = 1;
- while(b.p != nil){
- firstline = 0;
- op = dwarfget1(&b);
- if(trace) werrstr("\tline %lu, addr 0x%x, op %d %.10H", cur.line, cur.addr, op, b.p);
- if(op >= opcodebase){
- a = (op - opcodebase) / linerange;
- l = (op - opcodebase) % linerange + linebase;
- cur.line += l;
- cur.addr += a * quantum;
- if(trace) werrstr(" +%d,%d\n", a, l);
- emit:
- if(first){
- if(cur.addr > pc){
- werrstr("found wrong line mapping 0x%x for pc 0x%x", cur.addr, pc);
- /* This is an overzealous check. gcc can produce discontiguous ranges
- and reorder statements, so it's possible for a future line to start
- ahead of pc and still find a matching one. */
- /*goto out;*/
- firstline = 1;
- }
- first = 0;
- start = cur.addr;
- }
- if(cur.addr > pc && !firstline)
- break;
- if(b.p == nil){
- werrstr("buffer underflow in line mapping");
- goto out;
- }
- emit = cur;
- if(emit.flags & EndSequence){
- werrstr("found wrong line mapping 0x%x-0x%x for pc 0x%x", start, cur.addr, pc);
- goto out;
- }
- cur.flags &= ~(BasicDwarfBlock|PrologueEnd|EpilogueBegin);
- }else{
- switch(op){
- case 0: /* extended op code */
- if(trace) werrstr(" ext");
- len = dwarfget128(&b);
- end = b.p+len;
- if(b.p == nil || end > b.ep || end < b.p || len < 1)
- goto bad;
- switch(dwarfget1(&b)){
- case 1: /* end sequence */
- if(trace) werrstr(" end\n");
- cur.flags |= EndSequence;
- goto emit;
- case 2: /* set address */
- cur.addr = dwarfgetaddr(&b);
- if(trace) werrstr(" set pc 0x%x\n", cur.addr);
- break;
- case 3: /* define file */
- newf = malloc(nf+1*sizeof(f[0]));
- if (newf)
- RtlMoveMemory(newf, f, nf*sizeof(f[0]));
- if(newf == nil)
- goto out;
- f[nf++] = b.p;
- s = dwarfgetstring(&b);
- dwarfget128(&b);
- dwarfget128(&b);
- dwarfget128(&b);
- if(trace) werrstr(" def file %s\n", s);
- break;
- }
- if(b.p == nil || b.p > end)
- goto bad;
- b.p = end;
- break;
- case 1: /* emit */
- if(trace) werrstr(" emit\n");
- goto emit;
- case 2: /* advance pc */
- a = dwarfget128(&b);
- if(trace) werrstr(" advance pc + %lu\n", a*quantum);
- cur.addr += a * quantum;
- break;
- case 3: /* advance line */
- l = dwarfget128s(&b);
- if(trace) werrstr(" advance line + %ld\n", l);
- cur.line += l;
- break;
- case 4: /* set file */
- if(trace) werrstr(" set file\n");
- cur.file = dwarfget128s(&b);
- break;
- case 5: /* set column */
- if(trace) werrstr(" set column\n");
- cur.column = dwarfget128(&b);
- break;
- case 6: /* negate stmt */
- if(trace) werrstr(" negate stmt\n");
- cur.flags ^= Isstmt;
- break;
- case 7: /* set basic block */
- if(trace) werrstr(" set basic block\n");
- cur.flags |= BasicDwarfBlock;
- break;
- case 8: /* const add pc */
- a = (255 - opcodebase) / linerange * quantum;
- if(trace) werrstr(" const add pc + %d\n", a);
- cur.addr += a;
- break;
- case 9: /* fixed advance pc */
- a = dwarfget2(&b);
- if(trace) werrstr(" fixed advance pc + %d\n", a);
- cur.addr += a;
- break;
- case 10: /* set prologue end */
- if(trace) werrstr(" set prologue end\n");
- cur.flags |= PrologueEnd;
- break;
- case 11: /* set epilogue begin */
- if(trace) werrstr(" set epilogue begin\n");
- cur.flags |= EpilogueBegin;
- break;
- case 12: /* set isa */
- if(trace) werrstr(" set isa\n");
- cur.isa = dwarfget128(&b);
- break;
- default: /* something new - skip it */
- if(trace) werrstr(" unknown %d\n", opcount[op]);
- for(i=0; i<opcount[op]; i++)
- dwarfget128(&b);
- break;
- }
- }
- }
- if(b.p == nil)
- goto bad;
+ cur = reset;
+ emit = reset;
+ nf = 0;
+ start = 0;
+ if(trace) werrstr("program @ %lu ... %.*H opbase = %d", b.p - d->line.data, b.ep-b.p, b.p, opcodebase);
+ first = 1;
+ while(b.p != nil){
+ firstline = 0;
+ op = dwarfget1(&b);
+ if(trace) werrstr("\tline %lu, addr 0x%x, op %d %.10H", cur.line, cur.addr, op, b.p);
+ if(op >= opcodebase){
+ a = (op - opcodebase) / linerange;
+ l = (op - opcodebase) % linerange + linebase;
+ cur.line += l;
+ cur.addr += a * quantum;
+ if(trace) werrstr(" +%d,%d", a, l);
+ emit:
+ if(first){
+ if(cur.addr > pc){
+ werrstr("found wrong line mapping 0x%x for pc 0x%x", cur.addr, pc);
+ /* This is an overzealous check. gcc can produce discontiguous ranges
+ and reorder statements, so it's possible for a future line to start
+ ahead of pc and still find a matching one. */
+ /*goto out;*/
+ firstline = 1;
+ }
+ first = 0;
+ start = cur.addr;
+ }
+ if(cur.addr > pc && !firstline)
+ break;
+ if(b.p == nil){
+ werrstr("buffer underflow in line mapping");
+ goto out;
+ }
+ emit = cur;
+ if(emit.flags & EndSequence){
+ werrstr("found wrong line mapping 0x%x-0x%x for pc 0x%x", start, cur.addr, pc);
+ goto out;
+ }
+ cur.flags &= ~(BasicDwarfBlock|PrologueEnd|EpilogueBegin);
+ }else{
+ switch(op){
+ case 0: /* extended op code */
+ if(trace) werrstr(" ext");
+ len = dwarfget128(&b);
+ end = b.p+len;
+ if(b.p == nil || end > b.ep || end < b.p || len < 1)
+ goto bad;
+ switch(dwarfget1(&b)){
+ case 1: /* end sequence */
+ if(trace) werrstr(" end");
+ cur.flags |= EndSequence;
+ goto emit;
+ case 2: /* set address */
+ cur.addr = dwarfgetaddr(&b);
+ if(trace) werrstr(" set pc 0x%x", cur.addr);
+ break;
+ case 3: /* define file */
+ newf = malloc(nf+1*sizeof(f[0]));
+ if (newf)
+ RtlMoveMemory(newf, f, nf*sizeof(f[0]));
+ if(newf == nil)
+ goto out;
+ free(f);
+ f = newf;
+ f[nf++] = s = dwarfgetstring(&b);
+ DPRINT1("str %s", s);
+ dwarfget128(&b);
+ dwarfget128(&b);
+ dwarfget128(&b);
+ if(trace) werrstr(" def file %s", s);
+ break;
+ }
+ if(b.p == nil || b.p > end)
+ goto bad;
+ b.p = end;
+ break;
+ case 1: /* emit */
+ if(trace) werrstr(" emit");
+ goto emit;
+ case 2: /* advance pc */
+ a = dwarfget128(&b);
+ if(trace) werrstr(" advance pc + %lu", a*quantum);
+ cur.addr += a * quantum;
+ break;
+ case 3: /* advance line */
+ l = dwarfget128s(&b);
+ if(trace) werrstr(" advance line + %ld", l);
+ cur.line += l;
+ break;
+ case 4: /* set file */
+ if(trace) werrstr(" set file");
+ cur.file = dwarfget128s(&b);
+ break;
+ case 5: /* set column */
+ if(trace) werrstr(" set column");
+ cur.column = dwarfget128(&b);
+ break;
+ case 6: /* negate stmt */
+ if(trace) werrstr(" negate stmt");
+ cur.flags ^= Isstmt;
+ break;
+ case 7: /* set basic block */
+ if(trace) werrstr(" set basic block");
+ cur.flags |= BasicDwarfBlock;
+ break;
+ case 8: /* const add pc */
+ a = (255 - opcodebase) / linerange * quantum;
+ if(trace) werrstr(" const add pc + %d", a);
+ cur.addr += a;
+ break;
+ case 9: /* fixed advance pc */
+ a = dwarfget2(&b);
+ if(trace) werrstr(" fixed advance pc + %d", a);
+ cur.addr += a;
+ break;
+ case 10: /* set prologue end */
+ if(trace) werrstr(" set prologue end");
+ cur.flags |= PrologueEnd;
+ break;
+ case 11: /* set epilogue begin */
+ if(trace) werrstr(" set epilogue begin");
+ cur.flags |= EpilogueBegin;
+ break;
+ case 12: /* set isa */
+ if(trace) werrstr(" set isa");
+ cur.isa = dwarfget128(&b);
+ break;
+ default: /* something new - skip it */
+ if(trace) werrstr(" unknown %d", opcount[op]);
+ for(i=0; i<opcount[op]; i++)
+ dwarfget128(&b);
+ break;
+ }
+ }
+ }
+ if(b.p == nil)
+ goto bad;
- /* finally! the data we seek is in "emit" */
+ /* finally! the data we seek is in "emit" */
- if(emit.file == 0){
- werrstr("invalid file index in mapping data");
- goto out;
- }
- if(line)
- *line = emit.line;
+ if(emit.file == 0){
+ werrstr("invalid file index in mapping data");
+ goto out;
+ }
+ if(line)
+ *line = emit.line;
- /* skip over first emit.file-2 guys */
- b.p = (uchar*)files;
- for(i=emit.file-1; i > 0 && b.p!=nil && *b.p!=0; i--){
- dwarfgetstring(&b);
- dwarfget128(&b);
- dwarfget128(&b);
- dwarfget128(&b);
- }
- if(b.p == nil){
- werrstr("problem parsing file data second time (cannot happen)");
- goto bad;
- }
- if(*b.p == 0){
- if(i >= nf){
- werrstr("bad file index in mapping data");
- goto bad;
- }
- b.p = f[i];
- }
- s = dwarfgetstring(&b);
- if(file)
- *file = s;
- i = dwarfget128(&b); /* directory */
- x = dwarfget128(&b);
- if(mtime)
- *mtime = x;
- x = dwarfget128(&b);
- if(length)
- *length = x;
+ /* skip over first emit.file-2 guys */
+ b.p = (uchar*)files;
+ for(i=emit.file-1; i > 0 && b.p!=nil && *b.p!=0; i--){
+ dwarfgetstring(&b);
+ dwarfget128(&b);
+ dwarfget128(&b);
+ dwarfget128(&b);
+ }
+ if(b.p == nil){
+ werrstr("problem parsing file data second time (cannot happen)");
+ goto bad;
+ }
+ if(*b.p == 0){
+ if(i >= nf){
+ werrstr("bad file index in mapping data");
+ goto bad;
+ }
+ b.p = (uchar*)f[i];
+ }
+ s = dwarfgetstring(&b);
+ *file = s;
+ i = dwarfget128(&b); /* directory */
+ x = dwarfget128(&b);
+ x = dwarfget128(&b);
- /* fetch dir name */
- if(cdir)
- *cdir = sym.attrs.compdir;
+ /* fetch dir name */
+ cdir = sym.attrs.have.compdir ? sym.attrs.compdir : 0;
- if(dir){
- *dir = nil;
- b.p = dirs;
- for (x = 1; b.p && *b.p; x++)
- if (x == i) {
- *dir = dwarfgetstring(&b);
- break;
- }
+ char *dwarfdir;
+ dwarfdir = nil;
+ b.p = dirs;
+ for (x = 1; b.p && *b.p; x++) {
+ dwarfdir = dwarfgetstring(&b);
+ if (x == i) break;
}
- *function = nil;
- lastline = 0;
-#if 0
- if (dwarfenumunit(d, unit, &proc) >= 0) {
- dwarfnextsymat(d, &proc, 0);
- while (dwarfnextsymat(d, &proc, 1) == 1) {
- if (proc.attrs.tag == TagSubprogram &&
- proc.attrs.have.name &&
- proc.attrs.declfile == emit.file &&
- proc.attrs.declline <= *line &&
- proc.attrs.declline > lastline) {
- lastline = proc.attrs.declline;
- free(*function);
- *function = malloc(strlen(proc.attrs.name)+1);
- strcpy(*function, proc.attrs.name);
+ if (!cdir && dwarfdir)
+ cdir = dwarfdir;
+
+ char *filefull = malloc(strlen(cdir) + strlen(*file) + 2);
+ strcpy(filefull, cdir);
+ strcat(filefull, "/");
+ strcat(filefull, *file);
+ *file = filefull;
+
+ *function = nil;
+ lastline = 0;
+
+ runit = dwarfaddrtounit(d, pc, &unit);
+ if (runit == 0) {
+ DwarfSym compunit = { };
+ int renum = dwarfenumunit(d, unit, &compunit);
+ if (renum < 0)
+ return -1;
+ renum = dwarfnextsymat(d, &compunit, proc);
+ while (renum == 0) {
+ if (proc->attrs.tag == TagSubprogram &&
+ proc->attrs.have.name)
+ {
+ if (proc->attrs.lowpc <= pc && proc->attrs.highpc > pc) {
+ *function = malloc(strlen(proc->attrs.name)+1);
+ strcpy(*function, proc->attrs.name);
+ goto done;
+ }
}
- }
- }
-#elif 1
- ulong lastaddr = 0;
- *function = NULL;
- for (i = 0; i < d->pe->nsymbols; i++) {
- if (d->pe->symtab[i].address > lastaddr &&
- d->pe->symtab[i].address <= pc - d->pe->imagebase &&
- d->pe->symtab[i].address < d->pe->imagesize) {
- lastaddr = d->pe->symtab[i].address;
- *function = d->pe->symtab[i].name;
- }
- }
-#else
- // *sigh* we get unrelocated low_pc and high_pc because the dwarf symbols
- // are not 'loaded' in the PE sense.
- if (dwarflookupfn(d, unit, pc, &proc) >= 0) {
- *function = malloc(strlen(proc.attrs.name)+1);
- strcpy(*function, proc.attrs.name);
- }
-#endif
+ renum = dwarfnextsym(d, proc);
+ }
+ }
- /* free at last, free at last */
- free(f);
- return 0;
+ // Next search by declaration
+ runit = dwarfaddrtounit(d, pc, &unit);
+ if (runit == 0) {
+ DwarfSym compunit = { };
+ int renum = dwarfenumunit(d, unit, &compunit);
+ if (renum < 0)
+ return -1;
+ renum = dwarfnextsymat(d, &compunit, proc);
+ while (renum == 0) {
+ if (proc->attrs.tag == TagSubprogram &&
+ proc->attrs.have.name &&
+ proc->attrs.declfile == emit.file)
+ {
+ if (proc->attrs.declline <= *line &&
+ proc->attrs.declline > lastline) {
+ free(*function);
+ *function = malloc(strlen(proc->attrs.name)+1);
+ strcpy(*function, proc->attrs.name);
+ goto done;
+ }
+ lastline = proc->attrs.declline;
+ }
+ renum = dwarfnextsym(d, proc);
+ }
+ }
+ /* free at last, free at last */
+done:
+ free(f);
+ return 0;
bad:
- werrstr("corrupted line mapping for 0x%x", pc);
+ werrstr("corrupted line mapping for 0x%x", pc);
out:
- free(f);
- return -1;
+ free(f);
+ return -1;
}
+VOID RosSymFreeInfo(PROSSYM_LINEINFO LineInfo)
+{
+ int i;
+ free(LineInfo->FileName);
+ LineInfo->FileName = NULL;
+ free(LineInfo->FunctionName);
+ LineInfo->FunctionName = NULL;
+ for (i = 0; i < sizeof(LineInfo->Parameters)/sizeof(LineInfo->Parameters[0]); i++)
+ free(LineInfo->Parameters[i].ValueName);
+}
#include "pe.h"
BOOLEAN
-RosSymGetAddressInformation(PROSSYM_INFO RosSymInfo,
- ULONG_PTR RelativeAddress,
- ULONG *LineNumber,
- char *FileName,
- char *FunctionName)
+RosSymGetAddressInformation
+(PROSSYM_INFO RosSymInfo,
+ ULONG_PTR RelativeAddress,
+ PROSSYM_LINEINFO RosSymLineInfo)
{
- char *cdir, *dir, *file, *function;
- ulong line, mtime, length;
+ ROSSYM_REGISTERS registers;
+ DwarfParam params[sizeof(RosSymLineInfo->Parameters)/sizeof(RosSymLineInfo->Parameters[0])];
+ DwarfSym proc = { };
+ int i;
int res = dwarfpctoline
(RosSymInfo,
+ &proc,
RelativeAddress + RosSymInfo->pe->imagebase,
- &cdir,
- &dir,
- &file,
- &function,
- &line,
- &mtime,
- &length);
- if (res != -1) {
- *LineNumber = line;
- FileName[0] = 0;
- if (dir) {
- strcpy(FileName, dir);
- strcat(FileName, "/");
- }
- if (file)
- strcat(FileName, file);
- FunctionName[0] = 0;
- if (function)
- strcpy(FunctionName, function);
- return TRUE;
- } else {
+ &RosSymLineInfo->FileName,
+ &RosSymLineInfo->FunctionName,
+ &RosSymLineInfo->LineNumber);
+ if (res == -1) {
+ werrstr("Could not get basic function info");
return FALSE;
- }
+ }
+
+ if (!(RosSymLineInfo->Flags & ROSSYM_LINEINFO_HAS_REGISTERS))
+ return TRUE;
+
+ registers = RosSymLineInfo->Registers;
+
+ DwarfExpr cfa = { };
+ ulong cfaLocation;
+ if (dwarfregunwind
+ (RosSymInfo,
+ RelativeAddress + RosSymInfo->pe->imagebase,
+ proc.attrs.framebase.c,
+ &cfa,
+ ®isters) == -1) {
+ werrstr("Can't get cfa location for %s", RosSymLineInfo->FunctionName);
+ return TRUE;
+ }
+
+ res = dwarfgetparams
+ (RosSymInfo,
+ &proc,
+ RelativeAddress + RosSymInfo->pe->imagebase,
+ sizeof(params)/sizeof(params[0]),
+ params);
+
+ if (res == -1) {
+ werrstr("%s: could not get params at all", RosSymLineInfo->FunctionName);
+ RosSymLineInfo->NumParams = 0;
+ return TRUE;
+ }
+
+ werrstr("%s: res %d", RosSymLineInfo->FunctionName, res);
+ RosSymLineInfo->NumParams = res;
+
+ res = dwarfcomputecfa(RosSymInfo, &cfa, ®isters, &cfaLocation);
+ if (res == -1) {
+ werrstr("%s: could not get our own cfa", RosSymLineInfo->FunctionName);
+ return TRUE;
+ }
+
+ for (i = 0; i < RosSymLineInfo->NumParams; i++) {
+ werrstr("Getting arg %s, unit %x, type %x",
+ params[i].name, params[i].unit, params[i].type);
+ res = dwarfargvalue
+ (RosSymInfo,
+ &proc,
+ RelativeAddress + RosSymInfo->pe->imagebase,
+ cfaLocation,
+ ®isters,
+ ¶ms[i]);
+ if (res == -1) { RosSymLineInfo->NumParams = i; return TRUE; }
+ werrstr("%s: %x", params[i].name, params[i].value);
+ RosSymLineInfo->Parameters[i].ValueName = malloc(strlen(params[i].name)+1);
+ strcpy(RosSymLineInfo->Parameters[i].ValueName, params[i].name);
+ free(params[i].name);
+ RosSymLineInfo->Parameters[i].Value = params[i].value;
+ }
+
+ return TRUE;
}
/* EOF */
#define NDEBUG
#include <debug.h>
+#define SYMBOL_SIZE 18
+
extern NTSTATUS RosSymStatus;
BOOLEAN
RosSymCreateFromFile(PVOID FileContext, PROSSYM_INFO *RosSymInfo)
{
- IMAGE_DOS_HEADER DosHeader;
- IMAGE_NT_HEADERS NtHeaders;
- PIMAGE_SECTION_HEADER SectionHeaders;
- unsigned SectionIndex;
- unsigned SymbolTable, NumSymbols;
-
- /* Load DOS header */
- if (! RosSymSeekFile(FileContext, 0))
+ IMAGE_DOS_HEADER DosHeader;
+ IMAGE_NT_HEADERS NtHeaders;
+ PIMAGE_SECTION_HEADER SectionHeaders;
+ unsigned SectionIndex;
+ unsigned SymbolTable, NumSymbols;
+
+ /* Load DOS header */
+ if (! RosSymSeekFile(FileContext, 0))
{
- DPRINT1("Could not rewind file\n");
- return FALSE;
- }
- if (! RosSymReadFile(FileContext, &DosHeader, sizeof(IMAGE_DOS_HEADER)))
+ werrstr("Could not rewind file\n");
+ return FALSE;
+ }
+ if (! RosSymReadFile(FileContext, &DosHeader, sizeof(IMAGE_DOS_HEADER)))
{
- DPRINT1("Failed to read DOS header %x\n", RosSymStatus);
- return FALSE;
+ werrstr("Failed to read DOS header %x\n", RosSymStatus);
+ return FALSE;
}
- if (! ROSSYM_IS_VALID_DOS_HEADER(&DosHeader))
+ if (! ROSSYM_IS_VALID_DOS_HEADER(&DosHeader))
{
- DPRINT1("Image doesn't have a valid DOS header\n");
- return FALSE;
+ werrstr("Image doesn't have a valid DOS header\n");
+ return FALSE;
}
- /* Load NT headers */
- if (! RosSymSeekFile(FileContext, DosHeader.e_lfanew))
+ /* Load NT headers */
+ if (! RosSymSeekFile(FileContext, DosHeader.e_lfanew))
{
- DPRINT1("Failed seeking to NT headers\n");
- return FALSE;
+ werrstr("Failed seeking to NT headers\n");
+ return FALSE;
}
- if (! RosSymReadFile(FileContext, &NtHeaders, sizeof(IMAGE_NT_HEADERS)))
+ if (! RosSymReadFile(FileContext, &NtHeaders, sizeof(IMAGE_NT_HEADERS)))
{
- DPRINT1("Failed to read NT headers\n");
- return FALSE;
+ werrstr("Failed to read NT headers\n");
+ return FALSE;
}
- if (! ROSSYM_IS_VALID_NT_HEADERS(&NtHeaders))
+ if (! ROSSYM_IS_VALID_NT_HEADERS(&NtHeaders))
{
- DPRINT1("Image doesn't have a valid PE header\n");
- return FALSE;
+ werrstr("Image doesn't have a valid PE header\n");
+ return FALSE;
}
- SymbolTable = NtHeaders.FileHeader.PointerToSymbolTable;
- NumSymbols = NtHeaders.FileHeader.NumberOfSymbols;
+ SymbolTable = NtHeaders.FileHeader.PointerToSymbolTable;
+ NumSymbols = NtHeaders.FileHeader.NumberOfSymbols;
- if (!NumSymbols)
+ if (!NumSymbols)
{
- DPRINT1("Image doesn't have debug symbols\n");
- return FALSE;
+ werrstr("Image doesn't have debug symbols\n");
+ return FALSE;
}
- DPRINT("SymbolTable %x NumSymbols %x\n", SymbolTable, NumSymbols);
+ DPRINT("SymbolTable %x NumSymbols %x\n", SymbolTable, NumSymbols);
- /* Load section headers */
- if (! RosSymSeekFile(FileContext, (char *) IMAGE_FIRST_SECTION(&NtHeaders) -
- (char *) &NtHeaders + DosHeader.e_lfanew))
+ /* Load section headers */
+ if (! RosSymSeekFile(FileContext, (char *) IMAGE_FIRST_SECTION(&NtHeaders) -
+ (char *) &NtHeaders + DosHeader.e_lfanew))
{
- DPRINT1("Failed seeking to section headers\n");
- return FALSE;
+ werrstr("Failed seeking to section headers\n");
+ return FALSE;
}
- DPRINT("Alloc section headers\n");
- SectionHeaders = RosSymAllocMem(NtHeaders.FileHeader.NumberOfSections
- * sizeof(IMAGE_SECTION_HEADER));
- if (NULL == SectionHeaders)
+ DPRINT("Alloc section headers\n");
+ SectionHeaders = RosSymAllocMem(NtHeaders.FileHeader.NumberOfSections
+ * sizeof(IMAGE_SECTION_HEADER));
+ if (NULL == SectionHeaders)
{
- DPRINT1("Failed to allocate memory for %u section headers\n",
- NtHeaders.FileHeader.NumberOfSections);
- return FALSE;
+ werrstr("Failed to allocate memory for %u section headers\n",
+ NtHeaders.FileHeader.NumberOfSections);
+ return FALSE;
}
- if (! RosSymReadFile(FileContext, SectionHeaders,
- NtHeaders.FileHeader.NumberOfSections
- * sizeof(IMAGE_SECTION_HEADER)))
+ if (! RosSymReadFile(FileContext, SectionHeaders,
+ NtHeaders.FileHeader.NumberOfSections
+ * sizeof(IMAGE_SECTION_HEADER)))
+ {
+ RosSymFreeMem(SectionHeaders);
+ werrstr("Failed to read section headers\n");
+ return FALSE;
+ }
+
+ // Convert names to ANSI_STRINGs
+ for (SectionIndex = 0; SectionIndex < NtHeaders.FileHeader.NumberOfSections;
+ SectionIndex++)
{
- RosSymFreeMem(SectionHeaders);
- DPRINT1("Failed to read section headers\n");
- return FALSE;
+ ANSI_STRING astr;
+ if (SectionHeaders[SectionIndex].Name[0] != '/') {
+ DPRINT("Short name string %d, %s\n", SectionIndex, SectionHeaders[SectionIndex].Name);
+ astr.Buffer = RosSymAllocMem(IMAGE_SIZEOF_SHORT_NAME);
+ memcpy(astr.Buffer, SectionHeaders[SectionIndex].Name, IMAGE_SIZEOF_SHORT_NAME);
+ astr.MaximumLength = IMAGE_SIZEOF_SHORT_NAME;
+ astr.Length = GetStrnlen(astr.Buffer, IMAGE_SIZEOF_SHORT_NAME);
+ } else {
+ UNICODE_STRING intConv;
+ NTSTATUS Status;
+ ULONG StringOffset;
+
+ Status = RtlCreateUnicodeStringFromAsciiz(&intConv, (PCSZ)SectionHeaders[SectionIndex].Name + 1);
+ if (!NT_SUCCESS(Status)) goto freeall;
+ Status = RtlUnicodeStringToInteger(&intConv, 10, &StringOffset);
+ RtlFreeUnicodeString(&intConv);
+ if (!NT_SUCCESS(Status)) goto freeall;
+ if (!RosSymSeekFile(FileContext, SymbolTable + NumSymbols * SYMBOL_SIZE + StringOffset))
+ goto freeall;
+ astr.Buffer = RosSymAllocMem(MAXIMUM_DWARF_NAME_SIZE);
+ if (!RosSymReadFile(FileContext, astr.Buffer, MAXIMUM_DWARF_NAME_SIZE))
+ goto freeall;
+ astr.Length = GetStrnlen(astr.Buffer, MAXIMUM_DWARF_NAME_SIZE);
+ astr.MaximumLength = MAXIMUM_DWARF_NAME_SIZE;
+ DPRINT("Long name %d, %s\n", SectionIndex, astr.Buffer);
+ }
+ *ANSI_NAME_STRING(&SectionHeaders[SectionIndex]) = astr;
}
- // Convert names to ANSI_STRINGs
- for (SectionIndex = 0; SectionIndex < NtHeaders.FileHeader.NumberOfSections;
- SectionIndex++)
- {
- ANSI_STRING astr;
- if (SectionHeaders[SectionIndex].Name[0] != '/') {
- DPRINT("Short name string %d, %s\n", SectionIndex, SectionHeaders[SectionIndex].Name);
- astr.Buffer = RosSymAllocMem(IMAGE_SIZEOF_SHORT_NAME);
- memcpy(astr.Buffer, SectionHeaders[SectionIndex].Name, IMAGE_SIZEOF_SHORT_NAME);
- astr.MaximumLength = IMAGE_SIZEOF_SHORT_NAME;
- astr.Length = GetStrnlen(astr.Buffer, IMAGE_SIZEOF_SHORT_NAME);
- } else {
- UNICODE_STRING intConv;
- NTSTATUS Status;
- ULONG StringOffset;
-
- Status = RtlCreateUnicodeStringFromAsciiz(&intConv, (PCSZ)SectionHeaders[SectionIndex].Name + 1);
- if (!NT_SUCCESS(Status)) goto freeall;
- Status = RtlUnicodeStringToInteger(&intConv, 10, &StringOffset);
- RtlFreeUnicodeString(&intConv);
- if (!NT_SUCCESS(Status)) goto freeall;
- if (!RosSymSeekFile(FileContext, SymbolTable + NumSymbols * SYMBOL_SIZE + StringOffset))
- goto freeall;
- astr.Buffer = RosSymAllocMem(MAXIMUM_DWARF_NAME_SIZE);
- if (!RosSymReadFile(FileContext, astr.Buffer, MAXIMUM_DWARF_NAME_SIZE))
- goto freeall;
- astr.Length = GetStrnlen(astr.Buffer, MAXIMUM_DWARF_NAME_SIZE);
- astr.MaximumLength = MAXIMUM_DWARF_NAME_SIZE;
- DPRINT("Long name %d, %s\n", SectionIndex, astr.Buffer);
- }
- *ANSI_NAME_STRING(&SectionHeaders[SectionIndex]) = astr;
- }
-
- DPRINT("Done with sections\n");
- Pe *pe = RosSymAllocMem(sizeof(*pe));
- pe->fd = FileContext;
- pe->e2 = peget2;
- pe->e4 = peget4;
- pe->e8 = peget8;
- pe->nsections = NtHeaders.FileHeader.NumberOfSections;
- pe->sect = SectionHeaders;
- pe->nsymbols = NtHeaders.FileHeader.NumberOfSymbols;
- pe->symtab = malloc(pe->nsymbols * sizeof(CoffSymbol));
- SYMENT SymbolData;
- int i, j;
- DPRINT("Getting symbol data\n");
- ASSERT(sizeof(SymbolData) == 18);
- for (i = 0, j = 0; i < pe->nsymbols; i++) {
- if (!RosSymSeekFile
- (FileContext,
- NtHeaders.FileHeader.PointerToSymbolTable + i * sizeof(SymbolData)))
- goto freeall;
- if (!RosSymReadFile(FileContext, &SymbolData, sizeof(SymbolData)))
- goto freeall;
- if ((SymbolData.e_scnum < 1) ||
- (SymbolData.e_sclass != C_EXT &&
- SymbolData.e_sclass != C_STAT))
- continue;
- int section = SymbolData.e_scnum - 1;
- if (SymbolData.e.e.e_zeroes) {
- pe->symtab[j].name = malloc(sizeof(SymbolData.e.e_name)+1);
- memcpy(pe->symtab[j].name, SymbolData.e.e_name, sizeof(SymbolData.e.e_name));
- pe->symtab[j].name[sizeof(SymbolData.e.e_name)] = 0;
- } else {
- if (!RosSymSeekFile
- (FileContext,
- NtHeaders.FileHeader.PointerToSymbolTable +
- (NtHeaders.FileHeader.NumberOfSymbols * 18) +
- SymbolData.e.e.e_offset))
- goto freeall;
- pe->symtab[j].name = malloc(MAXIMUM_COFF_SYMBOL_LENGTH+1);
- pe->symtab[j].name[MAXIMUM_COFF_SYMBOL_LENGTH] = 0;
- // It's possible that we've got a string just at the end of the file
- // we'll skip that symbol if needed
- if (!RosSymReadFile(FileContext, pe->symtab[j].name, MAXIMUM_COFF_SYMBOL_LENGTH)) {
- free(pe->symtab[j].name);
- continue;
- }
- }
- if (pe->symtab[j].name[0] == '.') {
- free(pe->symtab[j].name);
- continue;
- }
- pe->symtab[j].address = pe->sect[section].VirtualAddress + SymbolData.e_value;
- j++;
- }
- DPRINT("%d symbols\n", j);
- pe->nsymbols = j;
- pe->imagebase = pe->loadbase = NtHeaders.OptionalHeader.ImageBase;
- pe->imagesize = NtHeaders.OptionalHeader.SizeOfImage;
- pe->loadsection = loaddisksection;
- DPRINT("do dwarfopen\n");
- *RosSymInfo = dwarfopen(pe);
- DPRINT("done %x\n", *RosSymInfo);
-
- return TRUE;
+ DPRINT("Done with sections\n");
+ Pe *pe = RosSymAllocMem(sizeof(*pe));
+ pe->fd = FileContext;
+ pe->e2 = peget2;
+ pe->e4 = peget4;
+ pe->e8 = peget8;
+ pe->nsections = NtHeaders.FileHeader.NumberOfSections;
+ pe->sect = SectionHeaders;
+ pe->imagebase = pe->loadbase = NtHeaders.OptionalHeader.ImageBase;
+ pe->imagesize = NtHeaders.OptionalHeader.SizeOfImage;
+ pe->loadsection = loaddisksection;
+ *RosSymInfo = dwarfopen(pe);
+
+ return TRUE;
freeall:
- for (SectionIndex = 0; SectionIndex < NtHeaders.FileHeader.NumberOfSections;
- SectionIndex++)
- RtlFreeAnsiString(ANSI_NAME_STRING(&SectionHeaders[SectionIndex]));
- RosSymFreeMem(SectionHeaders);
+ for (SectionIndex = 0; SectionIndex < NtHeaders.FileHeader.NumberOfSections;
+ SectionIndex++)
+ RtlFreeAnsiString(ANSI_NAME_STRING(&SectionHeaders[SectionIndex]));
+ RosSymFreeMem(SectionHeaders);
- return FALSE;
+ return FALSE;
}
/* EOF */
#include "rossympriv.h"
#define NTOS_MODE_USER
#include <ndk/ntndk.h>
+#include <pseh/pseh.h>
#define NDEBUG
#include <debug.h>
RtlFreeHeap(RtlGetProcessHeap(), 0, Area);
}
+static BOOLEAN
+RosSymGetMemUM(ULONG_PTR *Target, PVOID SourceMem, ULONG Size)
+{
+ return FALSE;
+}
+
VOID
RosSymInitUserMode(VOID)
{
RosSymAllocMemUM,
RosSymFreeMemUM,
RosSymZwReadFile,
- RosSymZwSeekFile
+ RosSymZwSeekFile,
+ RosSymGetMemUM
};
RosSymInit(&KmCallbacks);
for (i = 0; i < pe->nsections; i++) {
RtlFreeAnsiString(ANSI_NAME_STRING(&pe->sect[i]));
}
- for (i = 0; i < pe->nsymbols; i++) {
- free(pe->symtab[i].name);
- }
- free(pe->symtab);
free(pe->sect);
free(pe);
}
struct DwarfBlock;
typedef struct _IMAGE_SECTION_HEADER PeSect;
-typedef struct _CoffSymbol {
- ulong address;
- char *name;
-} CoffSymbol;
-
typedef struct _Pe {
void *fd;
u16int (*e2)(const unsigned char *data);
u32int (*e4)(const unsigned char *data);
u64int (*e8)(const unsigned char *data);
ulong imagebase, imagesize, loadbase;
- ulong nsymbols;
- CoffSymbol *symtab;
int (*loadsection)(struct _Pe *pe, char *name, struct DwarfBlock *b);
int nsections;
struct _IMAGE_SECTION_HEADER *sect;
} Pe;
-#define E_SYMNMLEN 8
-#include <pshpack1.h>
-typedef struct {
- union {
- char e_name[E_SYMNMLEN];
- struct {
- unsigned long e_zeroes;
- unsigned long e_offset;
- } e;
- } e;
- unsigned long e_value;
- short e_scnum;
- unsigned short e_type;
- unsigned char e_sclass;
- unsigned char e_numaux;
-} SYMENT, *PSYMENT;
-#include <poppack.h>
-
-#define C_EXT 2
-#define C_STAT 3
-#define DT_FCN 0x40
-
Pe *peopen(const char *name);
int loaddisksection(struct _Pe *pe, char *name, struct DwarfBlock *b);
-int loadmemsection(struct _Pe *pe, char *name, struct DwarfBlock *b);
u16int peget2(const unsigned char *ptr);
u32int peget4(const unsigned char *ptr);
u64int peget8(const unsigned char *ptr);
#pragma once
+#define HIGHBIT 0x80000000
+
extern ROSSYM_CALLBACKS RosSymCallbacks;
#define RosSymAllocMem(Size) (*RosSymCallbacks.AllocMemProc)(Size)
#define RosSymFreeMem(Area) (*RosSymCallbacks.FreeMemProc)(Area)
#define RosSymReadFile(FileContext, Buffer, Size) (*RosSymCallbacks.ReadFileProc)((FileContext), (Buffer), (Size))
#define RosSymSeekFile(FileContext, Position) (*RosSymCallbacks.SeekFileProc)((FileContext), (Position))
+#define RosSymGetMem(TargetAddress, Address, Size) (*RosSymCallbacks.MemGetProc)((TargetAddress), (Address), (Size))
extern BOOLEAN RosSymZwReadFile(PVOID FileContext, PVOID Buffer, ULONG Size);
extern BOOLEAN RosSymZwSeekFile(PVOID FileContext, ULONG_PTR Position);
-extern BOOLEAN RosSymIoReadFile(PVOID FileContext, PVOID Buffer, ULONG Size);
-extern BOOLEAN RosSymIoSeekFile(PVOID FileContext, ULONG_PTR Position);
-
#define ROSSYM_IS_VALID_DOS_HEADER(DosHeader) (IMAGE_DOS_SIGNATURE == (DosHeader)->e_magic \
&& 0L != (DosHeader)->e_lfanew)
#define ROSSYM_IS_VALID_NT_HEADERS(NtHeaders) (IMAGE_NT_SIGNATURE == (NtHeaders)->Signature \
add_subdirectory(nls)
add_subdirectory(vgafonts)
-add_minicd(${CMAKE_CURRENT_SOURCE_DIR}/drivers/etc/hosts reactos hosts)
-add_minicd(${CMAKE_CURRENT_SOURCE_DIR}/drivers/etc/KDBinit reactos KDBinit)
-add_minicd(${CMAKE_CURRENT_SOURCE_DIR}/drivers/etc/services reactos services)
-
-add_cab(${CMAKE_CURRENT_SOURCE_DIR}/drivers/etc/hosts 5)
-add_cab(${CMAKE_CURRENT_SOURCE_DIR}/drivers/etc/KDBinit 5)
-add_cab(${CMAKE_CURRENT_SOURCE_DIR}/drivers/etc/services 5)
-add_cab(${CMAKE_CURRENT_SOURCE_DIR}/sounds/ReactOS_LogOn.wav 8)
\ No newline at end of file
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/drivers/etc/hosts DESTINATION reactos/system32/drivers/etc FOR all)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/drivers/etc/KDBinit DESTINATION reactos/system32/drivers/etc FOR all)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/drivers/etc/services DESTINATION reactos/system32/drivers/etc FOR all)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/sounds/ReactOS_LogOn.wav DESTINATION reactos/media FOR all)
\ No newline at end of file
)
foreach(item ${FONT_FILES})
- add_cab("${CMAKE_CURRENT_SOURCE_DIR}/${item}" 3)
+ add_cd_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/${item}" DESTINATION reactos/Fonts FOR all)
endforeach(item)
\ No newline at end of file
)
foreach(item ${INF_FILES})
- add_cab("${CMAKE_CURRENT_SOURCE_DIR}/${item}" 6)
+ add_cd_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/${item}" DESTINATION reactos/inf FOR all)
endforeach(item)
-add_cab(${CMAKE_CURRENT_SOURCE_DIR}/syssetup.inf 6)
\ No newline at end of file
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/syssetup.inf DESTINATION reactos/inf FOR all)
\ No newline at end of file
-add_minicd(${CMAKE_CURRENT_SOURCE_DIR}/l_intl.nls reactos l_intl.nls)
-add_minicd(${CMAKE_CURRENT_SOURCE_DIR}/c_437.nls reactos c_437.nls)
-add_minicd(${CMAKE_CURRENT_SOURCE_DIR}/c_1252.nls reactos c_1252.nls)
-add_livecd(${CMAKE_CURRENT_SOURCE_DIR}/l_intl.nls reactos/system32)
-add_livecd(${CMAKE_CURRENT_SOURCE_DIR}/c_437.nls reactos/system32 c_437.nls)
-add_livecd(${CMAKE_CURRENT_SOURCE_DIR}/c_1252.nls reactos/system32 c_1252.nls)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/l_intl.nls DESTINATION reactos/system32 NO_CAB FOR all)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/c_437.nls DESTINATION reactos/system32 NO_CAB FOR all)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/c_1252.nls DESTINATION reactos/system32 NO_CAB FOR all)
list(APPEND NLS_FILES
c_037.nls
foreach(item ${NLS_FILES})
- add_cab("${CMAKE_CURRENT_SOURCE_DIR}/${item}" 1 ${item})
+ add_cd_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/${item}" DESTINATION reactos/system32 FOR all)
endforeach(item)
add_custom_target(vgafonts DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/vgafonts.cab)
-add_minicd(${CMAKE_CURRENT_BINARY_DIR}/vgafonts.cab reactos vgafonts.cab)
-add_cab(${CMAKE_CURRENT_BINARY_DIR}/vgafonts.cab 4)
\ No newline at end of file
+add_cd_file(TARGET vgafonts FILE ${CMAKE_CURRENT_BINARY_DIR}/vgafonts.cab DESTINATION reactos NO_CAB FOR all)
\ No newline at end of file
endmacro()\r
\r
macro(set_module_type MODULE TYPE)\r
- add_dependencies(${MODULE} psdk buildno_header)\r
+ add_dependencies(${MODULE} psdk)\r
if(${TYPE} MATCHES nativecui)\r
set_subsystem(${MODULE} native)\r
set_entrypoint(${MODULE} NtProcessStartup@4)\r
add_importlibs(ntoskrnl hal kdcom bootvid)
add_pch(ntoskrnl ${CMAKE_CURRENT_SOURCE_DIR}/include/ntoskrnl.h ${SOURCE})
-add_dependencies(ntoskrnl psdk bugcodes kernel_zw kernel_napi asm)
+add_dependencies(ntoskrnl psdk bugcodes asm)
-add_minicd_target(ntoskrnl reactos ntoskrnl.exe)
-add_livecd_target(ntoskrnl reactos/system32)
+add_cd_file(TARGET ntoskrnl DESTINATION reactos/system32 NO_CAB FOR all)
add_importlib_target(ntoskrnl.spec)
add_library(ntdllsys ntdll.S)
if ((DriveNumber != AUTO_DRIVE) && (DriveNumber < 26))
{
/* Force assignment */
+ KeAcquireGuardedMutex(&ObpDeviceMapLock);
if ((ObSystemDeviceMap->DriveMap & (1 << DriveNumber)) != 0)
{
DbgPrint("Drive letter already used!\n");
+ KeReleaseGuardedMutex(&ObpDeviceMapLock);
return FALSE;
}
+ KeReleaseGuardedMutex(&ObpDeviceMapLock);
}
else
{
/* Automatic assignment */
DriveNumber = AUTO_DRIVE;
-
+ KeAcquireGuardedMutex(&ObpDeviceMapLock);
for (i = 2; i < 26; i++)
{
if ((ObSystemDeviceMap->DriveMap & (1 << i)) == 0)
break;
}
}
+ KeReleaseGuardedMutex(&ObpDeviceMapLock);
if (DriveNumber == AUTO_DRIVE)
{
DPRINT("DriveNumber %d\n", DriveNumber);
- /* Update the System Device Map */
- ObSystemDeviceMap->DriveMap |= (1 << DriveNumber);
- ObSystemDeviceMap->DriveType[DriveNumber] = DriveType;
-
/* Build drive name */
swprintf(DriveNameBuffer,
L"\\??\\%C:",
BOOLEAN
KdbSymPrintAddress(
- IN PVOID Address);
+ IN PVOID Address,
+ IN PKTRAP_FRAME Context);
NTSTATUS
KdbSymGetAddressInformation(
IN PROSSYM_INFO RosSymInfo,
IN ULONG_PTR RelativeAddress,
- OUT PULONG LineNumber OPTIONAL,
- OUT PCH FileName OPTIONAL,
- OUT PCH FunctionName OPTIONAL
+ IN PROSSYM_LINEINFO RosSymLineInfo
);
#endif
//
extern ULONG ObpTraceLevel;
extern KEVENT ObpDefaultObject;
+extern KGUARDED_MUTEX ObpDeviceMapLock;
extern POBJECT_TYPE ObpTypeObjectType;
extern POBJECT_TYPE ObSymbolicLinkType;
extern POBJECT_TYPE ObpTypeObjectType;
static void
KdbpPrintAddressInCode(unsigned int Addr, struct disassemble_info * Ignored)
{
- if (!KdbSymPrintAddress((void*)Addr))
+ if (!KdbSymPrintAddress((void*)Addr, NULL))
{
DbgPrint("<%08x>", Addr);
}
while (Count > 0)
{
- if (!KdbSymPrintAddress((PVOID)Address))
+ if (!KdbSymPrintAddress((PVOID)Address, NULL))
KdbpPrint("<%x>:", Address);
else
KdbpPrint(":");
/* Disassemble */
while (Count-- > 0)
{
- if (!KdbSymPrintAddress((PVOID)Address))
+ if (!KdbSymPrintAddress((PVOID)Address, NULL))
KdbpPrint("<%08x>: ", Address);
else
KdbpPrint(": ");
ULONGLONG Result = 0;
ULONG_PTR Frame = KdbCurrentTrapFrame->Tf.Ebp;
ULONG_PTR Address;
+ KTRAP_FRAME TrapFrame;
if (Argc >= 2)
{
KdbpPrint("Eip:\n");
/* Try printing the function at EIP */
- if (!KdbSymPrintAddress((PVOID)KdbCurrentTrapFrame->Tf.Eip))
+ if (!KdbSymPrintAddress((PVOID)KdbCurrentTrapFrame->Tf.Eip, &KdbCurrentTrapFrame->Tf))
KdbpPrint("<%08x>\n", KdbCurrentTrapFrame->Tf.Eip);
else
KdbpPrint("\n");
}
+ TrapFrame = KdbCurrentTrapFrame->Tf;
KdbpPrint("Frames:\n");
+
for (;;)
{
+ BOOLEAN GotNextFrame;
+
if (Frame == 0)
break;
break;
}
+ if ((GotNextFrame = NT_SUCCESS(KdbpSafeReadMemory(&Frame, (PVOID)Frame, sizeof (ULONG_PTR)))))
+ TrapFrame.Ebp = Frame;
+
/* Print the location of the call instruction */
- if (!KdbSymPrintAddress((PVOID)(Address - 5)))
+ if (!KdbSymPrintAddress((PVOID)(Address - 5), &TrapFrame))
KdbpPrint("<%08x>\n", Address);
else
KdbpPrint("\n");
if (Address == 0)
break;
- if (!NT_SUCCESS(KdbpSafeReadMemory(&Frame, (PVOID)Frame, sizeof (ULONG_PTR))))
+ if (!GotNextFrame)
{
KdbpPrint("Couldn't access memory at 0x%p!\n", Frame);
break;
if (EnteredOnSingleStep)
{
- if (!KdbSymPrintAddress((PVOID)KdbCurrentTrapFrame->Tf.Eip))
+ if (!KdbSymPrintAddress((PVOID)KdbCurrentTrapFrame->Tf.Eip, &KdbCurrentTrapFrame->Tf))
{
KdbpPrint("<%x>", KdbCurrentTrapFrame->Tf.Eip);
}
IMAGE_SYMBOL_INFO_CACHE, *PIMAGE_SYMBOL_INFO_CACHE;
typedef struct _ROSSYM_KM_OWN_CONTEXT {
- ROSSYM_OWN_FILECONTEXT Rossym;
LARGE_INTEGER FileOffset;
PFILE_OBJECT FileObject;
} ROSSYM_KM_OWN_CONTEXT, *PROSSYM_KM_OWN_CONTEXT;
PROSSYM_KM_OWN_CONTEXT Context = (PROSSYM_KM_OWN_CONTEXT)FileContext;
IO_STATUS_BLOCK Iosb;
NTSTATUS Status = MiSimpleRead
- (Context->FileObject,
+ (Context->FileObject,
&Context->FileOffset,
Buffer,
Length,
return NT_SUCCESS(Status);
}
-static PROSSYM_OWN_FILECONTEXT
+static PROSSYM_KM_OWN_CONTEXT
KdbpCaptureFileForSymbols(PFILE_OBJECT FileObject)
{
PROSSYM_KM_OWN_CONTEXT Context = ExAllocatePool(NonPagedPool, sizeof(*Context));
ObReferenceObject(FileObject);
Context->FileOffset.QuadPart = 0;
Context->FileObject = FileObject;
- Context->Rossym.ReadFileProc = KdbpReadSymFile;
- Context->Rossym.SeekFileProc = KdbpSeekSymFile;
- return &Context->Rossym;
+ return Context;
}
static VOID
-KdbpReleaseFileForSymbols(PROSSYM_OWN_FILECONTEXT FileContext)
+KdbpReleaseFileForSymbols(PROSSYM_KM_OWN_CONTEXT Context)
{
- PROSSYM_KM_OWN_CONTEXT Context = (PROSSYM_KM_OWN_CONTEXT)FileContext;
ObDereferenceObject(Context->FileObject);
ExFreePool(Context);
}
*/
BOOLEAN
KdbSymPrintAddress(
- IN PVOID Address)
+ IN PVOID Address,
+ IN PKTRAP_FRAME Context)
{
+ int i;
PMEMORY_AREA MemoryArea = NULL;
PROS_SECTION_OBJECT SectionObject;
PLDR_DATA_TABLE_ENTRY LdrEntry;
- PROSSYM_OWN_FILECONTEXT FileContext;
+ PROSSYM_KM_OWN_CONTEXT FileContext;
ULONG_PTR RelativeAddress;
NTSTATUS Status;
- ULONG LineNumber;
- CHAR FileName[256];
- CHAR FunctionName[256];
+ ROSSYM_LINEINFO LineInfo = { };
+
+ struct {
+ enum _ROSSYM_REGNAME regname;
+ size_t ctx_offset;
+ } regmap[] = {
+ { ROSSYM_X86_EDX, FIELD_OFFSET(KTRAP_FRAME, Edx) },
+ { ROSSYM_X86_EAX, FIELD_OFFSET(KTRAP_FRAME, Eax) },
+ { ROSSYM_X86_ECX, FIELD_OFFSET(KTRAP_FRAME, Ecx) },
+ { ROSSYM_X86_EBX, FIELD_OFFSET(KTRAP_FRAME, Ebx) },
+ { ROSSYM_X86_ESI, FIELD_OFFSET(KTRAP_FRAME, Esi) },
+ { ROSSYM_X86_EDI, FIELD_OFFSET(KTRAP_FRAME, Edi) },
+ { ROSSYM_X86_EBP, FIELD_OFFSET(KTRAP_FRAME, Ebp) },
+ { ROSSYM_X86_ESP, FIELD_OFFSET(KTRAP_FRAME, HardwareEsp) }
+ };
+
+ if (Context)
+ {
+ DPRINT("Has Context %x (EBP %x)\n", Context, Context->Ebp);
+ LineInfo.Flags = ROSSYM_LINEINFO_HAS_REGISTERS;
+
+ for (i = 0; i < sizeof(regmap) / sizeof(regmap[0]); i++) {
+ memcpy
+ (&LineInfo.Registers.Registers[regmap[i].regname],
+ ((PCHAR)Context)+regmap[i].ctx_offset,
+ sizeof(ULONG_PTR));
+ DPRINT("DWARF REG[%d] -> %x\n", regmap[i].regname, LineInfo.Registers.Registers[regmap[i].regname]);
+ }
+ }
if (!KdbpSymbolsInitialized || !KdbpSymFindModule(Address, NULL, -1, &LdrEntry))
return FALSE;
RelativeAddress = (ULONG_PTR)Address - (ULONG_PTR)LdrEntry->DllBase;
- Status = KdbSymGetAddressInformation(LdrEntry->PatchInformation,
- RelativeAddress,
- &LineNumber,
- FileName,
- FunctionName);
+ Status = KdbSymGetAddressInformation
+ (LdrEntry->PatchInformation,
+ RelativeAddress,
+ &LineInfo);
+
if (NT_SUCCESS(Status))
{
DbgPrint("<%wZ:%x (%s:%d (%s))>",
- &LdrEntry->BaseDllName, RelativeAddress, FileName, LineNumber, FunctionName);
+ &LdrEntry->BaseDllName, RelativeAddress, LineInfo.FileName, LineInfo.LineNumber, LineInfo.FunctionName);
+ if (Context)
+ {
+ int i;
+ char *comma = "";
+ DbgPrint("(");
+ for (i = 0; i < LineInfo.NumParams; i++) {
+ DbgPrint
+ ("%s%s=%llx",
+ comma,
+ LineInfo.Parameters[i].ValueName,
+ LineInfo.Parameters[i].Value);
+ comma = ",";
+ }
+ DbgPrint(")");
+ }
+
return TRUE;
}
else if (Address < MmSystemRangeStart)
{
MemoryArea = MmLocateMemoryAreaByAddress(&PsGetCurrentProcess()->Vm, Address);
- if (!MemoryArea || MemoryArea->Type != MEMORY_AREA_SECTION_VIEW)
+ if (!MemoryArea || MemoryArea->Type != MEMORY_AREA_SECTION_VIEW)
{
goto end;
}
SectionObject = MemoryArea->Data.SectionData.Section;
if (!(SectionObject->AllocationAttributes & SEC_IMAGE)) goto end;
- if (MemoryArea->StartingAddress != KdbpImageBase)
+ if (MemoryArea->StartingAddress != (PVOID)KdbpImageBase)
{
if (KdbpRosSymInfo)
{
if ((FileContext = KdbpCaptureFileForSymbols(SectionObject->FileObject)))
{
if (RosSymCreateFromFile(FileContext, &KdbpRosSymInfo))
- KdbpImageBase = MemoryArea->StartingAddress;
+ KdbpImageBase = (ULONG_PTR)MemoryArea->StartingAddress;
KdbpReleaseFileForSymbols(FileContext);
}
if (KdbpRosSymInfo)
{
RelativeAddress = (ULONG_PTR)Address - KdbpImageBase;
+ RosSymFreeInfo(&LineInfo);
Status = KdbSymGetAddressInformation
(KdbpRosSymInfo,
RelativeAddress,
- &LineNumber,
- FileName,
- FunctionName);
+ &LineInfo);
if (NT_SUCCESS(Status))
{
DbgPrint
("<%wZ:%x (%s:%d (%s))>",
&SectionObject->FileObject->FileName,
- RelativeAddress, FileName, LineNumber, FunctionName);
+ RelativeAddress,
+ LineInfo.FileName,
+ LineInfo.LineNumber,
+ LineInfo.FunctionName);
+
+ if (Context)
+ {
+ int i;
+ char *comma = "";
+ DbgPrint("(");
+ for (i = 0; i < LineInfo.NumParams; i++) {
+ DbgPrint
+ ("%s%s=%llx",
+ comma,
+ LineInfo.Parameters[i].ValueName,
+ LineInfo.Parameters[i].Value);
+ comma = ",";
+ }
+ DbgPrint(")");
+ }
+
return TRUE;
}
}
KdbSymGetAddressInformation(
IN PROSSYM_INFO RosSymInfo,
IN ULONG_PTR RelativeAddress,
- OUT PULONG LineNumber OPTIONAL,
- OUT PCH FileName OPTIONAL,
- OUT PCH FunctionName OPTIONAL)
+ IN PROSSYM_LINEINFO LineInfo)
{
if (!KdbpSymbolsInitialized ||
!RosSymInfo ||
- !RosSymGetAddressInformation(RosSymInfo, RelativeAddress, LineNumber, FileName, FunctionName))
+ !RosSymGetAddressInformation(RosSymInfo, RelativeAddress, LineInfo))
{
return STATUS_UNSUCCESSFUL;
}
NTSTATUS Status;
IO_STATUS_BLOCK IoStatusBlock;
PFILE_OBJECT FileObject;
- PROSSYM_OWN_FILECONTEXT FileContext;
+ PROSSYM_KM_OWN_CONTEXT FileContext;
/* Allow KDB to break on module load */
KdbModuleLoaded(FileName);
/* Nothing here */
}
+static PVOID KdbpSymAllocMem(ULONG_PTR size)
+{
+ return ExAllocatePoolWithTag(NonPagedPool, size, 'RSYM');
+}
+
+static VOID KdbpSymFreeMem(PVOID Area)
+{
+ return ExFreePool(Area);
+}
+
+static BOOLEAN KdbpSymReadMem(PVOID FileContext, PVOID TargetDebug, PVOID SourceMem, ULONG Size)
+{
+ return NT_SUCCESS(KdbpSafeReadMemory(TargetDebug, SourceMem, Size));
+}
+
+static ROSSYM_CALLBACKS KdbpRosSymCallbacks = {
+ KdbpSymAllocMem, KdbpSymFreeMem,
+ KdbpReadSymFile, KdbpSeekSymFile,
+ KdbpSymReadMem
+};
/*! \brief Initializes the KDB symbols implementation.
*
p1 = p2;
}
- RosSymInitKernelMode();
+ RosSymInit(&KdbpRosSymCallbacks);
}
else if (BootPhase == 3)
{
if (p)
{
#ifdef KDBG
- if (!KdbSymPrintAddress((PVOID)Addr))
+ if (!KdbSymPrintAddress((PVOID)Addr, NULL))
#endif
{
/* Print out the module name */
ULONG KeIcacheFlushCount = 0;
ULONG KiDmaIoCoherency = 0;
ULONG KePrefetchNTAGranularity = 32;
-CHAR KeNumberProcessors;
+CHAR KeNumberProcessors = 0;
KAFFINITY KeActiveProcessors = 1;
BOOLEAN KiI386PentiumLockErrataPresent;
BOOLEAN KiSMTProcessorsPresent;
{
*(.edata)
}
+ /DISCARD/ :
+ {
+ *(.debug$S)
+ *(.debug$T)
+ *(.debug$F)
+ *(.drectve)
+ }
.idata BLOCK(__section_alignment__) :
{
/* These zeroes mark the end of the reloc section. */
LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
}
- .debug_aranges BLOCK(__section_alignment__) :
- {
- *(.debug_aranges)
- }
- .debug_abbrev BLOCK(__section_alignment__) :
- {
- *(.debug_abbrev)
- }
- .debug_frame BLOCK(__section_alignment__) :
- {
- *(.debug_frame)
- }
- .debug_info BLOCK(__section_alignment__) :
- {
- *(.debug_info)
- }
- .debug_line BLOCK(__section_alignment__) :
- {
- *(.debug_line)
- }
- .debug_loc BLOCK(__section_alignment__) :
- {
- *(.debug_loc)
- }
- .debug_pubnames BLOCK(__section_alignment__) :
- {
- *(.debug_pubnames)
- }
- .debug_ranges BLOCK(__section_alignment__) :
+ .stab BLOCK(__section_alignment__) (NOLOAD) :
{
- *(.debug_ranges)
+ [ .stab ]
}
- .debug_str BLOCK(__section_alignment__) :
+ .stabstr BLOCK(__section_alignment__) (NOLOAD) :
{
- *(.debug_str)
+ [ .stabstr ]
}
INIT BLOCK(__section_alignment__) :
{
/* Initialize the Default Event */
KeInitializeEvent(&ObpDefaultObject, NotificationEvent, TRUE);
+ /* Initialize the Dos Device Map mutex */
+ KeInitializeGuardedMutex(&ObpDeviceMapLock);
+
/* Setup default access for the system process */
PsGetCurrentProcess()->GrantedAccess = PROCESS_ALL_ACCESS;
PsGetCurrentThread()->GrantedAccess = THREAD_ALL_ACCESS;
POBJECT_TYPE ObpTypeObjectType = NULL;
KEVENT ObpDefaultObject;
+KGUARDED_MUTEX ObpDeviceMapLock;
GENERAL_LOOKASIDE ObpNameBufferLookasideList, ObpCreateInfoLookasideList;
/* Add the SD charge too */
if (Header->Flags & OB_FLAG_SECURITY) PagedPoolCharge += 2048;
}
-
+
/* Return the quota */
DPRINT("FIXME: Should return quotas: %lx %lx\n", PagedPoolCharge, NonPagedPoolCharge);
#if 0
PagedPoolCharge,
NonPagedPoolCharge);
#endif
-
+
}
}
{
ULONG i;
POBJECT_TYPE ObjectType = (PVOID)Object;
-
+
/* Loop our locks */
for (i = 0; i < 4; i++)
{
/* Delete each one */
ExDeleteResourceLite(&ObjectType->ObjectLocks[i]);
}
-
+
/* Delete our main mutex */
ExDeleteResourceLite(&ObjectType->Mutex);
}
NTAPI
ObpDeleteSymbolicLinkName(IN POBJECT_SYMBOLIC_LINK SymbolicLink)
{
- /* FIXME: Device maps not supported yet */
+ POBJECT_HEADER ObjectHeader;
+ POBJECT_HEADER_NAME_INFO ObjectNameInfo;
+
+ /* FIXME: Need to support Device maps */
+
+ /* Get header data */
+ ObjectHeader = OBJECT_TO_OBJECT_HEADER(SymbolicLink);
+ ObjectNameInfo = ObpReferenceNameInfo(ObjectHeader);
+
+ /* Check if we are not actually in a directory with a device map */
+ if (!(ObjectNameInfo) ||
+ !(ObjectNameInfo->Directory) /*||
+ !(ObjectNameInfo->Directory->DeviceMap)*/)
+ {
+ ObpDereferenceNameInfo(ObjectNameInfo);
+ return;
+ }
+
+ /* Check if it's a DOS drive letter, and remove the entry from drive map if needed */
+ if (SymbolicLink->DosDeviceDriveIndex != 0 &&
+ ObjectNameInfo->Name.Length == 2 * sizeof(WCHAR) &&
+ ObjectNameInfo->Name.Buffer[1] == L':' &&
+ ( (ObjectNameInfo->Name.Buffer[0] >= L'A' &&
+ ObjectNameInfo->Name.Buffer[0] <= L'Z') ||
+ (ObjectNameInfo->Name.Buffer[0] >= L'a' &&
+ ObjectNameInfo->Name.Buffer[0] <= L'z') ))
+ {
+ /* Remove the drive entry */
+ KeAcquireGuardedMutex(&ObpDeviceMapLock);
+ ObSystemDeviceMap->DriveType[SymbolicLink->DosDeviceDriveIndex-1] =
+ DOSDEVICE_DRIVE_UNKNOWN;
+ ObSystemDeviceMap->DriveMap &=
+ ~(1 << (SymbolicLink->DosDeviceDriveIndex-1));
+ KeReleaseGuardedMutex(&ObpDeviceMapLock);
+
+ /* Reset the drive index, valid drive index starts from 1 */
+ SymbolicLink->DosDeviceDriveIndex = 0;
+ }
+
+ ObpDereferenceNameInfo(ObjectNameInfo);
+}
+
+NTSTATUS
+NTAPI
+ObpParseSymbolicLinkToIoDeviceObject(IN POBJECT_DIRECTORY SymbolicLinkDirectory,
+ IN OUT POBJECT_DIRECTORY *Directory,
+ IN OUT PUNICODE_STRING TargetPath,
+ IN OUT POBP_LOOKUP_CONTEXT Context,
+ OUT PVOID *Object)
+{
+ UNICODE_STRING Name;
+ BOOLEAN ManualUnlock;
+
+ if (! TargetPath || ! Object || ! Context || ! Directory ||
+ ! SymbolicLinkDirectory)
+ {
+ return STATUS_INVALID_PARAMETER;
+ }
+
+ /* FIXME: Need to support Device maps */
+
+ /* Try walking the target path and open each part of the path */
+ while (TargetPath->Length)
+ {
+ /* Strip '\' if present at the beginning of the target path */
+ if (TargetPath->Length >= sizeof(OBJ_NAME_PATH_SEPARATOR)&&
+ TargetPath->Buffer[0] == OBJ_NAME_PATH_SEPARATOR)
+ {
+ TargetPath->Buffer++;
+ TargetPath->Length -= sizeof(OBJ_NAME_PATH_SEPARATOR);
+ }
+
+ /* Remember the current component of the target path */
+ Name = *TargetPath;
+
+ /* Move forward to the next component of the target path */
+ while (TargetPath->Length >= sizeof(OBJ_NAME_PATH_SEPARATOR))
+ {
+ if (TargetPath->Buffer[0] != OBJ_NAME_PATH_SEPARATOR)
+ {
+ TargetPath->Buffer++;
+ TargetPath->Length -= sizeof(OBJ_NAME_PATH_SEPARATOR);
+ }
+ else
+ break;
+ }
+
+ Name.Length -= TargetPath->Length;
+
+ /* Finished processing the entire path, stop */
+ if (! Name.Length)
+ break;
+ /*
+ * Make sure a deadlock does not occur as an exclusive lock on a pushlock
+ * would have already taken one in ObpLookupObjectName() on the parent
+ * directory where the symlink is being created [ObInsertObject()].
+ * Prevent recursive locking by faking lock state in the lookup context
+ * when the current directory is same as the parent directory where
+ * the symlink is being created. If the lock state is not faked,
+ * ObpLookupEntryDirectory() will try to get a recursive lock on the
+ * pushlock and hang. For e.g. this happens when a substed drive is pointed to
+ * another substed drive.
+ */
+ if (*Directory == SymbolicLinkDirectory && ! Context->DirectoryLocked)
+ {
+ /* Fake lock state so that ObpLookupEntryDirectory() doesn't attempt a lock */
+ ManualUnlock = TRUE;
+ Context->DirectoryLocked = TRUE;
+ }
+ else
+ ManualUnlock = FALSE;
+
+ *Object = ObpLookupEntryDirectory(*Directory,
+ &Name,
+ 0,
+ FALSE,
+ Context);
+
+ /* Locking was faked, undo it now */
+ if (*Directory == SymbolicLinkDirectory && ManualUnlock)
+ Context->DirectoryLocked = FALSE;
+
+ /* Lookup failed, stop */
+ if (! *Object)
+ break;
+
+ if (OBJECT_TO_OBJECT_HEADER(*Object)->Type == ObDirectoryType)
+ {
+ /* Make this current directory, and continue search */
+ *Directory = (POBJECT_DIRECTORY)*Object;
+ }
+ else if (OBJECT_TO_OBJECT_HEADER(*Object)->Type == ObSymbolicLinkType &&
+ (((POBJECT_SYMBOLIC_LINK)*Object)->DosDeviceDriveIndex == 0))
+ {
+ /* Symlink points to another initialized symlink, ask caller to reparse */
+ *Directory = ObpRootDirectoryObject;
+ TargetPath = &((POBJECT_SYMBOLIC_LINK)*Object)->LinkTarget;
+ return STATUS_REPARSE_OBJECT;
+ }
+ else
+ {
+ /* Neither directory or symlink, stop */
+ break;
+ }
+ }
+
+ /* Return a valid object, only if object type is IoDeviceObject */
+ if (*Object &&
+ OBJECT_TO_OBJECT_HEADER(*Object)->Type != IoDeviceObjectType)
+ {
+ *Object = NULL;
+ }
+ return STATUS_SUCCESS;
}
VOID
{
POBJECT_HEADER ObjectHeader;
POBJECT_HEADER_NAME_INFO ObjectNameInfo;
+ PVOID Object = NULL;
+ POBJECT_DIRECTORY Directory;
+ UNICODE_STRING TargetPath;
+ NTSTATUS Status;
+ ULONG DriveType = DOSDEVICE_DRIVE_CALCULATE;
+ ULONG ReparseCnt;
+ const ULONG MaxReparseAttempts = 20;
+ OBP_LOOKUP_CONTEXT Context;
+
+ /* FIXME: Need to support Device maps */
/* Get header data */
ObjectHeader = OBJECT_TO_OBJECT_HEADER(SymbolicLink);
- ObjectNameInfo = OBJECT_HEADER_TO_NAME_INFO(ObjectHeader);
+ ObjectNameInfo = ObpReferenceNameInfo(ObjectHeader);
/* Check if we are not actually in a directory with a device map */
if (!(ObjectNameInfo) ||
- !(ObjectNameInfo->Directory) ||
- !(ObjectNameInfo->Directory->DeviceMap))
+ !(ObjectNameInfo->Directory) /*||
+ !(ObjectNameInfo->Directory->DeviceMap)*/)
{
- /* There's nothing to do, return */
+ ObpDereferenceNameInfo(ObjectNameInfo);
return;
}
- /* FIXME: We don't support device maps yet */
- DPRINT1("Unhandled path!\n");
- ASSERT(FALSE);
+ /* Check if it's a DOS drive letter, and set the drive index accordingly */
+ if (ObjectNameInfo->Name.Length == 2 * sizeof(WCHAR) &&
+ ObjectNameInfo->Name.Buffer[1] == L':' &&
+ ( (ObjectNameInfo->Name.Buffer[0] >= L'A' &&
+ ObjectNameInfo->Name.Buffer[0] <= L'Z') ||
+ (ObjectNameInfo->Name.Buffer[0] >= L'a' &&
+ ObjectNameInfo->Name.Buffer[0] <= L'z') ))
+ {
+ SymbolicLink->DosDeviceDriveIndex =
+ RtlUpcaseUnicodeChar(ObjectNameInfo->Name.Buffer[0]) - L'A';
+ /* The Drive index start from 1 */
+ SymbolicLink->DosDeviceDriveIndex++;
+
+ /* Initialize lookup context */
+ ObpInitializeLookupContext(&Context);
+
+ /* Start the search from the root */
+ Directory = ObpRootDirectoryObject;
+ TargetPath = SymbolicLink->LinkTarget;
+
+ /*
+ * Locate the IoDeviceObject if any this symbolic link points to.
+ * To prevent endless reparsing, setting an upper limit on the
+ * number of reparses.
+ */
+ Status = STATUS_REPARSE_OBJECT;
+ ReparseCnt = 0;
+ while (Status == STATUS_REPARSE_OBJECT &&
+ ReparseCnt < MaxReparseAttempts)
+ {
+ Status =
+ ObpParseSymbolicLinkToIoDeviceObject(ObjectNameInfo->Directory,
+ &Directory,
+ &TargetPath,
+ &Context,
+ &Object);
+ if (Status == STATUS_REPARSE_OBJECT)
+ ReparseCnt++;
+ }
+
+ /* Cleanup lookup context */
+ ObpReleaseLookupContext(&Context);
+
+ /* Error, or max resparse attemtps exceeded */
+ if (! NT_SUCCESS(Status) || ReparseCnt >= MaxReparseAttempts)
+ {
+ /* Cleanup */
+ ObpDereferenceNameInfo(ObjectNameInfo);
+ return;
+ }
+
+ if (Object)
+ {
+ /* Calculate the drive type */
+ switch(((PDEVICE_OBJECT)Object)->DeviceType)
+ {
+ case FILE_DEVICE_VIRTUAL_DISK:
+ DriveType = DOSDEVICE_DRIVE_RAMDISK;
+ break;
+ case FILE_DEVICE_CD_ROM:
+ case FILE_DEVICE_CD_ROM_FILE_SYSTEM:
+ DriveType = DOSDEVICE_DRIVE_CDROM;
+ break;
+ case FILE_DEVICE_DISK:
+ case FILE_DEVICE_DISK_FILE_SYSTEM:
+ case FILE_DEVICE_FILE_SYSTEM:
+ if (((PDEVICE_OBJECT)Object)->Characteristics & FILE_REMOVABLE_MEDIA)
+ DriveType = DOSDEVICE_DRIVE_REMOVABLE;
+ else
+ DriveType = DOSDEVICE_DRIVE_FIXED;
+ break;
+ case FILE_DEVICE_NETWORK:
+ case FILE_DEVICE_NETWORK_FILE_SYSTEM:
+ DriveType = DOSDEVICE_DRIVE_REMOTE;
+ break;
+ default:
+ DPRINT1("Device Type %ld for %wZ is not known or unhandled\n",
+ ((PDEVICE_OBJECT)Object)->DeviceType,
+ &SymbolicLink->LinkTarget);
+ DriveType = DOSDEVICE_DRIVE_UNKNOWN;
+ }
+ }
+
+ /* Add a new drive entry */
+ KeAcquireGuardedMutex(&ObpDeviceMapLock);
+ ObSystemDeviceMap->DriveType[SymbolicLink->DosDeviceDriveIndex-1] =
+ (UCHAR)DriveType;
+ ObSystemDeviceMap->DriveMap |=
+ 1 << (SymbolicLink->DosDeviceDriveIndex-1);
+ KeReleaseGuardedMutex(&ObpDeviceMapLock);
+ }
+
+ /* Cleanup */
+ ObpDereferenceNameInfo(ObjectNameInfo);
}
/*++
NTAPI
ObDereferenceDeviceMap(IN PEPROCESS Process)
{
- //KIRQL OldIrql;
- PDEVICE_MAP DeviceMap = Process->DeviceMap;
+ PDEVICE_MAP DeviceMap;
- /* FIXME: We don't use Process Devicemaps yet */
+ /* Get the pointer to this process devicemap and reset it
+ holding devicemap lock */
+ KeAcquireGuardedMutex(&ObpDeviceMapLock);
+ DeviceMap = Process->DeviceMap;
+ Process->DeviceMap = NULL;
+ KeReleaseGuardedMutex(&ObpDeviceMapLock);
+
+ /* Continue only if there is a devicemap to dereference */
if (DeviceMap)
{
- /* FIXME: Acquire the DeviceMap Spinlock */
- // KeAcquireSpinLock(DeviceMap->Lock, &OldIrql);
+ KeAcquireGuardedMutex(&ObpDeviceMapLock);
/* Delete the device map link and dereference it */
- Process->DeviceMap = NULL;
if (--DeviceMap->ReferenceCount)
{
/* Nobody is referencing it anymore, unlink the DOS directory */
DeviceMap->DosDevicesDirectory->DeviceMap = NULL;
- /* FIXME: Release the DeviceMap Spinlock */
- // KeReleasepinLock(DeviceMap->Lock, OldIrql);
+ /* Release the devicemap lock */
+ KeReleaseGuardedMutex(&ObpDeviceMapLock);
/* Dereference the DOS Devices Directory and free the Device Map */
ObDereferenceObject(DeviceMap->DosDevicesDirectory);
}
else
{
- /* FIXME: Release the DeviceMap Spinlock */
- // KeReleasepinLock(DeviceMap->Lock, OldIrql);
+ /* Release the devicemap lock */
+ KeReleaseGuardedMutex(&ObpDeviceMapLock);
}
}
}
ObQueryDeviceMapInformation(IN PEPROCESS Process,
IN PPROCESS_DEVICEMAP_INFORMATION DeviceMapInfo)
{
- //KIRQL OldIrql ;
-
/*
* FIXME: This is an ugly hack for now, to always return the System Device Map
* instead of returning the Process Device Map. Not important yet since we don't use it
*/
- /* FIXME: Acquire the DeviceMap Spinlock */
- // KeAcquireSpinLock(DeviceMap->Lock, &OldIrql);
+ KeAcquireGuardedMutex(&ObpDeviceMapLock);
/* Make a copy */
DeviceMapInfo->Query.DriveMap = ObSystemDeviceMap->DriveMap;
ObSystemDeviceMap->DriveType,
sizeof(ObSystemDeviceMap->DriveType));
- /* FIXME: Release the DeviceMap Spinlock */
- // KeReleasepinLock(DeviceMap->Lock, OldIrql);
+ KeReleaseGuardedMutex(&ObpDeviceMapLock);
}
/* EOF */
+++ /dev/null
-#reactos.dff
-add_custom_command(
- OUTPUT ${REACTOS_BINARY_DIR}/boot/reactos.dff
- COMMAND ${CMAKE_COMMAND} -E copy ${REACTOS_SOURCE_DIR}/boot/bootdata/packages/reactos.dff.in ${REACTOS_BINARY_DIR}/boot/reactos.dff
- DEPENDS ${REACTOS_SOURCE_DIR}/boot/bootdata/packages/reactos.dff.in)
-
-file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_cab_target.txt CAB_TARGET_ENTRIES)
-foreach(ENTRY ${CAB_TARGET_ENTRIES})
- string(REGEX REPLACE "^(.*)\t.*" "\\1" _targetname ${ENTRY})
- string(REGEX REPLACE "^.*\t(.)" "\\1" _dir_num ${ENTRY})
- get_target_property(_FILENAME ${_targetname} LOCATION)
- if(NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
- set(_FILENAME '\"${_FILENAME}\"')
- endif()
- add_custom_command(
- OUTPUT ${REACTOS_BINARY_DIR}/boot/reactos.dff
- COMMAND ${CMAKE_COMMAND} -E echo ${_FILENAME} ${_dir_num} >> ${REACTOS_BINARY_DIR}/boot/reactos.dff
- DEPENDS ${_targetname}
- APPEND)
-endforeach()
-
-file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_cab.txt CAB_TARGET_ENTRIES)
-foreach(ENTRY ${CAB_TARGET_ENTRIES})
- string(REGEX REPLACE "^(.*)\t.*" "\\1" _FILENAME ${ENTRY})
- string(REGEX REPLACE "^.*\t(.)" "\\1" _dir_num ${ENTRY})
- if(NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
- set(QUOTED_FILENAME '\"${_FILENAME}\"')
- else()
- set(QUOTED_FILENAME ${_FILENAME})
- endif()
- add_custom_command(
- OUTPUT ${REACTOS_BINARY_DIR}/boot/reactos.dff
- COMMAND ${CMAKE_COMMAND} -E echo ${QUOTED_FILENAME} ${_dir_num} >> ${REACTOS_BINARY_DIR}/boot/reactos.dff
- DEPENDS ${_FILENAME}
- APPEND)
-endforeach()
-
-#reactos.cab
-add_custom_command(
- OUTPUT ${REACTOS_BINARY_DIR}/boot/reactos.inf
- COMMAND native-cabman -C ${REACTOS_BINARY_DIR}/boot/reactos.dff -L ${REACTOS_BINARY_DIR}/boot -I -P ${REACTOS_SOURCE_DIR}
- DEPENDS ${REACTOS_BINARY_DIR}/boot/reactos.dff)
-add_custom_command(
- OUTPUT ${REACTOS_BINARY_DIR}/boot/reactos.cab
- COMMAND native-cabman -C ${REACTOS_BINARY_DIR}/boot/reactos.dff -RC ${REACTOS_BINARY_DIR}/boot/reactos.inf -L ${REACTOS_BINARY_DIR}/boot -N -P ${REACTOS_SOURCE_DIR}
- DEPENDS ${REACTOS_BINARY_DIR}/boot/reactos.inf)
-
-#bootcd target
-macro(create_bootcd_dir BOOTCD_DIR _target)
-
- file(MAKE_DIRECTORY
- "${BOOTCD_DIR}"
- "${BOOTCD_DIR}/loader"
- "${BOOTCD_DIR}/reactos"
- "${BOOTCD_DIR}/reactos/system32")
-
- file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_minicd_target.txt MINICD_TARGET_ENTRIES)
- foreach(ENTRY ${MINICD_TARGET_ENTRIES})
- string(REGEX REPLACE "^(.*)\t.*\t.*" "\\1" _targetname ${ENTRY})
- string(REGEX REPLACE "^.*\t(.*)\t.*" "\\1" _DIR ${ENTRY})
- string(REGEX REPLACE "^.*\t.*\t(.*)" "\\1"_NAMEONCD ${ENTRY})
- get_target_property(_FILENAME ${_targetname} LOCATION)
- set(filename ${BOOTCD_DIR}/${_DIR}/${_NAMEONCD})
- list(APPEND ${_target}_FILES ${filename})
- add_custom_command(
- OUTPUT ${filename}
- COMMAND ${CMAKE_COMMAND} -E copy ${_FILENAME} ${filename}
- DEPENDS ${_targetname})
- endforeach()
-
- file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_minicd.txt MINICD_ENTRIES)
- foreach(ENTRY ${MINICD_ENTRIES})
- string(REGEX REPLACE "^(.*)\t.*\t.*" "\\1" _FILENAME ${ENTRY})
- string(REGEX REPLACE "^.*\t(.*)\t.*" "\\1" _DIR ${ENTRY})
- string(REGEX REPLACE "^.*\t.*\t(.*)" "\\1"_NAMEONCD ${ENTRY})
- set(filename ${BOOTCD_DIR}/${_DIR}/${_NAMEONCD})
- list(APPEND ${_target}_FILES ${filename})
- add_custom_command(
- OUTPUT ${filename}
- COMMAND ${CMAKE_COMMAND} -E copy ${_FILENAME} ${filename}
- DEPENDS ${_FILENAME})
- endforeach()
-
- add_custom_command(
- OUTPUT ${BOOTCD_DIR}/reactos/reactos.inf ${BOOTCD_DIR}/reactos/reactos.cab
- COMMAND ${CMAKE_COMMAND} -E copy ${REACTOS_BINARY_DIR}/boot/reactos.inf ${BOOTCD_DIR}/reactos/reactos.inf
- COMMAND ${CMAKE_COMMAND} -E copy ${REACTOS_BINARY_DIR}/boot/reactos.cab ${BOOTCD_DIR}/reactos/reactos.cab
- DEPENDS ${REACTOS_BINARY_DIR}/boot/reactos.cab)
- list(APPEND ${_target}_FILES ${filename} ${BOOTCD_DIR}/reactos/reactos.inf ${BOOTCD_DIR}/reactos/reactos.cab)
-endmacro()
-
-create_bootcd_dir(${REACTOS_BINARY_DIR}/boot/bootcd bootcd)
-add_custom_target(bootcd
- COMMAND native-cdmake -v -j -m -b ${CMAKE_CURRENT_BINARY_DIR}/boot/freeldr/bootsect/isoboot.bin ${BOOTCD_DIR} REACTOS ${REACTOS_BINARY_DIR}/bootcd.iso
- DEPENDS ${bootcd_FILES})
-add_dependencies(bootcd dosmbr ext2 fat32 fat isoboot isobtrt vgafonts)
-set_directory_properties(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${REACTOS_BINARY_DIR}/bootcd.iso)
-
-#bootcdregtest target
-create_bootcd_dir(${REACTOS_BINARY_DIR}/boot/bootcdregtest bootcdregtest)
-add_custom_command(
- OUTPUT ${REACTOS_BINARY_DIR}/boot/bootcdregtest/reactos/unattend.inf
- COMMAND ${CMAKE_COMMAND} -E copy ${REACTOS_SOURCE_DIR}/boot/bootdata/bootcdregtest/unattend.inf ${REACTOS_BINARY_DIR}/boot/bootcdregtest/reactos/unattend.inf
- DEPENDS ${REACTOS_SOURCE_DIR}/boot/bootdata/bootcdregtest/unattend.inf ${REACTOS_BINARY_DIR}/boot/bootcdregtest)
-add_custom_target(bootcdregtest
- COMMAND native-cdmake -v -j -m -b ${CMAKE_CURRENT_BINARY_DIR}/boot/freeldr/bootsect/isoboot.bin ${REACTOS_BINARY_DIR}/boot/bootcdregtest REACTOS ${REACTOS_BINARY_DIR}/bootcdregtest.iso
- DEPENDS ${REACTOS_BINARY_DIR}/boot/bootcdregtest/reactos/unattend.inf ${bootcdregtest_FILES})
-add_dependencies(bootcdregtest dosmbr ext2 fat32 fat isoboot isobtrt vgafonts)
-
-
-#livecd target
-file(MAKE_DIRECTORY
- "${LIVECD_DIR}"
- "${LIVECD_DIR}/loader"
- "${LIVECD_DIR}/Profiles"
- "${LIVECD_DIR}/Profiles/All Users"
- "${LIVECD_DIR}/Profiles/All Users/Desktop"
- "${LIVECD_DIR}/Profiles/Default User"
- "${LIVECD_DIR}/Profiles/Default User/Desktop"
- "${LIVECD_DIR}/Profiles/Default User/My Documents"
- "${LIVECD_DIR}/reactos"
- "${LIVECD_DIR}/reactos/inf"
- "${LIVECD_DIR}/reactos/fonts"
- "${LIVECD_DIR}/reactos/system32"
- "${LIVECD_DIR}/reactos/system32/config")
-
-file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_livecd_target.txt LIVECD_TARGET_ENTRIES)
-foreach(ENTRY ${LIVECD_TARGET_ENTRIES})
- string(REGEX REPLACE "^(.*)\t.*\t.*" "\\1" _targetname ${ENTRY})
- string(REGEX REPLACE "^.*\t(.*)\t.*" "\\1" _DIR ${ENTRY})
- string(REGEX REPLACE "^.*\t.*\t(.*)" "\\1"_NAMEONCD ${ENTRY})
- get_target_property(_FILENAME ${_targetname} LOCATION)
- set(filename ${LIVECD_DIR}/${_DIR}/${_NAMEONCD})
- list(APPEND LIVECD_FILES ${filename})
- add_custom_command(
- OUTPUT ${filename}
- COMMAND ${CMAKE_COMMAND} -E copy ${_FILENAME} ${LIVECD_DIR}/${_DIR}/${_NAMEONCD}
- DEPENDS ${_targetname})
-endforeach()
-file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_livecd.txt LIVECD_ENTRIES)
-
-foreach(ENTRY ${LIVECD_ENTRIES})
- string(REGEX REPLACE "^(.*)\t.*\t.*" "\\1" _FILENAME ${ENTRY})
- string(REGEX REPLACE "^.*\t(.*)\t.*" "\\1" _DIR ${ENTRY})
- string(REGEX REPLACE "^.*\t.*\t(.*)" "\\1"_NAMEONCD ${ENTRY})
- set(filename ${LIVECD_DIR}/${_DIR}/${_NAMEONCD})
- list(APPEND LIVECD_FILES ${filename})
- add_custom_command(
- OUTPUT ${filename}
- COMMAND ${CMAKE_COMMAND} -E copy ${_FILENAME} ${LIVECD_DIR}/${_DIR}/${_NAMEONCD}
- DEPENDS ${_FILENAME})
-endforeach()
-
-add_custom_target(livecd
- COMMAND native-cdmake -v -j -m -b ${CMAKE_CURRENT_BINARY_DIR}/boot/freeldr/bootsect/isoboot.bin ${LIVECD_DIR} REACTOS ${REACTOS_BINARY_DIR}/livecd.iso
- DEPENDS ${LIVECD_FILES})
-add_dependencies(livecd isoboot livecd_hives vgafonts)
-
-set_directory_properties(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${REACTOS_BINARY_DIR}/livecd.iso)
add_importlibs(ntvdm ntdll user32 gdi32 advapi32 kernel32 msvcrt)
add_dependencies(ntvdm ndk bugcodes)
-add_cab_target(ntvdm 1)
\ No newline at end of file
+add_cd_file(TARGET ntvdm DESTINATION reactos/system32 FOR all)
\ No newline at end of file
target_link_libraries(csrss nt)
add_importlibs(csrss ntdll csrsrv)
add_dependencies(csrss psdk bugcodes)
-add_cab_target(csrss 1)
+add_cd_file(TARGET csrss DESTINATION reactos/system32 FOR all)
add_subdirectory(csrsrv)
add_subdirectory(win32csr)
add_pch(csrsrv ${CMAKE_CURRENT_SOURCE_DIR}/srv.h ${SOURCE})
add_dependencies(csrsrv psdk bugcodes)
-add_cab_target(csrsrv 1)
+add_cd_file(TARGET csrsrv DESTINATION reactos/system32 FOR all)
add_importlib_target(csrsrv.spec)
list(APPEND SOURCE
alias.c
- appswitch.c
coninput.c
conoutput.c
console.c
add_pch(win32csr ${CMAKE_CURRENT_SOURCE_DIR}/w32csr.h ${SOURCE})
add_dependencies(win32csr bugcodes)
-add_cab_target(win32csr 1)
+add_cd_file(TARGET win32csr DESTINATION reactos/system32 FOR all)
/* Not defined in any header file */
extern VOID WINAPI PrivateCsrssManualGuiCheck(LONG Check);
-extern VOID WINAPI InitializeAppSwitchHook();
extern LIST_ENTRY DosDeviceHistory;
extern RTL_CRITICAL_SECTION Win32CsrDefineDosDeviceCritSec;
{ 0, 0, NULL }
};
+static HHOOK hhk = NULL;
+
/* FUNCTIONS *****************************************************************/
+LRESULT
+CALLBACK
+KeyboardHookProc(
+ int nCode,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ return CallNextHookEx(hhk, nCode, wParam, lParam);
+}
+
BOOL WINAPI
DllMain(HANDLE hDll,
DWORD dwReason,
if (DLL_PROCESS_ATTACH == dwReason)
{
Win32CsrDllHandle = hDll;
- InitializeAppSwitchHook();
+//
+// HACK HACK HACK ReactOS to BOOT! Initialization BUG ALERT! See bug 5655.
+//
+ hhk = SetWindowsHookEx(WH_KEYBOARD_LL, KeyboardHookProc, NULL, 0);
+// BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT!
+// BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT!
+// BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT!
}
if (DLL_PROCESS_DETACH == dwReason)
DWORD dwFlags;
PWSTR lpBuffer;
- DPRINT("CsrDefineDosDevice entered, Flags:%d, DeviceName:%wZ, TargetName:%wZ\n",
+ DPRINT("CsrDefineDosDevice entered, Flags:%d, DeviceName:%wZ, TargetName:%wZ\n",
Request->Data.DefineDosDeviceRequest.dwFlags,
&Request->Data.DefineDosDeviceRequest.DeviceName,
&Request->Data.DefineDosDeviceRequest.TargetName);
RequestLinkTarget =
&Request->Data.DefineDosDeviceRequest.TargetName;
+ /*
+ * Strip off any trailing '\', if we leave a trailing slash the drive remains non-accessible.
+ * So working around it for now.
+ * FIXME: Need to fix this in the object manager ObpLookupObjectName()??, and remove this when the its fixed.
+ */
+ while (RequestLinkTarget->Length >= sizeof(WCHAR) &&
+ RequestLinkTarget->Buffer[(RequestLinkTarget->Length/sizeof(WCHAR)) - 1] == L'\\')
+ {
+ RequestLinkTarget->Length -= sizeof(WCHAR);
+ }
+
lpBuffer = (PWSTR) RtlAllocateHeap(Win32CsrApiHeap,
HEAP_ZERO_MEMORY,
RequestDeviceName.MaximumLength + 5 * sizeof(WCHAR));
&LinkTarget,
&Length);
}
-
+
if (! NT_SUCCESS(Status))
{
DPRINT1("NtQuerySymbolicLinkObject(%wZ) failed (Status %lx)\n",
CONTAINING_RECORD(Entry,
CSRSS_DOS_DEVICE_HISTORY_ENTRY,
Entry);
- Matched =
+ Matched =
! RtlCompareUnicodeString(&RequestDeviceName,
&HistoryEntry->Device,
FALSE);
&DeviceName, Status);
}
}
- _SEH2_FINALLY
+ _SEH2_FINALLY
{
(void) RtlLeaveCriticalSection(&Win32CsrDefineDosDeviceCritSec);
if (DeviceName.Buffer)
return Status;
}
-void CsrCleanupDefineDosDevice()
+void CsrCleanupDefineDosDevice(void)
{
PLIST_ENTRY Entry, ListHead;
PCSRSS_DOS_DEVICE_HISTORY_ENTRY HistoryEntry;
(void) RtlDeleteCriticalSection(&Win32CsrDefineDosDeviceCritSec);
-
+
ListHead = &DosDeviceHistory;
Entry = ListHead->Flink;
while (Entry != ListHead)
GuiConsoleUpdateSelection(Console, &c);
}
+static VOID
+GuiConsoleCopy(HWND hWnd, PCSRSS_CONSOLE Console)
+{
+ if (OpenClipboard(hWnd) == TRUE)
+ {
+ HANDLE hData;
+ PBYTE ptr;
+ LPSTR data, dstPos;
+ ULONG selWidth, selHeight;
+ ULONG xPos, yPos, size;
+
+ selWidth = Console->Selection.srSelection.Right - Console->Selection.srSelection.Left + 1;
+ selHeight = Console->Selection.srSelection.Bottom - Console->Selection.srSelection.Top + 1;
+ DPRINT("Selection is (%d|%d) to (%d|%d)\n",
+ Console->Selection.srSelection.Left,
+ Console->Selection.srSelection.Top,
+ Console->Selection.srSelection.Right,
+ Console->Selection.srSelection.Bottom);
+
+ /* Basic size for one line and termination */
+ size = selWidth + 1;
+ if (selHeight > 0)
+ {
+ /* Multiple line selections have to get \r\n appended */
+ size += ((selWidth + 2) * (selHeight - 1));
+ }
+
+ /* Allocate memory, it will be passed to the system and may not be freed here */
+ hData = GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, size);
+ if (hData == NULL)
+ {
+ CloseClipboard();
+ return;
+ }
+ data = GlobalLock(hData);
+ if (data == NULL)
+ {
+ CloseClipboard();
+ return;
+ }
+
+ DPRINT("Copying %dx%d selection\n", selWidth, selHeight);
+ dstPos = data;
+
+ for (yPos = 0; yPos < selHeight; yPos++)
+ {
+ ptr = ConioCoordToPointer(Console->ActiveBuffer,
+ Console->Selection.srSelection.Left,
+ yPos + Console->Selection.srSelection.Top);
+ /* Copy only the characters, leave attributes alone */
+ for (xPos = 0; xPos < selWidth; xPos++)
+ {
+ dstPos[xPos] = ptr[xPos * 2];
+ }
+ dstPos += selWidth;
+ if (yPos != (selHeight - 1))
+ {
+ strcat(data, "\r\n");
+ dstPos += 2;
+ }
+ }
+
+ DPRINT("Setting data <%s> to clipboard\n", data);
+ GlobalUnlock(hData);
+
+ EmptyClipboard();
+ SetClipboardData(CF_TEXT, hData);
+ CloseClipboard();
+ }
+}
+
+static VOID
+GuiConsolePaste(HWND hWnd, PCSRSS_CONSOLE Console)
+{
+ if (OpenClipboard(hWnd) == TRUE)
+ {
+ HANDLE hData;
+ LPSTR str;
+ size_t len;
+
+ hData = GetClipboardData(CF_TEXT);
+ if (hData == NULL)
+ {
+ CloseClipboard();
+ return;
+ }
+
+ str = GlobalLock(hData);
+ if (str == NULL)
+ {
+ CloseClipboard();
+ return;
+ }
+ DPRINT("Got data <%s> from clipboard\n", str);
+ len = strlen(str);
+
+ ConioWriteConsole(Console, Console->ActiveBuffer, str, len, TRUE);
+
+ GlobalUnlock(hData);
+ CloseClipboard();
+ }
+}
+
static VOID
GuiConsoleRightMouseDown(HWND hWnd)
{
if (!(Console->Selection.dwFlags & CONSOLE_SELECTION_NOT_EMPTY))
{
- /* FIXME - paste text from clipboard */
+ GuiConsolePaste(hWnd, Console);
}
else
{
- /* FIXME - copy selection to clipboard */
+ GuiConsoleCopy(hWnd, Console);
+ /* Clear the selection */
GuiConsoleUpdateSelection(Console, NULL);
}
CPLFunc(hWnd, CPL_DBLCLK, (LPARAM)&SharedInfo, Defaults);
}
static LRESULT
-GuiConsoleHandleSysMenuCommand(HWND hWnd, WPARAM wParam, LPARAM lParam, PGUI_CONSOLE_DATA GuiData)
+GuiConsoleHandleSysMenuCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
{
LRESULT Ret = TRUE;
+ PCSRSS_CONSOLE Console;
+ PGUI_CONSOLE_DATA GuiData;
+ COORD bottomRight = { 0, 0 };
+
+ GuiConsoleGetDataPointers(hWnd, &Console, &GuiData);
switch(wParam)
{
case ID_SYSTEM_EDIT_MARK:
+ DPRINT1("Marking not handled yet\n");
+ break;
+
case ID_SYSTEM_EDIT_COPY:
+ GuiConsoleCopy(hWnd, Console);
+ break;
+
case ID_SYSTEM_EDIT_PASTE:
+ GuiConsolePaste(hWnd, Console);
+ break;
+
case ID_SYSTEM_EDIT_SELECTALL:
+ bottomRight.X = Console->Size.X - 1;
+ bottomRight.Y = Console->Size.Y - 1;
+ GuiConsoleUpdateSelection(Console, &bottomRight);
+ break;
+
case ID_SYSTEM_EDIT_SCROLL:
+ DPRINT1("Scrolling is not handled yet\n");
+ break;
+
case ID_SYSTEM_EDIT_FIND:
+ DPRINT1("Finding is not handled yet\n");
break;
case ID_SYSTEM_DEFAULTS:
GuiConsoleMouseMove(hWnd, wParam, lParam);
break;
case WM_SYSCOMMAND:
- Result = GuiConsoleHandleSysMenuCommand(hWnd, wParam, lParam, GuiData);
+ Result = GuiConsoleHandleSysMenuCommand(hWnd, wParam, lParam);
break;
case WM_HSCROLL:
case WM_VSCROLL:
/* TRANSLATOR: Mário Kaèmár /Mario Kacmar/ aka Kario (kario@szm.sk)
* DATE OF TR: 29-05-2008
+ * LastChange: 12-04-2011
*/
LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT
IDS_SCROLLUP "Rolova\9d nahor"
IDS_SCROLLDOWN "Rolova\9d nadol"
- IDS_COMMAND_PROMPT "Command Prompt"
+ IDS_COMMAND_PROMPT "Príkazový riadok"
END
#include "lang/fr-FR.rc"
#include "lang/id-ID.rc"
#include "lang/it-IT.rc"
-//#include "lang/ja-JP.rc" FIXME: iconv issue
+#include "lang/ja-JP.rc"
#include "lang/no-NO.rc"
#include "lang/pl-PL.rc"
#include "lang/ru-RU.rc"
objects/gdibatch.c
objects/gdidbg.c
objects/gdiobj.c
+ objects/gdipool.c
objects/icm.c
objects/line.c
objects/metafile.c
add_importlibs(win32k ntoskrnl hal ftfd)
add_pch(win32k ${CMAKE_CURRENT_SOURCE_DIR}/pch.h ${SOURCE})
-add_dependencies(win32k gendib_generated subsystem_napi)
-add_cab_target(win32k 1)
+add_cd_file(TARGET win32k DESTINATION reactos/system32 FOR all)
add_importlib_target(win32k.spec)
add_library(win32ksys sys-stubs.S)
/* NOTE: We don't care about the bLocked param, as our handle manager
allows freeing the object, while we hold any number of locks. */
- /* Free the object */
- return DRIVEROBJ_FreeObjectByHandle(hdo);
+ /* Delete the object */
+ GDIOBJ_vDeleteObject(&pedo->baseobj);
+ return TRUE;
}
}
/* Unlock object */
- cLocks = DRIVEROBJ_UnlockObject(pedo);
+ cLocks = pedo->baseobj.cExclusiveLock;
+ DRIVEROBJ_UnlockObject(pedo);
/* Check if we still hold a lock */
- if (cLocks < 1)
+ if (cLocks < 2)
{
/* Object wasn't locked before, fail. */
return FALSE;
ASSERT(pebo->psurfTrg->ppal);
pebo->ppalSurf = pebo->psurfTrg->ppal;
- GDIOBJ_IncrementShareCount(&pebo->ppalSurf->BaseObject);
+ GDIOBJ_vReferenceObjectByPointer(&pebo->ppalSurf->BaseObject);
if (pbrush->flAttrs & GDIBRUSH_IS_NULL)
{
{
DPRINT1("Warning: Couldn't lock visible region of window DC\n");
}
- REGION_FreeRgnByHandle(hVisRgn);
+ GreDeleteObject(hVisRgn);
}
else
{
ppdev->gdiinfo.ulLogPixelsY = 96;
/* Setup Palette */
- GDIOBJ_SetOwnership(ppdev->devinfo.hpalDefault, NULL);
ppdev->ppalSurf = PALETTE_ShareLockPalette(ppdev->devinfo.hpalDefault);
DPRINT("PDEVOBJ_bEnablePDEV - dhpdev = %p\n", ppdev->dhpdev);
if (ppdev->pSurface)
{
/* Increment reference count */
- GDIOBJ_IncrementShareCount(&ppdev->pSurface->BaseObject);
+ GDIOBJ_vReferenceObjectByPointer(&ppdev->pSurface->BaseObject);
}
else
{
}
/* Allocate a SURFACE object */
- psurf = (PSURFACE)GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_BITMAP);
+ psurf = (PSURFACE)GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_BITMAP, sizeof(SURFACE));
if (psurf)
{
/* Assign a default palette and increment its reference count */
psurf->ppal = appalSurfaceDefault[iFormat];
- GDIOBJ_IncrementShareCount(&psurf->ppal->BaseObject);
+ GDIOBJ_vReferenceObjectByPointer(&psurf->ppal->BaseObject);
}
return psurf;
{
/* Bail out if that failed */
DPRINT1("SURFACE_bSetBitmapBits failed.\n");
- SURFACE_FreeSurfaceByHandle(hbmp);
+ GDIOBJ_vDeleteObject(&psurf->BaseObject);
return NULL;
}
/* Set public ownership */
- GDIOBJ_SetOwnership(hbmp, NULL);
+ GDIOBJ_vSetObjectOwner(&psurf->BaseObject, GDI_OBJ_HMGR_PUBLIC);
/* Unlock the surface and return */
SURFACE_UnlockSurface(psurf);
hbmp = (HBITMAP)psurf->SurfObj.hsurf;
/* Set public ownership */
- GDIOBJ_SetOwnership(hbmp, NULL);
+ GDIOBJ_vSetObjectOwner(&psurf->BaseObject, GDI_OBJ_HMGR_PUBLIC);
/* Unlock the surface and return */
SURFACE_UnlockSurface(psurf);
hsurf = psurf->SurfObj.hsurf;
/* Set public ownership */
- GDIOBJ_SetOwnership(hsurf, NULL);
+ GDIOBJ_vSetObjectOwner(&psurf->BaseObject, GDI_OBJ_HMGR_PUBLIC);
/* Unlock the surface and return */
SURFACE_UnlockSurface(psurf);
APIENTRY
EngDeleteSurface(IN HSURF hsurf)
{
- GDIOBJ_SetOwnership(hsurf, PsGetCurrentProcess());
- SURFACE_FreeSurfaceByHandle(hsurf);
+ PSURFACE psurf;
+
+ psurf = SURFACE_ShareLockSurface(hsurf);
+ if (!psurf)
+ {
+ DPRINT1("Could not reference surface to delete\n");
+ return FALSE;
+ }
+
+ GDIOBJ_vDeleteObject(&psurf->BaseObject);
return TRUE;
}
#define GDIBRUSH_CACHED_IS_SOLID 0x80000000
#define BRUSH_AllocBrush() ((PBRUSH) GDIOBJ_AllocObj(GDIObjType_BRUSH_TYPE))
-#define BRUSH_AllocBrushWithHandle() ((PBRUSH) GDIOBJ_AllocObjWithHandle (GDI_OBJECT_TYPE_BRUSH))
+#define BRUSH_AllocBrushWithHandle() ((PBRUSH) GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_BRUSH, sizeof(BRUSH)))
#define BRUSH_FreeBrush(pBrush) GDIOBJ_FreeObj((POBJ)pBrush, GDIObjType_BRUSH_TYPE)
#define BRUSH_FreeBrushByHandle(hBrush) GDIOBJ_FreeObjByHandle((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH)
-#define BRUSH_LockBrush(hBrush) ((PBRUSH)GDIOBJ_LockObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH))
-#define BRUSH_UnlockBrush(pBrush) GDIOBJ_UnlockObjByPtr((POBJ)pBrush)
-
#define BRUSH_ShareLockBrush(hBrush) ((PBRUSH)GDIOBJ_ShareLockObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH))
-#define BRUSH_ShareUnlockBrush(pBrush) GDIOBJ_ShareUnlockObjByPtr((POBJ)pBrush)
+#define BRUSH_ShareUnlockBrush(pBrush) GDIOBJ_vDereferenceObject((POBJ)pBrush)
INT FASTCALL BRUSH_GetObject (PBRUSH GdiObject, INT Count, LPLOGBRUSH Buffer);
BOOL INTERNAL_CALL BRUSH_Cleanup(PVOID ObjectBody);
#define COLORSPACEOBJ_AllocCS() ((PCOLORSPACE) GDIOBJ_AllocObj(GDIObjType_ICMLCS_TYPE))
-#define COLORSPACEOBJ_AllocCSWithHandle() ((PCOLORSPACE) GDIOBJ_AllocObjWithHandle (GDI_OBJECT_TYPE_COLORSPACE))
+#define COLORSPACEOBJ_AllocCSWithHandle() ((PCOLORSPACE) GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_COLORSPACE, sizeof(COLORSPACE)))
#define COLORSPACEOBJ_FreeCS(pCS) GDIOBJ_FreeObj((POBJ)pCS, GDIObjType_ICMLCS_TYPE)
#define COLORSPACEOBJ_FreeCSByHandle(hCS) GDIOBJ_FreeObjByHandle((HGDIOBJ)hCS, GDI_OBJECT_TYPE_COLORSPACE)
-#define COLORSPACEOBJ_LockCS(hCS) ((PCOLORSPACE)GDIOBJ_LockObj((HGDIOBJ)hCS, GDI_OBJECT_TYPE_COLORSPACE))
-#define COLORSPACEOBJ_UnlockCS(pCS) GDIOBJ_UnlockObjByPtr((POBJ)pCS)
+#define COLORSPACEOBJ_LockCS(hCS) ((PCOLORSPACE)GDIOBJ_LockObject((HGDIOBJ)hCS, GDIObjType_ICMLCS_TYPE))
+#define COLORSPACEOBJ_UnlockCS(pCS) GDIOBJ_vUnlockObject((POBJ)pCS)
typedef struct _COLORTRANSFORMOBJ
{
/* Internal functions *********************************************************/
-#define DC_LockDc(hDC) \
- ((PDC) GDIOBJ_LockObj ((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC))
-#define DC_UnlockDc(pDC) \
- GDIOBJ_UnlockObjByPtr ((POBJ)pDC)
-
extern PDC defaultDCstate;
INIT_FUNCTION NTSTATUS NTAPI InitDcImpl(VOID);
PPDEVOBJ FASTCALL IntEnumHDev(VOID);
PDC NTAPI DC_AllocDcWithHandle(VOID);
VOID FASTCALL DC_InitDC(HDC DCToInit);
-VOID FASTCALL DC_AllocateDcAttr(HDC);
+BOOL NTAPI DC_bAllocDcAttr(PDC pdc);
VOID FASTCALL DC_FreeDcAttr(HDC);
BOOL INTERNAL_CALL DC_Cleanup(PVOID ObjectBody);
BOOL FASTCALL DC_SetOwnership(HDC hDC, PEPROCESS Owner);
VOID FASTCALL IntvGetDeviceCaps(PPDEVOBJ, PDEVCAPS);
BOOL FASTCALL MakeInfoDC(PDC,BOOL);
BOOL FASTCALL IntSetDefaultRegion(PDC);
+BOOL NTAPI GreSetDCOwner(HDC hdc, ULONG ulOwner);
+
+FORCEINLINE
+PDC
+DC_LockDc(HDC hdc)
+{
+ //if (GDI_HANDLE_GET_TYPE(hdc) != GDILoObjType_LO_DC_TYPE) return NULL; ???
+ return GDIOBJ_LockObject(hdc, GDIObjType_DC_TYPE);
+}
+
+FORCEINLINE
+VOID
+DC_UnlockDc(PDC pdc)
+{
+ GDIOBJ_vUnlockObject(&pdc->BaseObject);
+}
VOID
FORCEINLINE
SURFACE_ShareUnlockSurface(psurfOld);
}
if (psurfNew)
- GDIOBJ_IncrementShareCount((POBJ)psurfNew);
+ GDIOBJ_vReferenceObjectByPointer((POBJ)psurfNew);
pdc->dclevel.pSurface = psurfNew;
}
if (pbrFillOld)
BRUSH_ShareUnlockBrush(pbrFillOld);
if (pbrFill)
- GDIOBJ_IncrementShareCount((POBJ)pbrFill);
+ GDIOBJ_vReferenceObjectByPointer((POBJ)pbrFill);
pdc->dclevel.pbrFill = pbrFill;
}
if (pbrLineOld)
BRUSH_ShareUnlockBrush(pbrLineOld);
if (pbrLine)
- GDIOBJ_IncrementShareCount((POBJ)pbrLine);
+ GDIOBJ_vReferenceObjectByPointer((POBJ)pbrLine);
pdc->dclevel.pbrLine = pbrLine;
}
if (ppalOld)
PALETTE_ShareUnlockPalette(ppalOld);
if (ppal)
- GDIOBJ_IncrementShareCount((POBJ)ppal);
+ GDIOBJ_vReferenceObjectByPointer((POBJ)ppal);
pdc->dclevel.ppal = ppal;
}
BuildDIBPalette (CONST BITMAPINFO *bmi);
BITMAPINFO* FASTCALL DIB_ConvertBitmapInfo(CONST BITMAPINFO* bmi, DWORD Usage);
-VOID FASTCALL DIB_FreeConvertedBitmapInfo(BITMAPINFO* converted, BITMAPINFO* orig);
\ No newline at end of file
+VOID FASTCALL DIB_FreeConvertedBitmapInfo(BITMAPINFO* converted, BITMAPINFO* orig);
BOOL INTERNAL_CALL DRIVEROBJ_Cleanup(PVOID pObject);
-#define DRIVEROBJ_AllocObjectWithHandle() ((PEDRIVEROBJ)GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_DRIVEROBJ))
+#define DRIVEROBJ_AllocObjectWithHandle() ((PEDRIVEROBJ)GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_DRIVEROBJ, sizeof(DRIVEROBJ)))
#define DRIVEROBJ_FreeObjectByHandle(hdo) GDIOBJ_FreeObjByHandle((HGDIOBJ)hdo, GDI_OBJECT_TYPE_DRIVEROBJ)
-#define DRIVEROBJ_LockObject(hdo) ((PEDRIVEROBJ)GDIOBJ_LockObj((HGDIOBJ)hdo, GDI_OBJECT_TYPE_DRIVEROBJ))
-#define DRIVEROBJ_UnlockObject(pdo) GDIOBJ_UnlockObjByPtr((POBJ)pdo)
+#define DRIVEROBJ_UnlockObject(pdo) GDIOBJ_vUnlockObject((POBJ)pdo)
+
+FORCEINLINE
+PEDRIVEROBJ
+DRIVEROBJ_LockObject(HDRVOBJ hdo)
+{
+ return GDIOBJ_LockObject(hdo, GDIObjType_DRVOBJ_TYPE);
+}
#pragma once
-extern ULONG gulDebugChannels;
+typedef enum _LOG_EVENT_TYPE
+{
+ EVENT_ALLOCATE,
+ EVENT_CREATE_HANDLE,
+ EVENT_REFERENCE,
+ EVENT_DEREFERENCE,
+ EVENT_LOCK,
+ EVENT_UNLOCK,
+ EVENT_DELETE,
+ EVENT_FREE,
+ EVENT_SET_OWNER,
+} LOG_EVENT_TYPE;
+
+typedef struct _LOGENTRY
+{
+ SLIST_ENTRY sleLink;
+ LOG_EVENT_TYPE nEventType;
+ DWORD dwProcessId;
+ DWORD dwThreadId;
+ ULONG ulUnique;
+ LPARAM lParam;
+ PVOID apvBackTrace[20];
+ union
+ {
+ ULONG_PTR data1;
+ } data;
+} LOGENTRY, *PLOGENTRY;
+
+#if DBG_ENABLE_EVENT_LOGGING
+VOID NTAPI DbgDumpEventList(PSLIST_HEADER pslh);
+VOID NTAPI DbgLogEvent(PSLIST_HEADER pslh, EVENT_TYPE nEventType, LPARAM lParam);
+VOID NTAPI DbgCleanupEventList(PSLIST_HEADER pslh);
+#define DBG_LOGEVENT(pslh, type, val) DbgLogEvent(pslh, type, (ULONG_PTR)val)
+#define DBG_INITLOG(pslh) InitializeSListHead(pslh)
+#define DBG_DUMP_EVENT_LIST(pslh) DbgDumpEventList(pslh)
+#define DBG_CLEANUP_EVENT_LIST(pslh) DbgCleanupEventList(pslh)
+#else
+#define DBG_LOGEVENT(pslh, type, val)
+#define DBG_INITLOG(pslh)
+#define DBG_DUMP_EVENT_LIST(pslh)
+#define DBG_CLEANUP_EVENT_LIST(pslh)
+#endif
-#define GDI_STACK_LEVELS 20
-extern ULONG_PTR GDIHandleAllocator[GDI_HANDLE_COUNT][GDI_STACK_LEVELS+1];
-extern ULONG_PTR GDIHandleLocker[GDI_HANDLE_COUNT][GDI_STACK_LEVELS+1];
-extern ULONG_PTR GDIHandleShareLocker[GDI_HANDLE_COUNT][GDI_STACK_LEVELS+1];
-extern ULONG_PTR GDIHandleDeleter[GDI_HANDLE_COUNT][GDI_STACK_LEVELS+1];
+extern ULONG gulLogUnique;
+
+extern ULONG gulDebugChannels;
enum _DEBUGCHANNELS
{
DbgModeSwitch = 16,
};
-void IntDumpHandleTable(PGDI_HANDLE_TABLE HandleTable);
-ULONG CaptureStackBackTace(PVOID* pFrames, ULONG nFramesToCapture);
-BOOL GdiDbgHTIntegrityCheck(VOID);
-void GdiDbgDumpLockedHandles(VOID);
+VOID NTAPI DbgDumpGdiHandleTable(VOID);
+ULONG NTAPI DbgCaptureStackBackTace(PVOID* pFrames, ULONG nFramesToCapture);
+BOOL NTAPI DbgGdiHTIntegrityCheck(VOID);
+VOID NTAPI DbgDumpLockedGdiHandles(VOID);
#define DBGENABLE(ch) gulDebugChannels |= (ch);
#define DBGDISABLE(ch) gulDebugChannels &= ~(ch);
#define DPRINTCH(ch) if (gulDebugChannels & (ch)) DbgPrint
-#ifdef GDI_DEBUG
-
#define KeRosDumpStackFrames(Frames, Count) KdSystemDebugControl('DsoR', (PVOID)Frames, Count, NULL, 0, NULL, KernelMode)
NTSYSAPI ULONG APIENTRY RtlWalkFrameChain(OUT PVOID *Callers, IN ULONG Count, IN ULONG Flags);
-#define IS_HANDLE_VALID(idx) \
- ((GdiHandleTable->Entries[idx].Type & GDI_ENTRY_BASETYPE_MASK) != 0)
-
-#define GDIDBG_TRACECALLER() \
- DPRINT1("-> called from:\n"); \
- KeRosDumpStackFrames(NULL, 20);
-#define GDIDBG_TRACEALLOCATOR(handle) \
- DPRINT1("-> allocated from:\n"); \
- KeRosDumpStackFrames(GDIHandleAllocator[GDI_HANDLE_GET_INDEX(handle)], GDI_STACK_LEVELS);
-#define GDIDBG_TRACELOCKER(handle) \
- DPRINT1("-> locked from:\n"); \
- KeRosDumpStackFrames(GDIHandleLocker[GDI_HANDLE_GET_INDEX(handle)], GDI_STACK_LEVELS);
-#define GDIDBG_TRACESHARELOCKER(handle) \
- DPRINT1("-> locked from:\n"); \
- KeRosDumpStackFrames(GDIHandleShareLocker[GDI_HANDLE_GET_INDEX(handle)], GDI_STACK_LEVELS);
-#define GDIDBG_TRACEDELETER(handle) \
- DPRINT1("-> deleted from:\n"); \
- KeRosDumpStackFrames(GDIHandleDeleter[GDI_HANDLE_GET_INDEX(handle)], GDI_STACK_LEVELS);
-#define GDIDBG_CAPTUREALLOCATOR(handle) \
- CaptureStackBackTace((PVOID*)GDIHandleAllocator[GDI_HANDLE_GET_INDEX(handle)], GDI_STACK_LEVELS);
-#define GDIDBG_CAPTURELOCKER(handle) \
- CaptureStackBackTace((PVOID*)GDIHandleLocker[GDI_HANDLE_GET_INDEX(handle)], GDI_STACK_LEVELS);
-#define GDIDBG_CAPTURESHARELOCKER(handle) \
- CaptureStackBackTace((PVOID*)GDIHandleShareLocker[GDI_HANDLE_GET_INDEX(handle)], GDI_STACK_LEVELS);
-#define GDIDBG_CAPTUREDELETER(handle) \
- CaptureStackBackTace((PVOID*)GDIHandleDeleter[GDI_HANDLE_GET_INDEX(handle)], GDI_STACK_LEVELS);
-#define GDIDBG_DUMPHANDLETABLE() \
- IntDumpHandleTable(GdiHandleTable)
-#define GDIDBG_INITLOOPTRACE() \
- ULONG Attempts = 0;
-#define GDIDBG_TRACELOOP(Handle, PrevThread, Thread) \
- if ((++Attempts % 20) == 0) \
- { \
- DPRINT1("[%d] Handle 0x%p Locked by 0x%x (we're 0x%x)\n", Attempts, Handle, PrevThread, Thread); \
- }
-
-#else
-
-#define GDIDBG_TRACECALLER()
-#define GDIDBG_TRACEALLOCATOR(index)
-#define GDIDBG_TRACELOCKER(index)
-#define GDIDBG_TRACESHARELOCKER(index)
-#define GDIDBG_CAPTUREALLOCATOR(index)
-#define GDIDBG_CAPTURELOCKER(index)
-#define GDIDBG_CAPTURESHARELOCKER(index)
-#define GDIDBG_CAPTUREDELETER(handle)
-#define GDIDBG_DUMPHANDLETABLE()
-#define GDIDBG_INITLOOPTRACE()
-#define GDIDBG_TRACELOOP(Handle, PrevThread, Thread)
-#define GDIDBG_TRACEDELETER(handle)
-
-#endif /* GDI_DEBUG */
-
#if DBG
void
NTAPI
{
DbgPrint("(%s:%ld) There are %ld exclusive locks!\n",
pszFile, nLine, pti->cExclusiveLocks);
- GdiDbgDumpLockedHandles();
ASSERT(FALSE);
}
}
#include <win32k/ntgdihdl.h>
#include "win32.h"
-/* apparently the first 10 entries are never used in windows as they are empty */
+/* The first 10 entries are never used in windows, they are empty */
#define RESERVE_ENTRIES_COUNT 10
typedef struct _GDI_HANDLE_TABLE
PVOID pvLangPack; // Language Pack.
CFONT cfPublic[GDI_CFONT_MAX]; // Public Fonts.
DWORD dwCFCount;
-//////////////////////////////////////////////////////////////////////////////
- PPAGED_LOOKASIDE_LIST LookasideLists;
- ULONG FirstFree;
- ULONG FirstUnused;
} GDI_HANDLE_TABLE, *PGDI_HANDLE_TABLE;
* It's for thread locking. */
typedef struct _BASEOBJECT
{
- HGDIOBJ hHmgr;
- ULONG ulShareCount;
- USHORT cExclusiveLock;
- USHORT BaseFlags;
- PTHREADINFO Tid;
- EX_PUSH_LOCK pushlock;
+ HGDIOBJ hHmgr;
+ union {
+ ULONG ulShareCount; /* For objects without a handle */
+ DWORD dwThreadId; /* Exclusive lock owner */
+ };
+ USHORT cExclusiveLock;
+ USHORT BaseFlags;
+ EX_PUSH_LOCK pushlock;
+#if DBG_ENABLE_EVENT_LOGGING
+ SLIST_HEADER slhLog;
+#endif
} BASEOBJECT, *POBJ;
-typedef struct _CLIENTOBJ
-{
- BASEOBJECT BaseObject;
-} CLIENTOBJ, *PCLIENTOBJ;
-
enum BASEFLAGS
{
BASEFLAG_LOOKASIDE = 0x80,
BASEFLAG_READY_TO_DIE = 0x1000
};
-BOOL INTERNAL_CALL GDIOBJ_OwnedByCurrentProcess(HGDIOBJ ObjectHandle);
-BOOL INTERNAL_CALL GDIOBJ_SetOwnership(HGDIOBJ ObjectHandle, PEPROCESS Owner);
-BOOL INTERNAL_CALL GDIOBJ_CopyOwnership(HGDIOBJ CopyFrom, HGDIOBJ CopyTo);
-BOOL INTERNAL_CALL GDIOBJ_ConvertToStockObj(HGDIOBJ *hObj);
-//VOID INTERNAL_CALL GDIOBJ_ShareUnlockObjByPtr(POBJ Object);
-BOOL INTERNAL_CALL GDIOBJ_ValidateHandle(HGDIOBJ hObj, ULONG ObjectType);
-POBJ INTERNAL_CALL GDIOBJ_AllocObj(UCHAR ObjectType);
-POBJ INTERNAL_CALL GDIOBJ_AllocObjWithHandle(ULONG ObjectType);
-VOID INTERNAL_CALL GDIOBJ_FreeObj (POBJ pObj, UCHAR ObjectType);
-BOOL INTERNAL_CALL GDIOBJ_FreeObjByHandle (HGDIOBJ hObj, DWORD ObjectType);
-PGDIOBJ INTERNAL_CALL GDIOBJ_LockObj (HGDIOBJ hObj, DWORD ObjectType);
-PGDIOBJ INTERNAL_CALL GDIOBJ_ShareLockObj (HGDIOBJ hObj, DWORD ObjectType);
-VOID INTERNAL_CALL GDIOBJ_LockMultipleObjs(ULONG ulCount, IN HGDIOBJ* ahObj, OUT PGDIOBJ* apObj);
+typedef struct _CLIENTOBJ
+{
+ BASEOBJECT BaseObject;
+} CLIENTOBJ, *PCLIENTOBJ;
-PVOID INTERNAL_CALL GDI_MapHandleTable(PEPROCESS Process);
+#define GDIOBJFLAG_DEFAULT (0x0)
+#define GDIOBJFLAG_IGNOREPID (0x1)
+#define GDIOBJFLAG_IGNORELOCK (0x2)
INIT_FUNCTION
NTSTATUS
NTAPI
InitGdiHandleTable(VOID);
-#define GDIOBJ_GetObjectType(Handle) \
- GDI_HANDLE_GET_TYPE(Handle)
+BOOL
+NTAPI
+GreIsHandleValid(
+ HGDIOBJ hobj);
-#define GDIOBJFLAG_DEFAULT (0x0)
-#define GDIOBJFLAG_IGNOREPID (0x1)
-#define GDIOBJFLAG_IGNORELOCK (0x2)
+BOOL
+NTAPI
+GreDeleteObject(
+ HGDIOBJ hObject);
-BOOL FASTCALL GreDeleteObject(HGDIOBJ hObject);
-BOOL FASTCALL IsObjectDead(HGDIOBJ);
-BOOL FASTCALL IntGdiSetDCOwnerEx( HDC, DWORD, BOOL);
-BOOL FASTCALL IntGdiSetRegionOwner(HRGN,DWORD);
+ULONG
+NTAPI
+GreGetObjectOwner(
+ HGDIOBJ hobj);
-/*!
- * Release GDI object. Every object locked by GDIOBJ_LockObj() must be unlocked.
- * You should unlock the object
- * as soon as you don't need to have access to it's data.
+BOOL
+NTAPI
+GreSetObjectOwner(
+ HGDIOBJ hobj,
+ ULONG ulOwner);
- * \param Object Object pointer (as returned by GDIOBJ_LockObj).
- */
-ULONG
-FORCEINLINE
-GDIOBJ_UnlockObjByPtr(POBJ Object)
-{
-#if DBG
- PTHREADINFO pti = (PTHREADINFO)PsGetCurrentThreadWin32Thread();
- if (pti)
- {
- if (pti->cExclusiveLocks < 1)
- {
- DbgPrint("cExclusiveLocks = %ld, object: %ld\n",
- pti->cExclusiveLocks, Object->cExclusiveLock);
- ASSERT(FALSE);
- }
- pti->cExclusiveLocks--;
- }
-#endif
- INT cLocks = InterlockedDecrement((PLONG)&Object->cExclusiveLock);
- ASSERT(cLocks >= 0);
- return cLocks;
-}
+INT
+NTAPI
+GreGetObject(
+ IN HGDIOBJ hobj,
+ IN INT cbCount,
+ IN PVOID pvBuffer);
-ULONG
-FORCEINLINE
-GDIOBJ_ShareUnlockObjByPtr(POBJ Object)
-{
- HGDIOBJ hobj = Object->hHmgr;
- USHORT flags = Object->BaseFlags;
- INT cLocks = InterlockedDecrement((PLONG)&Object->ulShareCount);
- ASSERT(cLocks >= 0);
- if ((flags & BASEFLAG_READY_TO_DIE) && (cLocks == 0))
- {
- ASSERT(Object->cExclusiveLock == 0);
- GDIOBJ_SetOwnership(hobj, PsGetCurrentProcess());
- GDIOBJ_FreeObjByHandle(hobj, GDI_OBJECT_TYPE_DONTCARE);
- }
- return cLocks;
-}
-
-#ifdef GDI_DEBUG
-ULONG FASTCALL GDIOBJ_IncrementShareCount(POBJ Object);
-#else
-ULONG
-FORCEINLINE
-GDIOBJ_IncrementShareCount(POBJ Object)
-{
- INT cLocks = InterlockedIncrement((PLONG)&Object->ulShareCount);
- ASSERT(cLocks >= 1);
- return cLocks;
-}
-#endif
+POBJ
+NTAPI
+GDIOBJ_AllocateObject(
+ UCHAR objt,
+ ULONG cjSize,
+ FLONG fl);
+
+VOID
+NTAPI
+GDIOBJ_vDeleteObject(
+ POBJ pobj);
+
+POBJ
+NTAPI
+GDIOBJ_ReferenceObjectByHandle(
+ HGDIOBJ hobj,
+ UCHAR objt);
+
+VOID
+NTAPI
+GDIOBJ_vReferenceObjectByPointer(
+ POBJ pobj);
+
+VOID
+NTAPI
+GDIOBJ_vDereferenceObject(
+ POBJ pobj);
+
+PGDIOBJ
+NTAPI
+GDIOBJ_LockObject(
+ HGDIOBJ hobj,
+ UCHAR objt);
+
+VOID
+NTAPI
+GDIOBJ_vUnlockObject(
+ POBJ pobj);
+
+VOID
+NTAPI
+GDIOBJ_vSetObjectOwner(
+ POBJ pobj,
+ ULONG ulOwner);
+
+BOOL
+NTAPI
+GDIOBJ_bLockMultipleObjects(
+ ULONG ulCount,
+ HGDIOBJ* ahObj,
+ PGDIOBJ* apObj,
+ UCHAR objt);
+
+HGDIOBJ
+NTAPI
+GDIOBJ_hInsertObject(
+ POBJ pobj,
+ ULONG ulOwner);
-INT FASTCALL GreGetObjectOwner(HGDIOBJ, GDIOBJTYPE);
+VOID
+NTAPI
+GDIOBJ_vFreeObject(
+ POBJ pobj);
+
+VOID
+NTAPI
+GDIOBJ_vSetObjectAttr(
+ POBJ pobj,
+ PVOID pvObjAttr);
+
+PVOID
+NTAPI
+GDIOBJ_pvGetObjectAttr(
+ POBJ pobj);
+
+BOOL INTERNAL_CALL GDIOBJ_ConvertToStockObj(HGDIOBJ *hObj);
+POBJ INTERNAL_CALL GDIOBJ_AllocObjWithHandle(ULONG ObjectType, ULONG cjSize);
+PGDIOBJ INTERNAL_CALL GDIOBJ_ShareLockObj(HGDIOBJ hObj, DWORD ObjectType);
+PVOID INTERNAL_CALL GDI_MapHandleTable(PEPROCESS Process);
-#define GDIOBJ_GetKernelObj(Handle) \
- ((PGDI_TABLE_ENTRY)&GdiHandleTable->Entries[GDI_HANDLE_GET_INDEX(Handle)])->KernelData
-#define GDI_ENTRY_TO_INDEX(ht, e) \
- (((ULONG_PTR)(e) - (ULONG_PTR)&((ht)->Entries[0])) / sizeof(GDI_TABLE_ENTRY))
-#define GDI_HANDLE_GET_ENTRY(HandleTable, h) \
- (&(HandleTable)->Entries[GDI_HANDLE_GET_INDEX((h))])
UINT vk;
} HOT_KEY_ITEM, *PHOT_KEY_ITEM;
+#define IDHOT_REACTOS (-9)
+
INIT_FUNCTION
NTSTATUS
NTAPI
VOID FASTCALL
UnregisterThreadHotKeys(struct _ETHREAD *Thread);
+UINT FASTCALL
+DefWndGetHotKey(HWND hwnd);
+INT FASTCALL
+DefWndSetHotKey( PWND pWnd, WPARAM wParam);
/* EOF */
VOID FASTCALL
SetLastNtError(
NTSTATUS Status);
+
+typedef struct _GDI_POOL *PGDI_POOL;
+
+PGDI_POOL
+NTAPI
+GdiPoolCreate(
+ ULONG cjAllocSize,
+ ULONG ulTag);
+
+VOID
+NTAPI
+GdiPoolDestroy(PGDI_POOL pPool);
+
+PVOID
+NTAPI
+GdiPoolAllocate(
+ PGDI_POOL pPool);
+
+VOID
+NTAPI
+GdiPoolFree(
+ PGDI_POOL pPool,
+ PVOID pvAlloc);
+
+FORCEINLINE
+VOID
+ExAcquirePushLockExclusive(PEX_PUSH_LOCK PushLock)
+{
+ /* Try acquiring the lock */
+ if (InterlockedBitTestAndSet((PLONG)PushLock, EX_PUSH_LOCK_LOCK_V))
+ {
+ /* Someone changed it, use the slow path */
+ ExfAcquirePushLockExclusive(PushLock);
+ }
+}
+
+FORCEINLINE
+VOID
+ExReleasePushLockExclusive(PEX_PUSH_LOCK PushLock)
+{
+ EX_PUSH_LOCK OldValue;
+
+ /* Unlock the pushlock */
+ OldValue.Value = InterlockedExchangeAddSizeT((PSIZE_T)PushLock,
+ -(SSIZE_T)EX_PUSH_LOCK_LOCK);
+ /* Check if anyone is waiting on it and it's not already waking */
+ if ((OldValue.Waiting) && !(OldValue.Waking))
+ {
+ /* Wake it up */
+ ExfTryToWakePushLock(PushLock);
+ }
+}
+
+FORCEINLINE
+VOID
+_ExInitializePushLock(PEX_PUSH_LOCK Lock)
+{
+ *(PULONG_PTR)Lock = 0;
+}
+#define ExInitializePushLock _ExInitializePushLock
CONST RGBQUAD *Colors);
#define PALETTE_FreePalette(pPalette) GDIOBJ_FreeObj((POBJ)pPalette, GDIObjType_PAL_TYPE)
#define PALETTE_FreePaletteByHandle(hPalette) GDIOBJ_FreeObjByHandle((HGDIOBJ)hPalette, GDI_OBJECT_TYPE_PALETTE)
-#define PALETTE_LockPalette(hPalette) ((PPALETTE)GDIOBJ_LockObj((HGDIOBJ)hPalette, GDI_OBJECT_TYPE_PALETTE))
-#define PALETTE_UnlockPalette(pPalette) GDIOBJ_UnlockObjByPtr((POBJ)pPalette)
+#define PALETTE_UnlockPalette(pPalette) GDIOBJ_vUnlockObject((POBJ)pPalette)
#define PALETTE_ShareLockPalette(hpal) \
((PPALETTE)GDIOBJ_ShareLockObj((HGDIOBJ)hpal, GDI_OBJECT_TYPE_PALETTE))
#define PALETTE_ShareUnlockPalette(ppal) \
- GDIOBJ_ShareUnlockObjByPtr(&ppal->BaseObject)
+ GDIOBJ_vDereferenceObject(&ppal->BaseObject)
BOOL INTERNAL_CALL PALETTE_Cleanup(PVOID ObjectBody);
INIT_FUNCTION NTSTATUS NTAPI InitPaletteImpl(VOID);
typedef struct _PATH
{
BASEOBJECT BaseObject;
-
+
RECTFX rcfxBoundBox;
POINTFX ptfxSubPathStart;
} EPATHOBJ, *PEPATHOBJ;
#define PATH_AllocPath() ((PPATH) GDIOBJ_AllocObj(GDIObjType_PATH_TYPE))
-#define PATH_AllocPathWithHandle() ((PPATH) GDIOBJ_AllocObjWithHandle (GDI_OBJECT_TYPE_PATH))
+#define PATH_AllocPathWithHandle() ((PPATH) GDIOBJ_AllocObjWithHandle (GDI_OBJECT_TYPE_PATH, sizeof(PATH)))
#define PATH_FreePath(pPath) GDIOBJ_FreeObj((POBJ)pPath, GDIObjType_PATH_TYPE)
#define PATH_FreeExtPathByHandle(hPath) GDIOBJ_FreeObjByHandle((HGDIOBJ) hPath, GDI_OBJECT_TYPE_PATH)
#define PATH_LockPath(hPath) ((PPATH)GDIOBJ_ShareLockObj((HGDIOBJ)hPath, GDI_OBJECT_TYPE_PATH))
-#define PATH_UnlockPath(pPath) GDIOBJ_ShareUnlockObjByPtr((POBJ)pPath)
+#define PATH_UnlockPath(pPath) GDIOBJ_vDereferenceObject((POBJ)pPath)
#define PATH_IsPathOpen(dclevel) ( ((dclevel).hPath) && ((dclevel).flPath & DCPATH_ACTIVE) )
/* Internal interface */
#define PEN_AllocPen() ((HPEN)GDIOBJ_AllocObj(GDIObjType_BRUSH_TYPE))
-#define PEN_AllocPenWithHandle() ((PBRUSH)GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_PEN))
+#define PEN_AllocPenWithHandle() ((PBRUSH)GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_PEN, sizeof(BRUSH)))
#define PEN_FreePen(pBMObj) GDIOBJ_FreeObj((POBJ) pBMObj, GDIObjType_BRUSH_TYPE)
#define PEN_FreePenByHandle(hBMObj) GDIOBJ_FreeObjByHandle((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_PEN)
-//#define PEN_LockPen(hBMObj) ((PBRUSH)GDIOBJ_LockObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_PEN))
-
#define PEN_AllocExtPen() ((PBRUSH)GDIOBJ_AllocObj(GDIObjType_BRUSH_TYPE))
-#define PEN_AllocExtPenWithHandle() ((PBRUSH)GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_EXTPEN))
+#define PEN_AllocExtPenWithHandle() ((PBRUSH)GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_EXTPEN, sizeof(BRUSH)))
#define PEN_FreeExtPen(pBMObj) GDIOBJ_FreeObj((POBJ) pBMObj, GDIObjType_BRUSH_TYPE)
#define PEN_FreeExtPenByHandle(hBMObj) GDIOBJ_FreeObjByHandle((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_EXTPEN)
//#define PEN_LockExtPen(hBMObj) ((PBRUSH)GDIOBJ_LockObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_EXTPEN))
-#define PEN_UnlockPen(pPenObj) GDIOBJ_UnlockObjByPtr((POBJ)pPenObj)
-
-#define PEN_ShareUnlockPen(ppen) GDIOBJ_ShareUnlockObjByPtr((POBJ)ppen)
+#define PEN_UnlockPen(pPenObj) GDIOBJ_vUnlockObject((POBJ)pPenObj)
+#define PEN_ShareUnlockPen(ppen) GDIOBJ_vDereferenceObject((POBJ)ppen)
-PBRUSH FASTCALL PEN_LockPen(HGDIOBJ);
PBRUSH FASTCALL PEN_ShareLockPen(HGDIOBJ);
INT APIENTRY PEN_GetObject(PBRUSH pPen, INT Count, PLOGPEN Buffer);
/* Header for all gdi objects in the handle table.
Do not (re)move this. */
BASEOBJECT BaseObject;
+ PRGN_ATTR prgnattr;
+ RGN_ATTR rgnattr;
RGNDATAHEADER rdh;
RECTL *Buffer;
#define REGION_FreeRgn(pRgn) GDIOBJ_FreeObj((POBJ)pRgn, GDIObjType_RGN_TYPE)
#define REGION_FreeRgnByHandle(hRgn) GDIOBJ_FreeObjByHandle((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION)
-#define REGION_LockRgn(hRgn) ((PROSRGNDATA)GDIOBJ_LockObj((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION))
-#define REGION_UnlockRgn(pRgn) GDIOBJ_UnlockObjByPtr((POBJ)pRgn)
PROSRGNDATA FASTCALL REGION_AllocRgnWithHandle(INT n);
PROSRGNDATA FASTCALL REGION_AllocUserRgnWithHandle(INT n);
VOID FASTCALL RGNOBJAPI_Unlock(PROSRGNDATA);
HRGN FASTCALL IntSysCreateRectRgn(INT,INT,INT,INT);
PROSRGNDATA FASTCALL IntSysCreateRectpRgn(INT,INT,INT,INT);
+BOOL FASTCALL IntGdiSetRegionOwner(HRGN,DWORD);
#define IntSysCreateRectRgnIndirect(prc) \
IntSysCreateRectRgn((prc)->left, (prc)->top, (prc)->right, (prc)->bottom)
#define IntSysCreateRectpRgnIndirect(prc) \
IntSysCreateRectpRgn((prc)->left, (prc)->top, (prc)->right, (prc)->bottom)
+
+PROSRGNDATA
+FASTCALL
+IntSysCreateRectpRgn(INT LeftRect, INT TopRect, INT RightRect, INT BottomRect);
+
+FORCEINLINE
+PREGION
+REGION_LockRgn(HRGN hrgn)
+{
+ return GDIOBJ_LockObject(hrgn, GDIObjType_RGN_TYPE);
+}
+
+FORCEINLINE
+VOID
+REGION_UnlockRgn(PREGION prgn)
+{
+ GDIOBJ_vUnlockObject(&prgn->BaseObject);
+}
/* Internal interface */
-#define SURFACE_AllocSurfaceWithHandle() ((PSURFACE) GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_BITMAP))
+#define SURFACE_AllocSurfaceWithHandle() ((PSURFACE) GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_BITMAP, sizeof(SURFACE)))
#define SURFACE_FreeSurface(pBMObj) GDIOBJ_FreeObj((POBJ) pBMObj, GDIObjType_SURF_TYPE)
#define SURFACE_FreeSurfaceByHandle(hBMObj) GDIOBJ_FreeObjByHandle((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP)
/* NOTE: Use shared locks! */
-#define SURFACE_LockSurface(hBMObj) \
- ((PSURFACE) GDIOBJ_LockObj ((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP))
#define SURFACE_ShareLockSurface(hBMObj) \
((PSURFACE) GDIOBJ_ShareLockObj ((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP))
#define SURFACE_UnlockSurface(pBMObj) \
- GDIOBJ_UnlockObjByPtr ((POBJ)pBMObj)
+ GDIOBJ_vUnlockObject ((POBJ)pBMObj)
#define SURFACE_ShareUnlockSurface(pBMObj) \
- GDIOBJ_ShareUnlockObjByPtr ((POBJ)pBMObj)
+ GDIOBJ_vDereferenceObject ((POBJ)pBMObj)
BOOL INTERNAL_CALL SURFACE_Cleanup(PVOID ObjectBody);
/* Internal interface */
#define TEXTOBJ_AllocText() ((PTEXTOBJ) GDIOBJ_AllocObj(GDIObjType_LFONT_TYPE))
-#define TEXTOBJ_AllocTextWithHandle() ((PTEXTOBJ) GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_FONT))
+#define TEXTOBJ_AllocTextWithHandle() ((PTEXTOBJ) GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_FONT, sizeof(TEXTOBJ)))
#define TEXTOBJ_FreeText(pBMObj) GDIOBJ_FreeObj((POBJ) pBMObj, GDILoObjType_LO_FONT_TYPE)
#define TEXTOBJ_FreeTextByHandle(hBMObj) GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_FONT)
-#define TEXTOBJ_LockText(hBMObj) ((PTEXTOBJ) GDIOBJ_LockObj ((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_FONT))
-#define TEXTOBJ_UnlockText(pBMObj) GDIOBJ_UnlockObjByPtr ((POBJ)pBMObj)
+#define TEXTOBJ_LockText(hBMObj) ((PTEXTOBJ) GDIOBJ_LockObject((HGDIOBJ) hBMObj, GDIObjType_LFONT_TYPE))
+#define TEXTOBJ_UnlockText(pBMObj) GDIOBJ_vUnlockObject ((POBJ)pBMObj)
PTEXTOBJ FASTCALL RealizeFontInit(HFONT);
NTSTATUS FASTCALL TextIntRealizeFont(HFONT,PTEXTOBJ);
LIST_ENTRY W32CallbackListHead;
SINGLE_LIST_ENTRY ReferencesList;
ULONG cExclusiveLocks;
+#if DBG
+ USHORT acExclusiveLockCount[GDIObjTypeTotal];
+#endif
} THREADINFO;
LIST_ENTRY DriverObjListHead;
struct _KBL* KeyboardLayout; // THREADINFO only
W32HEAP_USER_MAPPING HeapMappings;
+ struct _GDI_POOL *pPoolDcAttr;
+ struct _GDI_POOL *pPoolBrushAttr;
+ struct _GDI_POOL *pPoolRgnAttr;
} PROCESSINFO;
#define INIT_FUNCTION
#endif
+/* Enable debugging features */
+#define GDI_DEBUG 0
+#define DBG_ENABLE_EVENT_LOGGING 0
+#define DBG_ENABLE_SERVICE_HOOKS 0
+
/* Internal Win32k Headers */
#include <include/accelerator.h>
#include <include/clipboard.h>
Win32Process->peProcess = Process;
/* setup process flags */
Win32Process->W32PF_flags = 0;
+
+ /* Create pools for GDI object attributes */
+ Win32Process->pPoolDcAttr = GdiPoolCreate(sizeof(DC_ATTR), 'acdG');
+ Win32Process->pPoolBrushAttr = GdiPoolCreate(sizeof(BRUSH_ATTR), 'arbG');
+ Win32Process->pPoolRgnAttr = GdiPoolCreate(sizeof(RGN_ATTR), 'agrG');
+ ASSERT(Win32Process->pPoolDcAttr);
+ ASSERT(Win32Process->pPoolBrushAttr);
+ ASSERT(Win32Process->pPoolRgnAttr);
}
else
{
DPRINT("Destroying W32 process PID:%d at IRQ level: %lu\n", Process->UniqueProcessId, KeGetCurrentIrql());
Win32Process->W32PF_flags |= W32PF_TERMINATED;
+ /* Notify logon application to restart shell if needed */
+ if(Win32Process->rpdeskStartup->pDeskInfo)
+ {
+ if(Win32Process->rpdeskStartup->pDeskInfo->ppiShellProcess == Win32Process)
+ {
+ DWORD ExitCode;
+ ExitCode = PsGetProcessExitStatus(Win32Process->peProcess);
+
+ DPRINT1("Shell process is exiting (%d)\n", ExitCode);
+
+ UserPostMessage(hwndSAS,
+ WM_LOGONNOTIFY,
+ LN_SHELL_EXITED,
+ ExitCode);
+ }
+ }
+
if (Win32Process->InputIdleEvent)
{
EngFreeMem((PVOID)Win32Process->InputIdleEvent);
LogonProcess = NULL;
}
+ /* Close the startup desktop */
+ ASSERT(Win32Process->rpdeskStartup);
+ ASSERT(Win32Process->hdeskStartup);
+ ObDereferenceObject(Win32Process->rpdeskStartup);
+ ZwClose(Win32Process->hdeskStartup);
+
+ /* Close the current window station */
UserSetProcessWindowStation(NULL);
+ /* Destroy GDI pools */
+ GdiPoolDestroy(Win32Process->pPoolDcAttr);
+ GdiPoolDestroy(Win32Process->pPoolBrushAttr);
+ GdiPoolDestroy(Win32Process->pPoolRgnAttr);
}
RETURN( STATUS_SUCCESS);
HDESK hDesk = NULL;
NTSTATUS Status;
PUNICODE_STRING DesktopPath;
+ PDESKTOP pdesk;
PRTL_USER_PROCESS_PARAMETERS ProcessParams = (Process->Peb ? Process->Peb->ProcessParameters : NULL);
DPRINT("Creating W32 thread TID:%d at IRQ level: %lu\n", Thread->Cid.UniqueThread, KeGetCurrentIrql());
InitializeListHead(&Win32Thread->aphkStart[i]);
}
- /*
- * inherit the thread desktop and process window station (if not yet inherited) from the process startup
- * info structure. See documentation of CreateProcess()
- */
- DesktopPath = (ProcessParams ? ((ProcessParams->DesktopInfo.Length > 0) ? &ProcessParams->DesktopInfo : NULL) : NULL);
- Status = IntParseDesktopPath(Process,
- DesktopPath,
- &hWinSta,
- &hDesk);
- if(NT_SUCCESS(Status))
- {
- if(hWinSta != NULL)
- {
- if(!UserSetProcessWindowStation(hWinSta))
- {
- DPRINT1("Failed to set process window station\n");
- }
- }
-
- if (hDesk != NULL)
- {
- if (!IntSetThreadDesktop(hDesk, FALSE))
- {
- DPRINT1("Unable to set thread desktop\n");
- }
- }
- }
- else
- {
- DPRINT1("No Desktop handle for this Thread!\n");
- }
Win32Thread->TIF_flags &= ~TIF_INCLEANUP;
co_IntDestroyCaret(Win32Thread);
Win32Thread->ppi = PsGetCurrentProcessWin32Process();
}
Win32Thread->MessageQueue = MsqCreateMessageQueue(Thread);
Win32Thread->KeyboardLayout = W32kGetDefaultKeyLayout();
+ Win32Thread->pEThread = Thread;
+
+ /* HAAAAAAAACK! This should go to Win32kProcessCallback */
+ if(Win32Thread->ppi->hdeskStartup == NULL)
+ {
+ /*
+ * inherit the thread desktop and process window station (if not yet inherited) from the process startup
+ * info structure. See documentation of CreateProcess()
+ */
+ DesktopPath = (ProcessParams ? ((ProcessParams->DesktopInfo.Length > 0) ? &ProcessParams->DesktopInfo : NULL) : NULL);
+ Status = IntParseDesktopPath(Process,
+ DesktopPath,
+ &hWinSta,
+ &hDesk);
+ if(NT_SUCCESS(Status))
+ {
+ if(hWinSta != NULL)
+ {
+ if(!UserSetProcessWindowStation(hWinSta))
+ {
+ DPRINT1("Failed to set process window station\n");
+ }
+ }
+
+ if (hDesk != NULL)
+ {
+ /* Validate the new desktop. */
+ Status = IntValidateDesktopHandle(hDesk,
+ UserMode,
+ 0,
+ &pdesk);
+
+ if(NT_SUCCESS(Status))
+ {
+ Win32Thread->ppi->hdeskStartup = hDesk;
+ Win32Thread->ppi->rpdeskStartup = pdesk;
+ }
+ }
+ }
+ else
+ {
+ DPRINT1("No Desktop handle for this Thread!\n");
+ }
+ }
+
+ if (Win32Thread->ppi->hdeskStartup != NULL)
+ {
+ if (!IntSetThreadDesktop(Win32Thread->ppi->hdeskStartup, FALSE))
+ {
+ DPRINT1("Unable to set thread desktop\n");
+ }
+ }
+
pTeb = NtCurrentTeb();
if (pTeb)
{ /* Attempt to startup client support which should have been initialized in IntSetThreadDesktop. */
// System thread running! Now SendMessage should be okay.
Win32Thread->pcti = &Win32Thread->cti;
}
- Win32Thread->pEThread = Thread;
+ GetW32ThreadInfo();
}
else
{
/* Register our per-process and per-thread structures. */
PsEstablishWin32Callouts((PWIN32_CALLOUTS_FPNS)&CalloutData);
-#if 0 // DBG
+#if DBG_ENABLE_SERVICE_HOOKS
/* Register service hook callbacks */
KdSystemDebugControl('CsoR', DbgPreServiceHook, ID_Win32PreServiceHook, 0, 0, 0, 0);
KdSystemDebugControl('CsoR', DbgPostServiceHook, ID_Win32PostServiceHook, 0, 0, 0, 0);
{
DPRINT1("ReactX Calling : DxEngSetDCOwner \n");
- return IntGdiSetDCOwnerEx( hObject, OwnerMask, FALSE);
+ return GreSetDCOwner(hObject, OwnerMask);
}
/************************************************************************/
/* delete bitmaps */
if (bmpMask)
{
- GDIOBJ_SetOwnership(bmpMask, PsGetCurrentProcess());
+ GreSetObjectOwner(bmpMask, GDI_OBJ_HMGR_POWNED);
GreDeleteObject(bmpMask);
CurIcon->IconInfo.hbmMask = NULL;
}
if (bmpColor)
{
- GDIOBJ_SetOwnership(bmpColor, PsGetCurrentProcess());
+ GreSetObjectOwner(bmpColor, GDI_OBJ_HMGR_POWNED);
GreDeleteObject(bmpColor);
CurIcon->IconInfo.hbmColor = NULL;
}
/* Copy new IconInfo field */
CurIcon->IconInfo = IconInfo;
- psurfBmp = SURFACE_ShareLockSurface(CurIcon->IconInfo.hbmColor);
- if (psurfBmp)
+ if (CurIcon->IconInfo.hbmColor)
{
+ psurfBmp = SURFACE_ShareLockSurface(CurIcon->IconInfo.hbmColor);
+ if (!psurfBmp)
+ goto done;
+
CurIcon->Size.cx = psurfBmp->SurfObj.sizlBitmap.cx;
CurIcon->Size.cy = psurfBmp->SurfObj.sizlBitmap.cy;
SURFACE_ShareUnlockSurface(psurfBmp);
- GDIOBJ_SetOwnership(CurIcon->IconInfo.hbmColor, NULL);
+ GreSetObjectOwner(CurIcon->IconInfo.hbmColor, GDI_OBJ_HMGR_PUBLIC);
}
else
{
SURFACE_ShareUnlockSurface(psurfBmp);
}
- GDIOBJ_SetOwnership(CurIcon->IconInfo.hbmMask, NULL);
+ GreSetObjectOwner(CurIcon->IconInfo.hbmMask, GDI_OBJ_HMGR_PUBLIC);
Ret = TRUE;
CurIcon->Size.cx = psurfBmp->SurfObj.sizlBitmap.cx;
CurIcon->Size.cy = psurfBmp->SurfObj.sizlBitmap.cy;
SURFACE_UnlockSurface(psurfBmp);
- GDIOBJ_SetOwnership(GdiHandleTable, CurIcon->IconInfo.hbmMask, NULL);
+ GreSetObjectOwner(CurIcon->IconInfo.hbmMask, GDI_OBJ_HMGR_PUBLIC);
}
}
if (CurIcon->IconInfo.hbmMask)
SURFACE_UnlockSurface(psurfBmp);
}
}
- GDIOBJ_SetOwnership(GdiHandleTable, CurIcon->IconInfo.hbmMask, NULL);
+ GreSetObjectOwner(CurIcon->IconInfo.hbmMask, GDI_OBJ_HMGR_PUBLIC);
}
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
if(Ret)
{
/* This icon is shared now */
- GDIOBJ_SetOwnership(CurIcon->IconInfo.hbmMask, NULL);
+ GreSetObjectOwner(CurIcon->IconInfo.hbmMask, GDI_OBJ_HMGR_PUBLIC);
if(CurIcon->IconInfo.hbmColor)
{
- GDIOBJ_SetOwnership(CurIcon->IconInfo.hbmColor, NULL);
+ GreSetObjectOwner(CurIcon->IconInfo.hbmColor, GDI_OBJ_HMGR_PUBLIC);
}
}
UserDereferenceObject(CurIcon);
if (istepIfAniCur)
DPRINT1("NtUserDrawIconEx: istepIfAniCur is not supported!\n");
- if (!hbmMask || !IntGdiGetObject(hbmMask, sizeof(BITMAP), (PVOID)&bm))
+ if (!hbmMask || !GreGetObject(hbmMask, sizeof(BITMAP), (PVOID)&bm))
{
return FALSE;
}
- if (hbmColor && !IntGdiGetObject(hbmColor, sizeof(BITMAP), (PVOID)&bmpColor))
+ if (hbmColor && !GreGetObject(hbmColor, sizeof(BITMAP), (PVOID)&bmpColor))
{
return FALSE;
}
return lResult;
}
+LRESULT FASTCALL
+DefWndHandleSysCommand(PWND pWnd, WPARAM wParam, LPARAM lParam)
+{
+ LRESULT lResult = 0;
+ BOOL Hook = FALSE;
+
+ if (ISITHOOKED(WH_CBT) || (pWnd->head.rpdesk->pDeskInfo->fsHooks & HOOKID_TO_FLAG(WH_CBT)))
+ {
+ Hook = TRUE;
+ lResult = co_HOOK_CallHooks(WH_CBT, HCBT_SYSCOMMAND, wParam, lParam);
+
+ if (lResult) return lResult;
+ }
+
+ switch (wParam & 0xfff0)
+ {
+ case SC_SCREENSAVE:
+ DPRINT1("Screensaver Called!\n");
+ break;
+
+ default:
+ // We do not support anything else here so we should return normal even when sending a hook.
+ return 0;
+ }
+
+ return(Hook ? 1 : 0); // Don't call us again from user space.
+}
+
/*
Win32k counterpart of User DefWindowProc
*/
case WM_SYSCOMMAND:
{
DPRINT1("hwnd %p WM_SYSCOMMAND %lx %lx\n", Wnd->head.h, wParam, lParam );
- lResult = co_HOOK_CallHooks(WH_CBT, HCBT_SYSCOMMAND, wParam, lParam);
+ lResult = DefWndHandleSysCommand(Wnd, wParam, lParam);
break;
}
case WM_SHOWWINDOW:
case WM_CLIENTSHUTDOWN:
return IntClientShutdown(Wnd, wParam, lParam);
+ case WM_GETHOTKEY:
+ return DefWndGetHotKey(UserHMGetHandle(Wnd));
+ case WM_SETHOTKEY:
+ return DefWndSetHotKey(Wnd, wParam);
+
+ /* ReactOS only. */
case WM_CBT:
{
switch (wParam)
IntFreeDesktopHeap(Desktop);
}
-NTSTATUS NTAPI
+NTSTATUS NTAPI
IntDesktopOkToClose(PWIN32_OKAYTOCLOSEMETHOD_PARAMETERS Parameters)
{
PTHREADINFO pti;
{
PWND Window = NULL;
HRGN hRgn;
-
+
Window = UserGetDesktopWindow();
hRgn = IntSysCreateRectRgnIndirect(&Window->rcWindow);
RDW_ERASE |
RDW_INVALIDATE |
RDW_ALLCHILDREN);
-
- REGION_FreeRgnByHandle(hRgn);
+
+ GreDeleteObject(hRgn);
}
DPRINT("IntSetThreadDesktop() , FOF=%d\n", FreeOnFailure);
MapHeap = (PsGetCurrentProcess() != PsInitialSystemProcess);
W32Thread = PsGetCurrentThreadWin32Thread();
-
+
if(hDesktop != NULL)
{
/* Validate the new desktop. */
ObDereferenceObject(OldDesktop);
}
-
+
if (hOldDesktop != NULL)
{
ZwClose(hOldDesktop);
BOOL ret;
UserEnterExclusive();
-
+
ret = IntSetThreadDesktop(hDesktop, FALSE);
-
+
UserLeave();
-
+
return ret;
}
return STATUS_SUCCESS;
}
-
#if 0 //not used
NTSTATUS FASTCALL
CleanupHotKeys(VOID)
}
#endif
-
BOOL FASTCALL
GetHotKey (UINT fsModifiers,
UINT vk,
return FALSE;
}
-
VOID FASTCALL
UnregisterWindowHotKeys(PWND Window)
{
}
-
VOID FASTCALL
UnregisterThreadHotKeys(struct _ETHREAD *Thread)
{
}
-
static
BOOL FASTCALL
IsHotKey (UINT fsModifiers, UINT vk)
return FALSE;
}
+//
+// Get/SetHotKey message support.
+//
+UINT FASTCALL
+DefWndGetHotKey( HWND hwnd )
+{
+ PHOT_KEY_ITEM HotKeyItem;
+
+ DPRINT1("DefWndGetHotKey\n");
+
+ if (IsListEmpty(&gHotkeyList)) return 0;
+
+ LIST_FOR_EACH(HotKeyItem, &gHotkeyList, HOT_KEY_ITEM, ListEntry)
+ {
+ if ( HotKeyItem->hWnd == hwnd &&
+ HotKeyItem->id == IDHOT_REACTOS )
+ {
+ return MAKELONG(HotKeyItem->vk, HotKeyItem->fsModifiers);
+ }
+ }
+ return 0;
+}
+
+INT FASTCALL
+DefWndSetHotKey( PWND pWnd, WPARAM wParam )
+{
+ UINT fsModifiers, vk;
+ PHOT_KEY_ITEM HotKeyItem;
+ HWND hWnd;
+ BOOL HaveSameWnd = FALSE;
+ INT Ret = 1;
+
+ DPRINT1("DefWndSetHotKey wParam 0x%x\n", wParam);
+
+ // A hot key cannot be associated with a child window.
+ if (pWnd->style & WS_CHILD) return 0;
+
+ // VK_ESCAPE, VK_SPACE, and VK_TAB are invalid hot keys.
+ if ( LOWORD(wParam) == VK_ESCAPE ||
+ LOWORD(wParam) == VK_SPACE ||
+ LOWORD(wParam) == VK_TAB ) return -1;
+
+ vk = LOWORD(wParam);
+ fsModifiers = HIWORD(wParam);
+ hWnd = UserHMGetHandle(pWnd);
+ if (wParam)
+ {
+ LIST_FOR_EACH(HotKeyItem, &gHotkeyList, HOT_KEY_ITEM, ListEntry)
+ {
+ if ( HotKeyItem->fsModifiers == fsModifiers &&
+ HotKeyItem->vk == vk &&
+ HotKeyItem->id == IDHOT_REACTOS )
+ {
+ if (HotKeyItem->hWnd != hWnd)
+ Ret = 2; // Another window already has the same hot key.
+ break;
+ }
+ }
+ }
+
+ LIST_FOR_EACH(HotKeyItem, &gHotkeyList, HOT_KEY_ITEM, ListEntry)
+ {
+ if ( HotKeyItem->hWnd == hWnd &&
+ HotKeyItem->id == IDHOT_REACTOS )
+ {
+ HaveSameWnd = TRUE;
+ break;
+ }
+ }
+
+ if (HaveSameWnd)
+ {
+ if (wParam == 0)
+ { // Setting wParam to NULL removes the hot key associated with a window.
+ UnregisterWindowHotKeys(pWnd);
+ }
+ else
+ { /* A window can only have one hot key. If the window already has a hot key
+ associated with it, the new hot key replaces the old one. */
+ HotKeyItem->fsModifiers = fsModifiers;
+ HotKeyItem->vk = vk;
+ }
+ }
+ else //
+ {
+ if (wParam == 0)
+ return 1; // Do nothing, exit.
+
+ HotKeyItem = ExAllocatePoolWithTag (PagedPool, sizeof(HOT_KEY_ITEM), USERTAG_HOTKEY);
+ if (HotKeyItem == NULL)
+ {
+ return 0;
+ }
+
+ HotKeyItem->Thread = pWnd->head.pti->pEThread;
+ HotKeyItem->hWnd = hWnd;
+ HotKeyItem->id = IDHOT_REACTOS; // Don't care, these hot keys are unrelated to the hot keys set by RegisterHotKey.
+ HotKeyItem->fsModifiers = fsModifiers;
+ HotKeyItem->vk = vk;
+
+ InsertHeadList (&gHotkeyList, &HotKeyItem->ListEntry);
+ }
+ return Ret;
+}
/* SYSCALLS *****************************************************************/
co_IntKeyboardSendAltKeyMsg()
{
DPRINT1("co_IntKeyboardSendAltKeyMsg\n");
- co_MsqPostKeyboardMessage(WM_SYSCOMMAND,SC_KEYMENU,0);
+// co_MsqPostKeyboardMessage(WM_SYSCOMMAND,SC_KEYMENU,0); This sends everything into a msg loop!
}
static VOID APIENTRY
if (ModifierState & MOD_ALT)
{
- lParam |= (1 << 29);
+ lParam |= (1 << 29); // wine -> (HIWORD(lParam) & KEYDATA_ALT) #define KEYDATA_ALT 0x2000
if (!(KeyInput.Flags & KEY_BREAK))
msg.message = WM_SYSKEYDOWN;
if (ki->dwFlags & KEYEVENTF_KEYUP)
{
Msg.message = WM_KEYUP;
- if ((gQueueKeyStateTable[VK_MENU] & 0x80) &&
+ if (((gQueueKeyStateTable[VK_MENU] & 0x80) &&
((wVkStripped == VK_MENU) || (wVkStripped == VK_CONTROL)
|| !(gQueueKeyStateTable[VK_CONTROL] & 0x80)))
+ || (wVkStripped == VK_F10))
{
if( TrackSysKey == VK_MENU || /* <ALT>-down/<ALT>-up sequence */
(wVkStripped != VK_MENU)) /* <ALT>-down...<something else>-up */
else
{
Msg.message = WM_KEYDOWN;
- if ((gQueueKeyStateTable[VK_MENU] & 0x80 || wVkStripped == VK_MENU) &&
+ if (((gQueueKeyStateTable[VK_MENU] & 0x80 || wVkStripped == VK_MENU) &&
!(gQueueKeyStateTable[VK_CONTROL] & 0x80 || wVkStripped == VK_CONTROL))
+ || (wVkStripped == VK_F10))
{
Msg.message = WM_SYSKEYDOWN;
TrackSysKey = wVkStripped;
/* send a WM_NCPAINT and WM_ERASEBKGND if the non-client area is still invalid */
HRGN hrgn = IntSysCreateRectRgn( 0, 0, 0, 0 );
co_UserGetUpdateRgn( Window, hrgn, TRUE );
- REGION_FreeRgnByHandle( hrgn );
+ GreDeleteObject(hrgn);
}
return retval;
}
/* Now check for normal messages. */
- if ((ProcessMask & QS_POSTMESSAGE) &&
+ if (( (ProcessMask & QS_POSTMESSAGE) ||
+ (ProcessMask & QS_HOTKEY) ) &&
MsqPeekMessage( ThreadQueue,
RemoveMessages,
Window,
RETURN( FALSE);
}
- ObReferenceObject(Win32Thread->pEThread);
Result = (ULONG_PTR)co_IntCallWindowProc( Window->lpfnWndProc,
!Window->Unicode,
hWnd,
*uResult = Result;
}
- ObDereferenceObject(Win32Thread->pEThread);
-
IntCallWndProcRet( Window, hWnd, Msg, wParam, lParam, (LRESULT *)uResult);
if (! NT_SUCCESS(UnpackParam(lParamPacked, Msg, wParam, lParam, FALSE)))
IntCallWndProc( Window, hWnd, Msg, wParam, lParam);
- ObReferenceObject(Win32Thread->pEThread);
Result = (ULONG_PTR)co_IntCallWindowProc( Window->lpfnWndProc,
!Window->Unicode,
hWnd,
{
*uResult = Result;
}
- ObDereferenceObject(Win32Thread->pEThread);
IntCallWndProcRet( Window, hWnd, Msg, wParam, lParam, (LRESULT *)uResult);
}
IntReferenceMessageQueue(Window->head.pti->MessageQueue);
- /* Take reference on this MessageQueue if its a callback. It will be released
+ /* Take reference on this MessageQueue if its a callback. It will be released
when message is processed or removed from target hwnd MessageQueue */
if (CompletionCallback)
IntReferenceMessageQueue(Win32Thread->MessageQueue);
}
Monitor->Prev = p;
}
-
+
IntUpdateMonitorSize(pGdiDevice);
return STATUS_SUCCESS;
}
if (Monitor->hrgnMonitor)
- REGION_FreeRgnByHandle(Monitor->hrgnMonitor);
+ GreDeleteObject(Monitor->hrgnMonitor);
IntDestroyMonitorObject(Monitor);
if (Monitor->hrgnMonitor)
{
- GDIOBJ_SetOwnership(Monitor->hrgnMonitor, PsGetCurrentProcess());
- REGION_FreeRgnByHandle(Monitor->hrgnMonitor);
+ GreSetObjectOwner(Monitor->hrgnMonitor, GDI_OBJ_HMGR_POWNED);
+ GreDeleteObject(Monitor->hrgnMonitor);
}
Monitor->hrgnMonitor = IntSysCreateRectRgnIndirect( &Monitor->rcMonitor );
if (monitorRectList != NULL)
monitorRectList[iCount] = IntersectionRect;
}
-
+
/* Increase count of found monitors */
iCount++;
}
return hMonitor;
}
- hMonitorList = ExAllocatePoolWithTag(PagedPool,
+ hMonitorList = ExAllocatePoolWithTag(PagedPool,
sizeof(HMONITOR) * numMonitors,
USERTAG_MONITORRECTS);
if (hMonitorList == NULL)
if( key < 0x100 )
{
- ret = ((DWORD)(MessageQueue->KeyState[key] & KS_DOWN_BIT) << 8 ) |
- (MessageQueue->KeyState[key] & KS_LOCK_BIT);
+ ret = (DWORD)MessageQueue->KeyState[key];
+ if (MessageQueue->KeyState[key] & KS_DOWN_BIT)
+ ret |= 0xFF00; // If down, windows returns 0xFF80.
}
return ret;
/* change the input key state for a given key */
static void set_input_key_state( PUSER_MESSAGE_QUEUE MessageQueue, UCHAR key, BOOL down )
{
+ DPRINT("set_input_key_state key:%d, down:%d\n", key, down);
+
if (down)
{
- if (!(MessageQueue->KeyState[key] & KS_DOWN_BIT))
+ if (!(MessageQueue->KeyState[key] & KS_DOWN_BIT))
{
MessageQueue->KeyState[key] ^= KS_LOCK_BIT;
}
UCHAR key;
BOOL down = 0;
+ DPRINT("update_input_key_state message:%d\n", msg->message);
+
switch (msg->message)
{
case WM_LBUTTONDOWN:
down = 1;
/* fall through */
case WM_XBUTTONUP:
- if (msg->wParam == XBUTTON1)
+ if (msg->wParam == XBUTTON1)
set_input_key_state( MessageQueue, VK_XBUTTON1, down );
- else if (msg->wParam == XBUTTON2)
+ else if (msg->wParam == XBUTTON2)
set_input_key_state( MessageQueue, VK_XBUTTON2, down );
break;
case WM_KEYDOWN:
pti = Queue->Thread->Tcb.Win32Thread;
if (MessageBits & QS_KEY)
- {
+ {
if (--Queue->nCntsQBits[QSRosKey] == 0) ClrMask |= QS_KEY;
}
if (MessageBits & QS_MOUSEMOVE) // ReactOS hard coded.
if(Msg->hwnd != NULL)
{
pwnd = UserGetWindowObject(Msg->hwnd);
- if ((pwnd->style & WS_VISIBLE) &&
+ if ((pwnd->style & WS_VISIBLE) &&
IntPtInWindow(pwnd, Msg->pt.x, Msg->pt.y))
{
pDesk->htEx = HTCLIENT;
continue;
}
- if((pwnd->style & WS_VISIBLE) &&
+ if((pwnd->style & WS_VISIBLE) &&
IntPtInWindow(pwnd, Msg->pt.x, Msg->pt.y))
{
Msg->hwnd = pwnd->head.h;
MSG Mesg;
LARGE_INTEGER LargeTickCount;
NTSTATUS Status;
+ INT id;
+ DWORD Type;
Status = ObReferenceObjectByPointer (Thread,
THREAD_ALL_ACCESS,
return;
}
- Mesg.hwnd = hWnd;
- Mesg.message = WM_HOTKEY;
- Mesg.wParam = wParam;
- Mesg.lParam = lParam;
+ id = wParam; // Check for hot keys unrelated to the hot keys set by RegisterHotKey.
+
+ Mesg.hwnd = hWnd;
+ Mesg.message = id != IDHOT_REACTOS ? WM_HOTKEY : WM_SYSCOMMAND;
+ Mesg.wParam = id != IDHOT_REACTOS ? wParam : SC_HOTKEY;
+ Mesg.lParam = id != IDHOT_REACTOS ? lParam : (LPARAM)hWnd;
+ Type = id != IDHOT_REACTOS ? QS_HOTKEY : QS_POSTMESSAGE;
KeQueryTickCount(&LargeTickCount);
- Mesg.time = MsqCalculateMessageTime(&LargeTickCount);
- Mesg.pt = gpsi->ptCursor;
- MsqPostMessage(Window->head.pti->MessageQueue, &Mesg, FALSE, QS_HOTKEY);
+ Mesg.time = MsqCalculateMessageTime(&LargeTickCount);
+ Mesg.pt = gpsi->ptCursor;
+ MsqPostMessage(Window->head.pti->MessageQueue, &Mesg, FALSE, Type);
UserDereferenceObject(Window);
ObDereferenceObject (Thread);
{
PUSER_SENT_MESSAGE SaveMsg, Message;
PLIST_ENTRY Entry;
- LRESULT Result;
PTHREADINFO pti;
+ LRESULT Result = 0;
if (IsListEmpty(&MessageQueue->SentMessagesListHead))
{
ptirec = MessageQueue->Thread->Tcb.Win32Thread;
ASSERT(ThreadQueue != MessageQueue);
ASSERT(ptirec->pcti); // Send must have a client side to receive it!!!!
-
+
+ /* Don't send from or to a dying thread */
+ if (pti->TIF_flags & TIF_INCLEANUP || ptirec->TIF_flags & TIF_INCLEANUP)
+ {
+ *uResult = -1;
+ return STATUS_TIMEOUT;
+ }
+
Timeout.QuadPart = (LONGLONG) uTimeout * (LONGLONG) -10000;
/* FIXME - increase reference counter of sender's message queue here */
{
InsertTailList(&MessageQueue->HardwareMessagesListHead,
&Message->ListEntry);
+
+ update_input_key_state( MessageQueue, Msg );
}
Message->QS_Flags = MessageBits;
if (pwndParent == pwndDesktop) break;
pt.x += pwnd->rcClient.left - pwndParent->rcClient.left;
pt.y += pwnd->rcClient.top - pwndParent->rcClient.top;
-
+
pwnd = pwndParent;
co_IntSendMessage( UserHMGetHandle(pwnd), WM_PARENTNOTIFY,
MAKEWPARAM( event, idChild ), MAKELPARAM( pt.x, pt.y ) );
}
DPRINT("Got mouse message for 0x%x, hittest: 0x%x\n", msg->hwnd, hittest );
-
+
if (pwndMsg == NULL || pwndMsg->head.pti != pti)
{
/* Remove and ignore the message */
}
}
- if (!((first == 0 && last == 0) || (message >= first || message <= last)))
+ if (!((first == 0 && last == 0) || (message >= first || message <= last)))
{
DPRINT("Message out of range!!!\n");
RETURN(FALSE);
if (pwndTop && pwndTop != pwndDesktop)
{
- LONG ret = co_IntSendMessage( msg->hwnd,
- WM_MOUSEACTIVATE,
+ LONG ret = co_IntSendMessage( msg->hwnd,
+ WM_MOUSEACTIVATE,
(WPARAM)UserHMGetHandle(pwndTop),
MAKELONG( hittest, msg->message));
switch(ret)
case VK_LMENU: case VK_RMENU:
Msg->wParam = VK_MENU;
break;
+ case VK_F10:
+ if (Msg->message == WM_KEYUP) Msg->message = WM_SYSKEYUP;
+ if (Msg->message == WM_KEYDOWN) Msg->message = WM_SYSKEYDOWN;
+ break;
}
}
CurrentMessage = CONTAINING_RECORD(CurrentEntry, USER_MESSAGE,
ListEntry);
- do
+ do
{
if (IsListEmpty(CurrentEntry)) break;
if (!CurrentMessage) break;
if (Remove)
{
- update_input_key_state(MessageQueue, pMsg);
+ update_input_key_state(MessageQueue, &msg);
RemoveEntryList(&CurrentMessage->ListEntry);
- ClearMsgBitsMask(MessageQueue, QS_INPUT);
+ ClearMsgBitsMask(MessageQueue, CurrentMessage->QS_Flags);
MsqDestroyMessage(CurrentMessage);
}
PLIST_ENTRY CurrentEntry;
PUSER_MESSAGE CurrentMessage;
PLIST_ENTRY ListHead;
-
+
CurrentEntry = MessageQueue->PostedMessagesListHead.Flink;
ListHead = &MessageQueue->PostedMessagesListHead;
if (Remove)
{
RemoveEntryList(&CurrentMessage->ListEntry);
- ClearMsgBitsMask(MessageQueue, QS_POSTMESSAGE);
+ ClearMsgBitsMask(MessageQueue, CurrentMessage->QS_Flags);
MsqDestroyMessage(CurrentMessage);
}
return(TRUE);
ret = KeWaitForSingleObject( MessageQueue->NewMessages,
UserRequest,
UserMode,
- FALSE,
+ FALSE,
NULL );
UserEnterCo();
return ret;
PUSER_MESSAGE CurrentMessage;
PUSER_SENT_MESSAGE CurrentSentMessage;
PTHREADINFO pti;
-
+
pti = MessageQueue->Thread->Tcb.Win32Thread;
DPRINT("Notify the sender and remove a message from the queue that had not been dispatched\n");
/* Only if the message has a sender was the message in the DispatchingList */
- if ((CurrentSentMessage->SenderQueue)
+ if ((CurrentSentMessage->SenderQueue)
&& (CurrentSentMessage->DispatchingListEntry.Flink != NULL))
{
RemoveEntryList(&CurrentSentMessage->DispatchingListEntry);
if (Ret)
{
UserSendNotifyMessage(HWND_BROADCAST, WM_SYSCOLORCHANGE, 0, 0);
+
+ UserRedrawDesktop();
}
UserLeave();
hRgnWindow = IntCalcWindowRgn(Window, TRUE);
if (hRgnWindow == NULL)
{
- REGION_FreeRgnByHandle(hRgnNonClient);
+ GreDeleteObject(hRgnNonClient);
return HRGN_WINDOW;
}
hRgnWindow, RGN_DIFF);
if (RgnType == ERROR)
{
- REGION_FreeRgnByHandle(hRgnWindow);
- REGION_FreeRgnByHandle(hRgnNonClient);
+ GreDeleteObject(hRgnWindow);
+ GreDeleteObject(hRgnNonClient);
return HRGN_WINDOW;
}
else if (RgnType == NULLREGION)
{
- REGION_FreeRgnByHandle(hRgnWindow);
- REGION_FreeRgnByHandle(hRgnNonClient);
+ GreDeleteObject(hRgnWindow);
+ GreDeleteObject(hRgnNonClient);
return NULL;
}
hRgnWindow, RGN_AND) == NULLREGION)
{
IntGdiSetRegionOwner(Window->hrgnUpdate, GDI_OBJ_HMGR_POWNED);
- REGION_FreeRgnByHandle(Window->hrgnUpdate);
+ GreDeleteObject(Window->hrgnUpdate);
Window->hrgnUpdate = NULL;
if (!(Window->state & WNDS_INTERNALPAINT))
MsqDecPaintCountQueue(Window->head.pti->MessageQueue);
}
}
- REGION_FreeRgnByHandle(hRgnWindow);
+ GreDeleteObject(hRgnWindow);
return hRgnNonClient;
}
MsqDecPaintCountQueue(Wnd->head.pti->MessageQueue);
co_IntSendMessage(hWnd, WM_NCPAINT, (WPARAM)TempRegion, 0);
- if ( (HANDLE) 1 != TempRegion &&
- NULL != TempRegion)
- {
- /* NOTE: The region can already be deleted! */
- GDIOBJ_FreeObjByHandle(TempRegion, GDI_OBJECT_TYPE_REGION | GDI_OBJECT_TYPE_SILENT);
- }
}
- if (Wnd->state & WNDS_ERASEBACKGROUND)
+ if (Wnd->state & WNDS_SENDERASEBACKGROUND)
{
if (Wnd->hrgnUpdate)
{
Wnd->hrgnUpdate,
DCX_CACHE|DCX_USESTYLE|DCX_INTERSECTRGN|DCX_KEEPCLIPRGN);
- if (co_IntSendMessage(hWnd, WM_ERASEBKGND, (WPARAM)hDC, 0))
+ Wnd->state &= ~(WNDS_SENDERASEBACKGROUND|WNDS_ERASEBACKGROUND);
+ // Kill the loop, so Clear before we send.
+ if (!co_IntSendMessage(hWnd, WM_ERASEBKGND, (WPARAM)hDC, 0))
{
- Wnd->state &= ~WNDS_ERASEBACKGROUND;
+ Wnd->state |= (WNDS_SENDERASEBACKGROUND|WNDS_ERASEBACKGROUND);
}
UserReleaseDC(Wnd, hDC, FALSE);
}
hRgnClient = IntSysCreateRectRgnIndirect(&Wnd->rcClient);
RgnType = NtGdiCombineRgn(hRgn, hRgn, hRgnClient, RGN_AND);
- REGION_FreeRgnByHandle(hRgnClient);
+ GreDeleteObject(hRgnClient);
}
/*
hRgnWindow = IntSysCreateRectRgnIndirect(&Wnd->rcWindow);
RgnType = NtGdiCombineRgn(hRgn, hRgn, hRgnWindow, RGN_AND);
- REGION_FreeRgnByHandle(hRgnWindow);
+ GreDeleteObject(hRgnWindow);
}
else
{
hRgn, RGN_OR) == NULLREGION)
{
IntGdiSetRegionOwner(Wnd->hrgnUpdate, GDI_OBJ_HMGR_POWNED);
- REGION_FreeRgnByHandle(Wnd->hrgnUpdate);
+ GreDeleteObject(Wnd->hrgnUpdate);
Wnd->hrgnUpdate = NULL;
}
if (Flags & RDW_FRAME)
Wnd->state |= WNDS_SENDNCPAINT;
if (Flags & RDW_ERASE)
- Wnd->state |= WNDS_ERASEBACKGROUND;
+ Wnd->state |= WNDS_SENDERASEBACKGROUND;
Flags |= RDW_FRAME;
}
hRgn, RGN_DIFF) == NULLREGION)
{
IntGdiSetRegionOwner(Wnd->hrgnUpdate, GDI_OBJ_HMGR_POWNED);
- REGION_FreeRgnByHandle(Wnd->hrgnUpdate);
+ GreDeleteObject(Wnd->hrgnUpdate);
Wnd->hrgnUpdate = NULL;
}
}
if (Wnd->hrgnUpdate == NULL)
- Wnd->state &= ~WNDS_ERASEBACKGROUND;
+ Wnd->state &= ~(WNDS_SENDERASEBACKGROUND|WNDS_ERASEBACKGROUND);
if (Flags & RDW_NOFRAME)
Wnd->state &= ~WNDS_SENDNCPAINT;
if (Flags & RDW_NOERASE)
- Wnd->state &= ~WNDS_ERASEBACKGROUND;
+ Wnd->state &= ~(WNDS_SENDERASEBACKGROUND|WNDS_ERASEBACKGROUND);
}
if (Flags & RDW_INTERNALPAINT)
HRGN hRgnTemp = IntSysCreateRectRgn(0, 0, 0, 0);
NtGdiCombineRgn(hRgnTemp, hRgn, 0, RGN_COPY);
IntInvalidateWindows(Child, hRgnTemp, Flags);
- REGION_FreeRgnByHandle(hRgnTemp);
+ GreDeleteObject(hRgnTemp);
}
}
hRgn = IntSysCreateRectRgn(0, 0, 0, 0);
if (NtGdiCombineRgn(hRgn, UpdateRgn, NULL, RGN_COPY) == NULLREGION)
{
- REGION_FreeRgnByHandle(hRgn);
+ GreDeleteObject(hRgn);
hRgn = NULL;
}
else
if (hRgn != NULL)
{
- REGION_FreeRgnByHandle(hRgn);
+ GreDeleteObject(hRgn);
}
DPRINT("co_UserRedrawWindow exit\n");
Window->state &= ~WNDS_SENDNCPAINT;
MsqDecPaintCountQueue(Window->head.pti->MessageQueue);
co_IntSendMessage(hWnd, WM_NCPAINT, (WPARAM)hRgn, 0);
- if (hRgn != (HANDLE)1 && hRgn != NULL)
+ if (hRgn != HRGN_WINDOW && hRgn != NULL && GreIsHandleValid(hRgn))
{
/* NOTE: The region can already by deleted! */
- GDIOBJ_FreeObjByHandle(hRgn, GDI_OBJECT_TYPE_REGION | GDI_OBJECT_TYPE_SILENT);
+ GreDeleteObject(hRgn);
}
}
Window->state &= ~WNDS_INTERNALPAINT;
- if (Window->state & WNDS_ERASEBACKGROUND)
+ if (Window->state & WNDS_SENDERASEBACKGROUND)
{
- Window->state &= ~WNDS_ERASEBACKGROUND;
+ Window->state &= ~(WNDS_SENDERASEBACKGROUND|WNDS_ERASEBACKGROUND);
Ps.fErase = !co_IntSendMessage(hWnd, WM_ERASEBKGND, (WPARAM)Ps.hdc, 0);
+ if ( Ps.fErase )
+ {
+ Window->state |= (WNDS_SENDERASEBACKGROUND|WNDS_ERASEBACKGROUND);
+ }
}
else
{
could not be copied, because it was not visible */
if (hrgnUpdate || prcUpdate)
{
- HRGN hrgnOwn, hrgnVisible, hrgnTmp;
+ HRGN hrgnOwn, hrgnTmp;
+ PREGION prgnTmp;
pDC = DC_LockDc(hDC);
if (!pDC)
{
return FALSE;
}
- hrgnVisible = ((PROSRGNDATA)pDC->prgnVis)->BaseObject.hHmgr; // pDC->prgnRao?
/* Begin with the shifted and then clipped scroll rect */
rcDst = rcScroll;
NtGdiCombineRgn(hrgnOwn, hrgnOwn, hrgnTmp, RGN_OR);
/* Substract the part of the dest that was visible in source */
- NtGdiCombineRgn(hrgnTmp, hrgnTmp, hrgnVisible, RGN_AND);
+ prgnTmp = RGNOBJAPI_Lock(hrgnTmp, NULL);
+ IntGdiCombineRgn(prgnTmp, prgnTmp, pDC->prgnVis, RGN_AND);
+ RGNOBJAPI_Unlock(prgnTmp);
NtGdiOffsetRgn(hrgnTmp, dx, dy);
Result = NtGdiCombineRgn(hrgnOwn, hrgnOwn, hrgnTmp, RGN_DIFF);
/* DO NOT Unlock DC while messing with prgnVis! */
DC_UnlockDc(pDC);
- REGION_FreeRgnByHandle(hrgnTmp);
+ GreDeleteObject(hrgnTmp);
if (prcUpdate)
{
if (!hrgnUpdate)
{
- REGION_FreeRgnByHandle(hrgnOwn);
+ GreDeleteObject(hrgnOwn);
}
}
else
NtGdiOffsetRgn(hrgnTemp, dx, dy);
NtGdiCombineRgn(hrgnTemp, hrgnTemp, hrgnClip, RGN_AND);
co_UserRedrawWindow(Window, NULL, hrgnTemp, RDW_INVALIDATE | RDW_ERASE);
- REGION_FreeRgnByHandle(hrgnClip);
+ GreDeleteObject(hrgnClip);
}
- REGION_FreeRgnByHandle(hrgnTemp);
+ GreDeleteObject(hrgnTemp);
if (flags & SW_SCROLLCHILDREN)
{
CLEANUP:
if (hrgnOwn && !hrgnUpdate)
{
- REGION_FreeRgnByHandle(hrgnOwn);
+ GreDeleteObject(hrgnOwn);
}
if (Window)
SURFACE_ShareUnlockSurface(psurfBmp);
/* Change the bitmap's ownership */
- GDIOBJ_SetOwnership(hbmp, NULL);
+ GreSetObjectOwner(hbmp, GDI_OBJ_HMGR_PUBLIC);
/* Yes, Windows really loads the current setting from the registry. */
ulTile = SpiLoadInt(KEY_DESKTOP, L"TileWallpaper", 0);
if(hOldBitmap != NULL)
{
/* Delete the old wallpaper */
- GDIOBJ_SetOwnership(hOldBitmap, PsGetCurrentProcess());
+ GreSetObjectOwner(hOldBitmap, GDI_OBJ_HMGR_POWNED);
GreDeleteObject(hOldBitmap);
}
CurrentWindow->state & WNDS_DESTROYED )
{
DPRINT1("ATM the Current Window or Parent is dead!\n");
- if (VisRgn) REGION_FreeRgnByHandle(VisRgn);
+ if (VisRgn) GreDeleteObject(VisRgn);
return NULL;
}
if (!(CurrentWindow->style & WS_VISIBLE))
{
- if (VisRgn) REGION_FreeRgnByHandle(VisRgn);
+ if (VisRgn) GreDeleteObject(VisRgn);
return NULL;
}
ClipRgn = IntSysCreateRectRgnIndirect(&CurrentWindow->rcClient);
NtGdiCombineRgn(VisRgn, VisRgn, ClipRgn, RGN_AND);
- REGION_FreeRgnByHandle(ClipRgn);
+ GreDeleteObject(ClipRgn);
if ((PreviousWindow->style & WS_CLIPSIBLINGS) ||
(PreviousWindow == Wnd && ClipSiblings))
{
CurrentSibling = CurrentWindow->spwndChild;
- while ( CurrentSibling != NULL &&
+ while ( CurrentSibling != NULL &&
CurrentSibling != PreviousWindow )
{
if ((CurrentSibling->style & WS_VISIBLE) &&
NtGdiOffsetRgn(ClipRgn, CurrentSibling->rcWindow.left, CurrentSibling->rcWindow.top);
}
NtGdiCombineRgn(VisRgn, VisRgn, ClipRgn, RGN_DIFF);
- REGION_FreeRgnByHandle(ClipRgn);
+ GreDeleteObject(ClipRgn);
}
CurrentSibling = CurrentSibling->spwndNext;
}
NtGdiOffsetRgn(ClipRgn, CurrentWindow->rcWindow.left, CurrentWindow->rcWindow.top);
}
NtGdiCombineRgn(VisRgn, VisRgn, ClipRgn, RGN_DIFF);
- REGION_FreeRgnByHandle(ClipRgn);
+ GreDeleteObject(ClipRgn);
}
CurrentWindow = CurrentWindow->spwndNext;
}
RDW_ALLCHILDREN);
UserDerefObjectCo(Parent);
}
- REGION_FreeRgnByHandle(Temp);
+ GreDeleteObject(Temp);
}
/* EOF */
if (hDC && !defaultDCstate) // Ultra HAX! Dedicated to GvG!
{ // This is a cheesy way to do this.
PDC dc = DC_LockDc ( hDC );
+ ASSERT(dc);
defaultDCstate = ExAllocatePoolWithTag(PagedPool, sizeof(DC), TAG_DC);
RtlZeroMemory(defaultDCstate, sizeof(DC));
defaultDCstate->pdcattr = &defaultDCstate->dcattr;
else
{
DPRINT("FREE DCATTR!!!! NOT DCE_WINDOW_DC!!!!! hDC-> %x\n", pDce->hDC);
- IntGdiSetDCOwnerEx( pDce->hDC, GDI_OBJ_HMGR_NONE, FALSE);
+ GreSetDCOwner(pDce->hDC, GDI_OBJ_HMGR_NONE);
pDce->ptiOwner = NULL;
}
}
else if (Dce->hrgnClip != NULL)
{
- GDIOBJ_FreeObjByHandle(Dce->hrgnClip, GDI_OBJECT_TYPE_REGION|GDI_OBJECT_TYPE_SILENT);
+ GreDeleteObject(Dce->hrgnClip);
}
Dce->hrgnClip = NULL;
}
dce->DCXFlags &= ~DCX_DCEBUSY;
DPRINT("Exit!!!!! DCX_CACHE!!!!!! hDC-> %x \n", dce->hDC);
- if (!IntGdiSetDCOwnerEx( dce->hDC, GDI_OBJ_HMGR_NONE, FALSE))
+ if (!GreSetDCOwner(dce->hDC, GDI_OBJ_HMGR_NONE))
return 0;
dce->ptiOwner = NULL; // Reset ownership.
dce->ppiOwner = NULL;
{
if(hRgnVisible != NULL)
{
- REGION_FreeRgnByHandle(hRgnVisible);
+ GreDeleteObject(hRgnVisible);
}
hRgnVisible = IntSysCreateRectRgn(0, 0, 0, 0);
}
if (hRgnVisible != NULL)
{
- REGION_FreeRgnByHandle(hRgnVisible);
+ GreDeleteObject(hRgnVisible);
}
}
return(NULL);
}
- if (!GDIOBJ_ValidateHandle(Dce->hDC, GDI_OBJECT_TYPE_DC))
+ if (!GreIsHandleValid(Dce->hDC))
{
DPRINT1("FIXME: Got DCE with invalid hDC! 0x%x\n", Dce->hDC);
Dce->hDC = DceCreateDisplayDC();
if (Dce->hrgnClip != NULL)
{
DPRINT1("Should not be called!!\n");
- GDIOBJ_FreeObjByHandle(Dce->hrgnClip, GDI_OBJECT_TYPE_REGION|GDI_OBJECT_TYPE_SILENT);
+ GreDeleteObject(Dce->hrgnClip);
Dce->hrgnClip = NULL;
}
Dce->hrgnClip = ClipRegion;
{
DPRINT("ENTER!!!!!! DCX_CACHE!!!!!! hDC-> %x\n", Dce->hDC);
// Need to set ownership so Sync dcattr will work.
- IntGdiSetDCOwnerEx( Dce->hDC, GDI_OBJ_HMGR_POWNED, FALSE);
+ GreSetDCOwner(Dce->hDC, GDI_OBJ_HMGR_POWNED);
Dce->ptiOwner = GetW32ThreadInfo(); // Set the temp owning
}
pdce->DCXFlags |= DCX_INDESTROY;
- if (Force && !GDIOBJ_OwnedByCurrentProcess(pdce->hDC))
+ if (Force &&
+ GreGetObjectOwner(pdce->hDC) != GDI_OBJ_HMGR_POWNED)
{
DPRINT("Change ownership for DCE! -> %x\n" , pdce);
// Note: Windows sets W32PF_OWNDCCLEANUP and moves on.
- if (!IsObjectDead((HGDIOBJ) pdce->hDC))
+ if (GreIsHandleValid(pdce->hDC))
{
- DC_SetOwnership( pdce->hDC, PsGetCurrentProcess());
+ GreSetDCOwner(pdce->hDC, GDI_OBJ_HMGR_POWNED);
}
else
{
}
else
{
- if (!GreGetObjectOwner(pdce->hDC, GDIObjType_DC_TYPE))
- DC_SetOwnership( pdce->hDC, PsGetCurrentProcess());
+ if (GreGetObjectOwner(pdce->hDC) == GDI_OBJ_HMGR_PUBLIC)
+ GreSetDCOwner(pdce->hDC, GDI_OBJ_HMGR_POWNED);
}
if (!Hit) IntGdiDeleteDC(pdce->hDC, TRUE);
if (pdce->hrgnClip && !(pdce->DCXFlags & DCX_KEEPCLIPRGN))
{
- GDIOBJ_FreeObjByHandle(pdce->hrgnClip, GDI_OBJECT_TYPE_REGION|GDI_OBJECT_TYPE_SILENT);
+ GreDeleteObject(pdce->hrgnClip);
pdce->hrgnClip = NULL;
}
pDCE->hwndCurrent = 0;
DPRINT("POWNED DCE going Cheap!! DCX_CACHE!! hDC-> %x \n", pDCE->hDC);
- if (!IntGdiSetDCOwnerEx( pDCE->hDC, GDI_OBJ_HMGR_NONE, FALSE))
+ if (!GreSetDCOwner( pDCE->hDC, GDI_OBJ_HMGR_NONE))
{
DPRINT1("Fail Owner Switch hDC-> %x \n", pDCE->hDC);
break;
}
pLE = LEDce.Flink;
pDCE = CONTAINING_RECORD(pLE, DCE, List);
- if(!pDCE) return; // Another null test!
+
do
{
if(!pDCE) break;
}
}
- if (!GDIOBJ_ValidateHandle(pDCE->hDC, GDI_OBJECT_TYPE_DC) ||
+ if (!GreIsHandleValid(pDCE->hDC) ||
(dc = DC_LockDc(pDCE->hDC)) == NULL)
{
pLE = pDCE->List.Flink;
/* temp hack */
PWND FASTCALL UserGetWindowObject(HWND hWnd)
{
- PTHREADINFO ti;
- PWND Window;
-
- if (PsGetCurrentProcess() != PsInitialSystemProcess)
- {
- ti = GetW32ThreadInfo();
- if (ti == NULL)
- {
- EngSetLastError(ERROR_ACCESS_DENIED);
- return NULL;
- }
- }
+ PWND Window;
if (!hWnd)
{
}
pWnd->style |= WS_DISABLED;
}
-
+
if (Update)
{
IntNotifyWinEvent(EVENT_OBJECT_STATECHANGE, pWnd, OBJID_WINDOW, CHILDID_SELF, 0);
if(Window->hrgnClip)
{
+ IntGdiSetRegionOwner(Window->hrgnClip, GDI_OBJ_HMGR_POWNED);
GreDeleteObject(Window->hrgnClip);
Window->hrgnClip = NULL;
}
PRTL_USER_PROCESS_PARAMETERS ProcessParams;
pMonitor = IntGetPrimaryMonitor();
- ASSERT(pMonitor);
+
+ /* Check if we don't have a monitor attached yet */
+ if(pMonitor == NULL)
+ {
+ Cs->x = Cs->y = 0;
+ Cs->cx = 800;
+ Cs->cy = 600;
+ return;
+ }
ProcessParams = PsGetCurrentProcess()->Peb->ProcessParameters;
hwndInsertAfter = HWND_TOP;
UserRefObjectCo(Window, &Ref);
+ UserDereferenceObject(Window);
ObDereferenceObject(WinSta);
//// Check for a hook to eliminate overhead. ////
if (Window)
{
UserDerefObjectCo(Window);
- UserDereferenceObject(Window);
}
if (ParentWindow) UserDerefObjectCo(ParentWindow);
-
+
return ret;
}
WinStaObject->ShellListView = hwndListView;
ti = GetW32ThreadInfo();
- if (ti->pDeskInfo) ti->pDeskInfo->hShellWindow = hwndShell;
+ if (ti->pDeskInfo)
+ {
+ ti->pDeskInfo->hShellWindow = hwndShell;
+ ti->pDeskInfo->ppiShellProcess = ti->ppi;
+ }
UserDerefObjectCo(WndShell);
{
/* Nothing to copy, clean up */
RGNOBJAPI_Unlock(VisRgn);
- REGION_FreeRgnByHandle(CopyRgn);
+ GreDeleteObject(CopyRgn);
CopyRgn = NULL;
}
else if (OldWindowRect.left != NewWindowRect.left ||
RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
}
}
- REGION_FreeRgnByHandle(DirtyRgn);
+ GreDeleteObject(DirtyRgn);
}
if (CopyRgn != NULL)
{
- REGION_FreeRgnByHandle(CopyRgn);
+ GreDeleteObject(CopyRgn);
}
/* Expose what was covered before but not covered anymore */
{
co_VIS_WindowLayoutChanged(Window, ExposedRgn);
}
- REGION_FreeRgnByHandle(ExposedRgn);
- REGION_FreeRgnByHandle(VisBefore);
+ GreDeleteObject(ExposedRgn);
+ GreDeleteObject(VisBefore);
}
if (VisAfter != NULL)
{
- REGION_FreeRgnByHandle(VisAfter);
+ GreDeleteObject(VisAfter);
}
if (!(WinPos.flags & SWP_NOACTIVATE))
// HRGN VisibleRgn;
ASSERT_REFS_CO(Wnd);
-
+
WasVisible = (Wnd->style & WS_VISIBLE) != 0;
switch (Cmd)
UserDereferenceObject(ScopeWin);
return NULL;
}
-
+
return ScopeWin;
}
SWP_HIDEWINDOW | SWP_FRAMECHANGED))
{
EngSetLastError(ERROR_INVALID_PARAMETER);
- return NULL;
+ return NULL;
}
if (!(pDWP = (PSMWP)UserGetObject(gHandleTable, hdwp, otSMWP)))
pDWP->acvr[pDWP->ccvr].pos.cx = cx;
pDWP->acvr[pDWP->ccvr].pos.cy = cy;
pDWP->acvr[pDWP->ccvr].pos.flags = flags;
- pDWP->acvr[pDWP->ccvr].hrgnClip = NULL;
+ pDWP->acvr[pDWP->ccvr].hrgnClip = NULL;
pDWP->acvr[pDWP->ccvr].hrgnInterMonitor = NULL;
pDWP->ccvr++;
END:
if ( WndInsertAfter &&
WndInsertAfter != HWND_BOTTOM &&
- WndInsertAfter != HWND_TOPMOST &&
+ WndInsertAfter != HWND_TOPMOST &&
WndInsertAfter != HWND_NOTOPMOST )
{
pWndIA = UserGetWindowObject(WndInsertAfter);
Exit:
DPRINT("Leave NtUserDeferWindowPos, ret=%i\n", Ret);
UserLeave();
- return Ret;
+ return Ret;
}
/*
if ( hWndInsertAfter &&
hWndInsertAfter != HWND_BOTTOM &&
- hWndInsertAfter != HWND_TOPMOST &&
+ hWndInsertAfter != HWND_TOPMOST &&
hWndInsertAfter != HWND_NOTOPMOST )
{
pWndIA = UserGetWindowObject(hWndInsertAfter);
if (hRgn) // The region will be deleted in user32.
{
- if (GDIOBJ_ValidateHandle(hRgn, GDI_OBJECT_TYPE_REGION))
+ if (GreIsHandleValid(hRgn))
{
hrgnCopy = IntSysCreateRectRgn(0, 0, 0, 0);
if (Window->hrgnClip)
{
/* Delete no longer needed region handle */
+ IntGdiSetRegionOwner(Window->hrgnClip, GDI_OBJ_HMGR_POWNED);
GreDeleteObject(Window->hrgnClip);
}
EngSetLastError(ERROR_INVALID_PARAMETER);
RETURN(FALSE);
}
-
+
UserRefObjectCo(Window, &Ref);
ret = co_WinPosShowWindow(Window, nCmdShow);
UserDerefObjectCo(Window);
return STATUS_OBJECT_TYPE_MISMATCH;
}
-NTSTATUS NTAPI
+NTSTATUS NTAPI
IntWinstaOkToClose(PWIN32_OKAYTOCLOSEMETHOD_PARAMETERS Parameters)
{
PPROCESSINFO ppi;
IntDestroyPrimarySurface();
return FALSE;
}
- IntGdiSetDCOwnerEx(ScreenDeviceContext, GDI_OBJ_HMGR_PUBLIC, FALSE);
+ GreSetDCOwner(ScreenDeviceContext, GDI_OBJ_HMGR_PUBLIC);
/* Setup the cursor */
co_IntLoadDefaultCursors();
hSystemBM = NtGdiCreateCompatibleDC(ScreenDeviceContext);
- NtGdiSelectFont( hSystemBM, NtGdiGetStockObject(SYSTEM_FONT));
- IntGdiSetDCOwnerEx( hSystemBM, GDI_OBJ_HMGR_PUBLIC, FALSE);
+ NtGdiSelectFont(hSystemBM, NtGdiGetStockObject(SYSTEM_FONT));
+ GreSetDCOwner(hSystemBM, GDI_OBJ_HMGR_PUBLIC);
// FIXME! Move these to a update routine.
gpsi->Planes = NtGdiGetDeviceCaps(ScreenDeviceContext, PLANES);
{
if (NULL != ScreenDeviceContext)
{ // No need to allocate a new dcattr.
- DC_SetOwnership(ScreenDeviceContext, PsGetCurrentProcess());
- NtGdiDeleteObjectApp(ScreenDeviceContext);
+ GreSetDCOwner(ScreenDeviceContext, GDI_OBJ_HMGR_POWNED);
+ GreDeleteObject(ScreenDeviceContext);
ScreenDeviceContext = NULL;
}
IntHideDesktop(IntGetActiveDesktop());
/*
* No existing window station found, try to create new one
*/
-
+
/* Capture window station name */
_SEH2_TRY
{
DPRINT("Closing window station handle (0x%X)\n", hWinSta);
- Status = ZwClose(hWinSta);
+ Status = ObCloseHandle(hWinSta, UserMode);
if (!NT_SUCCESS(Status))
{
SetLastNtError(Status);
ppi = PsGetCurrentProcessWin32Process();
+ /* Reference the new window station */
if(hWindowStation !=NULL)
{
Status = IntValidateWindowStationHandle( hWindowStation,
}
OldWinSta = ppi->prpwinsta;
- hwinstaOld = ppi->hwinsta;
-
- /*
- * FIXME - don't allow changing the window station if there are threads that are attached to desktops and own gui objects
- */
-
- InterlockedExchangePointer(&PsGetCurrentProcess()->Win32WindowStation, hWindowStation);
-
- ppi->prpwinsta = NewWinSta;
- ppi->hwinsta = hWindowStation;
-
+ hwinstaOld = PsGetProcessWin32WindowStation(ppi->peProcess);
+ /* Dereference the previous window station */
if(OldWinSta != NULL)
{
ObDereferenceObject(OldWinSta);
}
- if(hwinstaOld != NULL)
+ /* Check if we have a stale handle (it should happen for console apps) */
+ if(hwinstaOld != ppi->hwinsta)
{
- ZwClose(hwinstaOld);
+ ObCloseHandle(hwinstaOld, UserMode);
}
+ /*
+ * FIXME - don't allow changing the window station if there are threads that are attached to desktops and own gui objects
+ */
+
+ PsSetProcessWindowStation(ppi->peProcess, hWindowStation);
+
+ ppi->prpwinsta = NewWinSta;
+ ppi->hwinsta = hWindowStation;
+
return TRUE;
}
{
PDC_ATTR pdcattr;
RECTL RectBounds, RectSEpts;
- PBRUSH pbrushPen;
+ PBRUSH pbrPen;
SURFACE *psurf;
BOOL ret = TRUE;
LONG PenWidth, PenOrigWidth;
pdcattr = dc->pdcattr;
- pbrushPen = PEN_LockPen(pdcattr->hpen);
- if (!pbrushPen)
+ pbrPen = PEN_ShareLockPen(pdcattr->hpen);
+ if (!pbrPen)
{
DPRINT1("Arc Fail 1\n");
EngSetLastError(ERROR_INTERNAL_ERROR);
return FALSE;
}
- PenOrigWidth = PenWidth = pbrushPen->ptPenWidth.x;
- if (pbrushPen->ulPenStyle == PS_NULL) PenWidth = 0;
+ PenOrigWidth = PenWidth = pbrPen->ptPenWidth.x;
+ if (pbrPen->ulPenStyle == PS_NULL) PenWidth = 0;
- if (pbrushPen->ulPenStyle == PS_INSIDEFRAME)
+ if (pbrPen->ulPenStyle == PS_INSIDEFRAME)
{
if (2*PenWidth > (Right - Left)) PenWidth = (Right -Left + 1)/2;
if (2*PenWidth > (Bottom - Top)) PenWidth = (Bottom -Top + 1)/2;
}
if (!PenWidth) PenWidth = 1;
- pbrushPen->ptPenWidth.x = PenWidth;
+ pbrPen->ptPenWidth.x = PenWidth;
RectBounds.left = Left;
RectBounds.right = Right;
AngleStart,
AngleEnd,
arctype,
- pbrushPen);
+ pbrPen);
psurf = dc->dclevel.pSurface;
if (NULL == psurf)
{
DPRINT1("Arc Fail 2\n");
- PEN_UnlockPen(pbrushPen);
+ PEN_ShareUnlockPen(pbrPen);
EngSetLastError(ERROR_INTERNAL_ERROR);
return FALSE;
}
if (arctype == GdiTypeChord)
PUTLINE(EfCx + CenterX, EfCy + CenterY, SfCx + CenterX, SfCy + CenterY, dc->eboLine);
- pbrushPen->ptPenWidth.x = PenOrigWidth;
- PEN_UnlockPen(pbrushPen);
+ pbrPen->ptPenWidth.x = PenOrigWidth;
+ PEN_ShareUnlockPen(pbrPen);
DPRINT("IntArc Exit.\n");
return ret;
}
DPRINT("Locking DCs\n");
ahDC[0] = hDCDest;
ahDC[1] = hDCSrc ;
- GDIOBJ_LockMultipleObjs(2, ahDC, apObj);
- DCDest = apObj[0];
- DCSrc = apObj[1];
-
- if ((NULL == DCDest) || (NULL == DCSrc))
+ if (!GDIOBJ_bLockMultipleObjects(2, ahDC, apObj, GDIObjType_DC_TYPE))
{
DPRINT1("Invalid dc handle (dest=0x%08x, src=0x%08x) passed to NtGdiAlphaBlend\n", hDCDest, hDCSrc);
EngSetLastError(ERROR_INVALID_HANDLE);
- if(DCSrc) GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject);
- if(DCDest) GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject);
return FALSE;
}
+ DCDest = apObj[0];
+ DCSrc = apObj[1];
if (DCDest->dctype == DC_TYPE_INFO || DCDest->dctype == DCTYPE_INFO)
{
- GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject);
- GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject);
+ GDIOBJ_vUnlockObject(&DCSrc->BaseObject);
+ GDIOBJ_vUnlockObject(&DCDest->BaseObject);
/* Yes, Windows really returns TRUE in this case */
return TRUE;
}
!SourceRect.right ||
!SourceRect.bottom)
{
- GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject);
- GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject);
+ GDIOBJ_vUnlockObject(&DCSrc->BaseObject);
+ GDIOBJ_vUnlockObject(&DCDest->BaseObject);
return TRUE;
}
leave :
DPRINT("Finishing blit\n");
DC_vFinishBlit(DCDest, DCSrc);
- GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject);
- GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject);
+ GDIOBJ_vUnlockObject(&DCSrc->BaseObject);
+ GDIOBJ_vUnlockObject(&DCDest->BaseObject);
return bResult;
}
DPRINT("Locking DCs\n");
ahDC[0] = hdcDst;
ahDC[1] = hdcSrc ;
- GDIOBJ_LockMultipleObjs(2, ahDC, apObj);
- DCDest = apObj[0];
- DCSrc = apObj[1];
-
- if ((NULL == DCDest) || (NULL == DCSrc))
+ if (!GDIOBJ_bLockMultipleObjects(2, ahDC, apObj, GDIObjType_DC_TYPE))
{
DPRINT1("Invalid dc handle (dest=0x%08x, src=0x%08x) passed to NtGdiAlphaBlend\n", hdcDst, hdcSrc);
EngSetLastError(ERROR_INVALID_HANDLE);
- if(DCSrc) GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject);
- if(DCDest) GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject);
return FALSE;
}
+ DCDest = apObj[0];
+ DCSrc = apObj[1];
if (DCDest->dctype == DC_TYPE_INFO || DCDest->dctype == DCTYPE_INFO)
{
- GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject);
- GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject);
+ GDIOBJ_vUnlockObject(&DCSrc->BaseObject);
+ GDIOBJ_vUnlockObject(&DCDest->BaseObject);
/* Yes, Windows really returns TRUE in this case */
return TRUE;
}
done:
DC_vFinishBlit(DCDest, DCSrc);
- GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject);
- GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject);
+ GDIOBJ_vUnlockObject(&DCDest->BaseObject);
+ GDIOBJ_vUnlockObject(&DCSrc->BaseObject);
return Ret;
}
UsesMask = ROP_USES_MASK(dwRop);
//DPRINT1("dwRop : 0x%08x\n", dwRop);
+ if (!hdcDest || (UsesSource && !hdcSrc))
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
/* Take care of mask bitmap */
if(hbmMask)
{
- psurfMask = SURFACE_LockSurface(hbmMask);
+ psurfMask = SURFACE_ShareLockSurface(hbmMask);
if(!psurfMask)
{
EngSetLastError(ERROR_INVALID_HANDLE);
if(gajBitsPerFormat[psurfMask->SurfObj.iBitmapFormat] != 1)
{
EngSetLastError(ERROR_INVALID_PARAMETER);
- SURFACE_UnlockSurface(psurfMask);
+ SURFACE_ShareUnlockSurface(psurfMask);
return FALSE;
}
}
else if(psurfMask)
{
DPRINT1("Getting Mask bitmap without needing it?\n");
- SURFACE_UnlockSurface(psurfMask);
+ SURFACE_ShareUnlockSurface(psurfMask);
psurfMask = NULL;
}
MaskPoint.x = xMask;
/* Take care of source and destination bitmap */
DPRINT("Locking DCs\n");
ahDC[0] = hdcDest;
- ahDC[1] = hdcSrc ;
- GDIOBJ_LockMultipleObjs(2, ahDC, apObj);
+ ahDC[1] = UsesSource ? hdcSrc : NULL;
+ if (!GDIOBJ_bLockMultipleObjects(2, ahDC, apObj, GDIObjType_DC_TYPE))
+ {
+ DPRINT1("Invalid dc handle (dest=0x%08x, src=0x%08x) passed to NtGdiAlphaBlend\n", hdcDest, hdcSrc);
+ EngSetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
DCDest = apObj[0];
DCSrc = apObj[1];
+ ASSERT(DCDest);
if (NULL == DCDest)
{
if(DCSrc) DC_UnlockDc(DCSrc);
if (UsesSource)
{
- if (NULL == DCSrc)
- {
- DC_UnlockDc(DCDest);
- DPRINT("Invalid source dc handle (0x%08x) passed to NtGdiBitBlt\n", hdcSrc);
- return FALSE;
- }
+ ASSERT(DCSrc);
if (DCSrc->dctype == DC_TYPE_INFO)
{
DC_UnlockDc(DCDest);
return TRUE;
}
}
- else if(DCSrc)
- {
- DPRINT("Getting a valid Source handle without using source!!!\n");
- DC_UnlockDc(DCSrc);
- DCSrc = NULL ;
- }
pdcattr = DCDest->pdcattr;
DC_UnlockDc(DCSrc);
}
DC_UnlockDc(DCDest);
- if(psurfMask) SURFACE_UnlockSurface(psurfMask);
+ if(psurfMask) SURFACE_ShareUnlockSurface(psurfMask);
return Status;
}
EXLATEOBJ exlo;
XLATEOBJ *XlateObj = NULL;
POINTL BrushOrigin;
- BOOL UsesSource = ROP_USES_SOURCE(ROP);
+ BOOL UsesSource;
+ BOOL UsesMask;
FIXUP_ROP(ROP);
+ UsesSource = ROP_USES_SOURCE(ROP);
+ UsesMask = ROP_USES_MASK(ROP);
if (0 == WidthDest || 0 == HeightDest || 0 == WidthSrc || 0 == HeightSrc)
{
return FALSE;
}
- DPRINT("Locking DCs\n");
- ahDC[0] = hDCDest;
- ahDC[1] = hDCSrc ;
- ahDC[2] = hDCMask ;
- GDIOBJ_LockMultipleObjs(3, ahDC, apObj);
- DCDest = apObj[0];
- DCSrc = apObj[1];
- DCMask = apObj[2];
+ if (!hDCDest || (UsesSource && !hDCSrc) || (UsesMask && !hDCMask))
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
- if (NULL == DCDest)
+ ahDC[0] = hDCDest;
+ ahDC[1] = UsesSource ? hDCSrc : NULL;
+ ahDC[2] = UsesMask ? hDCMask : NULL;
+ if (!GDIOBJ_bLockMultipleObjects(3, ahDC, apObj, GDIObjType_DC_TYPE))
{
- if(DCSrc) GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject);
- if(DCMask) GDIOBJ_UnlockObjByPtr(&DCMask->BaseObject);
- DPRINT("Invalid destination dc handle (0x%08x) passed to NtGdiBitBlt\n", hDCDest);
+ DPRINT1("Invalid dc handle (dest=0x%08x, src=0x%08x) passed to NtGdiAlphaBlend\n", hDCDest, hDCSrc);
+ EngSetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
+ DCDest = apObj[0];
+ DCSrc = apObj[1];
+ DCMask = apObj[2];
if (DCDest->dctype == DC_TYPE_INFO)
{
- if(DCSrc) GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject);
- if(DCMask) GDIOBJ_UnlockObjByPtr(&DCMask->BaseObject);
- GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject);
+ if(DCSrc) GDIOBJ_vUnlockObject(&DCSrc->BaseObject);
+ if(DCMask) GDIOBJ_vUnlockObject(&DCMask->BaseObject);
+ GDIOBJ_vUnlockObject(&DCDest->BaseObject);
/* Yes, Windows really returns TRUE in this case */
return TRUE;
}
if (UsesSource)
{
- if (NULL == DCSrc)
- {
- GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject);
- if(DCMask) GDIOBJ_UnlockObjByPtr(&DCMask->BaseObject);
- DPRINT("Invalid source dc handle (0x%08x) passed to NtGdiBitBlt\n", hDCSrc);
- return FALSE;
- }
if (DCSrc->dctype == DC_TYPE_INFO)
{
- GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject);
- GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject);
- if(DCMask) GDIOBJ_UnlockObjByPtr(&DCMask->BaseObject);
+ GDIOBJ_vUnlockObject(&DCDest->BaseObject);
+ GDIOBJ_vUnlockObject(&DCSrc->BaseObject);
+ if(DCMask) GDIOBJ_vUnlockObject(&DCMask->BaseObject);
/* Yes, Windows really returns TRUE in this case */
return TRUE;
}
}
- else if(DCSrc)
- {
- DPRINT1("Getting a valid Source handle without using source!!!\n");
- GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject);
- DCSrc = NULL ;
- }
pdcattr = DCDest->pdcattr;
for (i = 0; i < cRects; i++)
{
- pbrush = BRUSH_LockBrush(pRects->hBrush);
+ pbrush = BRUSH_ShareLockBrush(pRects->hBrush);
if(pbrush != NULL)
{
IntPatBlt(
pRects->r.bottom,
dwRop,
pbrush);
- BRUSH_UnlockBrush(pbrush);
+ BRUSH_ShareUnlockBrush(pbrush);
}
pRects++;
}
if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY))
DC_vUpdateFillBrush(dc);
- pbrush = BRUSH_LockBrush(pdcattr->hbrush);
+ pbrush = BRUSH_ShareLockBrush(pdcattr->hbrush);
if (pbrush == NULL)
{
EngSetLastError(ERROR_INVALID_HANDLE);
ret = IntPatBlt(dc, XLeft, YLeft, Width, Height, ROP, pbrush);
- BRUSH_UnlockBrush(pbrush);
+ BRUSH_ShareUnlockBrush(pbrush);
DC_UnlockDc(dc);
return ret;
if (!pvBits)
{
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
- SURFACE_FreeSurfaceByHandle(hbmp);
+ GDIOBJ_vDeleteObject(&psurf->BaseObject);
return NULL;
}
DecompressBitmap(sizl, pvCompressedBits, pvBits, lDelta, iFormat);
/* Bail out if that failed */
DPRINT1("SURFACE_bSetBitmapBits failed.\n");
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
- SURFACE_FreeSurfaceByHandle(hbmp);
+ GDIOBJ_vDeleteObject(&psurf->BaseObject);
return NULL;
}
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- SURFACE_UnlockSurface(psurf);
- SURFACE_FreeSurfaceByHandle(hbmp);
+ GDIOBJ_vDeleteObject(&psurf->BaseObject);
_SEH2_YIELD(return NULL;)
}
_SEH2_END
ASSERT(psurfBmp);
/* Assign palette */
psurfBmp->ppal = psurf->ppal;
- GDIOBJ_IncrementShareCount((POBJ)psurf->ppal);
+ GDIOBJ_vReferenceObjectByPointer((POBJ)psurf->ppal);
/* Set flags */
psurfBmp->flags = API_BITMAP;
psurfBmp->hdc = NULL; // Fixme
return 0;
}
- PalGDI = PALETTE_ShareLockPalette(psurf->ppal->BaseObject.hHmgr);
+ PalGDI = psurf->ppal;
for (Index = 0;
Index < 256 && Index < PalGDI->NumColors;
bi->bmiColors[Index].rgbBlue = PalGDI->IndexedColors[Index].peBlue;
bi->bmiColors[Index].rgbReserved = 0;
}
- PALETTE_ShareUnlockPalette(PalGDI);
}
Bmp = DIB_CreateDIBSection(Dc,
if (resBitmap)
{
IntSetBitmapBits(resBitmap, Bitmap->SurfObj.cjBits, Bitmap->SurfObj.pvBits);
- GDIOBJ_IncrementShareCount(&Bitmap->ppal->BaseObject);
- GDIOBJ_ShareUnlockObjByPtr(&resBitmap->ppal->BaseObject);
+ GDIOBJ_vReferenceObjectByPointer(&Bitmap->ppal->BaseObject);
+ GDIOBJ_vDereferenceObject(&resBitmap->ppal->BaseObject);
resBitmap->ppal = Bitmap->ppal;
SURFACE_ShareUnlockSurface(resBitmap);
}
{0x7E, 0xBD, 0xDB, 0xE7, 0xE7, 0xDB, 0xBD, 0x7E} /* HS_DIAGCROSS */
};
-
-PVOID
+BOOL
FASTCALL
-AllocateObjectAttr(VOID)
+IntGdiSetBrushOwner(PBRUSH pbr, ULONG ulOwner)
{
- PTHREADINFO pti;
- PPROCESSINFO ppi;
- PVOID pAttr;
- PGDI_OBJ_ATTR_FREELIST pGdiObjAttrFreeList;
- PGDI_OBJ_ATTR_ENTRY pGdiObjAttrEntry;
- int i;
-
- pti = PsGetCurrentThreadWin32Thread();
- if (pti->pgdiBrushAttr)
- {
- pAttr = pti->pgdiBrushAttr; // Get the free one.
- pti->pgdiBrushAttr = NULL;
- return pAttr;
- }
-
- ppi = PsGetCurrentProcessWin32Process();
-
- if (!ppi->pBrushAttrList) // If set point is null, allocate new group.
- {
- pGdiObjAttrEntry = EngAllocUserMem(sizeof(GDI_OBJ_ATTR_ENTRY), 0);
-
- if (!pGdiObjAttrEntry)
- {
- DPRINT1("Attr Failed User Allocation!\n");
- return NULL;
- }
-
- DPRINT("AllocObjectAttr User 0x%x\n",pGdiObjAttrEntry);
+ // FIXME:
+ if (pbr->flAttrs & GDIBRUSH_IS_GLOBAL) return TRUE;
- pGdiObjAttrFreeList = ExAllocatePoolWithTag( PagedPool,
- sizeof(GDI_OBJ_ATTR_FREELIST),
- GDITAG_BRUSH_FREELIST);
- if ( !pGdiObjAttrFreeList )
- {
- EngFreeUserMem(pGdiObjAttrEntry);
- return NULL;
- }
-
- RtlZeroMemory(pGdiObjAttrFreeList, sizeof(GDI_OBJ_ATTR_FREELIST));
-
- DPRINT("AllocObjectAttr Ex 0x%x\n",pGdiObjAttrFreeList);
+ if ((ulOwner == GDI_OBJ_HMGR_PUBLIC) || ulOwner == GDI_OBJ_HMGR_NONE)
+ {
+ // Deny user access to User Data.
+ GDIOBJ_vSetObjectAttr(&pbr->BaseObject, NULL);
+ // FIXME: deallocate brush attr
+ }
- InsertHeadList( &ppi->GDIBrushAttrFreeList, &pGdiObjAttrFreeList->Entry);
+ if (ulOwner == GDI_OBJ_HMGR_POWNED)
+ {
+ // Allow user access to User Data.
+ GDIOBJ_vSetObjectAttr(&pbr->BaseObject, pbr->pBrushAttr);
+ // FIXME: allocate brush attr
+ }
- pGdiObjAttrFreeList->nEntries = GDIOBJATTRFREE;
- // Start at the bottom up and set end of free list point.
- ppi->pBrushAttrList = &pGdiObjAttrEntry->Attr[GDIOBJATTRFREE-1];
- // Build the free attr list.
- for ( i = 0; i < GDIOBJATTRFREE; i++)
- {
- pGdiObjAttrFreeList->AttrList[i] = &pGdiObjAttrEntry->Attr[i];
- }
- }
+ GDIOBJ_vSetObjectOwner(&pbr->BaseObject, ulOwner);
- pAttr = ppi->pBrushAttrList;
- pGdiObjAttrFreeList = (PGDI_OBJ_ATTR_FREELIST)ppi->GDIBrushAttrFreeList.Flink;
+ return TRUE;
+}
- // Free the list when it is full!
- if ( pGdiObjAttrFreeList->nEntries-- == 1)
- { // No more free entries, so yank the list.
- RemoveEntryList( &pGdiObjAttrFreeList->Entry );
+BOOL
+NTAPI
+BRUSH_bAllocBrushAttr(PBRUSH pbr)
+{
+ PPROCESSINFO ppi;
+ BRUSH_ATTR *pBrushAttr;
- ExFreePoolWithTag( pGdiObjAttrFreeList, GDITAG_BRUSH_FREELIST );
+ ppi = PsGetCurrentProcessWin32Process();
+ ASSERT(ppi);
- if ( IsListEmpty( &ppi->GDIBrushAttrFreeList ) )
- {
- ppi->pBrushAttrList = NULL;
- return pAttr;
- }
+ pBrushAttr = GdiPoolAllocate(ppi->pPoolDcAttr);
+ if (!pBrushAttr)
+ {
+ DPRINT1("Could not allocate brush attr\n");
+ return FALSE;
+ }
- pGdiObjAttrFreeList = (PGDI_OBJ_ATTR_FREELIST)ppi->GDIBrushAttrFreeList.Flink;
- }
+ /* Copy the content from the kernel mode dc attr */
+ pbr->pBrushAttr = pBrushAttr;
+ *pbr->pBrushAttr = pbr->BrushAttr;
- ppi->pBrushAttrList = pGdiObjAttrFreeList->AttrList[pGdiObjAttrFreeList->nEntries-1];
+ /* Set the object attribute in the handle table */
+ GDIOBJ_vSetObjectAttr(&pbr->BaseObject, pBrushAttr);
- return pAttr;
+ DPRINT("BRUSH_bAllocBrushAttr: pbr=%p, pbr->pdcattr=%p\n", pbr, pbr->pBrushAttr);
+ return TRUE;
}
-VOID
-FASTCALL
-FreeObjectAttr(PVOID pAttr)
-{
- PTHREADINFO pti;
- PPROCESSINFO ppi;
- PGDI_OBJ_ATTR_FREELIST pGdiObjAttrFreeList;
-
- pti = PsGetCurrentThreadWin32Thread();
-
- if (!pti) return;
-
- if (!pti->pgdiBrushAttr)
- { // If it is null, just cache it for the next time.
- pti->pgdiBrushAttr = pAttr;
- return;
- }
-
- ppi = PsGetCurrentProcessWin32Process();
-
- pGdiObjAttrFreeList = (PGDI_OBJ_ATTR_FREELIST)ppi->GDIBrushAttrFreeList.Flink;
-
- // We add to the list of free entries, so this will grows!
- if ( IsListEmpty(&ppi->GDIBrushAttrFreeList) ||
- pGdiObjAttrFreeList->nEntries == GDIOBJATTRFREE )
- {
- pGdiObjAttrFreeList = ExAllocatePoolWithTag( PagedPool,
- sizeof(GDI_OBJ_ATTR_FREELIST),
- GDITAG_BRUSH_FREELIST);
- if ( !pGdiObjAttrFreeList )
- {
- return;
- }
- InsertHeadList( &ppi->GDIBrushAttrFreeList, &pGdiObjAttrFreeList->Entry);
- pGdiObjAttrFreeList->nEntries = 0;
- }
- // Up count, save the entry and set end of free list point.
- ++pGdiObjAttrFreeList->nEntries; // Top Down...
- pGdiObjAttrFreeList->AttrList[pGdiObjAttrFreeList->nEntries-1] = pAttr;
- ppi->pBrushAttrList = pAttr;
-
- return;
-}
-BOOL
-FASTCALL
-IntGdiSetBrushOwner(PBRUSH pbr, DWORD OwnerMask)
+VOID
+NTAPI
+BRUSH_vFreeBrushAttr(PBRUSH pbr)
{
- HBRUSH hBR;
- PEPROCESS Owner = NULL;
- PGDI_TABLE_ENTRY pEntry = NULL;
-
- if (!pbr) return FALSE;
-
- hBR = pbr->BaseObject.hHmgr;
-
- if (!hBR || (GDI_HANDLE_GET_TYPE(hBR) != GDI_OBJECT_TYPE_BRUSH))
- return FALSE;
- else
- {
- INT Index = GDI_HANDLE_GET_INDEX((HGDIOBJ)hBR);
- pEntry = &GdiHandleTable->Entries[Index];
- }
-
- if (pbr->flAttrs & GDIBRUSH_IS_GLOBAL)
- {
- GDIOBJ_ShareUnlockObjByPtr((POBJ)pbr);
- return TRUE;
- }
-
- if ((OwnerMask == GDI_OBJ_HMGR_PUBLIC) || OwnerMask == GDI_OBJ_HMGR_NONE)
- {
- // Set this Brush to inaccessible mode and to an Owner of NONE.
-// if (OwnerMask == GDI_OBJ_HMGR_NONE) Owner = OwnerMask;
-
- if (!GDIOBJ_SetOwnership((HGDIOBJ) hBR, Owner))
- return FALSE;
+#if 0
+ PPROCESSINFO ppi;
- // Deny user access to User Data.
- pEntry->UserData = NULL; // This hBR is inaccessible!
- }
+ if (pbrush->pBrushAttr == &pbrush->BrushAttr) return;
- if (OwnerMask == GDI_OBJ_HMGR_POWNED)
- {
- if (!GDIOBJ_SetOwnership((HGDIOBJ) hBR, PsGetCurrentProcess() ))
- return FALSE;
+ /* Reset the object attribute in the handle table */
+ GDIOBJ_vSetObjectAttr(&pbr->BaseObject, NULL);
- // Allow user access to User Data.
- pEntry->UserData = pbr->pBrushAttr;
- }
- return TRUE;
+ /* Free memory from the process gdi pool */
+ ppi = PsGetCurrentProcessWin32Process();
+ ASSERT(ppi);
+ GdiPoolFree(ppi->pPoolBrushAttr, pbr->pBrushAttr);
+#endif
+ /* Reset to kmode brush attribute */
+ pbr->pBrushAttr = &pbr->BrushAttr;
}
BOOL
if (pbrush->flAttrs & (GDIBRUSH_IS_HATCH | GDIBRUSH_IS_BITMAP))
{
ASSERT(pbrush->hbmPattern);
- GDIOBJ_SetOwnership(pbrush->hbmPattern, PsGetCurrentProcess());
+ GreSetObjectOwner(pbrush->hbmPattern, GDI_OBJ_HMGR_POWNED);
GreDeleteObject(pbrush->hbmPattern);
}
+ /* Check if there is a usermode attribute */
+ if (pbrush->pBrushAttr != &pbrush->BrushAttr)
+ {
+ BRUSH_vFreeBrushAttr(pbrush);
+ }
+
/* Free the kmode styles array of EXTPENS */
if (pbrush->pStyle)
{
pbrush->hbmPattern = hPattern;
/* FIXME: Fill in the rest of fields!!! */
- GDIOBJ_SetOwnership(hPattern, NULL);
+ GreSetObjectOwner(hPattern, GDI_OBJ_HMGR_PUBLIC);
- BRUSH_UnlockBrush(pbrush);
+ GDIOBJ_vUnlockObject(&pbrush->BaseObject);
return hBrush;
}
pbrush->hbmPattern = hPattern;
pbrush->BrushAttr.lbColor = Color & 0xFFFFFF;
- GDIOBJ_SetOwnership(hPattern, NULL);
+ GreSetObjectOwner(hPattern, GDI_OBJ_HMGR_PUBLIC);
- BRUSH_UnlockBrush(pbrush);
+ GDIOBJ_vUnlockObject(&pbrush->BaseObject);
return hBrush;
}
pbrush->hbmPattern = hPattern;
/* FIXME: Fill in the rest of fields!!! */
- GDIOBJ_SetOwnership(hPattern, NULL);
+ GreSetObjectOwner(hPattern, GDI_OBJ_HMGR_PUBLIC);
- BRUSH_UnlockBrush(pbrush);
+ GDIOBJ_vUnlockObject(&pbrush->BaseObject);
return hBrush;
}
pbrush->BrushAttr.lbColor = Color & 0x00FFFFFF;
/* FIXME: Fill in the rest of fields!!! */
- BRUSH_UnlockBrush(pbrush);
+ GDIOBJ_vUnlockObject(&pbrush->BaseObject);
return hBrush;
}
hBrush = pbrush->BaseObject.hHmgr;
pbrush->flAttrs |= GDIBRUSH_IS_NULL;
- BRUSH_UnlockBrush(pbrush);
+ GDIOBJ_vUnlockObject(&pbrush->BaseObject);
return hBrush;
}
{
PBRUSH pbrush;
- pbrush = BRUSH_LockBrush(hBrush);
+ pbrush = BRUSH_ShareLockBrush(hBrush);
if (pbrush->flAttrs & GDIBRUSH_IS_SOLID)
{
pbrush->BrushAttr.lbColor = Color & 0xFFFFFF;
}
- BRUSH_UnlockBrush(pbrush);
+ BRUSH_ShareUnlockBrush(pbrush);
}
{
PROSRGNDATA CombinedRegion;
HRGN hRgnVis;
+ PREGION prgnClip, prgnGCClip;
// would prefer this, but the rest of the code sucks
// ASSERT(Dc->rosdc.hGCClipRgn);
if (Dc->rosdc.hGCClipRgn == NULL)
Dc->rosdc.hGCClipRgn = IntSysCreateRectRgn(0, 0, 0, 0);
+ prgnGCClip = REGION_LockRgn(Dc->rosdc.hGCClipRgn);
+ ASSERT(prgnGCClip);
+
if (Dc->rosdc.hClipRgn == NULL)
- NtGdiCombineRgn(Dc->rosdc.hGCClipRgn, hRgnVis, 0, RGN_COPY);
+ IntGdiCombineRgn(prgnGCClip, Dc->prgnVis, NULL, RGN_COPY);
else
- NtGdiCombineRgn(Dc->rosdc.hGCClipRgn, Dc->rosdc.hClipRgn, hRgnVis, RGN_AND);
+ {
+ prgnClip = REGION_LockRgn(Dc->rosdc.hClipRgn); // FIXME: locking order, ugh
+ IntGdiCombineRgn(prgnGCClip, Dc->prgnVis, prgnClip, RGN_AND);
+ REGION_UnlockRgn(prgnClip);
+ }
+ REGION_UnlockRgn(prgnGCClip);
NtGdiOffsetRgn(Dc->rosdc.hGCClipRgn, Dc->ptlDCOrig.x, Dc->ptlDCOrig.y);
{
int retval;
DC *dc;
+ PREGION prgn;
if (!hrgn)
{
ASSERT (dc->prgnVis != NULL);
- retval = NtGdiCombineRgn(dc->prgnVis->BaseObject.hHmgr, hrgn, 0, RGN_COPY);
+ prgn = RGNOBJAPI_Lock(hrgn, NULL);
+ retval = prgn ? IntGdiCombineRgn(dc->prgnVis, prgn, NULL, RGN_COPY) : ERROR;
+ RGNOBJAPI_Unlock(prgn);
if ( retval != ERROR )
{
- NtGdiOffsetRgn(dc->prgnVis->BaseObject.hHmgr, -dc->ptlDCOrig.x, -dc->ptlDCOrig.y);
+ IntGdiOffsetRgn(dc->prgnVis, -dc->ptlDCOrig.x, -dc->ptlDCOrig.y);
CLIPPING_UpdateGCRegion(dc);
}
DC_UnlockDc(dc);
{
if (dc->rosdc.hClipRgn != NULL)
{
- REGION_FreeRgnByHandle(dc->rosdc.hClipRgn);
+ GreDeleteObject(dc->rosdc.hClipRgn);
dc->rosdc.hClipRgn = NULL;
}
}
retval = REGION_GetRgnBox(pRgnNew, rc);
- REGION_FreeRgnByHandle(pRgnNew->BaseObject.hHmgr);
+ REGION_Delete(pRgnNew);
DC_UnlockDc(dc);
if(Unlock) REGION_UnlockRgn(pRgn);
{
INT Result;
RECTL Rect;
- HRGN NewRgn;
+ PREGION prgnNew, prgnClip;
PDC dc = DC_LockDc(hDC);
if (!dc)
IntLPtoDP(dc, (LPPOINT)&Rect, 2);
- NewRgn = IntSysCreateRectRgnIndirect(&Rect);
- if (!NewRgn)
+ prgnNew = IntSysCreateRectpRgnIndirect(&Rect);
+ if (!prgnNew)
{
Result = ERROR;
}
if (!dc->rosdc.hClipRgn)
{
dc->rosdc.hClipRgn = IntSysCreateRectRgn(0, 0, 0, 0);
- NtGdiCombineRgn(dc->rosdc.hClipRgn, dc->prgnVis->BaseObject.hHmgr, NewRgn, RGN_DIFF);
+ prgnClip = REGION_LockRgn(dc->rosdc.hClipRgn);
+ IntGdiCombineRgn(prgnClip, dc->prgnVis, prgnNew, RGN_DIFF);
+ REGION_UnlockRgn(prgnClip);
Result = SIMPLEREGION;
}
else
{
- Result = NtGdiCombineRgn(dc->rosdc.hClipRgn, dc->rosdc.hClipRgn, NewRgn, RGN_DIFF);
+ prgnClip = REGION_LockRgn(dc->rosdc.hClipRgn);
+ Result = IntGdiCombineRgn(prgnClip, prgnClip, prgnNew, RGN_DIFF);
+ REGION_UnlockRgn(prgnClip);
}
- REGION_FreeRgnByHandle(NewRgn);
+ REGION_Delete(prgnNew);
}
if (Result != ERROR)
CLIPPING_UpdateGCRegion(dc);
else
{
Result = NtGdiCombineRgn(dc->rosdc.hClipRgn, dc->rosdc.hClipRgn, NewRgn, RGN_AND);
- REGION_FreeRgnByHandle(NewRgn);
+ GreDeleteObject(NewRgn);
}
if (Result != ERROR)
CLIPPING_UpdateGCRegion(dc);
RGN_AND);
if ( Ret )
{
- GDIOBJ_ShareUnlockObjByPtr(&pDC->dclevel.prgnMeta->BaseObject);
+ GDIOBJ_vDereferenceObject(&pDC->dclevel.prgnMeta->BaseObject);
if (!((PROSRGNDATA)pDC->dclevel.prgnMeta)->BaseObject.ulShareCount)
REGION_Delete(pDC->dclevel.prgnMeta);
pDC->dclevel.prgnMeta = TempRgn;
- GDIOBJ_ShareUnlockObjByPtr(&pDC->dclevel.prgnClip->BaseObject);
+ GDIOBJ_vDereferenceObject(&pDC->dclevel.prgnClip->BaseObject);
if (!((PROSRGNDATA)pDC->dclevel.prgnClip)->BaseObject.ulShareCount)
REGION_Delete(pDC->dclevel.prgnClip);
-/*
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: Functions for creation and destruction of DCs
} GDI_DC_ATTR_ENTRY, *PGDI_DC_ATTR_ENTRY;
-PDC_ATTR
-FASTCALL
-AllocateDcAttr(VOID)
-{
- PTHREADINFO pti;
- PPROCESSINFO ppi;
- PDC_ATTR pDc_Attr;
- PGDI_DC_ATTR_FREELIST pGdiDcAttrFreeList;
- PGDI_DC_ATTR_ENTRY pGdiDcAttrEntry;
- int i;
-
- pti = PsGetCurrentThreadWin32Thread();
- if (pti->pgdiDcattr)
- {
- pDc_Attr = pti->pgdiDcattr; // Get the free one.
- pti->pgdiDcattr = NULL;
- return pDc_Attr;
- }
-
- ppi = PsGetCurrentProcessWin32Process();
-
- if (!ppi->pDCAttrList) // If set point is null, allocate new group.
- {
- pGdiDcAttrEntry = EngAllocUserMem(sizeof(GDI_DC_ATTR_ENTRY), 0);
-
- if (!pGdiDcAttrEntry)
- {
- DPRINT1("DcAttr Failed User Allocation!\n");
- return NULL;
- }
-
- DPRINT("AllocDcAttr User 0x%x\n",pGdiDcAttrEntry);
-
- pGdiDcAttrFreeList = ExAllocatePoolWithTag( PagedPool,
- sizeof(GDI_DC_ATTR_FREELIST),
- GDITAG_DC_FREELIST);
- if ( !pGdiDcAttrFreeList )
- {
- EngFreeUserMem(pGdiDcAttrEntry);
- return NULL;
- }
-
- RtlZeroMemory(pGdiDcAttrFreeList, sizeof(GDI_DC_ATTR_FREELIST));
-
- DPRINT("AllocDcAttr Ex 0x%x\n",pGdiDcAttrFreeList);
-
- InsertHeadList( &ppi->GDIDcAttrFreeList, &pGdiDcAttrFreeList->Entry);
-
- pGdiDcAttrFreeList->nEntries = GDIDCATTRFREE;
- // Start at the bottom up and set end of free list point.
- ppi->pDCAttrList = &pGdiDcAttrEntry->Attr[GDIDCATTRFREE-1];
- // Build the free attr list.
- for ( i = 0; i < GDIDCATTRFREE; i++)
- {
- pGdiDcAttrFreeList->AttrList[i] = &pGdiDcAttrEntry->Attr[i];
- }
- }
-
- pDc_Attr = ppi->pDCAttrList;
- pGdiDcAttrFreeList = (PGDI_DC_ATTR_FREELIST)ppi->GDIDcAttrFreeList.Flink;
-
- // Free the list when it is full!
- if ( pGdiDcAttrFreeList->nEntries-- == 1)
- { // No more free entries, so yank the list.
- RemoveEntryList( &pGdiDcAttrFreeList->Entry );
-
- ExFreePoolWithTag( pGdiDcAttrFreeList, GDITAG_DC_FREELIST );
-
- if ( IsListEmpty( &ppi->GDIDcAttrFreeList ) )
- {
- ppi->pDCAttrList = NULL;
- return pDc_Attr;
- }
-
- pGdiDcAttrFreeList = (PGDI_DC_ATTR_FREELIST)ppi->GDIDcAttrFreeList.Flink;
- }
-
- ppi->pDCAttrList = pGdiDcAttrFreeList->AttrList[pGdiDcAttrFreeList->nEntries-1];
-
- return pDc_Attr;
-}
-
-VOID
-FASTCALL
-FreeDcAttr(PDC_ATTR pDc_Attr)
+BOOL
+NTAPI
+DC_bAllocDcAttr(PDC pdc)
{
- PTHREADINFO pti;
- PPROCESSINFO ppi;
- PGDI_DC_ATTR_FREELIST pGdiDcAttrFreeList;
+ PPROCESSINFO ppi;
+ PDC_ATTR pdcattr;
- pti = PsGetCurrentThreadWin32Thread();
-
- if (!pti) return;
-
- if (!pti->pgdiDcattr)
- { // If it is null, just cache it for the next time.
- pti->pgdiDcattr = pDc_Attr;
- return;
- }
+ ppi = PsGetCurrentProcessWin32Process();
+ ASSERT(ppi);
- ppi = PsGetCurrentProcessWin32Process();
-
- pGdiDcAttrFreeList = (PGDI_DC_ATTR_FREELIST)ppi->GDIDcAttrFreeList.Flink;
-
- // We add to the list of free entries, so this will grows!
- if ( IsListEmpty(&ppi->GDIDcAttrFreeList) ||
- pGdiDcAttrFreeList->nEntries == GDIDCATTRFREE )
- {
- pGdiDcAttrFreeList = ExAllocatePoolWithTag( PagedPool,
- sizeof(GDI_DC_ATTR_FREELIST),
- GDITAG_DC_FREELIST);
- if ( !pGdiDcAttrFreeList )
- {
- return;
- }
- InsertHeadList( &ppi->GDIDcAttrFreeList, &pGdiDcAttrFreeList->Entry);
- pGdiDcAttrFreeList->nEntries = 0;
- }
- // Up count, save the entry and set end of free list point.
- ++pGdiDcAttrFreeList->nEntries; // Top Down...
- pGdiDcAttrFreeList->AttrList[pGdiDcAttrFreeList->nEntries-1] = pDc_Attr;
- ppi->pDCAttrList = pDc_Attr;
-
- return;
-}
+ pdcattr = GdiPoolAllocate(ppi->pPoolDcAttr);
+ if (!pdcattr)
+ {
+ DPRINT1("Could not allocate DC attr\n");
+ return FALSE;
+ }
-BOOL
-FASTCALL
-DC_AllocDcAttr(PDC pdc)
-{
- DC_AllocateDcAttr(pdc->BaseObject.hHmgr);
+ /* Copy the content from the kernel mode dc attr */
+ pdc->pdcattr = pdcattr;
*pdc->pdcattr = pdc->dcattr;
- return TRUE;
-}
-// CHECK against current head
-VOID
-FASTCALL
-DC_AllocateDcAttr(HDC hDC)
-{
- PVOID NewMem = NULL;
- PDC pDC;
- HANDLE Pid = NtCurrentProcess();
- ULONG MemSize = sizeof(DC_ATTR); //PAGE_SIZE it will allocate that size
+ /* Set the object attribute in the handle table */
+ GDIOBJ_vSetObjectAttr(&pdc->BaseObject, pdcattr);
- NTSTATUS Status = ZwAllocateVirtualMemory(Pid,
- &NewMem,
- 0,
- &MemSize,
- MEM_COMMIT|MEM_RESERVE,
- PAGE_READWRITE);
- {
- INT Index = GDI_HANDLE_GET_INDEX((HGDIOBJ)hDC);
- PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index];
- // FIXME: dc could have been deleted!!! use GDIOBJ_InsertUserData
- if (NT_SUCCESS(Status))
- {
- RtlZeroMemory(NewMem, MemSize);
- Entry->UserData = NewMem;
- DPRINT("DC_ATTR allocated! 0x%x\n",NewMem);
- }
- else
- {
- DPRINT("DC_ATTR not allocated!\n");
- }
- }
- pDC = DC_LockDc(hDC);
- ASSERT(pDC->pdcattr == &pDC->dcattr);
- if(NewMem)
- {
- pDC->pdcattr = NewMem; // Store pointer
- }
- DC_UnlockDc(pDC);
+ DPRINT("DC_AllocDcAttr: pdc=%p, pdc->pdcattr=%p\n", pdc, pdc->pdcattr);
+ return TRUE;
}
VOID
NTAPI
DC_vFreeDcAttr(PDC pdc)
{
- HANDLE Pid = NtCurrentProcess();
- INT Index;
- PGDI_TABLE_ENTRY pent;
+ PPROCESSINFO ppi;
if (pdc->pdcattr == &pdc->dcattr)
{
return;
}
- pdc->pdcattr = &pdc->dcattr;
+ /* Reset the object attribute in the handle table */
+ GDIOBJ_vSetObjectAttr(&pdc->BaseObject, NULL);
- Index = GDI_HANDLE_GET_INDEX(pdc->BaseObject.hHmgr);
- pent = &GdiHandleTable->Entries[Index];
- if(pent->UserData)
- {
- ULONG MemSize = sizeof(DC_ATTR);
- NTSTATUS Status = ZwFreeVirtualMemory(Pid,
- &pent->UserData,
- &MemSize,
- MEM_RELEASE);
- if (!NT_SUCCESS(Status))
- {
- DPRINT1("DC_FreeDC failed to free DC_ATTR 0x%p\n", pent->UserData);
- ASSERT(FALSE);
- }
- pent->UserData = NULL;
- }
-}
+ ppi = PsGetCurrentProcessWin32Process();
+ ASSERT(ppi);
+ GdiPoolFree(ppi->pPoolDcAttr, pdc->pdcattr);
-
-static
-VOID
-CopytoUserDcAttr(PDC dc, PDC_ATTR pdcattr)
-{
- dc->dcattr.mxWorldToDevice = dc->dclevel.mxWorldToDevice;
- dc->dcattr.mxDeviceToWorld = dc->dclevel.mxDeviceToWorld;
- dc->dcattr.mxWorldToPage = dc->dclevel.mxWorldToPage;
-
- _SEH2_TRY
- {
- ProbeForWrite(pdcattr, sizeof(DC_ATTR), 1);
- RtlCopyMemory(pdcattr, &dc->dcattr, sizeof(DC_ATTR));
- }
- _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
- {
- ASSERT(FALSE);
- }
- _SEH2_END;
-}
-
-// FIXME: wtf? 2 functions, where one has a typo in the name????
-BOOL
-FASTCALL
-DCU_SyncDcAttrtoUser(PDC dc)
-{
- PDC_ATTR pdcattr = dc->pdcattr;
-
- if (pdcattr == &dc->dcattr) return TRUE; // No need to copy self.
- ASSERT(pdcattr);
- CopytoUserDcAttr( dc, pdcattr);
- return TRUE;
-}
-// LOL! DCU_ Sync hDc Attr to User,,, need it speeled out for you?
-BOOL
-FASTCALL
-DCU_SynchDcAttrtoUser(HDC hDC)
-{
- BOOL Ret;
- PDC pDC = DC_LockDc ( hDC );
- if (!pDC) return FALSE;
- Ret = DCU_SyncDcAttrtoUser(pDC);
- DC_UnlockDc( pDC );
- return Ret;
+ /* Reset to kmode dcattr */
+ pdc->pdcattr = &pdc->dcattr;
}
-
DC_AllocDcWithHandle()
{
PDC pdc;
- pdc = (PDC)GDIOBJ_AllocObjWithHandle(GDILoObjType_LO_DC_TYPE);
+
+ pdc = (PDC)GDIOBJ_AllocateObject(GDIObjType_DC_TYPE,
+ sizeof(DC),
+ BASEFLAG_LOOKASIDE);
+ if (!pdc)
+ {
+ DPRINT1("Could not allocate a DC.\n");
+ return NULL;
+ }
+
+ if (!GDIOBJ_hInsertObject(&pdc->BaseObject, GDI_OBJ_HMGR_POWNED))
+ {
+ DPRINT1("Could not insert DC into handle table.\n");
+ GDIOBJ_vFreeObject(&pdc->BaseObject);
+ return NULL;
+ }
pdc->pdcattr = &pdc->dcattr;
/* Allocate a Vis region */
pdc->prgnVis = IntSysCreateRectpRgn(0, 0, pdc->dclevel.sizl.cx, pdc->dclevel.sizl.cy);
ASSERT(pdc->prgnVis);
- GDIOBJ_CopyOwnership(pdc->BaseObject.hHmgr, pdc->prgnVis->BaseObject.hHmgr);
/* Setup palette */
pdc->dclevel.hpal = StockObjects[DEFAULT_PALETTE];
EBRUSHOBJ_vCleanup(&pdc->eboBackground);
/* Free regions */
- if (pdc->rosdc.hClipRgn)
+ if (pdc->rosdc.hClipRgn && GreIsHandleValid(pdc->rosdc.hClipRgn))
GreDeleteObject(pdc->rosdc.hClipRgn);
if (pdc->prgnVis)
- REGION_FreeRgnByHandle(pdc->prgnVis->BaseObject.hHmgr);
- if (pdc->rosdc.hGCClipRgn)
+ {
+ REGION_Delete(pdc->prgnVis);
+ }
+ if (pdc->rosdc.hGCClipRgn && GreIsHandleValid(pdc->rosdc.hGCClipRgn))
+ {
GreDeleteObject(pdc->rosdc.hGCClipRgn);
+ }
if (NULL != pdc->rosdc.CombinedClip)
IntEngDeleteClipRegion(pdc->rosdc.CombinedClip);
return TRUE;
}
-BOOL
-FASTCALL
-DC_SetOwnership(HDC hDC, PEPROCESS Owner)
+VOID
+NTAPI
+DC_vSetOwner(PDC pdc, ULONG ulOwner)
{
- INT Index;
- PGDI_TABLE_ENTRY Entry;
- PDC pDC;
- BOOL ret = FALSE;
- if (!GDIOBJ_SetOwnership(hDC, Owner))
+ if (pdc->rosdc.hClipRgn)
{
- DPRINT1("GDIOBJ_SetOwnership failed\n");
- return FALSE;
+ IntGdiSetRegionOwner(pdc->rosdc.hClipRgn, ulOwner);
}
- pDC = DC_LockDc(hDC);
- if (!pDC)
+ if (pdc->rosdc.hGCClipRgn)
{
- DPRINT1("Could not lock DC\n");
- return FALSE;
+ IntGdiSetRegionOwner(pdc->rosdc.hGCClipRgn, ulOwner);
+ }
+
+ if (pdc->dclevel.hPath)
+ {
+ GreSetObjectOwner(pdc->dclevel.hPath, ulOwner);
+ }
+
+ IntGdiSetBrushOwner(pdc->dclevel.pbrFill, ulOwner);
+ IntGdiSetBrushOwner(pdc->dclevel.pbrLine, ulOwner);
+
+ /* Allocate or free DC attribute */
+ if (ulOwner == GDI_OBJ_HMGR_PUBLIC || ulOwner == GDI_OBJ_HMGR_NONE)
+ {
+ if (pdc->pdcattr != &pdc->dcattr)
+ DC_vFreeDcAttr(pdc);
+ }
+ else if (ulOwner == GDI_OBJ_HMGR_POWNED)
+ {
+ if (pdc->pdcattr == &pdc->dcattr)
+ DC_bAllocDcAttr(pdc);
}
- /*
- System Regions:
- These regions do not use attribute sections and when allocated, use
- gdiobj level functions.
- */
- if (pDC->rosdc.hClipRgn)
- { // FIXME! HAX!!!
- Index = GDI_HANDLE_GET_INDEX(pDC->rosdc.hClipRgn);
- Entry = &GdiHandleTable->Entries[Index];
- if (Entry->UserData) FreeObjectAttr(Entry->UserData);
- Entry->UserData = NULL;
- //
- if (!GDIOBJ_SetOwnership(pDC->rosdc.hClipRgn, Owner)) goto leave;
- }
- if (pDC->prgnVis)
- { // FIXME! HAX!!!
- Index = GDI_HANDLE_GET_INDEX(pDC->prgnVis->BaseObject.hHmgr);
- Entry = &GdiHandleTable->Entries[Index];
- if (Entry->UserData) FreeObjectAttr(Entry->UserData);
- Entry->UserData = NULL;
- //
- if (!GDIOBJ_SetOwnership(pDC->prgnVis->BaseObject.hHmgr, Owner)) goto leave;
- }
- if (pDC->rosdc.hGCClipRgn)
- { // FIXME! HAX!!!
- Index = GDI_HANDLE_GET_INDEX(pDC->rosdc.hGCClipRgn);
- Entry = &GdiHandleTable->Entries[Index];
- if (Entry->UserData) FreeObjectAttr(Entry->UserData);
- Entry->UserData = NULL;
- //
- if (!GDIOBJ_SetOwnership(pDC->rosdc.hGCClipRgn, Owner)) goto leave;
- }
- if (pDC->dclevel.hPath)
- {
- if (!GDIOBJ_SetOwnership(pDC->dclevel.hPath, Owner)) goto leave;
- }
- ret = TRUE;
-
-leave:
- DC_UnlockDc(pDC);
-
- return ret;
+ /* Set the DC's ownership */
+ GDIOBJ_vSetObjectOwner(&pdc->BaseObject, ulOwner);
}
+BOOL
+NTAPI
+GreSetDCOwner(HDC hdc, ULONG ulOwner)
+{
+ PDC pdc;
+
+ pdc = DC_LockDc(hdc);
+ if (!pdc)
+ {
+ DPRINT1("GreSetDCOwner: Could not lock DC\n");
+ return FALSE;
+ }
+
+ /* Call the internal DC function */
+ DC_vSetOwner(pdc, ulOwner);
+
+ DC_UnlockDc(pdc);
+ return TRUE;
+}
int FASTCALL
CLIPPING_UpdateGCRegion(DC* Dc);
/* FIXME: HACK! */
DC_InitHack(pdc);
- DC_AllocDcAttr(pdc);
+ DC_bAllocDcAttr(pdc);
DC_UnlockDc(pdc);
/* Call the internal function */
hdc = GreOpenDCW(pustrDevice ? &ustrDevice : NULL,
pdmInit ? &dmInit : NULL,
- NULL, // fixme pwszLogAddress
+ NULL, // FIXME: pwszLogAddress
iType,
bDisplay,
hspool,
- NULL, //FIXME: pDriverInfo2
+ NULL, // FIXME: pDriverInfo2
pUMdhpdev ? &dhpdev : NULL);
/* If we got a HDC and a UM dhpdev is requested,... */
if (hdc && pUMdhpdev)
{
- /* Copy dhpdev to caller (FIXME: use dhpdev?? */
+ /* Copy dhpdev to caller (FIXME: use dhpdev?) */
_SEH2_TRY
{
/* Pointer was already probed */
DC_InitHack(pdcNew);
/* Allocate a dc attribute */
- DC_AllocDcAttr(pdcNew);
+ DC_bAllocDcAttr(pdcNew);
// HACK!
DC_vSelectSurface(pdcNew, psurfDefaultBitmap);
DC_UnlockDc(DCToDelete);
- if (!IsObjectDead(hDC))
+ if (GreIsHandleValid(hDC))
{
- DC_vFreeDcAttr(DCToDelete); // Plug a leak see bug 6119!
-
- if (!GDIOBJ_FreeObjByHandle(hDC, GDI_OBJECT_TYPE_DC))
+ if (!GreDeleteObject(hDC))
{
DPRINT1("DC_FreeDC failed\n");
}
BOOL
APIENTRY
-NtGdiDeleteObjectApp(HANDLE DCHandle)
+NtGdiDeleteObjectApp(HANDLE hobj)
{
/* Complete all pending operations */
- NtGdiFlushUserBatch();
-
- if (GDI_HANDLE_IS_STOCKOBJ(DCHandle)) return TRUE;
+ NtGdiFlushUserBatch(); // FIXME: we shouldn't need this
- if (GDI_HANDLE_GET_TYPE(DCHandle) != GDI_OBJECT_TYPE_DC)
- return GreDeleteObject((HGDIOBJ) DCHandle);
+ if (GDI_HANDLE_IS_STOCKOBJ(hobj)) return TRUE;
- if (IsObjectDead((HGDIOBJ)DCHandle)) return TRUE;
-
- if (!GDIOBJ_OwnedByCurrentProcess(DCHandle))
+ if (GreGetObjectOwner(hobj) != GDI_OBJ_HMGR_POWNED)
{
EngSetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
- return IntGdiDeleteDC(DCHandle, FALSE);
+ if (GDI_HANDLE_GET_TYPE(hobj) != GDI_OBJECT_TYPE_DC)
+ return GreDeleteObject(hobj);
+
+ // FIXME: everything should be callback based
+ return IntGdiDeleteDC(hobj, FALSE);
}
BOOL
return hDC;
}
-BOOL
-FASTCALL
-IntGdiSetDCOwnerEx( HDC hDC, DWORD OwnerMask, BOOL NoSetBrush)
-{
- PDC pDC;
- BOOL Ret = FALSE;
-
- if (!hDC || (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)) return FALSE;
-
- if ((OwnerMask == GDI_OBJ_HMGR_PUBLIC) || OwnerMask == GDI_OBJ_HMGR_NONE)
- {
- pDC = DC_LockDc ( hDC );
- MmCopyFromCaller(&pDC->dcattr, pDC->pdcattr, sizeof(DC_ATTR));
- DC_vFreeDcAttr(pDC);
- DC_UnlockDc( pDC );
-
- if (!DC_SetOwnership( hDC, NULL )) // This hDC is inaccessible!
- return Ret;
- }
-
- if (OwnerMask == GDI_OBJ_HMGR_POWNED)
- {
- pDC = DC_LockDc ( hDC );
- ASSERT(pDC->pdcattr == &pDC->dcattr);
- DC_UnlockDc( pDC );
-
- if (!DC_SetOwnership( hDC, PsGetCurrentProcess() )) return Ret;
-
- DC_AllocateDcAttr( hDC ); // Allocate new dcattr
-
- DCU_SynchDcAttrtoUser( hDC ); // Copy data from dc to dcattr
- }
-
- if ((OwnerMask != GDI_OBJ_HMGR_NONE) && !NoSetBrush)
- {
- pDC = DC_LockDc ( hDC );
- if (IntGdiSetBrushOwner((PBRUSH)pDC->dclevel.pbrFill, OwnerMask))
- IntGdiSetBrushOwner((PBRUSH)pDC->dclevel.pbrLine, OwnerMask);
- DC_UnlockDc( pDC );
- }
- return TRUE;
-}
if(pdc->dctype == DCTYPE_MEMORY)
{
- IntGdiRealizePalette(pdc);
+ // This didn't work anyway
+ //IntGdiRealizePalette(hDC);
}
PALETTE_ShareUnlockPalette(ppal);
if (hVisRgn)
{
GdiSelectVisRgn(hdc, hVisRgn);
- REGION_FreeRgnByHandle(hVisRgn);
+ GreDeleteObject(hVisRgn);
}
/* Return the old bitmap handle */
else if (pdc->dclevel.prgnMeta) hrgnSrc = pdc->dclevel.prgnMeta->BaseObject.hHmgr;
break;
case SYSRGN:
- if (pdc->prgnVis) hrgnSrc = pdc->prgnVis->BaseObject.hHmgr;
+ if (pdc->prgnVis)
+ {
+ PREGION prgnDest = REGION_LockRgn(hrgnDest);
+ ret = IntGdiCombineRgn(prgnDest, pdc->prgnVis, 0, RGN_COPY) == ERROR ? -1 : 1;
+ REGION_UnlockRgn(prgnDest);
+ }
break;
default:
hrgnSrc = NULL;
IN PDC pdc,
INT iSaveLevel)
{
- PEPROCESS pepCurrentProcess;
HDC hdcSave;
PDC pdcSave;
ASSERT(iSaveLevel > 0);
DPRINT("DC_vRestoreDC(%p, %ld)\n", pdc->BaseObject.hHmgr, iSaveLevel);
- /* Get current process */
- pepCurrentProcess = PsGetCurrentProcess();
-
/* Loop the save levels */
while (pdc->dclevel.lSaveDepth > iSaveLevel)
{
DPRINT("RestoreDC = %p\n", hdcSave);
/* Set us as the owner */
- if (!GDIOBJ_SetOwnership(hdcSave, pepCurrentProcess))
+ if (!GreSetObjectOwner(hdcSave, GDI_OBJ_HMGR_POWNED))
{
/* Could not get ownership. That's bad! */
DPRINT1("Could not get ownership of saved DC (%p) for hdc %p!\n",
/* Make it a kernel handle
(FIXME: windows handles this different, see wiki)*/
- GDIOBJ_SetOwnership(hdcSave, NULL);
+ GreSetObjectOwner(hdcSave, GDI_OBJ_HMGR_PUBLIC);
/* Copy the current state */
DC_vCopyState(pdc, pdcSave, TRUE);
return 0;
}
- PalGDI = PALETTE_ShareLockPalette(psurf->ppal->BaseObject.hHmgr);
+ PalGDI = psurf->ppal;
for (Index = StartIndex;
Index < StartIndex + Entries && Index < PalGDI->NumColors;
PalGDI->IndexedColors[Index].peGreen = Colors[Index - StartIndex].rgbGreen;
PalGDI->IndexedColors[Index].peBlue = Colors[Index - StartIndex].rgbBlue;
}
- PALETTE_ShareUnlockPalette(PalGDI);
}
else
Entries = 0;
if (pSourceSurf) EngUnlockSurface(pSourceSurf);
if (hSourceBitmap) EngDeleteSurface((HSURF)hSourceBitmap);
- if (hpalDIB) PALETTE_FreePaletteByHandle(hpalDIB);
+ if (hpalDIB) GreDeleteObject(hpalDIB);
DC_UnlockDc(pDC);
return ret;
if (res)
{
- SURFACE_FreeSurfaceByHandle(res);
+ GreDeleteObject(res);
res = 0;
}
}
pdcattr = dc->pdcattr;
- pbrush = BRUSH_LockBrush(pdcattr->hbrush);
+ pbrush = BRUSH_ShareLockBrush(pdcattr->hbrush);
if (!pbrush)
{
DPRINT1("FillArc Fail\n");
(dc->dclevel.flPath & DCPATH_CLOCKWISE) ? -Start : -End,
pbrush, Chord);
- BRUSH_UnlockBrush(pbrush);
+ BRUSH_ShareUnlockBrush(pbrush);
return ret;
}
if (pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY))
DC_vUpdateLineBrush(dc);
- pbrush = PEN_LockPen(pdcattr->hpen);
+ pbrush = PEN_ShareLockPen(pdcattr->hpen);
if (!pbrush)
{
DPRINT1("Ellipse Fail 1\n");
DPRINT("Ellipse 2: XLeft: %d, YLeft: %d, Width: %d, Height: %d\n",
CenterX - RadiusX, CenterY + RadiusY, RadiusX*2, RadiusY*2);
- pFillBrushObj = BRUSH_LockBrush(pdcattr->hbrush);
+ pFillBrushObj = BRUSH_ShareLockBrush(pdcattr->hbrush);
if (NULL == pFillBrushObj)
{
DPRINT1("FillEllipse Fail\n");
RadiusX*2, // Width
RadiusY*2, // Height
&tmpFillBrushObj);
- BRUSH_UnlockBrush(pFillBrushObj);
+ BRUSH_ShareUnlockBrush(pFillBrushObj);
}
if (ret)
pbrush);
pbrush->ptPenWidth.x = PenOrigWidth;
- PEN_UnlockPen(pbrush);
+ PEN_ShareUnlockPen(pbrush);
DC_UnlockDc(dc);
DPRINT("Ellipse Exit.\n");
return ret;
int yCurveDiameter)
{
PDC_ATTR pdcattr;
- PBRUSH pbrushLine, pbrushFill;
+ PBRUSH pbrLine, pbrFill;
RECTL RectBounds;
LONG PenWidth, PenOrigWidth;
BOOL ret = TRUE; // default to success
if (pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY))
DC_vUpdateLineBrush(dc);
- pbrushLine = PEN_LockPen(pdcattr->hpen);
- if (!pbrushLine)
+ pbrLine = PEN_ShareLockPen(pdcattr->hpen);
+ if (!pbrLine)
{
/* Nothing to do, as we don't have a bitmap */
EngSetLastError(ERROR_INTERNAL_ERROR);
return FALSE;
}
- PenOrigWidth = PenWidth = pbrushLine->ptPenWidth.x;
- if (pbrushLine->ulPenStyle == PS_NULL) PenWidth = 0;
+ PenOrigWidth = PenWidth = pbrLine->ptPenWidth.x;
+ if (pbrLine->ulPenStyle == PS_NULL) PenWidth = 0;
- if (pbrushLine->ulPenStyle == PS_INSIDEFRAME)
+ if (pbrLine->ulPenStyle == PS_INSIDEFRAME)
{
if (2*PenWidth > (Right - Left)) PenWidth = (Right -Left + 1)/2;
if (2*PenWidth > (Bottom - Top)) PenWidth = (Bottom -Top + 1)/2;
}
if (!PenWidth) PenWidth = 1;
- pbrushLine->ptPenWidth.x = PenWidth;
+ pbrLine->ptPenWidth.x = PenWidth;
RectBounds.left = Left;
RectBounds.top = Top;
RectBounds.right += dc->ptlDCOrig.x;
RectBounds.bottom += dc->ptlDCOrig.y;
- pbrushFill = BRUSH_LockBrush(pdcattr->hbrush);
- if (NULL == pbrushFill)
+ pbrFill = BRUSH_ShareLockBrush(pdcattr->hbrush);
+ if (!pbrFill)
{
DPRINT1("FillRound Fail\n");
EngSetLastError(ERROR_INTERNAL_ERROR);
}
else
{
- RtlCopyMemory(&brushTemp, pbrushFill, sizeof(brushTemp));
+ RtlCopyMemory(&brushTemp, pbrFill, sizeof(brushTemp));
brushTemp.ptOrigin.x += RectBounds.left - Left;
brushTemp.ptOrigin.y += RectBounds.top - Top;
ret = IntFillRoundRect( dc,
xCurveDiameter,
yCurveDiameter,
&brushTemp);
- BRUSH_UnlockBrush(pbrushFill);
+ BRUSH_ShareUnlockBrush(pbrFill);
}
if (ret)
RectBounds.bottom,
xCurveDiameter,
yCurveDiameter,
- pbrushLine);
+ pbrLine);
- pbrushLine->ptPenWidth.x = PenOrigWidth;
- PEN_UnlockPen(pbrushLine);
+ pbrLine->ptPenWidth.x = PenOrigWidth;
+ PEN_ShareUnlockPen(pbrLine);
return ret;
}
DoDeviceSync( SURFOBJ *Surface, PRECTL Rect, FLONG fl)
{
PPDEVOBJ Device = (PDEVOBJ*)Surface->hdev;
-// No punting and "Handle to a surface, provided that the surface is device-managed.
+// No punting and "Handle to a surface, provided that the surface is device-managed.
// Otherwise, dhsurf is zero".
if (!(Device->flFlags & PDEV_DRIVER_PUNTED_CALL) && (Surface->dhsurf))
{
FASTCALL
SynchonizeDriver(FLONG Flags)
{
- SURFOBJ *SurfObj;
+ SURFOBJ *SurfObj;
PPDEVOBJ Device;
-
+
if (Flags & GCAPS2_SYNCFLUSH)
Flags = DSS_FLUSH_EVENT;
if (Flags & GCAPS2_SYNCTIMER)
break;
}
- return Size;
+ return Size;
}
/*
PCHAR pHdr = (PCHAR)&pTeb->GdiTebBatch.Buffer[0];
PDC pDC = NULL;
- if (hDC && !IsObjectDead(hDC))
+ if (GDI_HANDLE_GET_TYPE(hDC) == GDILoObjType_LO_DC_TYPE && GreIsHandleValid(hDC))
{
pDC = DC_LockDc(hDC);
}
#define NDEBUG
#include <debug.h>
+extern ULONG gulFirstFree;
+extern ULONG gulFirstUnused;
ULONG gulDebugChannels = 0;
+ULONG gulLogUnique = 0;
#ifdef GDI_DEBUG
-
-ULONG_PTR GDIHandleAllocator[GDI_HANDLE_COUNT][GDI_STACK_LEVELS+1];
-ULONG_PTR GDIHandleLocker[GDI_HANDLE_COUNT][GDI_STACK_LEVELS+1];
-ULONG_PTR GDIHandleShareLocker[GDI_HANDLE_COUNT][GDI_STACK_LEVELS+1];
-ULONG_PTR GDIHandleDeleter[GDI_HANDLE_COUNT][GDI_STACK_LEVELS+1];
-struct DbgOpenGDIHandle
-{
- ULONG idx;
- int count;
-};
-#define MAX_BACKTRACES 1024
-static struct DbgOpenGDIHandle AllocatorTable[MAX_BACKTRACES];
-
+#if 0
static
BOOL
CompareBacktraces(ULONG idx1, ULONG idx2)
return TRUE;
}
-void IntDumpHandleTable(PGDI_HANDLE_TABLE HandleTable)
+VOID
+NTAPI
+DbgDumpGdiHandleTable(void)
{
static int leak_reported = 0;
int i, j, idx, nTraces = 0;
ASSERT(FALSE);
}
+#endif
ULONG
-CaptureStackBackTace(PVOID* pFrames, ULONG nFramesToCapture)
+NTAPI
+DbgCaptureStackBackTace(PVOID* pFrames, ULONG nFramesToCapture)
{
ULONG nFrameCount;
}
BOOL
-GdiDbgHTIntegrityCheck()
+NTAPI
+DbgGdiHTIntegrityCheck()
{
ULONG i, nDeleted = 0, nFree = 0, nUsed = 0;
PGDI_TABLE_ENTRY pEntry;
/* FIXME: check reserved entries */
/* Now go through the deleted objects */
- i = GdiHandleTable->FirstFree & 0xffff;
+ i = gulFirstFree & 0xffff;
while (i)
{
pEntry = &GdiHandleTable->Entries[i];
i = (ULONG_PTR)pEntry->KernelData & 0xffff;
};
- for (i = GdiHandleTable->FirstUnused;
+ for (i = gulFirstUnused;
i < GDI_HANDLE_COUNT;
i++)
{
return r;
}
-ULONG
-FASTCALL
-GDIOBJ_IncrementShareCount(POBJ Object)
-{
- INT cLocks = InterlockedIncrement((PLONG)&Object->ulShareCount);
- GDIDBG_CAPTURESHARELOCKER(Object->hHmgr);
- ASSERT(cLocks >= 1);
- return cLocks;
-}
-
#endif /* GDI_DEBUG */
-void
-GdiDbgDumpLockedHandles()
+VOID
+NTAPI
+DbgDumpLockedGdiHandles()
{
+#if 0
ULONG i;
for (i = RESERVE_ENTRIES_COUNT; i < GDI_HANDLE_COUNT; i++)
{
- PGDI_TABLE_ENTRY pEntry = &GdiHandleTable->Entries[i];
+ PENTRY pentry = &gpentHmgr[i];
- if (pEntry->Type & GDI_ENTRY_BASETYPE_MASK)
+ if (pentry->Objt)
{
- BASEOBJECT *pObject = pEntry->KernelData;
- if (pObject->cExclusiveLock > 0)
+ POBJ pobj = pentry->einfo.pobj;
+ if (pobj->cExclusiveLock > 0)
{
DPRINT1("Locked object: %lx, type = %lx. allocated from:\n",
- i, pEntry->Type);
- GDIDBG_TRACEALLOCATOR(i);
- DPRINT1("Locked from:\n");
- GDIDBG_TRACELOCKER(i);
+ i, pentry->Objt);
+ DBG_DUMP_EVENT_LIST(&pobj->slhLog);
}
}
}
+#endif
+}
+
+VOID
+NTAPI
+DbgLogEvent(PSLIST_HEADER pslh, EVENT_TYPE nEventType, LPARAM lParam)
+{
+ PLOGENTRY pLogEntry;
+
+ /* Log a maximum of 100 events */
+ if (QueryDepthSList(pslh) >= 1000) return;
+
+ /* Allocate a logentry */
+ pLogEntry = EngAllocMem(0, sizeof(LOGENTRY), 'golG');
+ if (!pLogEntry) return;
+
+ /* Set type */
+ pLogEntry->nEventType = nEventType;
+ pLogEntry->ulUnique = InterlockedIncrement((LONG*)&gulLogUnique);
+ pLogEntry->dwProcessId = HandleToUlong(PsGetCurrentProcessId());
+ pLogEntry->dwThreadId = HandleToUlong(PsGetCurrentThreadId());
+ pLogEntry->lParam = lParam;
+
+ /* Capture a backtrace */
+ DbgCaptureStackBackTace(pLogEntry->apvBackTrace, 20);
+
+ switch (nEventType)
+ {
+ case EVENT_ALLOCATE:
+ case EVENT_CREATE_HANDLE:
+ case EVENT_REFERENCE:
+ case EVENT_DEREFERENCE:
+ case EVENT_LOCK:
+ case EVENT_UNLOCK:
+ case EVENT_DELETE:
+ case EVENT_FREE:
+ case EVENT_SET_OWNER:
+ default:
+ break;
+ }
+
+ /* Push it on the list */
+ InterlockedPushEntrySList(pslh, &pLogEntry->sleLink);
+}
+
+#define REL_ADDR(va) ((ULONG_PTR)va - (ULONG_PTR)&__ImageBase)
+
+VOID
+DbgPrintEvent(PLOGENTRY pLogEntry)
+{
+ PSTR pstr;
+
+ switch (pLogEntry->nEventType)
+ {
+ case EVENT_ALLOCATE: pstr = "Allocate"; break;
+ case EVENT_CREATE_HANDLE: pstr = "CreatHdl"; break;
+ case EVENT_REFERENCE: pstr = "Ref"; break;
+ case EVENT_DEREFERENCE: pstr = "Deref"; break;
+ case EVENT_LOCK: pstr = "Lock"; break;
+ case EVENT_UNLOCK: pstr = "Unlock"; break;
+ case EVENT_DELETE: pstr = "Delete"; break;
+ case EVENT_FREE: pstr = "Free"; break;
+ case EVENT_SET_OWNER: pstr = "SetOwner"; break;
+ default: pstr = "Unknown"; break;
+ }
+
+ DbgPrint("[%ld] %03x:%03x %.8s val=%p <%lx,%lx,%lx,%lx>\n",
+ pLogEntry->ulUnique,
+ pLogEntry->dwProcessId,
+ pLogEntry->dwThreadId,
+ pstr,
+ pLogEntry->lParam,
+ REL_ADDR(pLogEntry->apvBackTrace[2]),
+ REL_ADDR(pLogEntry->apvBackTrace[3]),
+ REL_ADDR(pLogEntry->apvBackTrace[4]),
+ REL_ADDR(pLogEntry->apvBackTrace[5]));
+}
+
+VOID
+NTAPI
+DbgDumpEventList(PSLIST_HEADER pslh)
+{
+ PSLIST_ENTRY psle;
+ PLOGENTRY pLogEntry;
+
+ while ((psle = InterlockedPopEntrySList(pslh)))
+ {
+ pLogEntry = CONTAINING_RECORD(psle, LOGENTRY, sleLink);
+ DbgPrintEvent(pLogEntry);
+ }
+
+}
+
+VOID
+NTAPI
+DbgCleanupEventList(PSLIST_HEADER pslh)
+{
+ PSLIST_ENTRY psle;
+ PLOGENTRY pLogEntry;
+
+ while ((psle = InterlockedPopEntrySList(pslh)))
+ {
+ pLogEntry = CONTAINING_RECORD(psle, LOGENTRY, sleLink);
+ EngFreeMem(pLogEntry);
+ }
}
void
PTHREADINFO pti = (PTHREADINFO)PsGetCurrentThreadWin32Thread();
if (pti && pti->cExclusiveLocks != 0)
{
- DbgPrint("FATAL: Win32DbgPreServiceHook(%ld): There are %ld exclusive locks!\n",
+ DbgPrint("FATAL: Win32DbgPreServiceHook(0x%lx): There are %ld exclusive locks!\n",
ulSyscallId, pti->cExclusiveLocks);
- GdiDbgDumpLockedHandles();
+ DbgDumpLockedGdiHandles();
ASSERT(FALSE);
}
PTHREADINFO pti = (PTHREADINFO)PsGetCurrentThreadWin32Thread();
if (pti && pti->cExclusiveLocks != 0)
{
- DbgPrint("FATAL: Win32DbgPostServiceHook(%ld): There are %ld exclusive locks!\n",
+ DbgPrint("FATAL: Win32DbgPostServiceHook(0x%lx): There are %ld exclusive locks!\n",
ulSyscallId, pti->cExclusiveLocks);
- GdiDbgDumpLockedHandles();
+ DbgDumpLockedGdiHandles();
ASSERT(FALSE);
}
return ulResult;
* LICENSE: GPL - See COPYING in the top level directory
* FILE: subsystems/win32/win32k/objects/gdiobj.c
* PURPOSE: General GDI object manipulation routines
- * PROGRAMMERS: ...
+ * PROGRAMMERS: Timo Kreuzer
*/
-/** INCLUDES ******************************************************************/
+/*
+ * If you want to understand this code, you need to start thinking in portals.
+ * - gpaulRefCount is a global pointer to an allocated array of ULONG values,
+ * one for each handle. Bits 0 - 22 contain a reference count for the handle.
+ * It gets increased for each handle lock / reference. Bit 23 contains a valid
+ * bit. If this bit is 0, the handle got deleted and will be pushed to the free
+ * list, once all references are gone. Bits 24 - 31 contain the reuse value of
+ * the handle, which allows to check if the entry was changed before atomically
+ * exchanging the reference count.
+ * - Objects can exist with or without a handle
+ * - Objects with a handle can be locked either exclusively or shared.
+ * Both locks increase the handle reference count in gpaulRefCount.
+ * Exclusive locks also increase the BASEOBJECT's cExclusiveLock field
+ * and the first lock (can be acquired recursively) acquires a pushlock
+ * that is also stored in the BASEOBJECT.
+ * - Objects without a handle cannot have exclusive locks. Their reference
+ * count is tracked in the BASEOBJECT's ulShareCount field.
+ * - An object that is inserted in the handle table automatically has an
+ * exclusive lock. For objects that are "shared objects" (BRUSH, PALETTE, ...)
+ * this is the only way it can ever be exclusively locked. It prevents the
+ * object from being locked by another thread. A shared lock will simply fail,
+ * while an exclusive lock will succeed after the object was unlocked.
+ *
+ */
+
+/* INCLUDES ******************************************************************/
#include <win32k.h>
#define NDEBUG
#include <debug.h>
-#define BASE_OBJTYPE_COUNT 32
-
-#define DelayExecution() \
- DPRINT("%s:%i: Delay\n", __FILE__, __LINE__); \
- KeDelayExecutionThread(KernelMode, FALSE, &ShortDelay)
+// move to gdidbg.h
+#if DBG
+#define DBG_INCREASE_LOCK_COUNT(pti, hobj) \
+ if (pti) ((PTHREADINFO)pti)->acExclusiveLockCount[((ULONG_PTR)hobj >> 16) & 0x1f]++;
+#define DBG_DECREASE_LOCK_COUNT(pti, hobj) \
+ if (pti) ((PTHREADINFO)pti)->acExclusiveLockCount[((ULONG_PTR)hobj >> 16) & 0x1f]--;
+#define ASSERT_SHARED_OBJECT_TYPE(objt) \
+ ASSERT((objt) == GDIObjType_SURF_TYPE || \
+ (objt) == GDIObjType_PAL_TYPE || \
+ (objt) == GDIObjType_LFONT_TYPE || \
+ (objt) == GDIObjType_PATH_TYPE || \
+ (objt) == GDIObjType_BRUSH_TYPE)
+#define ASSERT_EXCLUSIVE_OBJECT_TYPE(objt) \
+ ASSERT((objt) == GDIObjType_DC_TYPE || \
+ (objt) == GDIObjType_RGN_TYPE || \
+ (objt) == GDIObjType_LFONT_TYPE)
+#else
+#define DBG_INCREASE_LOCK_COUNT(ppi, hobj)
+#define DBG_DECREASE_LOCK_COUNT(x, y)
+#define ASSERT_SHARED_OBJECT_TYPE(objt)
+#define ASSERT_EXCLUSIVE_OBJECT_TYPE(objt)
+#endif
-static
-BOOL INTERNAL_CALL GDI_CleanupDummy(PVOID ObjectBody);
+#define MmMapViewInSessionSpace MmMapViewInSystemSpace
-/** GLOBALS *******************************************************************/
+#ifdef _M_IX86
+#define InterlockedOr16 _InterlockedOr16
+#endif
-typedef struct
-{
- BOOL bUseLookaside;
- ULONG_PTR ulBodySize;
- ULONG Tag;
- GDICLEANUPPROC CleanupProc;
-} OBJ_TYPE_INFO, *POBJ_TYPE_INFO;
+#define GDIOBJ_POOL_TAG(type) ('00hG' + ((objt & 0x1f) << 24))
-static const
-OBJ_TYPE_INFO ObjTypeInfo[BASE_OBJTYPE_COUNT] =
+enum
{
- {0, 0, 0, NULL}, /* 00 reserved entry */
- {1, sizeof(DC), TAG_DC, DC_Cleanup}, /* 01 DC */
- {1, 0, 0, NULL}, /* 02 UNUSED1 */
- {1, 0, 0, NULL}, /* 03 UNUSED2 */
- {1, sizeof(ROSRGNDATA), TAG_REGION, REGION_Cleanup}, /* 04 RGN */
- {1, sizeof(SURFACE), TAG_SURFACE, SURFACE_Cleanup}, /* 05 SURFACE */
- {1, sizeof(CLIENTOBJ), TAG_CLIENTOBJ, GDI_CleanupDummy}, /* 06 CLIENTOBJ: METADC,... */
- {1, sizeof(PATH), TAG_PATH, GDI_CleanupDummy}, /* 07 PATH */
- {1, sizeof(PALETTE), TAG_PALETTE, PALETTE_Cleanup}, /* 08 PAL */
- {1, sizeof(COLORSPACE), TAG_ICMLCS, GDI_CleanupDummy}, /* 09 ICMLCS, */
- {1, sizeof(TEXTOBJ), TAG_LFONT, GDI_CleanupDummy}, /* 0a LFONT */
- {0, 0, TAG_RFONT, NULL}, /* 0b RFONT, unused */
- {0, 0, TAG_PFE, NULL}, /* 0c PFE, unused */
- {0, 0, TAG_PFT, NULL}, /* 0d PFT, unused */
- {0, sizeof(GDICLRXFORM), TAG_ICMCXF, GDI_CleanupDummy}, /* 0e ICMCXF, */
- {0, 0, TAG_SPRITE, NULL}, /* 0f SPRITE, unused */
- {1, sizeof(BRUSH), TAG_BRUSH, BRUSH_Cleanup}, /* 10 BRUSH, PEN, EXTPEN */
- {0, 0, TAG_UMPD, NULL}, /* 11 UMPD, unused */
- {0, 0, 0, NULL}, /* 12 UNUSED4 */
- {0, 0, TAG_SPACE, NULL}, /* 13 SPACE, unused */
- {0, 0, 0, NULL}, /* 14 UNUSED5 */
- {0, 0, TAG_META, NULL}, /* 15 META, unused */
- {0, 0, TAG_EFSTATE, NULL}, /* 16 EFSTATE, unused */
- {0, 0, TAG_BMFD, NULL}, /* 17 BMFD, unused */
- {0, 0, TAG_VTFD, NULL}, /* 18 VTFD, unused */
- {0, 0, TAG_TTFD, NULL}, /* 19 TTFD, unused */
- {0, 0, TAG_RC, NULL}, /* 1a RC, unused */
- {0, 0, TAG_TEMP, NULL}, /* 1b TEMP, unused */
- {0, sizeof(EDRIVEROBJ), TAG_DRVOBJ, DRIVEROBJ_Cleanup},/* 1c DRVOBJ */
- {0, 0, TAG_DCIOBJ, NULL}, /* 1d DCIOBJ, unused */
- {0, 0, TAG_SPOOL, NULL}, /* 1e SPOOL, unused */
- {0, 0, 0, NULL}, /* 1f reserved entry */
+ REF_MASK_REUSE = 0xff000000,
+ REF_INC_REUSE = 0x01000000,
+ REF_MASK_VALID = 0x00800000,
+ REF_MASK_COUNT = 0x007fffff,
+ REF_MASK_INUSE = 0x00ffffff,
};
-static LARGE_INTEGER ShortDelay;
-PGDI_HANDLE_TABLE GdiHandleTable = NULL;
-static PSECTION_OBJECT GdiTableSection = NULL;
+/* GLOBALS *******************************************************************/
-/** INTERNAL FUNCTIONS ********************************************************/
+/* Per session handle table globals */
+static PVOID gpvGdiHdlTblSection = NULL;
+static PENTRY gpentHmgr;
+static PULONG gpaulRefCount;
+ULONG gulFirstFree;
+ULONG gulFirstUnused;
+static PPAGED_LOOKASIDE_LIST gpaLookasideList;
-// Audit Functions
-int tDC = 0;
-int tBRUSH = 0;
-int tBITMAP = 0;
-int tFONT = 0;
-int tRGN = 0;
+static BOOL INTERNAL_CALL GDIOBJ_Cleanup(PVOID ObjectBody);
-VOID
-AllocTypeDataDump(INT TypeInfo)
+static const
+GDICLEANUPPROC
+apfnCleanup[] =
{
- switch( TypeInfo & GDI_HANDLE_TYPE_MASK )
- {
- case GDILoObjType_LO_BRUSH_TYPE:
- tBRUSH++;
- break;
- case GDILoObjType_LO_DC_TYPE:
- tDC++;
- break;
- case GDILoObjType_LO_BITMAP_TYPE:
- tBITMAP++;
- break;
- case GDILoObjType_LO_FONT_TYPE:
- tFONT++;
- break;
- case GDILoObjType_LO_REGION_TYPE:
- tRGN++;
- break;
- }
-}
+ NULL, /* 00 GDIObjType_DEF_TYPE */
+ DC_Cleanup, /* 01 GDIObjType_DC_TYPE */
+ NULL, /* 02 GDIObjType_UNUSED1_TYPE */
+ NULL, /* 03 GDIObjType_UNUSED2_TYPE */
+ REGION_Cleanup, /* 04 GDIObjType_RGN_TYPE */
+ SURFACE_Cleanup, /* 05 GDIObjType_SURF_TYPE */
+ GDIOBJ_Cleanup, /* 06 GDIObjType_CLIENTOBJ_TYPE */
+ GDIOBJ_Cleanup, /* 07 GDIObjType_PATH_TYPE */
+ PALETTE_Cleanup, /* 08 GDIObjType_PAL_TYPE */
+ GDIOBJ_Cleanup, /* 09 GDIObjType_ICMLCS_TYPE */
+ GDIOBJ_Cleanup, /* 0a GDIObjType_LFONT_TYPE */
+ NULL, /* 0b GDIObjType_RFONT_TYPE, unused */
+ NULL, /* 0c GDIObjType_PFE_TYPE, unused */
+ NULL, /* 0d GDIObjType_PFT_TYPE, unused */
+ GDIOBJ_Cleanup, /* 0e GDIObjType_ICMCXF_TYPE */
+ NULL, /* 0f GDIObjType_SPRITE_TYPE, unused */
+ BRUSH_Cleanup, /* 10 GDIObjType_BRUSH_TYPE, BRUSH, PEN, EXTPEN */
+ NULL, /* 11 GDIObjType_UMPD_TYPE, unused */
+ NULL, /* 12 GDIObjType_UNUSED4_TYPE */
+ NULL, /* 13 GDIObjType_SPACE_TYPE, unused */
+ NULL, /* 14 GDIObjType_UNUSED5_TYPE */
+ NULL, /* 15 GDIObjType_META_TYPE, unused */
+ NULL, /* 16 GDIObjType_EFSTATE_TYPE, unused */
+ NULL, /* 17 GDIObjType_BMFD_TYPE, unused */
+ NULL, /* 18 GDIObjType_VTFD_TYPE, unused */
+ NULL, /* 19 GDIObjType_TTFD_TYPE, unused */
+ NULL, /* 1a GDIObjType_RC_TYPE, unused */
+ NULL, /* 1b GDIObjType_TEMP_TYPE, unused */
+ DRIVEROBJ_Cleanup,/* 1c GDIObjType_DRVOBJ_TYPE */
+ NULL, /* 1d GDIObjType_DCIOBJ_TYPE, unused */
+ NULL, /* 1e GDIObjType_SPOOL_TYPE, unused */
+ NULL, /* 1f reserved entry */
+};
-VOID
-DeAllocTypeDataDump(INT TypeInfo)
-{
- switch( TypeInfo & GDI_HANDLE_TYPE_MASK )
- {
- case GDILoObjType_LO_BRUSH_TYPE:
- tBRUSH--;
- break;
- case GDILoObjType_LO_DC_TYPE:
- tDC--;
- break;
- case GDILoObjType_LO_BITMAP_TYPE:
- tBITMAP--;
- break;
- case GDILoObjType_LO_FONT_TYPE:
- tFONT--;
- break;
- case GDILoObjType_LO_REGION_TYPE:
- tRGN--;
- break;
- }
-}
+/* INTERNAL FUNCTIONS ********************************************************/
-/*
- * Dummy GDI Cleanup Callback
- */
static
BOOL INTERNAL_CALL
-GDI_CleanupDummy(PVOID ObjectBody)
+GDIOBJ_Cleanup(PVOID ObjectBody)
{
return TRUE;
}
-/*!
- * Allocate GDI object table.
- * \param Size - number of entries in the object table.
-*/
-INIT_FUNCTION
-PGDI_HANDLE_TABLE
-INTERNAL_CALL
-GDIOBJ_iAllocHandleTable(OUT PSECTION_OBJECT *SectionObject)
+static
+VOID
+InitLookasideList(UCHAR objt, ULONG cjSize)
{
- PGDI_HANDLE_TABLE HandleTable = NULL;
- LARGE_INTEGER htSize;
- UINT ObjType;
- ULONG ViewSize = 0;
- NTSTATUS Status;
-
- ASSERT(SectionObject != NULL);
-
- htSize.QuadPart = sizeof(GDI_HANDLE_TABLE);
+ ExInitializePagedLookasideList(&gpaLookasideList[objt],
+ NULL,
+ NULL,
+ 0,
+ cjSize,
+ GDITAG_HMGR_LOOKASIDE_START + (objt << 24),
+ 0);
+}
- Status = MmCreateSection((PVOID*)SectionObject,
+INIT_FUNCTION
+NTSTATUS
+NTAPI
+InitGdiHandleTable(void)
+{
+ NTSTATUS status;
+ LARGE_INTEGER liSize;
+ PVOID pvSection;
+ SIZE_T cjViewSize = 0;
+
+ /* Create a section for the shared handle table */
+ liSize.QuadPart = sizeof(GDI_HANDLE_TABLE);//GDI_HANDLE_COUNT * sizeof(ENTRY);
+ status = MmCreateSection(&gpvGdiHdlTblSection,
SECTION_ALL_ACCESS,
NULL,
- &htSize,
+ &liSize,
PAGE_READWRITE,
SEC_COMMIT,
NULL,
NULL);
- if (!NT_SUCCESS(Status))
- return NULL;
-
- /* FIXME - use MmMapViewInSessionSpace once available! */
- Status = MmMapViewInSystemSpace(*SectionObject,
- (PVOID*)&HandleTable,
- &ViewSize);
- if (!NT_SUCCESS(Status))
+ if (!NT_SUCCESS(status))
{
- ObDereferenceObject(*SectionObject);
- *SectionObject = NULL;
- return NULL;
+ DPRINT1("INITGDI: Could not allocate a GDI handle table.\n");
+ return status;
}
- RtlZeroMemory(HandleTable, sizeof(GDI_HANDLE_TABLE));
-
- HandleTable->LookasideLists = ExAllocatePoolWithTag(NonPagedPool,
- BASE_OBJTYPE_COUNT * sizeof(PAGED_LOOKASIDE_LIST),
- TAG_GDIHNDTBLE);
- if (HandleTable->LookasideLists == NULL)
+ /* Map the section in session space */
+ status = MmMapViewInSessionSpace(gpvGdiHdlTblSection,
+ (PVOID*)&gpentHmgr,
+ &cjViewSize);
+ if (!NT_SUCCESS(status))
{
- MmUnmapViewInSystemSpace(HandleTable);
- ObDereferenceObject(*SectionObject);
- *SectionObject = NULL;
- return NULL;
+ DPRINT1("INITGDI: Failed to map handle table section\n");
+ ObDereferenceObject(gpvGdiHdlTblSection);
+ return status;
}
- for (ObjType = 0; ObjType < BASE_OBJTYPE_COUNT; ObjType++)
+ /* Allocate memory for the reference counter table */
+ gpaulRefCount = EngAllocSectionMem(&pvSection,
+ FL_ZERO_MEMORY,
+ GDI_HANDLE_COUNT * sizeof(ULONG),
+ 'frHG');
+ if (!gpaulRefCount)
{
- if (ObjTypeInfo[ObjType].bUseLookaside)
- {
- ExInitializePagedLookasideList(HandleTable->LookasideLists + ObjType,
- NULL,
- NULL,
- 0,
- ObjTypeInfo[ObjType].ulBodySize,
- ObjTypeInfo[ObjType].Tag,
- 0);
- }
+ DPRINT1("INITGDI: Failed to allocate reference table.\n");
+ ObDereferenceObject(gpvGdiHdlTblSection);
+ return STATUS_INSUFFICIENT_RESOURCES;
}
- ShortDelay.QuadPart = -5000LL; /* FIXME - 0.5 ms? */
+ gulFirstFree = 0;
+ gulFirstUnused = RESERVE_ENTRIES_COUNT;
- HandleTable->FirstFree = 0;
- HandleTable->FirstUnused = RESERVE_ENTRIES_COUNT;
+ GdiHandleTable = (PVOID)gpentHmgr;
- return HandleTable;
-}
+ /* Initialize the lookaside lists */
+ gpaLookasideList = ExAllocatePoolWithTag(NonPagedPool,
+ GDIObjTypeTotal * sizeof(PAGED_LOOKASIDE_LIST),
+ TAG_GDIHNDTBLE);
-INIT_FUNCTION
-NTSTATUS
-NTAPI
-InitGdiHandleTable()
-{
- /* Create the GDI handle table */
- GdiHandleTable = GDIOBJ_iAllocHandleTable(&GdiTableSection);
- if (GdiHandleTable == NULL)
- {
- DPRINT1("Failed to initialize the GDI handle table.\n");
- return STATUS_UNSUCCESSFUL;
- }
+ InitLookasideList(GDIObjType_DC_TYPE, sizeof(DC));
+ InitLookasideList(GDIObjType_RGN_TYPE, sizeof(REGION));
+ InitLookasideList(GDIObjType_SURF_TYPE, sizeof(SURFACE));
+ InitLookasideList(GDIObjType_CLIENTOBJ_TYPE, sizeof(CLIENTOBJ));
+ InitLookasideList(GDIObjType_PATH_TYPE, sizeof(PATH));
+ InitLookasideList(GDIObjType_PAL_TYPE, sizeof(PALETTE));
+ InitLookasideList(GDIObjType_ICMLCS_TYPE, sizeof(COLORSPACE));
+ InitLookasideList(GDIObjType_LFONT_TYPE, sizeof(TEXTOBJ));
+ InitLookasideList(GDIObjType_BRUSH_TYPE, sizeof(BRUSH));
return STATUS_SUCCESS;
}
+FORCEINLINE
+VOID
+IncrementGdiHandleCount(void)
+{
+ PPROCESSINFO ppi = PsGetCurrentProcessWin32Process();
+ if (ppi) InterlockedIncrement((LONG*)&ppi->GDIHandleCount);
+}
-static void FASTCALL
-LockErrorDebugOutput(HGDIOBJ hObj, PGDI_TABLE_ENTRY Entry, LPSTR Function)
+FORCEINLINE
+VOID
+DecrementGdiHandleCount(void)
{
- if ((Entry->Type & GDI_ENTRY_BASETYPE_MASK) == 0)
- {
- DPRINT1("%s: Attempted to lock object 0x%x that is deleted!\n", Function, hObj);
- GDIDBG_TRACEDELETER(hObj);
- }
- else if (GDI_HANDLE_GET_REUSECNT(hObj) != GDI_ENTRY_GET_REUSECNT(Entry->Type))
- {
- DPRINT1("%s: Attempted to lock object 0x%x, wrong reuse counter (Handle: 0x%x, Entry: 0x%x)\n",
- Function, hObj, GDI_HANDLE_GET_REUSECNT(hObj), GDI_ENTRY_GET_REUSECNT(Entry->Type));
- }
- else if (GDI_HANDLE_GET_TYPE(hObj) != ((Entry->Type << GDI_ENTRY_UPPER_SHIFT) & GDI_HANDLE_TYPE_MASK))
- {
- DPRINT1("%s: Attempted to lock object 0x%x, type mismatch (Handle: 0x%x, Entry: 0x%x)\n",
- Function, hObj, GDI_HANDLE_GET_TYPE(hObj), (Entry->Type << GDI_ENTRY_UPPER_SHIFT) & GDI_HANDLE_TYPE_MASK);
- }
- else
- {
- DPRINT1("%s: Attempted to lock object 0x%x, something went wrong, typeinfo = 0x%x\n",
- Function, hObj, Entry->Type);
- }
- GDIDBG_TRACECALLER();
+ PPROCESSINFO ppi = PsGetCurrentProcessWin32Process();
+ if (ppi) InterlockedDecrement((LONG*)&ppi->GDIHandleCount);
}
-ULONG
-FASTCALL
-InterlockedPopFreeEntry(VOID)
+static
+PENTRY
+ENTRY_pentPopFreeEntry(VOID)
{
ULONG iFirst, iNext, iPrev;
- PGDI_TABLE_ENTRY pEntry;
+ PENTRY pentFree;
DPRINT("Enter InterLockedPopFreeEntry\n");
do
{
/* Get the index and sequence number of the first free entry */
- iFirst = GdiHandleTable->FirstFree;
+ iFirst = gulFirstFree;
/* Check if we have a free entry */
if (!(iFirst & GDI_HANDLE_INDEX_MASK))
{
/* Increment FirstUnused and get the new index */
- iFirst = InterlockedIncrement((LONG*)&GdiHandleTable->FirstUnused) - 1;
+ iFirst = InterlockedIncrement((LONG*)&gulFirstUnused) - 1;
/* Check if we have unused entries left */
if (iFirst >= GDI_HANDLE_COUNT)
return 0;
}
- /* Return the old index */
- return iFirst;
+ /* Return the old entry */
+ return &gpentHmgr[iFirst];
}
/* Get a pointer to the first free entry */
- pEntry = GdiHandleTable->Entries + (iFirst & GDI_HANDLE_INDEX_MASK);
+ pentFree = &gpentHmgr[iFirst & GDI_HANDLE_INDEX_MASK];
/* Create a new value with an increased sequence number */
- iNext = (USHORT)(ULONG_PTR)pEntry->KernelData;
+ iNext = (USHORT)(ULONG_PTR)pentFree->einfo.pobj;
iNext |= (iFirst & ~GDI_HANDLE_INDEX_MASK) + 0x10000;
/* Try to exchange the FirstFree value */
- iPrev = InterlockedCompareExchange((LONG*)&GdiHandleTable->FirstFree,
+ iPrev = InterlockedCompareExchange((LONG*)&gulFirstFree,
iNext,
iFirst);
}
while (iPrev != iFirst);
/* Sanity check: is entry really free? */
- ASSERT(((ULONG_PTR)pEntry->KernelData & ~GDI_HANDLE_INDEX_MASK) == 0);
+ ASSERT(((ULONG_PTR)pentFree->einfo.pobj & ~GDI_HANDLE_INDEX_MASK) == 0);
- return iFirst & GDI_HANDLE_INDEX_MASK;
+ return pentFree;
}
/* Pushes an entry of the handle table to the free list,
- The entry must be unlocked and the base type field must be 0 */
+ The entry must not have any references left */
+static
VOID
-FASTCALL
-InterlockedPushFreeEntry(ULONG idxToFree)
+ENTRY_vPushFreeEntry(PENTRY pentFree)
{
- ULONG iToFree, iFirst, iPrev;
- PGDI_TABLE_ENTRY pFreeEntry;
+ ULONG iToFree, iFirst, iPrev, idxToFree;
+
+ DPRINT("Enter ENTRY_vPushFreeEntry\n");
+
+ idxToFree = pentFree - gpentHmgr;
+ ASSERT((gpaulRefCount[idxToFree] & REF_MASK_INUSE) == 0);
- DPRINT("Enter InterlockedPushFreeEntry\n");
+ /* Initialize entry */
+ pentFree->Objt = GDIObjType_DEF_TYPE;
+ pentFree->ObjectOwner.ulObj = 0;
+ pentFree->pUser = NULL;
- pFreeEntry = GdiHandleTable->Entries + idxToFree;
- ASSERT((pFreeEntry->Type & GDI_ENTRY_BASETYPE_MASK) == 0);
- ASSERT(pFreeEntry->ProcessId == 0);
- pFreeEntry->UserData = NULL; // FIXME
- ASSERT(pFreeEntry->UserData == NULL);
+ /* Increase reuse counter in entry and reference counter */
+ InterlockedExchangeAdd((LONG*)&gpaulRefCount[idxToFree], REF_INC_REUSE);
+ pentFree->FullUnique += 0x0100;
do
{
/* Get the current first free index and sequence number */
- iFirst = GdiHandleTable->FirstFree;
+ iFirst = gulFirstFree;
- /* Set the KernelData member to the index of the first free entry */
- pFreeEntry->KernelData = UlongToPtr(iFirst & GDI_HANDLE_INDEX_MASK);
+ /* Set the einfo.pobj member to the index of the first free entry */
+ pentFree->einfo.pobj = UlongToPtr(iFirst & GDI_HANDLE_INDEX_MASK);
/* Combine new index and increased sequence number in iToFree */
iToFree = idxToFree | ((iFirst & ~GDI_HANDLE_INDEX_MASK) + 0x10000);
/* Try to atomically update the first free entry */
- iPrev = InterlockedCompareExchange((LONG*)&GdiHandleTable->FirstFree,
+ iPrev = InterlockedCompareExchange((LONG*)&gulFirstFree,
iToFree,
iFirst);
}
while (iPrev != iFirst);
}
-
-BOOL
-INTERNAL_CALL
-GDIOBJ_ValidateHandle(HGDIOBJ hObj, ULONG ObjectType)
+static
+PENTRY
+ENTRY_ReferenceEntryByHandle(HGDIOBJ hobj, FLONG fl)
{
- PGDI_TABLE_ENTRY Entry = GDI_HANDLE_GET_ENTRY(GdiHandleTable, hObj);
- if ((((ULONG_PTR)hObj & GDI_HANDLE_TYPE_MASK) == ObjectType) &&
- (Entry->Type << GDI_ENTRY_UPPER_SHIFT) == GDI_HANDLE_GET_UPPER(hObj))
+ ULONG ulIndex, cNewRefs, cOldRefs;
+ PENTRY pentry;
+
+ /* Get the handle index and check if its too big */
+ ulIndex = GDI_HANDLE_GET_INDEX(hobj);
+ if (ulIndex >= GDI_HANDLE_COUNT) return NULL;
+
+ /* Get pointer to the entry */
+ pentry = &gpentHmgr[ulIndex];
+
+ /* Get the current reference count */
+ cOldRefs = gpaulRefCount[ulIndex];
+
+ do
{
- HANDLE pid = (HANDLE)((ULONG_PTR)Entry->ProcessId & ~0x1);
- if (pid == NULL || pid == PsGetCurrentProcessId())
+ /* Check if the slot is deleted */
+ if ((cOldRefs & REF_MASK_VALID) == 0)
+ {
+ DPRINT("GDIOBJ: slot not valid: 0x%lx, hobh=%p\n", cOldRefs, hobj);
+ return NULL;
+ }
+
+ /* Check if the unique value matches */
+ if (pentry->FullUnique != (USHORT)((ULONG_PTR)hobj >> 16))
{
- return TRUE;
+ DPRINT("GDIOBJ: wrong unique value. Handle: 0x%4x, entry: 0x%4x\n",
+ (USHORT)((ULONG_PTR)hobj >> 16, pentry->FullUnique));
+ return NULL;
}
+
+ /* Check if the object owner is this process or public */
+ if (!(fl & GDIOBJFLAG_IGNOREPID) &&
+ pentry->ObjectOwner.ulObj != GDI_OBJ_HMGR_PUBLIC &&
+ pentry->ObjectOwner.ulObj != PtrToUlong(PsGetCurrentProcessId()))
+ {
+ DPRINT("GDIOBJ: Cannot reference foreign handle %p, pentry=%p:%lx.\n",
+ hobj, pentry, pentry->ObjectOwner.ulObj);
+ return NULL;
+ }
+
+ /* Try to atomically increment the reference count */
+ cNewRefs = cOldRefs + 1;
+ cOldRefs = InterlockedCompareExchange((PLONG)&gpaulRefCount[ulIndex],
+ cNewRefs,
+ cOldRefs);
}
- return FALSE;
+ while (cNewRefs != cOldRefs + 1);
+
+ /* Integrity checks */
+ ASSERT((pentry->FullUnique & 0x1f) == pentry->Objt);
+ ASSERT(pentry->einfo.pobj && pentry->einfo.pobj->hHmgr == hobj);
+
+ return pentry;
}
-POBJ INTERNAL_CALL
-GDIOBJ_AllocObj(UCHAR BaseType)
+static
+HGDIOBJ
+ENTRY_hInsertObject(PENTRY pentry, POBJ pobj, UCHAR objt, ULONG ulOwner)
{
- POBJ pObject;
+ ULONG ulIndex;
- ASSERT((BaseType & ~GDIObjTypeTotal) == 0);
-// BaseType &= GDI_HANDLE_BASETYPE_MASK;
+ /* Calculate the handle index */
+ ulIndex = pentry - gpentHmgr;
- if (ObjTypeInfo[BaseType].bUseLookaside)
- {
- PPAGED_LOOKASIDE_LIST LookasideList;
+ /* Update the fields in the ENTRY */
+ pentry->einfo.pobj = pobj;
+ pentry->Objt = objt & 0x1f;
+ pentry->FullUnique = (pentry->FullUnique & 0xff00) | objt;
+ pentry->ObjectOwner.ulObj = ulOwner;
+
+ /* Make the handle valid with 1 reference */
+ ASSERT((gpaulRefCount[ulIndex] & REF_MASK_INUSE) == 0);
+ InterlockedOr((LONG*)&gpaulRefCount[ulIndex], REF_MASK_VALID | 1);
+
+ /* Return the handle */
+ return (HGDIOBJ)(((ULONG_PTR)pentry->FullUnique << 16) | ulIndex);
+}
+
+POBJ
+NTAPI
+GDIOBJ_AllocateObject(UCHAR objt, ULONG cjSize, FLONG fl)
+{
+ POBJ pobj;
- LookasideList = GdiHandleTable->LookasideLists + BaseType;
- pObject = ExAllocateFromPagedLookasideList(LookasideList);
+ if (fl & BASEFLAG_LOOKASIDE)
+ {
+ /* Allocate the object from a lookaside list */
+ pobj = ExAllocateFromPagedLookasideList(&gpaLookasideList[objt & 0x1f]);
}
else
{
- pObject = ExAllocatePoolWithTag(PagedPool,
- ObjTypeInfo[BaseType].ulBodySize,
- ObjTypeInfo[BaseType].Tag);
+ /* Allocate the object from paged pool */
+ pobj = ExAllocatePoolWithTag(PagedPool, cjSize, GDIOBJ_POOL_TAG(objt));
}
- if (pObject)
- {
- RtlZeroMemory(pObject, ObjTypeInfo[BaseType].ulBodySize);
- }
+ if (!pobj) return NULL;
- return pObject;
-}
+ /* Initialize the object */
+ RtlZeroMemory(pobj, cjSize);
+ pobj->hHmgr = (HGDIOBJ)((ULONG_PTR)objt << 16);
+ pobj->cExclusiveLock = 0;
+ pobj->ulShareCount = 1;
+ pobj->BaseFlags = fl & 0xffff;
+ DBG_INITLOG(&pobj->slhLog);
+ DBG_LOGEVENT(&pobj->slhLog, EVENT_ALLOCATE, 0);
+ return pobj;
+}
-/*!
- * Allocate memory for GDI object and return handle to it.
- *
- * \param ObjectType - type of object \ref GDI object types
- *
- * \return Pointer to the allocated object, which is locked.
-*/
-POBJ INTERNAL_CALL
-GDIOBJ_AllocObjWithHandle(ULONG ObjectType)
+VOID
+NTAPI
+GDIOBJ_vFreeObject(POBJ pobj)
{
- PPROCESSINFO W32Process;
- POBJ newObject = NULL;
- HANDLE CurrentProcessId, LockedProcessId;
- UCHAR TypeIndex;
- UINT Index;
- PGDI_TABLE_ENTRY Entry;
- LONG TypeInfo;
-
- GDIDBG_INITLOOPTRACE();
-
- W32Process = PsGetCurrentProcessWin32Process();
- /* HACK HACK HACK: simplest-possible quota implementation - don't allow a process
- to take too many GDI objects, itself. */
- if (W32Process && W32Process->GDIHandleCount >= 0x2710)
- {
- DPRINT1("Too many objects for process!!!\n");
- DPRINT1("DC %d BRUSH %d BITMAP %d FONT %d RGN %d\n",tDC,tBRUSH,tBITMAP,tFONT,tRGN);
- GDIDBG_DUMPHANDLETABLE();
- return NULL;
- }
+ UCHAR objt;
+
+ DBG_CLEANUP_EVENT_LIST(&pobj->slhLog);
- ASSERT(ObjectType != GDI_OBJECT_TYPE_DONTCARE);
+ /* Get the object type */
+ objt = ((ULONG_PTR)pobj->hHmgr >> 16) & 0x1f;
- TypeIndex = GDI_OBJECT_GET_TYPE_INDEX(ObjectType);
+ /* Call the cleanup procedure */
+ ASSERT(apfnCleanup[objt]);
+ apfnCleanup[objt](pobj);
- newObject = GDIOBJ_AllocObj(TypeIndex);
- if (!newObject)
+ /* Check if the object is allocated from a lookaside list */
+ if (pobj->BaseFlags & BASEFLAG_LOOKASIDE)
{
- DPRINT1("Not enough memory to allocate gdi object!\n");
- return NULL;
+ ExFreeToPagedLookasideList(&gpaLookasideList[objt], pobj);
}
+ else
+ {
+ ExFreePoolWithTag(pobj, GDIOBJ_POOL_TAG(objt));
+ }
+}
- CurrentProcessId = PsGetCurrentProcessId();
- LockedProcessId = (HANDLE)((ULONG_PTR)CurrentProcessId | 0x1);
-
-// RtlZeroMemory(newObject, ObjTypeInfo[TypeIndex].ulBodySize);
-
- /* On Windows the higher 16 bit of the type field don't contain the
- full type from the handle, but the base type.
- (type = BRSUH, PEN, EXTPEN, basetype = BRUSH) */
- TypeInfo = (ObjectType & GDI_HANDLE_BASETYPE_MASK) | (ObjectType >> GDI_ENTRY_UPPER_SHIFT);
+VOID
+NTAPI
+GDIOBJ_vDereferenceObject(POBJ pobj)
+{
+ ULONG cRefs, ulIndex;
- Index = InterlockedPopFreeEntry();
- if (Index != 0)
+ /* Check if the object has a handle */
+ if (GDI_HANDLE_GET_INDEX(pobj->hHmgr))
{
- HANDLE PrevProcId;
+ /* Calculate the index */
+ ulIndex = GDI_HANDLE_GET_INDEX(pobj->hHmgr);
- Entry = &GdiHandleTable->Entries[Index];
+ /* Decrement reference count */
+ ASSERT((gpaulRefCount[ulIndex] & REF_MASK_COUNT) > 0);
+ cRefs = InterlockedDecrement((LONG*)&gpaulRefCount[ulIndex]) & REF_MASK_INUSE;
-LockHandle:
- PrevProcId = InterlockedCompareExchangePointer((PVOID*)&Entry->ProcessId, LockedProcessId, 0);
- if (PrevProcId == NULL)
+ /* Check if we reached 0 and handle bit is not set */
+ if (cRefs == 0)
{
- PTHREADINFO Thread = (PTHREADINFO)PsGetCurrentThreadWin32Thread();
- HGDIOBJ Handle;
-
- Entry->KernelData = newObject;
+ /* Check if the handle was process owned */
+ if (gpentHmgr[ulIndex].ObjectOwner.ulObj != GDI_OBJ_HMGR_PUBLIC &&
+ gpentHmgr[ulIndex].ObjectOwner.ulObj != GDI_OBJ_HMGR_NONE)
+ {
+ /* Decrement the process handle count */
+ ASSERT(gpentHmgr[ulIndex].ObjectOwner.ulObj ==
+ HandleToUlong(PsGetCurrentProcessId()));
+ DecrementGdiHandleCount();
+ }
- /* copy the reuse-counter */
- TypeInfo |= Entry->Type & GDI_ENTRY_REUSE_MASK;
+ /* Push entry to the free list */
+ ENTRY_vPushFreeEntry(&gpentHmgr[ulIndex]);
+ }
+ }
+ else
+ {
+ /* Decrement the objects reference count */
+ ASSERT(pobj->ulShareCount > 0);
+ cRefs = InterlockedDecrement((LONG*)&pobj->ulShareCount);
+ }
- /* we found a free entry, no need to exchange this field atomically
- since we're holding the lock */
- Entry->Type = TypeInfo;
+ DBG_LOGEVENT(&pobj->slhLog, EVENT_DEREFERENCE, cRefs);
- /* Create a handle */
- Handle = (HGDIOBJ)((Index & 0xFFFF) | (TypeInfo << GDI_ENTRY_UPPER_SHIFT));
+ /* Check if we reached 0 */
+ if (cRefs == 0)
+ {
+ /* Make sure it's ok to delete the object */
+ ASSERT(pobj->BaseFlags & BASEFLAG_READY_TO_DIE);
- /* Initialize BaseObject fields */
- newObject->hHmgr = Handle;
- newObject->ulShareCount = 0;
- newObject->cExclusiveLock = 1;
- newObject->Tid = Thread;
-#if DBG
- if (Thread) Thread->cExclusiveLocks++;
-#endif
+ /* Free the object */
+ GDIOBJ_vFreeObject(pobj);
+ }
+}
- AllocTypeDataDump(TypeInfo);
+POBJ
+NTAPI
+GDIOBJ_ReferenceObjectByHandle(
+ HGDIOBJ hobj,
+ UCHAR objt)
+{
+ PENTRY pentry;
+ POBJ pobj;
- /* unlock the entry */
- (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, CurrentProcessId);
+ /* Check if the handle type matches */
+ ASSERT_SHARED_OBJECT_TYPE(objt);
+ if ((((ULONG_PTR)hobj >> 16) & 0x1f) != objt)
+ {
+ DPRINT("GDIOBJ: wrong type. handle=%p, type=%x\n", hobj, objt);
+ return NULL;
+ }
- GDIDBG_CAPTUREALLOCATOR(Index);
+ /* Reference the handle entry */
+ pentry = ENTRY_ReferenceEntryByHandle(hobj, 0);
+ if (!pentry)
+ {
+ DPRINT("GDIOBJ: requested handle 0x%p is not valid.\n", hobj);
+ return NULL;
+ }
- if (W32Process != NULL)
- {
- InterlockedIncrement(&W32Process->GDIHandleCount);
- }
+ /* Get the pointer to the BASEOBJECT */
+ pobj = pentry->einfo.pobj;
- DPRINT("GDIOBJ_AllocObj: 0x%x ob: 0x%x\n", Handle, newObject);
- return newObject;
- }
- else
- {
- GDIDBG_TRACELOOP(Index, PrevProcId, CurrentProcessId);
- /* damn, someone is trying to lock the object even though it doesn't
- even exist anymore, wait a little and try again!
- FIXME - we shouldn't loop forever! Give up after some time! */
- DelayExecution();
- /* try again */
- goto LockHandle;
- }
+ /* Check if the object is exclusively locked */
+ if (pobj->cExclusiveLock != 0)
+ {
+ DPRINT1("GDIOBJ: Cannot reference oject %p with exclusive lock.\n", hobj);
+ GDIOBJ_vDereferenceObject(pobj);
+ DBG_DUMP_EVENT_LIST(&pobj->slhLog);
+ return NULL;
}
- GDIOBJ_FreeObj(newObject, TypeIndex);
+ DBG_LOGEVENT(&pobj->slhLog, EVENT_REFERENCE, gpaulRefCount[pentry - gpentHmgr]);
- DPRINT1("Failed to insert gdi object into the handle table, no handles left!\n");
- GDIDBG_DUMPHANDLETABLE();
-
- return NULL;
+ /* All is well, return the object */
+ return pobj;
}
-
-VOID INTERNAL_CALL
-GDIOBJ_FreeObj(POBJ pObject, UCHAR BaseType)
+VOID
+NTAPI
+GDIOBJ_vReferenceObjectByPointer(POBJ pobj)
{
- /* Object must not have a handle! */
- ASSERT(pObject->hHmgr == NULL);
+ ULONG cRefs;
- if (ObjTypeInfo[BaseType].bUseLookaside)
- {
- PPAGED_LOOKASIDE_LIST LookasideList;
+ /* Must not be exclusively locked */
+ ASSERT(pobj->cExclusiveLock == 0);
- LookasideList = GdiHandleTable->LookasideLists + BaseType;
- ExFreeToPagedLookasideList(LookasideList, pObject);
+ /* Check if the object has a handle */
+ if (GDI_HANDLE_GET_INDEX(pobj->hHmgr))
+ {
+ /* Increase the handle's reference count */
+ ULONG ulIndex = GDI_HANDLE_GET_INDEX(pobj->hHmgr);
+ ASSERT((gpaulRefCount[ulIndex] & REF_MASK_COUNT) > 0);
+ cRefs = InterlockedIncrement((LONG*)&gpaulRefCount[ulIndex]);
}
else
{
- ExFreePool(pObject);
+ /* Increase the object's reference count */
+ cRefs = InterlockedIncrement((LONG*)&pobj->ulShareCount);
}
+
+ DBG_LOGEVENT(&pobj->slhLog, EVENT_REFERENCE, cRefs);
}
-/*!
- * Free memory allocated for the GDI object. For each object type this function calls the
- * appropriate cleanup routine.
- *
- * \param hObj - handle of the object to be deleted.
- *
- * \return Returns TRUE if succesful.
- * \return Returns FALSE if the cleanup routine returned FALSE or the object doesn't belong
- * to the calling process.
- *
- * \bug This function should return VOID and kill the object no matter what...
-*/
-BOOL INTERNAL_CALL
-GDIOBJ_FreeObjByHandle(HGDIOBJ hObj, DWORD ExpectedType)
+PGDIOBJ
+NTAPI
+GDIOBJ_LockObject(
+ HGDIOBJ hobj,
+ UCHAR objt)
{
- PGDI_TABLE_ENTRY Entry;
- HANDLE ProcessId, LockedProcessId, PrevProcId;
- ULONG HandleType, HandleUpper, TypeIndex;
- BOOL Silent;
+ PENTRY pentry;
+ POBJ pobj;
+ DWORD dwThreadId;
+
+ /* Check if the handle type matches */
+ ASSERT_EXCLUSIVE_OBJECT_TYPE(objt);
+ if ((((ULONG_PTR)hobj >> 16) & 0x1f) != objt)
+ {
+ DPRINT("wrong object type: hobj=0x%p, objt=0x%x\n", hobj, objt);
+ return NULL;
+ }
- GDIDBG_INITLOOPTRACE();
+ /* Reference the handle entry */
+ pentry = ENTRY_ReferenceEntryByHandle(hobj, 0);
+ if (!pentry)
+ {
+ DPRINT("GDIOBJ: requested handle 0x%p is not valid.\n", hobj);
+ return NULL;
+ }
- DPRINT("GDIOBJ_FreeObj: hObj: 0x%08x\n", hObj);
+ /* Get the pointer to the BASEOBJECT */
+ pobj = pentry->einfo.pobj;
- if (GDI_HANDLE_IS_STOCKOBJ(hObj))
+ /* Check if we already own the lock */
+ dwThreadId = PtrToUlong(PsGetCurrentThreadId());
+ if (pobj->dwThreadId != dwThreadId)
{
- DPRINT1("GDIOBJ_FreeObj() failed, can't delete stock object handle: 0x%x !!!\n", hObj);
- GDIDBG_TRACECALLER();
- return FALSE;
+ /* Disable APCs and acquire the push lock */
+ KeEnterCriticalRegion();
+ ExAcquirePushLockExclusive(&pobj->pushlock);
+
+ /* Set us as lock owner */
+ ASSERT(pobj->dwThreadId == 0);
+ pobj->dwThreadId = dwThreadId;
}
- ProcessId = PsGetCurrentProcessId();
- LockedProcessId = (HANDLE)((ULONG_PTR)ProcessId | 0x1);
+ /* Increase lock count */
+ pobj->cExclusiveLock++;
+ DBG_INCREASE_LOCK_COUNT(PsGetCurrentProcessWin32Process(), hobj);
+ DBG_LOGEVENT(&pobj->slhLog, EVENT_LOCK, 0);
+
+ /* Return the object */
+ return pobj;
+}
- Silent = (ExpectedType & GDI_OBJECT_TYPE_SILENT);
- ExpectedType &= ~GDI_OBJECT_TYPE_SILENT;
+VOID
+NTAPI
+GDIOBJ_vUnlockObject(POBJ pobj)
+{
+ ASSERT(pobj->cExclusiveLock > 0);
- HandleType = GDI_HANDLE_GET_TYPE(hObj);
- HandleUpper = GDI_HANDLE_GET_UPPER(hObj);
+ /* Decrease lock count */
+ pobj->cExclusiveLock--;
+ DBG_DECREASE_LOCK_COUNT(PsGetCurrentProcessWin32Process(), pobj->hHmgr);
- /* Check if we have the requested type */
- if ( (ExpectedType != GDI_OBJECT_TYPE_DONTCARE &&
- HandleType != ExpectedType) ||
- HandleType == 0 )
+ /* Check if this was the last lock */
+ if (pobj->cExclusiveLock == 0)
{
- DPRINT1("Attempted to free object 0x%x of wrong type (Handle: 0x%x, expected: 0x%x)\n",
- hObj, HandleType, ExpectedType);
- GDIDBG_TRACECALLER();
- return FALSE;
+ /* Reset lock owner */
+ pobj->dwThreadId = 0;
+
+ /* Release the pushlock and reenable APCs */
+ ExReleasePushLockExclusive(&pobj->pushlock);
+ KeLeaveCriticalRegion();
}
- Entry = GDI_HANDLE_GET_ENTRY(GdiHandleTable, hObj);
+ /* Dereference the object */
+ DBG_LOGEVENT(&pobj->slhLog, EVENT_UNLOCK, 0);
+ GDIOBJ_vDereferenceObject(pobj);
+}
-LockHandle:
- /* lock the object, we must not delete global objects, so don't exchange the locking
- process ID to zero when attempting to lock a global object... */
- PrevProcId = InterlockedCompareExchangePointer((PVOID*)&Entry->ProcessId, LockedProcessId, ProcessId);
- if (PrevProcId == ProcessId)
- {
- if ( (Entry->KernelData != NULL) &&
- ((Entry->Type << GDI_ENTRY_UPPER_SHIFT) == HandleUpper) &&
- ((Entry->Type & GDI_ENTRY_BASETYPE_MASK) == (HandleUpper & GDI_ENTRY_BASETYPE_MASK)) )
- {
- POBJ Object;
- PTHREADINFO Thread = (PTHREADINFO)PsGetCurrentThreadWin32Thread();
+HGDIOBJ
+NTAPI
+GDIOBJ_hInsertObject(
+ POBJ pobj,
+ ULONG ulOwner)
+{
+ PENTRY pentry;
+ UCHAR objt;
- Object = Entry->KernelData;
+ /* Must have no handle and only one reference */
+ ASSERT(GDI_HANDLE_GET_INDEX(pobj->hHmgr) == 0);
+ ASSERT(pobj->cExclusiveLock == 0);
+ ASSERT(pobj->ulShareCount == 1);
- if ((Object->cExclusiveLock == 0 || Object->Tid == Thread) &&
- Object->ulShareCount == 0)
- {
- BOOL Ret;
- PPROCESSINFO W32Process = PsGetCurrentProcessWin32Process();
+ /* Get a free handle entry */
+ pentry = ENTRY_pentPopFreeEntry();
+ if (!pentry)
+ {
+ DPRINT1("GDIOBJ: could not get a free entry.\n");
+ return NULL;
+ }
- /* Clear the basetype field so when unlocking the handle it gets finally deleted and increment reuse counter */
- Entry->Type = (Entry->Type + GDI_ENTRY_REUSE_INC) & ~GDI_ENTRY_BASETYPE_MASK;
+ /* Make the object exclusively locked */
+ ExInitializePushLock(&pobj->pushlock);
+ KeEnterCriticalRegion();
+ ExAcquirePushLockExclusive(&pobj->pushlock);
+ pobj->cExclusiveLock = 1;
+ pobj->dwThreadId = PtrToUlong(PsGetCurrentThreadId());
+ DBG_INCREASE_LOCK_COUNT(PsGetCurrentProcessWin32Process(), pobj->hHmgr);
- /* unlock the handle slot */
- (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, NULL);
+ /* Get object type from the hHmgr field */
+ objt = ((ULONG_PTR)pobj->hHmgr >> 16) & 0xff;
+ ASSERT(objt != GDIObjType_DEF_TYPE);
- /* push this entry to the free list */
- InterlockedPushFreeEntry(GDI_ENTRY_TO_INDEX(GdiHandleTable, Entry));
+ /* Check if current process is requested owner */
+ if (ulOwner == GDI_OBJ_HMGR_POWNED)
+ {
+ /* Increment the process handle count */
+ IncrementGdiHandleCount();
- Object->hHmgr = NULL;
-#if DBG
- if (Thread)
- {
- if (Thread->cExclusiveLocks < Object->cExclusiveLock)
- {
- DPRINT1("cExclusiveLocks = %ld, object: %ld\n",
- Thread->cExclusiveLocks, Object->cExclusiveLock);
- ASSERT(FALSE);
- }
- Thread->cExclusiveLocks -= Object->cExclusiveLock;
- }
-#endif
+ /* Use Process id */
+ ulOwner = HandleToUlong(PsGetCurrentProcessId());
+ }
- if (W32Process != NULL)
- {
- InterlockedDecrement(&W32Process->GDIHandleCount);
- }
+ /* Insert the object into the handle table */
+ pobj->hHmgr = ENTRY_hInsertObject(pentry, pobj, objt, ulOwner);
+
+ /* Return the handle */
+ DPRINT("GDIOBJ: Created handle: %p\n", pobj->hHmgr);
+ DBG_LOGEVENT(&pobj->slhLog, EVENT_CREATE_HANDLE, 0);
+ return pobj->hHmgr;
+}
- /* call the cleanup routine. */
- TypeIndex = GDI_OBJECT_GET_TYPE_INDEX(HandleType);
- Ret = ObjTypeInfo[TypeIndex].CleanupProc(Object);
+VOID
+NTAPI
+GDIOBJ_vSetObjectOwner(
+ POBJ pobj,
+ ULONG ulOwner)
+{
+ PENTRY pentry;
- DeAllocTypeDataDump(HandleType);
+ /* This is a ugly hack, need to fix IntGdiSetDCOwnerEx */
+ if (GDI_HANDLE_IS_STOCKOBJ(pobj->hHmgr))
+ {
+ DPRINT("Trying to set ownership of stock object %p to %lx\n", pobj->hHmgr, ulOwner);
+ return;
+ }
- /* Now it's time to free the memory */
- GDIOBJ_FreeObj(Object, TypeIndex);
+ /* Get the handle entry */
+ ASSERT(GDI_HANDLE_GET_INDEX(pobj->hHmgr));
+ pentry = &gpentHmgr[GDI_HANDLE_GET_INDEX(pobj->hHmgr)];
- GDIDBG_CAPTUREDELETER(hObj);
- return Ret;
- }
- else if (Object->ulShareCount != 0)
- {
- NTSTATUS Status;
- PEPROCESS OldProcess;
- Object->BaseFlags |= BASEFLAG_READY_TO_DIE;
- DPRINT("Object %p, ulShareCount = %d\n", Object->hHmgr, Object->ulShareCount);
- /* Set NULL owner. Do the work here to avoid race conditions */
- Status = PsLookupProcessByProcessId((HANDLE)((ULONG_PTR)PrevProcId & ~0x1), &OldProcess);
- if (NT_SUCCESS(Status))
- {
- PPROCESSINFO W32Process = (PPROCESSINFO)OldProcess->Win32Process;
- if (W32Process != NULL)
- {
- InterlockedDecrement(&W32Process->GDIHandleCount);
- }
- ObDereferenceObject(OldProcess);
- }
- (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, NULL);
- /* Don't wait on shared locks */
- return FALSE;
- }
- else
- {
- /*
- * The object is currently locked by another thread, so freeing is forbidden!
- */
- DPRINT1("Object->cExclusiveLock = %d\n", Object->cExclusiveLock);
- GDIDBG_TRACECALLER();
- GDIDBG_TRACELOCKER(hObj);
- (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId);
- /* do not assert here for it will call again from dxg.sys it being call twice */
-
- DelayExecution();
- goto LockHandle;
- }
- }
- else
+ /* Is the current process requested? */
+ if (ulOwner == GDI_OBJ_HMGR_POWNED)
+ {
+ /* Use process id */
+ ulOwner = HandleToUlong(PsGetCurrentProcessId());
+ if (pentry->ObjectOwner.ulObj != ulOwner)
{
- LockErrorDebugOutput(hObj, Entry, "GDIOBJ_FreeObj");
- (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId);
+ IncrementGdiHandleCount();
}
}
- else if (PrevProcId == LockedProcessId)
- {
- GDIDBG_TRACELOOP(hObj, PrevProcId, ProcessId);
- /* the object is currently locked, wait some time and try again.
- FIXME - we shouldn't loop forever! Give up after some time! */
- DelayExecution();
- /* try again */
- goto LockHandle;
- }
- else
+ // HACK
+ if (ulOwner == GDI_OBJ_HMGR_NONE)
+ ulOwner = GDI_OBJ_HMGR_PUBLIC;
+
+ if (ulOwner == GDI_OBJ_HMGR_PUBLIC ||
+ ulOwner == GDI_OBJ_HMGR_NONE)
{
- if (!Silent)
+ /* Make sure we don't leak user mode memory */
+ ASSERT(pentry->pUser == NULL);
+ if (pentry->ObjectOwner.ulObj != GDI_OBJ_HMGR_PUBLIC &&
+ pentry->ObjectOwner.ulObj != GDI_OBJ_HMGR_NONE)
{
- if ((Entry->Type & GDI_ENTRY_BASETYPE_MASK) == 0)
- {
- DPRINT1("Attempted to free gdi handle 0x%x that is already deleted!\n", hObj);
- }
- else if (((ULONG_PTR)PrevProcId & ~0x1) == 0)
- {
- DPRINT1("Attempted to free global gdi handle 0x%x, caller needs to get ownership first!!!\n", hObj);
- }
- else
- {
- DPRINT1("Attempted to free foreign handle: 0x%x Owner: 0x%x from Caller: 0x%x\n", hObj, (ULONG_PTR)PrevProcId & ~0x1, (ULONG_PTR)ProcessId & ~0x1);
- }
- DPRINT1("Type = 0x%lx, KernelData = 0x%p, ProcessId = 0x%p\n", Entry->Type, Entry->KernelData, Entry->ProcessId);
- GDIDBG_TRACECALLER();
- GDIDBG_TRACEALLOCATOR(hObj);
+ DecrementGdiHandleCount();
}
}
- return FALSE;
+ /* Set new owner */
+ pentry->ObjectOwner.ulObj = ulOwner;
}
+/* Locks 2 or 3 objects at a time */
BOOL
-FASTCALL
-IsObjectDead(HGDIOBJ hObject)
+NTAPI
+GDIOBJ_bLockMultipleObjects(
+ IN ULONG ulCount,
+ IN HGDIOBJ* ahObj,
+ OUT PGDIOBJ* apObj,
+ IN UCHAR objt)
{
- INT Index = GDI_HANDLE_GET_INDEX(hObject);
- PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index];
- // We check to see if the objects are knocking on deaths door.
- if ((Entry->Type & GDI_ENTRY_BASETYPE_MASK) != 0)
- return FALSE;
- else
- {
- DPRINT1("Object 0x%x currently being destroyed!!!\n",hObject);
- return TRUE; // return true and move on.
- }
-}
+ UINT auiIndices[3] = {0, 1, 2};
+ UINT i, j, tmp;
-/*
- * Process Environment Cached GDI Handles
- *
- * What types of GDI handle objects that are cached in the GDI handle buffer?
- * Brushes set to BS_SOLID, Pens with widths of zero or set to PS_SOLID, and
- * Regions that are set to NULLREGION or SIMPLEREGION.
- */
-BOOL
-FASTCALL
-bPEBCacheHandle(HGDIOBJ Handle, int oType, PVOID pAttr)
-{
- PGDIHANDLECACHE GdiHandleCache;
- HGDIOBJ *hPtr;
- HANDLE Lock;
- int Number, Offset, MaxNum = CACHE_PEN_ENTRIES;
- BOOL Ret = FALSE;
-
- GdiHandleCache = (PGDIHANDLECACHE)NtCurrentTeb()->ProcessEnvironmentBlock->GdiHandleBuffer;
-
- switch (oType)
- {
- case hctBrushHandle:
- Offset = 0;
- MaxNum = CACHE_BRUSH_ENTRIES;
- break;
-
- case hctPenHandle:
- Offset = CACHE_BRUSH_ENTRIES;
- break;
-
- case hctRegionHandle:
- Offset = CACHE_BRUSH_ENTRIES+CACHE_PEN_ENTRIES;
- break;
-
- default:
- return FALSE;
- }
-
- Lock = InterlockedCompareExchangePointer( (PVOID*)&GdiHandleCache->ulLock,
- NtCurrentTeb(),
- NULL );
- if (Lock) return FALSE;
-
- _SEH2_TRY
- {
- Number = GdiHandleCache->ulNumHandles[oType];
-
- hPtr = GdiHandleCache->Handle + Offset;
-
- if ( pAttr )
- {
- if ( Number < MaxNum )
- { // This object is cached and waiting for it's resurrection by the users.
- ((PRGN_ATTR)pAttr)->AttrFlags |= ATTR_CACHED;
- hPtr[Number] = Handle;
- GdiHandleCache->ulNumHandles[oType]++;
- DPRINT("Put Handle Count %d PEB 0x%x\n", GdiHandleCache->ulNumHandles[oType], NtCurrentTeb()->ProcessEnvironmentBlock);
- Ret = TRUE;
- }
- }
- }
- _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
- {
- Ret = FALSE;
- }
- _SEH2_END;
-
- (void)InterlockedExchangePointer((PVOID*)&GdiHandleCache->ulLock, Lock);
- return Ret;
-}
+ ASSERT(ulCount <= 3);
-/*!
- * Delete GDI object
- * \param hObject object handle
- * \return if the function fails the returned value is FALSE.
-*/
-BOOL
-FASTCALL
-GreDeleteObject(HGDIOBJ hObject)
-{
- INT Index;
- PGDI_TABLE_ENTRY Entry;
- DWORD dwObjectType;
- INT ihct;
- PVOID pAttr = NULL;
-
- DPRINT("NtGdiDeleteObject handle 0x%08x\n", hObject);
- if (!IsObjectDead(hObject))
- {
- dwObjectType = GDIOBJ_GetObjectType(hObject);
-
- Index = GDI_HANDLE_GET_INDEX(hObject);
- Entry = &GdiHandleTable->Entries[Index];
- pAttr = Entry->UserData;
-
- switch (dwObjectType)
- {
- case GDI_OBJECT_TYPE_BRUSH:
- ihct = hctBrushHandle;
- break;
-
- case GDI_OBJECT_TYPE_PEN:
- ihct = hctPenHandle;
- break;
-
- case GDI_OBJECT_TYPE_REGION:
- ihct = hctRegionHandle;
- break;
- }
-
- switch (dwObjectType)
- {
-// case GDI_OBJECT_TYPE_BRUSH:
-// case GDI_OBJECT_TYPE_PEN:
- case GDI_OBJECT_TYPE_REGION:
- /* If pAttr NULL, the probability is high for System GDI handle object. */
- if ( pAttr &&
- bPEBCacheHandle(hObject, ihct, pAttr) )
- { /* User space handle only! */
- return TRUE;
- }
- if (pAttr)
- {
- FreeObjectAttr(pAttr);
- Entry->UserData = NULL;
- }
- break;
-
- case GDI_OBJECT_TYPE_DC:
-// DC_FreeDcAttr(hObject);
- break;
- }
-
- return NULL != hObject
- ? GDIOBJ_FreeObjByHandle(hObject, dwObjectType) : FALSE;
- }
- else
+ /* Sort the handles */
+ for (i = 0; i < ulCount - 1; i++)
{
- DPRINT1("Attempt DeleteObject 0x%x currently being destroyed!!!\n",hObject);
- return TRUE; // return true and move on.
+ for (j = i + 1; j < ulCount; j++)
+ {
+ if ((ULONG_PTR)ahObj[auiIndices[i]] <
+ (ULONG_PTR)ahObj[auiIndices[j]])
+ {
+ tmp = auiIndices[i];
+ auiIndices[i] = auiIndices[j];
+ auiIndices[j] = tmp;
+ }
+ }
}
-}
-
-VOID
-FASTCALL
-IntDeleteHandlesForProcess(struct _EPROCESS *Process, ULONG ObjectType)
-{
- PGDI_TABLE_ENTRY Entry, End;
- ULONG Index = RESERVE_ENTRIES_COUNT;
- HANDLE ProcId;
- PPROCESSINFO W32Process;
- W32Process = (PPROCESSINFO)Process->Win32Process;
- ASSERT(W32Process);
-
- if (W32Process->GDIHandleCount > 0)
+ /* Lock the objects in safe order */
+ for (i = 0; i < ulCount; i++)
{
- ProcId = Process->UniqueProcessId;
+ /* Skip NULL handles */
+ if (ahObj[auiIndices[i]] == NULL)
+ {
+ apObj[auiIndices[i]] = NULL;
+ continue;
+ }
- /* FIXME - Instead of building the handle here and delete it using GDIOBJ_FreeObj
- we should delete it directly here! */
+ /* Lock the object */
+ apObj[auiIndices[i]] = GDIOBJ_LockObject(ahObj[auiIndices[i]], objt);
- End = &GdiHandleTable->Entries[GDI_HANDLE_COUNT];
- for (Entry = &GdiHandleTable->Entries[RESERVE_ENTRIES_COUNT];
- Entry != End;
- Entry++, Index++)
+ /* Check for failure */
+ if (apObj[auiIndices[i]] == NULL)
{
- /* ignore the lock bit */
- if ( (HANDLE)((ULONG_PTR)Entry->ProcessId & ~0x1) == ProcId)
+ /* Cleanup */
+ while (i--)
{
- if ( (Entry->Type & GDI_ENTRY_BASETYPE_MASK) == ObjectType ||
- ObjectType == GDI_OBJECT_TYPE_DONTCARE)
- {
- HGDIOBJ ObjectHandle;
-
- /* Create the object handle for the entry, the lower(!) 16 bit of the
- Type field includes the type of the object including the stock
- object flag - but since stock objects don't have a process id we can
- simply ignore this fact here. */
- ObjectHandle = (HGDIOBJ)(Index | (Entry->Type << GDI_ENTRY_UPPER_SHIFT));
-
- if (!GDIOBJ_FreeObjByHandle(ObjectHandle, GDI_OBJECT_TYPE_DONTCARE))
- {
- DPRINT1("Failed to delete object %p!\n", ObjectHandle);
- }
-
- if (W32Process->GDIHandleCount == 0)
- {
- /* there are no more gdi handles for this process, bail */
- break;
- }
- }
+ if (apObj[auiIndices[i]])
+ GDIOBJ_vUnlockObject(apObj[auiIndices[i]]);
}
+ return FALSE;
}
}
-}
+ return TRUE;
+}
-/*!
- * Internal function. Called when the process is destroyed to free the remaining GDI handles.
- * \param Process - PID of the process that will be destroyed.
-*/
-BOOL INTERNAL_CALL
-GDI_CleanupForProcess(struct _EPROCESS *Process)
+PVOID
+NTAPI
+GDIOBJ_pvGetObjectAttr(POBJ pobj)
{
- PEPROCESS CurrentProcess;
- PPROCESSINFO W32Process;
-
- DPRINT("Starting CleanupForProcess prochandle %x Pid %d\n", Process, Process->UniqueProcessId);
- CurrentProcess = PsGetCurrentProcess();
- if (CurrentProcess != Process)
- {
- KeAttachProcess(&Process->Pcb);
- }
-
- W32Process = (PPROCESSINFO)CurrentProcess->Win32Process;
-
- /* Delete objects. Begin with types that are not referenced by other types */
- IntDeleteHandlesForProcess(Process, GDILoObjType_LO_DC_TYPE);
- IntDeleteHandlesForProcess(Process, GDILoObjType_LO_BRUSH_TYPE);
- IntDeleteHandlesForProcess(Process, GDILoObjType_LO_BITMAP_TYPE);
-
- /* Finally finish with what's left */
- IntDeleteHandlesForProcess(Process, GDI_OBJECT_TYPE_DONTCARE);
-
- if (CurrentProcess != Process)
- {
- KeDetachProcess();
- }
-
-#ifdef GDI_DEBUG
- GdiDbgHTIntegrityCheck();
-#endif
-
- DPRINT("Completed cleanup for process %d\n", Process->UniqueProcessId);
- if (W32Process->GDIHandleCount > 0)
- {
- DPRINT1("Leaking %d handles!\n", W32Process->GDIHandleCount);
- }
-
- return TRUE;
+ ULONG ulIndex = GDI_HANDLE_GET_INDEX(pobj->hHmgr);
+ return gpentHmgr[ulIndex].pUser;
}
-/*!
- * Return pointer to the object by handle.
- *
- * \param hObj Object handle
- * \return Pointer to the object.
- *
- * \note Process can only get pointer to the objects it created or global objects.
- *
- * \todo Get rid of the ExpectedType parameter!
-*/
-PGDIOBJ INTERNAL_CALL
-GDIOBJ_LockObj(HGDIOBJ hObj, DWORD ExpectedType)
+VOID
+NTAPI
+GDIOBJ_vSetObjectAttr(POBJ pobj, PVOID pvObjAttr)
{
- ULONG HandleIndex;
- PGDI_TABLE_ENTRY Entry;
- HANDLE ProcessId, HandleProcessId, LockedProcessId, PrevProcId;
- POBJ Object = NULL;
- ULONG HandleType, HandleUpper;
-
- /* Check for dummy call */
- if(hObj == NULL)
- return NULL ;
+ ULONG ulIndex;
- GDIDBG_INITLOOPTRACE();
-
- HandleIndex = GDI_HANDLE_GET_INDEX(hObj);
- HandleType = GDI_HANDLE_GET_TYPE(hObj);
- HandleUpper = GDI_HANDLE_GET_UPPER(hObj);
-
- /* Check that the handle index is valid. */
- if (HandleIndex >= GDI_HANDLE_COUNT )
- return NULL;
-
- Entry = &GdiHandleTable->Entries[HandleIndex];
-
- /* Check if we have the requested type */
- if ( (ExpectedType != GDI_OBJECT_TYPE_DONTCARE &&
- HandleType != ExpectedType) ||
- HandleType == 0 )
- {
- DPRINT("Attempted to lock object 0x%x of wrong type (Handle: 0x%x, requested: 0x%x)\n",
- hObj, HandleType, ExpectedType);
- GDIDBG_TRACECALLER();
- GDIDBG_TRACEALLOCATOR(hObj);
- GDIDBG_TRACEDELETER(hObj);
- return NULL;
- }
+ ASSERT(pobj->hHmgr);
- ProcessId = (HANDLE)((ULONG_PTR)PsGetCurrentProcessId() & ~1);
+ /* Get the handle index */
+ ulIndex = GDI_HANDLE_GET_INDEX(pobj->hHmgr);
- /*
- * Prevent the thread from being terminated during the locking process.
- * It would result in undesired effects and inconsistency of the global
- * handle table.
- */
+ /* Set pointer to the usermode attribute */
+ gpentHmgr[ulIndex].pUser = pvObjAttr;
+}
- KeEnterCriticalRegion();
+VOID
+NTAPI
+GDIOBJ_vDeleteObject(POBJ pobj)
+{
+ ULONG ulIndex;
- /*
- * Loop until we either successfully lock the handle entry & object or
- * fail some of the check.
- */
+ /* Set the object's delete flag */
+ InterlockedOr16((SHORT*)&pobj->BaseFlags, BASEFLAG_READY_TO_DIE);
+ DBG_LOGEVENT(&pobj->slhLog, EVENT_DELETE, 0);
- for (;;)
+ /* Get the handle index */
+ ulIndex = GDI_HANDLE_GET_INDEX(pobj->hHmgr);
+ if (ulIndex)
{
- HandleProcessId = (HANDLE)((ULONG_PTR)Entry->ProcessId & ~1);
-
- /* Check for invalid owner. */
- if (ProcessId != HandleProcessId && HandleProcessId != NULL)
- {
- DPRINT1("Tried to lock object (0x%p) of wrong owner! ProcessId = %p, HandleProcessId = %p\n", hObj, ProcessId, HandleProcessId);
- GDIDBG_TRACECALLER();
- GDIDBG_TRACEALLOCATOR(hObj);
- break;
- }
-
- /* Lock the handle table entry. */
- LockedProcessId = (HANDLE)((ULONG_PTR)HandleProcessId | 0x1);
- PrevProcId = InterlockedCompareExchangePointer((PVOID*)&Entry->ProcessId,
- LockedProcessId,
- HandleProcessId);
+ /* Reset the handle valid bit */
+ InterlockedAnd((LONG*)&gpaulRefCount[ulIndex], ~REF_MASK_VALID);
- if (PrevProcId == HandleProcessId)
+ /* Check if the object is exclusively locked */
+ if (pobj->cExclusiveLock != 0)
{
- /*
- * We're locking an object that belongs to our process or it's a
- * global object if HandleProcessId is 0 here.
- */
+ /* Reset lock owner and lock count */
+ pobj->dwThreadId = 0;
+ pobj->cExclusiveLock = 0;
- if ( (Entry->KernelData != NULL) &&
- ((Entry->Type << GDI_ENTRY_UPPER_SHIFT) == HandleUpper) )
- {
- PTHREADINFO Thread = (PTHREADINFO)PsGetCurrentThreadWin32Thread();
- Object = Entry->KernelData;
-
- if (Object->cExclusiveLock == 0)
- {
- Object->Tid = Thread;
- Object->cExclusiveLock = 1;
- GDIDBG_CAPTURELOCKER(GDI_HANDLE_GET_INDEX(hObj))
-#if DBG
- if (Thread) Thread->cExclusiveLocks++;
-#endif
- }
- else
- {
- if (Object->Tid != Thread)
- {
- /* Unlock the handle table entry. */
- (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId);
-
- DelayExecution();
- continue;
- }
- InterlockedIncrement((PLONG)&Object->cExclusiveLock);
-#if DBG
- if (Thread) Thread->cExclusiveLocks++;
-#endif
- }
- }
- else
- {
- /*
- * Debugging code. Report attempts to lock deleted handles and
- * locking type mismatches.
- */
- LockErrorDebugOutput(hObj, Entry, "GDIOBJ_LockObj");
- }
-
- /* Unlock the handle table entry. */
- (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId);
-
- break;
- }
- else
- {
- /*
- * The handle is currently locked, wait some time and try again.
- */
- GDIDBG_TRACELOOP(hObj, PrevProcId, NULL);
-
- DelayExecution();
- continue;
+ /* Release the pushlock and reenable APCs */
+ ExReleasePushLockExclusive(&pobj->pushlock);
+ KeLeaveCriticalRegion();
}
}
- KeLeaveCriticalRegion();
-
- return Object;
+ /* Dereference the object (will take care of deletion) */
+ GDIOBJ_vDereferenceObject(pobj);
}
-
-/*!
- * Return pointer to the object by handle (and allow sharing of the handle
- * across threads).
- *
- * \param hObj Object handle
- * \return Pointer to the object.
- *
- * \note Process can only get pointer to the objects it created or global objects.
- *
- * \todo Get rid of the ExpectedType parameter!
-*/
-PGDIOBJ INTERNAL_CALL
-GDIOBJ_ShareLockObj(HGDIOBJ hObj, DWORD ExpectedType)
+BOOL
+NTAPI
+GreIsHandleValid(HGDIOBJ hobj)
{
- ULONG HandleIndex;
- PGDI_TABLE_ENTRY Entry;
- HANDLE ProcessId, HandleProcessId, LockedProcessId, PrevProcId;
- POBJ Object = NULL;
- ULONG_PTR HandleType, HandleUpper;
-
- /* Check for dummy call */
- if(hObj == NULL)
- return NULL ;
-
- HandleIndex = GDI_HANDLE_GET_INDEX(hObj);
- HandleType = GDI_HANDLE_GET_TYPE(hObj);
- HandleUpper = GDI_HANDLE_GET_UPPER(hObj);
-
- /* Check that the handle index is valid. */
- if (HandleIndex >= GDI_HANDLE_COUNT)
- return NULL;
+ PENTRY pentry;
- /* Check if we have the requested type */
- if ( (ExpectedType != GDI_OBJECT_TYPE_DONTCARE &&
- HandleType != ExpectedType) ||
- HandleType == 0 )
- {
- DPRINT1("Attempted to lock object 0x%x of wrong type (Handle: 0x%x, requested: 0x%x)\n",
- hObj, HandleType, ExpectedType);
- return NULL;
- }
-
- Entry = &GdiHandleTable->Entries[HandleIndex];
+ pentry = ENTRY_ReferenceEntryByHandle(hobj, 0);
+ if (!pentry) return FALSE;
+ GDIOBJ_vDereferenceObject(pentry->einfo.pobj);
+ return TRUE;
+}
- ProcessId = (HANDLE)((ULONG_PTR)PsGetCurrentProcessId() & ~1);
- HandleProcessId = (HANDLE)((ULONG_PTR)Entry->ProcessId & ~1);
+BOOL
+NTAPI
+GreDeleteObject(HGDIOBJ hobj)
+{
+ PENTRY pentry;
- /* Check for invalid owner. */
- if (ProcessId != HandleProcessId && HandleProcessId != NULL)
+ /* Check for stock objects */
+ if (GDI_HANDLE_IS_STOCKOBJ(hobj))
{
- return NULL;
+ DPRINT1("GreDeleteObject: Cannot delete stock object %p.\n", hobj);
+ return FALSE;
}
- /*
- * Prevent the thread from being terminated during the locking process.
- * It would result in undesired effects and inconsistency of the global
- * handle table.
- */
-
- KeEnterCriticalRegion();
-
- /*
- * Loop until we either successfully lock the handle entry & object or
- * fail some of the check.
- */
-
- for (;;)
+ /* Reference the handle entry */
+ pentry = ENTRY_ReferenceEntryByHandle(hobj, 0);
+ if (!pentry)
{
- /* Lock the handle table entry. */
- LockedProcessId = (HANDLE)((ULONG_PTR)HandleProcessId | 0x1);
- PrevProcId = InterlockedCompareExchangePointer((PVOID*)&Entry->ProcessId,
- LockedProcessId,
- HandleProcessId);
-
- if (PrevProcId == HandleProcessId)
- {
- /*
- * We're locking an object that belongs to our process or it's a
- * global object if HandleProcessId is 0 here.
- */
-
- if ( (Entry->KernelData != NULL) &&
- (HandleUpper == (Entry->Type << GDI_ENTRY_UPPER_SHIFT)) )
- {
- Object = (POBJ)Entry->KernelData;
-
-GDIDBG_CAPTURESHARELOCKER(HandleIndex);
-#ifdef GDI_DEBUG3
- if (InterlockedIncrement((PLONG)&Object->ulShareCount) == 1)
- {
- memset(GDIHandleLocker[HandleIndex], 0x00, GDI_STACK_LEVELS * sizeof(ULONG));
- RtlCaptureStackBackTrace(1, GDI_STACK_LEVELS, (PVOID*)GDIHandleShareLocker[HandleIndex], NULL);
- }
-#else
- InterlockedIncrement((PLONG)&Object->ulShareCount);
-#endif
- }
- else
- {
- /*
- * Debugging code. Report attempts to lock deleted handles and
- * locking type mismatches.
- */
- LockErrorDebugOutput(hObj, Entry, "GDIOBJ_ShareLockObj");
- }
-
- /* Unlock the handle table entry. */
- (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId);
-
- break;
- }
- else
- {
- /*
- * The handle is currently locked, wait some time and try again.
- */
-
- DelayExecution();
- continue;
- }
+ DPRINT1("GreDeleteObject: Trying to delete invalid object %p\n", hobj);
+ return FALSE;
}
- KeLeaveCriticalRegion();
-
- return Object;
-}
-
-BOOL INTERNAL_CALL
-GDIOBJ_OwnedByCurrentProcess(HGDIOBJ ObjectHandle)
-{
- PGDI_TABLE_ENTRY Entry;
- HANDLE ProcessId;
- BOOL Ret;
-
- DPRINT("GDIOBJ_OwnedByCurrentProcess: ObjectHandle: 0x%08x\n", ObjectHandle);
-
- if (!GDI_HANDLE_IS_STOCKOBJ(ObjectHandle))
+ /* Check for public owner */
+ if (pentry->ObjectOwner.ulObj == GDI_OBJ_HMGR_PUBLIC)
{
- ProcessId = PsGetCurrentProcessId();
-
- Entry = GDI_HANDLE_GET_ENTRY(GdiHandleTable, ObjectHandle);
- Ret = Entry->KernelData != NULL &&
- (Entry->Type & GDI_ENTRY_BASETYPE_MASK) != 0 &&
- (HANDLE)((ULONG_PTR)Entry->ProcessId & ~0x1) == ProcessId;
-
- return Ret;
+ DPRINT1("GreDeleteObject: Trying to delete global object %p\n", hobj);
+ GDIOBJ_vDereferenceObject(pentry->einfo.pobj);
+ return FALSE;
}
- return FALSE;
+ /* Delete the object */
+ GDIOBJ_vDeleteObject(pentry->einfo.pobj);
+ return TRUE;
}
-BOOL INTERNAL_CALL
-GDIOBJ_ConvertToStockObj(HGDIOBJ *phObj)
+ULONG
+NTAPI
+GreGetObjectOwner(HGDIOBJ hobj)
{
- /*
- * FIXME !!!!! THIS FUNCTION NEEDS TO BE FIXED - IT IS NOT SAFE WHEN OTHER THREADS
- * MIGHT ATTEMPT TO LOCK THE OBJECT DURING THIS CALL!!!
- */
- PGDI_TABLE_ENTRY Entry;
- HANDLE ProcessId, LockedProcessId, PrevProcId;
- PTHREADINFO Thread;
- HGDIOBJ hObj;
-
- GDIDBG_INITLOOPTRACE();
+ ULONG ulIndex, ulOwner;
- ASSERT(phObj);
- hObj = *phObj;
+ /* Get the handle index */
+ ulIndex = GDI_HANDLE_GET_INDEX(hobj);
- DPRINT("GDIOBJ_ConvertToStockObj: hObj: 0x%08x\n", hObj);
-
- Thread = (PTHREADINFO)PsGetCurrentThreadWin32Thread();
-
- if (!GDI_HANDLE_IS_STOCKOBJ(hObj))
+ /* Check if the handle is valid */
+ if (ulIndex >= GDI_HANDLE_COUNT ||
+ gpentHmgr[ulIndex].Objt == GDIObjType_DEF_TYPE ||
+ ((ULONG_PTR)hobj >> 16) != gpentHmgr[ulIndex].FullUnique)
{
- ProcessId = PsGetCurrentProcessId();
- LockedProcessId = (HANDLE)((ULONG_PTR)ProcessId | 0x1);
+ DPRINT1("GreGetObjectOwner: invalid handle 0x%p.\n", hobj);
+ return GDI_OBJ_HMGR_RESTRICTED;
+ }
- Entry = GDI_HANDLE_GET_ENTRY(GdiHandleTable, hObj);
+ /* Get the object owner */
+ ulOwner = gpentHmgr[ulIndex].ObjectOwner.ulObj;
-LockHandle:
- /* lock the object, we must not convert stock objects, so don't check!!! */
- PrevProcId = InterlockedCompareExchangePointer((PVOID*)&Entry->ProcessId, LockedProcessId, ProcessId);
- if (PrevProcId == ProcessId)
- {
- LONG NewType, PrevType, OldType;
-
- /* we're locking an object that belongs to our process. First calculate
- the new object type including the stock object flag and then try to
- exchange it.*/
- /* On Windows the higher 16 bit of the type field don't contain the
- full type from the handle, but the base type.
- (type = BRSUH, PEN, EXTPEN, basetype = BRUSH) */
- OldType = ((ULONG)hObj & GDI_HANDLE_BASETYPE_MASK) | ((ULONG)hObj >> GDI_ENTRY_UPPER_SHIFT);
- /* We are currently not using bits 24..31 (flags) of the type field, but for compatibility
- we copy them as we can't get them from the handle */
- OldType |= Entry->Type & GDI_ENTRY_FLAGS_MASK;
-
- /* As the object should be a stock object, set it's flag, but only in the lower 16 bits */
- NewType = OldType | GDI_ENTRY_STOCK_MASK;
-
- /* Try to exchange the type field - but only if the old (previous type) matches! */
- PrevType = InterlockedCompareExchange(&Entry->Type, NewType, OldType);
- if (PrevType == OldType && Entry->KernelData != NULL)
- {
- PTHREADINFO PrevThread;
- POBJ Object;
-
- /* We successfully set the stock object flag.
- KernelData should never be NULL here!!! */
- ASSERT(Entry->KernelData);
-
- Object = Entry->KernelData;
-
- PrevThread = Object->Tid;
- if (Object->cExclusiveLock == 0 || PrevThread == Thread)
- {
- /* dereference the process' object counter */
- if (PrevProcId != GDI_GLOBAL_PROCESS)
- {
- PEPROCESS OldProcess;
- PPROCESSINFO W32Process;
- NTSTATUS Status;
-
- /* FIXME */
- Status = PsLookupProcessByProcessId((HANDLE)((ULONG_PTR)PrevProcId & ~0x1), &OldProcess);
- if (NT_SUCCESS(Status))
- {
- W32Process = (PPROCESSINFO)OldProcess->Win32Process;
- if (W32Process != NULL)
- {
- InterlockedDecrement(&W32Process->GDIHandleCount);
- }
- ObDereferenceObject(OldProcess);
- }
- }
-
- hObj = (HGDIOBJ)((ULONG)(hObj) | GDI_HANDLE_STOCK_MASK);
- *phObj = hObj;
- Object->hHmgr = hObj;
-
- /* remove the process id lock and make it global */
- (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, GDI_GLOBAL_PROCESS);
-
- /* we're done, successfully converted the object */
- return TRUE;
- }
- else
- {
- GDIDBG_TRACELOOP(hObj, PrevThread, Thread);
-
- /* WTF?! The object is already locked by a different thread!
- Release the lock, wait a bit and try again!
- FIXME - we should give up after some time unless we want to wait forever! */
- (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId);
-
- DelayExecution();
- goto LockHandle;
- }
- }
- else
- {
- DPRINT1("Attempted to convert object 0x%x that is deleted! Should never get here!!!\n", hObj);
- DPRINT1("OldType = 0x%x, Entry->Type = 0x%x, NewType = 0x%x, Entry->KernelData = 0x%x\n", OldType, Entry->Type, NewType, Entry->KernelData);
- }
- }
- else if (PrevProcId == LockedProcessId)
- {
- GDIDBG_TRACELOOP(hObj, PrevProcId, ProcessId);
+ if (ulOwner == HandleToUlong(PsGetCurrentProcessId()))
+ return GDI_OBJ_HMGR_POWNED;
- /* the object is currently locked, wait some time and try again.
- FIXME - we shouldn't loop forever! Give up after some time! */
- DelayExecution();
- /* try again */
- goto LockHandle;
- }
- else
- {
- DPRINT1("Attempted to convert invalid handle: 0x%x\n", hObj);
- }
- }
+ if (ulOwner == GDI_OBJ_HMGR_PUBLIC)
+ return GDI_OBJ_HMGR_PUBLIC;
- return FALSE;
+ return GDI_OBJ_HMGR_RESTRICTED;
}
-BOOL INTERNAL_CALL
-GDIOBJ_SetOwnership(HGDIOBJ ObjectHandle, PEPROCESS NewOwner)
+BOOL
+NTAPI
+GreSetObjectOwner(
+ HGDIOBJ hobj,
+ ULONG ulOwner)
{
- PGDI_TABLE_ENTRY Entry;
- HANDLE ProcessId, LockedProcessId, PrevProcId;
- PTHREADINFO Thread;
- BOOL Ret = TRUE;
-
- GDIDBG_INITLOOPTRACE();
-
- DPRINT("GDIOBJ_SetOwnership: hObj: 0x%x, NewProcess: 0x%x\n", ObjectHandle, (NewOwner ? PsGetProcessId(NewOwner) : 0));
+ PENTRY pentry;
- Thread = (PTHREADINFO)PsGetCurrentThreadWin32Thread();
+ /* Check for stock objects */
+ if (GDI_HANDLE_IS_STOCKOBJ(hobj))
+ {
+ DPRINT("GreSetObjectOwner: got stock object %p\n", hobj);
+ return FALSE;
+ }
- if (!GDI_HANDLE_IS_STOCKOBJ(ObjectHandle))
+ /* Reference the handle entry */
+ pentry = ENTRY_ReferenceEntryByHandle(hobj, 0);
+ if (!pentry)
{
- ProcessId = PsGetCurrentProcessId();
- LockedProcessId = (HANDLE)((ULONG_PTR)ProcessId | 0x1);
+ DPRINT("GreSetObjectOwner: invalid handle 0x%p.\n", hobj);
+ return FALSE;
+ }
- Entry = GDI_HANDLE_GET_ENTRY(GdiHandleTable, ObjectHandle);
+ /* Call internal function */
+ GDIOBJ_vSetObjectOwner(pentry->einfo.pobj, ulOwner);
-LockHandle:
- /* lock the object, we must not convert stock objects, so don't check!!! */
- PrevProcId = InterlockedCompareExchangePointer((PVOID*)&Entry->ProcessId, ProcessId, LockedProcessId);
- if (PrevProcId == ProcessId)
- {
- PTHREADINFO PrevThread;
+ /* Dereference the object */
+ GDIOBJ_vDereferenceObject(pentry->einfo.pobj);
- if ((Entry->Type & GDI_ENTRY_BASETYPE_MASK) != 0)
- {
- POBJ Object = Entry->KernelData;
-
- PrevThread = Object->Tid;
- if (Object->cExclusiveLock == 0 || PrevThread == Thread)
- {
- PEPROCESS OldProcess;
- PPROCESSINFO W32Process;
- NTSTATUS Status;
-
- if (NewOwner != NULL)
- {
- ProcessId = PsGetProcessId(NewOwner);
- }
- else
- ProcessId = 0;
-
- if((ULONG_PTR)ProcessId == ((ULONG_PTR)PrevProcId & ~0x1))
- {
- DPRINT("Setting same process than previous one, nothing to do\n");
- goto done;
- }
-
- /* dereference the process' object counter */
- /* FIXME */
- if ((ULONG_PTR)PrevProcId & ~0x1)
- {
- Status = PsLookupProcessByProcessId((HANDLE)((ULONG_PTR)PrevProcId & ~0x1), &OldProcess);
- if (NT_SUCCESS(Status))
- {
- W32Process = (PPROCESSINFO)OldProcess->Win32Process;
- if (W32Process != NULL)
- {
- InterlockedDecrement(&W32Process->GDIHandleCount);
- }
- ObDereferenceObject(OldProcess);
- }
- }
-
- if (NewOwner != NULL)
- {
- /* Increase the new process' object counter */
- W32Process = (PPROCESSINFO)NewOwner->Win32Process;
- if (W32Process != NULL)
- {
- InterlockedIncrement(&W32Process->GDIHandleCount);
- }
- }
-
- done:
- /* remove the process id lock and change it to the new process id */
- (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, ProcessId);
-
- /* we're done! */
- return Ret;
- }
- else
- {
- GDIDBG_TRACELOOP(ObjectHandle, PrevThread, Thread);
-
- /* WTF?! The object is already locked by a different thread!
- Release the lock, wait a bit and try again! DO reset the pid lock
- so we make sure we don't access invalid memory in case the object is
- being deleted in the meantime (because we don't have aquired a reference
- at this point).
- FIXME - we should give up after some time unless we want to wait forever! */
- (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId);
-
- DelayExecution();
- goto LockHandle;
- }
- }
- else
- {
- DPRINT1("Attempted to change ownership of an object 0x%x currently being destroyed!!!\n", ObjectHandle);
- DPRINT1("Entry->Type = 0x%lx, Entry->KernelData = 0x%p\n", Entry->Type, Entry->KernelData);
- Ret = FALSE;
- }
- }
- else if (PrevProcId == LockedProcessId)
- {
- GDIDBG_TRACELOOP(ObjectHandle, PrevProcId, ProcessId);
-
- /* the object is currently locked, wait some time and try again.
- FIXME - we shouldn't loop forever! Give up after some time! */
- DelayExecution();
- /* try again */
- goto LockHandle;
- }
- else if (((ULONG_PTR)PrevProcId & ~0x1) == 0)
- {
- /* allow changing ownership of global objects */
- ProcessId = NULL;
- LockedProcessId = (HANDLE)((ULONG_PTR)ProcessId | 0x1);
- goto LockHandle;
- }
- else if ((HANDLE)((ULONG_PTR)PrevProcId & ~0x1) != PsGetCurrentProcessId())
- {
- DPRINT1("Attempted to change ownership of object 0x%x (pid: 0x%x) from pid 0x%x!!!\n", ObjectHandle, (ULONG_PTR)PrevProcId & ~0x1, PsGetCurrentProcessId());
- Ret = FALSE;
- }
- else
- {
- DPRINT1("Attempted to change owner of invalid handle: 0x%x\n", ObjectHandle);
- Ret = FALSE;
- }
- }
- return Ret;
+ return TRUE;
}
-BOOL INTERNAL_CALL
-GDIOBJ_CopyOwnership(HGDIOBJ CopyFrom, HGDIOBJ CopyTo)
+INT
+NTAPI
+GreGetObject(
+ IN HGDIOBJ hobj,
+ IN INT cbCount,
+ IN PVOID pvBuffer)
{
- PGDI_TABLE_ENTRY FromEntry;
- PTHREADINFO Thread;
- HANDLE FromProcessId, FromLockedProcessId, FromPrevProcId;
- BOOL Ret = TRUE;
-
- GDIDBG_INITLOOPTRACE();
-
- DPRINT("GDIOBJ_CopyOwnership: from: 0x%x, to: 0x%x\n", CopyFrom, CopyTo);
-
- Thread = (PTHREADINFO)PsGetCurrentThreadWin32Thread();
+ PVOID pvObj;
+ UCHAR objt;
+ INT iResult = 0;
+
+ /* Verify object type */
+ objt = ((ULONG_PTR)hobj >> 16) & 0x1f;
+ if (objt != GDIObjType_BRUSH_TYPE &&
+ objt != GDIObjType_SURF_TYPE &&
+ objt != GDIObjType_LFONT_TYPE &&
+ objt != GDIObjType_PAL_TYPE)
+ {
+ DPRINT1("GreGetObject: invalid object type\n");
+ return 0;
+ }
- if (!GDI_HANDLE_IS_STOCKOBJ(CopyFrom) && !GDI_HANDLE_IS_STOCKOBJ(CopyTo))
+ pvObj = GDIOBJ_ReferenceObjectByHandle(hobj, objt);
+ if (!pvObj)
{
- FromEntry = GDI_HANDLE_GET_ENTRY(GdiHandleTable, CopyFrom);
+ DPRINT("GreGetObject: Could not lock object\n");
+ EngSetLastError(ERROR_INVALID_HANDLE);
+ return 0;
+ }
- FromProcessId = (HANDLE)((ULONG_PTR)FromEntry->ProcessId & ~0x1);
- FromLockedProcessId = (HANDLE)((ULONG_PTR)FromProcessId | 0x1);
+ switch (GDI_HANDLE_GET_TYPE(hobj))
+ {
+ case GDILoObjType_LO_PEN_TYPE:
+ case GDILoObjType_LO_EXTPEN_TYPE:
+ iResult = PEN_GetObject(pvObj, cbCount, pvBuffer);
+ break;
-LockHandleFrom:
- /* lock the object, we must not convert stock objects, so don't check!!! */
- FromPrevProcId = InterlockedCompareExchangePointer((PVOID*)&FromEntry->ProcessId, FromProcessId, FromLockedProcessId);
- if (FromPrevProcId == FromProcessId)
- {
- PTHREADINFO PrevThread;
- POBJ Object;
+ case GDILoObjType_LO_BRUSH_TYPE:
+ iResult = BRUSH_GetObject(pvObj, cbCount, pvBuffer);
+ break;
- if ((FromEntry->Type & GDI_ENTRY_BASETYPE_MASK) != 0)
- {
- Object = FromEntry->KernelData;
-
- /* save the pointer to the calling thread so we know it was this thread
- that locked the object */
- PrevThread = Object->Tid;
- if (Object->cExclusiveLock == 0 || PrevThread == Thread)
- {
- /* now let's change the ownership of the target object */
-
- if (((ULONG_PTR)FromPrevProcId & ~0x1) != 0)
- {
- PEPROCESS ProcessTo;
- /* FIXME */
- if (NT_SUCCESS(PsLookupProcessByProcessId((HANDLE)((ULONG_PTR)FromPrevProcId & ~0x1), &ProcessTo)))
- {
- GDIOBJ_SetOwnership(CopyTo, ProcessTo);
- ObDereferenceObject(ProcessTo);
- }
- }
- else
- {
- /* mark the object as global */
- GDIOBJ_SetOwnership(CopyTo, NULL);
- }
-
- (void)InterlockedExchangePointer((PVOID*)&FromEntry->ProcessId, FromPrevProcId);
- }
- else
- {
- GDIDBG_TRACELOOP(CopyFrom, PrevThread, Thread);
-
- /* WTF?! The object is already locked by a different thread!
- Release the lock, wait a bit and try again! DO reset the pid lock
- so we make sure we don't access invalid memory in case the object is
- being deleted in the meantime (because we don't have aquired a reference
- at this point).
- FIXME - we should give up after some time unless we want to wait forever! */
- (void)InterlockedExchangePointer((PVOID*)&FromEntry->ProcessId, FromPrevProcId);
-
- DelayExecution();
- goto LockHandleFrom;
- }
- }
- else
+ case GDILoObjType_LO_BITMAP_TYPE:
+ iResult = BITMAP_GetObject(pvObj, cbCount, pvBuffer);
+ break;
+ case GDILoObjType_LO_FONT_TYPE:
+ iResult = FontGetObject(pvObj, cbCount, pvBuffer);
+#if 0
+ // Fix the LOGFONT structure for the stock fonts
+ if (FIRST_STOCK_HANDLE <= hobj && hobj <= LAST_STOCK_HANDLE)
{
- DPRINT1("Attempted to copy ownership from an object 0x%x currently being destroyed!!!\n", CopyFrom);
- Ret = FALSE;
+ FixStockFontSizeW(hobj, cbCount, pvBuffer);
}
- }
- else if (FromPrevProcId == FromLockedProcessId)
- {
- GDIDBG_TRACELOOP(CopyFrom, FromPrevProcId, FromProcessId);
+#endif
+ break;
- /* the object is currently locked, wait some time and try again.
- FIXME - we shouldn't loop forever! Give up after some time! */
- DelayExecution();
- /* try again */
- goto LockHandleFrom;
- }
- else if ((HANDLE)((ULONG_PTR)FromPrevProcId & ~0x1) != PsGetCurrentProcessId())
- {
- /* FIXME - should we really allow copying ownership from objects that we don't even own? */
- DPRINT1("WARNING! Changing copying ownership of object 0x%x (pid: 0x%x) to pid 0x%x!!!\n", CopyFrom, (ULONG_PTR)FromPrevProcId & ~0x1, PsGetCurrentProcessId());
- FromProcessId = (HANDLE)((ULONG_PTR)FromPrevProcId & ~0x1);
- FromLockedProcessId = (HANDLE)((ULONG_PTR)FromProcessId | 0x1);
- goto LockHandleFrom;
- }
- else
- {
- DPRINT1("Attempted to copy ownership from invalid handle: 0x%x\n", CopyFrom);
- Ret = FALSE;
- }
+ case GDILoObjType_LO_PALETTE_TYPE:
+ iResult = PALETTE_GetObject(pvObj, cbCount, pvBuffer);
+ break;
+
+ default:
+ DPRINT1("GDI object type of 0x%p not implemented\n", hobj);
+ break;
}
- return Ret;
+
+ GDIOBJ_vDereferenceObject(pvObj);
+ return iResult;
}
-PVOID INTERNAL_CALL
-GDI_MapHandleTable(PEPROCESS Process)
+W32KAPI
+INT
+APIENTRY
+NtGdiExtGetObjectW(
+ IN HANDLE hobj,
+ IN INT cbCount,
+ OUT LPVOID lpBuffer)
{
- PVOID MappedView = NULL;
- NTSTATUS Status;
- LARGE_INTEGER Offset;
- ULONG ViewSize = sizeof(GDI_HANDLE_TABLE);
-
- Offset.QuadPart = 0;
-
- ASSERT(GdiTableSection != NULL);
- ASSERT(Process != NULL);
-
- Status = MmMapViewOfSection(GdiTableSection,
- Process,
- &MappedView,
- 0,
- 0,
- &Offset,
- &ViewSize,
- ViewUnmap,
- SEC_NO_CHANGE,
- PAGE_READONLY);
-
- if (!NT_SUCCESS(Status))
- return NULL;
+ INT iRetCount = 0;
+ INT cbCopyCount;
+ union
+ {
+ BITMAP bitmap;
+ DIBSECTION dibsection;
+ LOGPEN logpen;
+ LOGBRUSH logbrush;
+ LOGFONTW logfontw;
+ EXTLOGFONTW extlogfontw;
+ ENUMLOGFONTEXDVW enumlogfontexdvw;
+ } object;
- return MappedView;
-}
+ /* Normalize to the largest supported object size */
+ cbCount = min((UINT)cbCount, sizeof(object));
-/* Locks 2 or 3 objects at a time */
-VOID
-INTERNAL_CALL
-GDIOBJ_LockMultipleObjs(ULONG ulCount,
- IN HGDIOBJ* ahObj,
- OUT PGDIOBJ* apObj)
-{
- UINT auiIndices[3] = {0,1,2};
- UINT i, tmp ;
- BOOL bUnsorted = TRUE;
+ /* Now do the actual call */
+ iRetCount = GreGetObject(hobj, cbCount, lpBuffer ? &object : NULL);
+ cbCopyCount = min((UINT)cbCount, (UINT)iRetCount);
- /* First is greatest */
- while(bUnsorted)
+ /* Make sure we have a buffer and a copy size */
+ if ((cbCopyCount) && (lpBuffer))
{
- bUnsorted = FALSE;
- for(i=1; i<ulCount; i++)
+ /* Enter SEH for buffer transfer */
+ _SEH2_TRY
{
- if((ULONG_PTR)ahObj[auiIndices[i-1]] < (ULONG_PTR)ahObj[auiIndices[i]])
- {
- tmp = auiIndices[i-1];
- auiIndices[i-1] = auiIndices[i];
- auiIndices[i] = tmp;
- bUnsorted = TRUE;
- }
+ // Probe the buffer and copy it
+ ProbeForWrite(lpBuffer, cbCopyCount, sizeof(WORD));
+ RtlCopyMemory(lpBuffer, &object, cbCopyCount);
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ /* Clear the return value.
+ * Do *NOT* set last error here! */
+ iRetCount = 0;
}
+ _SEH2_END;
}
- for(i=0;i<ulCount;i++)
- apObj[auiIndices[i]] = GDIOBJ_LockObj(ahObj[auiIndices[i]], GDI_OBJECT_TYPE_DONTCARE);
-}
-
-
-/** PUBLIC FUNCTIONS **********************************************************/
-
-INT
-FASTCALL
-GreGetObjectOwner(HGDIOBJ Handle, GDIOBJTYPE ObjType)
-{
- INT Ret = GDI_OBJ_HMGR_RESTRICTED;
-
- if ( GDI_HANDLE_GET_INDEX(Handle) < GDI_HANDLE_COUNT )
- {
- PGDI_TABLE_ENTRY pEntry = &GdiHandleTable->Entries[GDI_HANDLE_GET_INDEX(Handle)];
-
- if (pEntry->ObjectType == ObjType)
- {
- if (pEntry->FullUnique == (GDI_HANDLE_GET_UPPER(Handle) >> GDI_ENTRY_UPPER_SHIFT))
- Ret = pEntry->ProcessId & ~1;
- }
- }
- return Ret;
+ /* Return the count */
+ return iRetCount;
}
W32KAPI
HANDLE
APIENTRY
NtGdiCreateClientObj(
- IN ULONG ulType
-)
+ IN ULONG ulType)
{
POBJ pObject;
HANDLE handle;
- /* Mask out everything that would change the type in a wrong manner */
- ulType &= (GDI_HANDLE_TYPE_MASK & ~GDI_HANDLE_BASETYPE_MASK);
-
/* Allocate a new object */
- pObject = GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_CLIOBJ | ulType);
+ pObject = GDIOBJ_AllocateObject(GDIObjType_CLIENTOBJ_TYPE,
+ sizeof(CLIENTOBJ),
+ BASEFLAG_LOOKASIDE);
if (!pObject)
{
+ DPRINT1("NtGdiCreateClientObj: Could not allocate a clientobj.\n");
return NULL;
}
- /* get the handle */
- handle = pObject->hHmgr;
+ /* Mask out everything that would change the type in a wrong manner */
+ ulType &= (GDI_HANDLE_TYPE_MASK & ~GDI_HANDLE_BASETYPE_MASK);
+
+ /* Set the real object type */
+ pObject->hHmgr = UlongToHandle(ulType | GDILoObjType_LO_CLIENTOBJ_TYPE);
+
+ /* Create a handle */
+ handle = GDIOBJ_hInsertObject(pObject, GDI_OBJ_HMGR_POWNED);
+ if (!handle)
+ {
+ DPRINT1("NtGdiCreateClientObj Could not create a handle.\n");
+ GDIOBJ_vFreeObject(pObject);
+ return NULL;
+ }
/* Unlock it */
- GDIOBJ_UnlockObjByPtr(pObject);
+ GDIOBJ_vUnlockObject(pObject);
return handle;
}
BOOL
APIENTRY
NtGdiDeleteClientObj(
- IN HANDLE h
-)
+ IN HANDLE hobj)
{
/* We first need to get the real type from the handle */
- ULONG type = GDI_HANDLE_GET_TYPE(h);
+ ULONG ulType = GDI_HANDLE_GET_TYPE(hobj);
/* Check if it's really a CLIENTOBJ */
- if ((type & GDI_HANDLE_BASETYPE_MASK) != GDILoObjType_LO_CLIENTOBJ_TYPE)
+ if ((ulType & GDI_HANDLE_BASETYPE_MASK) != GDILoObjType_LO_CLIENTOBJ_TYPE)
{
/* FIXME: SetLastError? */
return FALSE;
}
- return GDIOBJ_FreeObjByHandle(h, type);
+
+ return GreDeleteObject(hobj);
}
-INT
-FASTCALL
-IntGdiGetObject(IN HANDLE Handle,
- IN INT cbCount,
- IN LPVOID lpBuffer)
+
+
+PGDI_HANDLE_TABLE GdiHandleTable = NULL;
+
+PGDIOBJ INTERNAL_CALL
+GDIOBJ_ShareLockObj(HGDIOBJ hObj, DWORD ExpectedType)
{
- PVOID pGdiObject;
- INT Result = 0;
- DWORD dwObjectType;
+ if (ExpectedType == GDI_OBJECT_TYPE_DONTCARE)
+ ExpectedType = GDI_HANDLE_GET_TYPE(hObj);
+ return GDIOBJ_ReferenceObjectByHandle(hObj, (ExpectedType >> 16) & 0x1f);
+}
- pGdiObject = GDIOBJ_LockObj(Handle, GDI_OBJECT_TYPE_DONTCARE);
- if (!pGdiObject)
+// This function is not safe to use with concurrent deleting attempts
+// That shouldn't be a problem, since we don't have any processes yet,
+// that could delete the handle
+BOOL
+INTERNAL_CALL
+GDIOBJ_ConvertToStockObj(HGDIOBJ *phObj)
+{
+ PENTRY pentry;
+ POBJ pobj;
+
+ /* Reference the handle entry */
+ pentry = ENTRY_ReferenceEntryByHandle(*phObj, 0);
+ if (!pentry)
{
- EngSetLastError(ERROR_INVALID_HANDLE);
- return 0;
+ DPRINT1("GDIOBJ: requested handle 0x%p is not valid.\n", *phObj);
+ return FALSE;
}
- dwObjectType = GDIOBJ_GetObjectType(Handle);
- switch (dwObjectType)
- {
- case GDI_OBJECT_TYPE_PEN:
- case GDI_OBJECT_TYPE_EXTPEN:
- Result = PEN_GetObject((PBRUSH) pGdiObject, cbCount, (PLOGPEN) lpBuffer); // IntGdiCreatePenIndirect
- break;
-
- case GDI_OBJECT_TYPE_BRUSH:
- Result = BRUSH_GetObject((PBRUSH ) pGdiObject, cbCount, (LPLOGBRUSH)lpBuffer);
- break;
-
- case GDI_OBJECT_TYPE_BITMAP:
- Result = BITMAP_GetObject((SURFACE *) pGdiObject, cbCount, lpBuffer);
- break;
- case GDI_OBJECT_TYPE_FONT:
- Result = FontGetObject((PTEXTOBJ) pGdiObject, cbCount, lpBuffer);
-#if 0
- // Fix the LOGFONT structure for the stock fonts
- if (FIRST_STOCK_HANDLE <= Handle && Handle <= LAST_STOCK_HANDLE)
- {
- FixStockFontSizeW(Handle, cbCount, lpBuffer);
- }
-#endif
- break;
+ /* Update the entry */
+ pentry->FullUnique |= GDI_ENTRY_STOCK_MASK;
+ pentry->ObjectOwner.ulObj = 0;
- case GDI_OBJECT_TYPE_PALETTE:
- Result = PALETTE_GetObject((PPALETTE) pGdiObject, cbCount, lpBuffer);
- break;
+ /* Get the pointer to the BASEOBJECT */
+ pobj = pentry->einfo.pobj;
- default:
- DPRINT1("GDI object type 0x%08x not implemented\n", dwObjectType);
- break;
- }
+ /* Calculate the new handle */
+ pobj->hHmgr = (HGDIOBJ)((ULONG_PTR)pobj->hHmgr | GDI_HANDLE_STOCK_MASK);
+
+ /* Return the new handle */
+ *phObj = pobj->hHmgr;
- GDIOBJ_UnlockObjByPtr(pGdiObject);
+ /* Dereference the handle */
+ GDIOBJ_vDereferenceObject(pobj);
- return Result;
+ return TRUE;
}
+POBJ INTERNAL_CALL
+GDIOBJ_AllocObjWithHandle(ULONG ObjectType, ULONG cjSize)
+{
+ POBJ pobj;
+ FLONG fl = 0;
+ UCHAR objt = ObjectType >> 16;
+
+ if ((objt == GDIObjType_DC_TYPE && cjSize == sizeof(DC)) ||
+ (objt == GDIObjType_PAL_TYPE && cjSize == sizeof(PALETTE)) ||
+ (objt == GDIObjType_RGN_TYPE && cjSize == sizeof(REGION)) ||
+ (objt == GDIObjType_SURF_TYPE && cjSize == sizeof(SURFACE)) ||
+ (objt == GDIObjType_PATH_TYPE && cjSize == sizeof(PATH)))
+ {
+ fl |= BASEFLAG_LOOKASIDE;
+ }
+ pobj = GDIOBJ_AllocateObject(objt, cjSize, fl);
+ if (!GDIOBJ_hInsertObject(pobj, GDI_OBJ_HMGR_POWNED))
+ {
+ GDIOBJ_vFreeObject(pobj);
+ return NULL;
+ }
+ return pobj;
+}
-W32KAPI
-INT
-APIENTRY
-NtGdiExtGetObjectW(IN HANDLE hGdiObj,
- IN INT cbCount,
- OUT LPVOID lpBuffer)
+PVOID INTERNAL_CALL
+GDI_MapHandleTable(PEPROCESS pProcess)
{
- INT iRetCount = 0;
- INT cbCopyCount;
- union
- {
- BITMAP bitmap;
- DIBSECTION dibsection;
- LOGPEN logpen;
- LOGBRUSH logbrush;
- LOGFONTW logfontw;
- EXTLOGFONTW extlogfontw;
- ENUMLOGFONTEXDVW enumlogfontexdvw;
- } Object;
+ PVOID pvMappedView = NULL;
+ NTSTATUS Status;
+ LARGE_INTEGER liOffset;
+ ULONG cjViewSize = sizeof(GDI_HANDLE_TABLE);
- // Normalize to the largest supported object size
- cbCount = min((UINT)cbCount, sizeof(Object));
+ liOffset.QuadPart = 0;
- // Now do the actual call
- iRetCount = IntGdiGetObject(hGdiObj, cbCount, lpBuffer ? &Object : NULL);
- cbCopyCount = min((UINT)cbCount, (UINT)iRetCount);
+ ASSERT(gpvGdiHdlTblSection != NULL);
+ ASSERT(pProcess != NULL);
- // Make sure we have a buffer and a copy size
- if ((cbCopyCount) && (lpBuffer))
+ Status = MmMapViewOfSection(gpvGdiHdlTblSection,
+ pProcess,
+ &pvMappedView,
+ 0,
+ 0,
+ &liOffset,
+ &cjViewSize,
+ ViewUnmap,
+ SEC_NO_CHANGE,
+ PAGE_READONLY);
+
+ if (!NT_SUCCESS(Status))
+ return NULL;
+
+ return pvMappedView;
+}
+
+BOOL INTERNAL_CALL
+GDI_CleanupForProcess(struct _EPROCESS *Process)
+{
+ PENTRY pentry;
+ ULONG ulIndex;
+ DWORD dwProcessId;
+ PPROCESSINFO ppi;
+
+ DPRINT("CleanupForProcess prochandle %x Pid %d\n",
+ Process, Process->UniqueProcessId);
+
+ ASSERT(Process == PsGetCurrentProcess());
+
+ /* Get the current process Id */
+ dwProcessId = PtrToUlong(PsGetCurrentProcessId());
+
+ /* Loop all handles in the handle table */
+ for (ulIndex = RESERVE_ENTRIES_COUNT; ulIndex < gulFirstUnused; ulIndex++)
{
- // Enter SEH for buffer transfer
- _SEH2_TRY
+ pentry = &gpentHmgr[ulIndex];
+
+ /* Check if the object is owned by the process */
+ if (pentry->ObjectOwner.ulObj == dwProcessId)
{
- // Probe the buffer and copy it
- ProbeForWrite(lpBuffer, cbCopyCount, sizeof(WORD));
- RtlCopyMemory(lpBuffer, &Object, cbCopyCount);
+ ASSERT(pentry->einfo.pobj->cExclusiveLock == 0);
+
+ /* Reference the object and delete it */
+ InterlockedIncrement((LONG*)&gpaulRefCount[ulIndex]);
+ GDIOBJ_vDeleteObject(pentry->einfo.pobj);
}
- _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ }
+
+//#ifdef GDI_DEBUG
+ DbgGdiHTIntegrityCheck();
+//#endif
+
+ ppi = PsGetCurrentProcessWin32Process();
+ DPRINT("Completed cleanup for process %d\n", Process->UniqueProcessId);
+ if (ppi->GDIHandleCount != 0)
+ {
+ DPRINT1("Leaking %d handles!\n", ppi->GDIHandleCount);
+ ASSERT(FALSE);
+ }
+
+ /* Loop all handles in the handle table */
+ for (ulIndex = RESERVE_ENTRIES_COUNT; ulIndex < gulFirstUnused; ulIndex++)
+ {
+ pentry = &gpentHmgr[ulIndex];
+
+ /* Check if the object is owned by the process */
+ if (pentry->ObjectOwner.ulObj == dwProcessId)
{
- // Clear the return value.
- // Do *NOT* set last error here!
- iRetCount = 0;
+ DPRINT1("Leaking object. Index=%lx, type=0x%x, refcount=%lx\n",
+ ulIndex, pentry->Objt, gpaulRefCount[ulIndex]);
+ DBG_DUMP_EVENT_LIST(&pentry->einfo.pobj->slhLog);
+ //DBG_CLEANUP_EVENT_LIST(&pentry->einfo.pobj->slhLog);
+ ASSERT(FALSE);
}
- _SEH2_END;
}
- // Return the count
- return iRetCount;
+
+ return TRUE;
}
-/* EOF */
/*
* PROJECT: ReactOS win32 kernel mode subsystem
* LICENSE: GPL - See COPYING in the top level directory
- * FILE: subsystems/win32/win32k/objects/gdiobj.c
+ * FILE: subsystems/win32/win32k/objects/gdipool.c
* PURPOSE: Static size allocator for user mode object attributes
* PROGRAMMERS: Timo Kreuzer
*/
ULONG cSlotsPerSection;
ULONG cEmptySections;
EX_PUSH_LOCK pushlock; // for pool growth
+#if DBG_ENABLE_EVENT_LOGGING
+ SLIST_HEADER slhLog;
+#endif
LIST_ENTRY leInUseList;
LIST_ENTRY leEmptyList;
SIZE_T cjSize = 0;
/* Should not have any allocations */
- ASSERT(pSection->cAllocCount == 0);
+ if (pSection->cAllocCount != 0)
+ {
+ DPRINT1("There are %ld allocations left, section=%p, pool=%p\n",
+ pSection->cAllocCount, pSection, pPool);
+ DBG_DUMP_EVENT_LIST(&pPool->slhLog);
+ ASSERT(FALSE);
+ }
/* Release the virtual memory */
status = ZwFreeVirtualMemory(NtCurrentProcess(),
pSection->ulCommitBitmap |= ulPageBit;
}
- /* Increase alloc count and check if section is now busy */
+ /* Increase alloc count */
pSection->cAllocCount++;
+ DBG_LOGEVENT(&pPool->slhLog, EVENT_ALLOCATE, pvAlloc);
+
+ /* Check if section is now busy */
if (pSection->cAllocCount == pPool->cSlotsPerSection)
{
/* Remove the section from the ready list */
/* Release the pool lock and enable APCs */
ExReleasePushLockExclusive(&pPool->pushlock);
KeLeaveCriticalRegion();
-DPRINT1("GdiPoolallocate: %p\n", pvAlloc);
+ DPRINT("GdiPoolallocate: %p\n", pvAlloc);
return pvAlloc;
}
-
VOID
NTAPI
GdiPoolFree(
PVOID pvAlloc)
{
PLIST_ENTRY ple;
- PGDI_POOL_SECTION pSection;
+ PGDI_POOL_SECTION pSection = NULL;
ULONG_PTR cjOffset;
ULONG ulIndex;
-DPRINT1("GdiPoolFree: %p\n", pvAlloc);
+ DPRINT("GdiPoolFree: %p\n", pvAlloc);
/* Disable APCs and acquire the pool lock */
KeEnterCriticalRegion();
/* Decrease allocation count */
pSection->cAllocCount--;
+ DBG_LOGEVENT(&pPool->slhLog, EVENT_FREE, pvAlloc);
/* Check if the section got valid now */
if (pSection->cAllocCount == pPool->cSlotsPerSection - 1)
}
}
+ DbgPrint("failed to free. pvAlloc=%p, base=%p, size=%lx\n",
+ pvAlloc, pSection->pvBaseAddress, pPool->cjSectionSize);
ASSERT(FALSE);
// KeBugCheck()
pPool->ulTag = ulTag;
pPool->cjSectionSize = GDI_POOL_ALLOCATION_GRANULARITY;
pPool->cSlotsPerSection = pPool->cjSectionSize / cjAllocSize;
+ DBG_INITLOG(&pPool->slhLog);
return pPool;
}
PLIST_ENTRY ple;
/* Loop all empty sections, removing them */
- while ((ple = RemoveHeadList(&pPool->leEmptyList)))
+ while (!IsListEmpty(&pPool->leEmptyList))
{
/* Delete the section */
+ ple = RemoveHeadList(&pPool->leEmptyList);
pSection = CONTAINING_RECORD(ple, GDI_POOL_SECTION, leInUseLink);
GdiPoolDeleteSection(pPool, pSection);
}
/* Loop all ready sections, removing them */
- while ((ple = RemoveHeadList(&pPool->leInUseList)))
+ while (!IsListEmpty(&pPool->leInUseList))
{
/* Delete the section */
+ ple = RemoveHeadList(&pPool->leInUseList);
pSection = CONTAINING_RECORD(ple, GDI_POOL_SECTION, leInUseLink);
GdiPoolDeleteSection(pPool, pSection);
}
+ DBG_CLEANUP_EVENT_LIST(&pPool->slhLog);
+
EngFreeMem(pPool);
}
{
BOOL Ret = FALSE;
- if ( hColorSpace != hStockColorSpace )
+ if ( hColorSpace != hStockColorSpace &&
+ GDI_HANDLE_GET_TYPE(hColorSpace) == GDILoObjType_LO_ICMLCS_TYPE)
{
- Ret = COLORSPACEOBJ_FreeCSByHandle(hColorSpace);
+ Ret = GreDeleteObject(hColorSpace);
if ( !Ret ) EngSetLastError(ERROR_INVALID_PARAMETER);
}
return Ret;
if (pDC->dclevel.pColorSpace)
{
- GDIOBJ_ShareUnlockObjByPtr((POBJ) pDC->dclevel.pColorSpace);
+ GDIOBJ_vDereferenceObject((POBJ) pDC->dclevel.pColorSpace);
}
pDC->dclevel.pColorSpace = pCS;
lpPalE[i].peFlags = PC_SYS_USED | (lpPalE[i].peFlags & 0x07);
}
-HPALETTE
-FASTCALL
-PALETTE_AllocPalette(ULONG Mode,
+PPALETTE
+NTAPI
+PALETTE_AllocPalette2(ULONG Mode,
ULONG NumColors,
ULONG *Colors,
ULONG Red,
ULONG Green,
ULONG Blue)
{
- HPALETTE NewPalette;
PPALETTE PalGDI;
- PalGDI = (PPALETTE)GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_PALETTE);
+ PalGDI = (PPALETTE)GDIOBJ_AllocateObject(GDIObjType_PAL_TYPE,
+ sizeof(PALETTE),
+ BASEFLAG_LOOKASIDE);
if (!PalGDI)
{
+ DPRINT1("Could not allocate a palette.\n");
return NULL;
}
- NewPalette = PalGDI->BaseObject.hHmgr;
-
- PalGDI->Self = NewPalette;
+ PalGDI->Self = PalGDI->BaseObject.hHmgr;
PalGDI->flFlags = Mode;
if (NULL != Colors)
TAG_PALETTE);
if (NULL == PalGDI->IndexedColors)
{
- PALETTE_UnlockPalette(PalGDI);
- PALETTE_FreePaletteByHandle(NewPalette);
+ GDIOBJ_vDeleteObject(&PalGDI->BaseObject);
return NULL;
}
RtlCopyMemory(PalGDI->IndexedColors, Colors, sizeof(PALETTEENTRY) * NumColors);
PalGDI->flFlags |= PAL_RGB;
}
- PALETTE_UnlockPalette(PalGDI);
+ return PalGDI;
+}
- return NewPalette;
+HPALETTE
+FASTCALL
+PALETTE_AllocPalette(ULONG Mode,
+ ULONG NumColors,
+ ULONG *Colors,
+ ULONG Red,
+ ULONG Green,
+ ULONG Blue)
+{
+ PPALETTE ppal;
+ HPALETTE hpal;
+
+ ppal = PALETTE_AllocPalette2(Mode, NumColors, Colors, Red, Green, Blue);
+ if (!ppal) return NULL;
+
+ hpal = GDIOBJ_hInsertObject(&ppal->BaseObject, GDI_OBJ_HMGR_POWNED);
+ if (!hpal)
+ {
+ DPRINT1("Could not insert palette into handle table.\n");
+ GDIOBJ_vFreeObject(&ppal->BaseObject);
+ return NULL;
+ }
+
+ PALETTE_UnlockPalette(ppal);
+
+ return hpal;
}
HPALETTE
PPALETTE PalGDI;
UINT i;
- PalGDI = (PPALETTE)GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_PALETTE);
+ PalGDI = (PPALETTE)GDIOBJ_AllocateObject(GDIObjType_PAL_TYPE,
+ sizeof(PALETTE),
+ BASEFLAG_LOOKASIDE);
if (!PalGDI)
{
+ DPRINT1("Could not allocate a palette.\n");
+ return NULL;
+ }
+
+ if (!GDIOBJ_hInsertObject(&PalGDI->BaseObject, GDI_OBJ_HMGR_POWNED))
+ {
+ DPRINT1("Could not insert palette into handle table.\n");
+ GDIOBJ_vFreeObject(&PalGDI->BaseObject);
return NULL;
}
TAG_PALETTE);
if (NULL == PalGDI->IndexedColors)
{
- PALETTE_UnlockPalette(PalGDI);
- PALETTE_FreePaletteByHandle(NewPalette);
+ GDIOBJ_vDeleteObject(&PalGDI->BaseObject);
return NULL;
}
HPALETTE
APIENTRY
EngCreatePalette(
- ULONG Mode,
- ULONG NumColors,
- ULONG *Colors,
- ULONG Red,
- ULONG Green,
- ULONG Blue)
+ ULONG iMode,
+ ULONG cColors,
+ ULONG *pulColors,
+ ULONG flRed,
+ ULONG flGreen,
+ ULONG flBlue)
{
- HPALETTE Palette;
+ PPALETTE ppal;
+ HPALETTE hpal;
+
+ ppal = PALETTE_AllocPalette2(iMode, cColors, pulColors, flRed, flGreen, flBlue);
+ if (!ppal) return NULL;
- Palette = PALETTE_AllocPalette(Mode, NumColors, Colors, Red, Green, Blue);
- if (Palette != NULL)
+ hpal = GDIOBJ_hInsertObject(&ppal->BaseObject, GDI_OBJ_HMGR_PUBLIC);
+ if (!hpal)
{
- GDIOBJ_SetOwnership(Palette, NULL);
+ DPRINT1("Could not insert palette into handle table.\n");
+ GDIOBJ_vFreeObject(&ppal->BaseObject);
+ return NULL;
}
- return Palette;
+ PALETTE_UnlockPalette(ppal);
+ return hpal;
}
/*
*/
BOOL
APIENTRY
-EngDeletePalette(IN HPALETTE Palette)
+EngDeletePalette(IN HPALETTE hpal)
{
- GDIOBJ_SetOwnership(Palette, PsGetCurrentProcess());
+ PPALETTE ppal;
+
+ ppal = PALETTE_ShareLockPalette(hpal);
+ if (!ppal) return FALSE;
- return PALETTE_FreePaletteByHandle(Palette);
+ GDIOBJ_vDeleteObject(&ppal->BaseObject);
+
+ return TRUE;
}
/*
pPath = PATH_LockPath( hPath );
if (!pPath) return FALSE;
PATH_DestroyGdiPath( pPath );
- PATH_UnlockPath( pPath );
- PATH_FreeExtPathByHandle(hPath);
+ GDIOBJ_vDeleteObject(&pPath->BaseObject);
return TRUE;
}
PATH_FlattenPath(pPath);
- size = IntGdiGetObject( pdcattr->hpen, 0, NULL);
+ size = GreGetObject( pdcattr->hpen, 0, NULL);
if (!size)
{
PATH_UnlockPath( pPath );
}
elp = ExAllocatePoolWithTag(PagedPool, size, TAG_PATH);
- (VOID) IntGdiGetObject( pdcattr->hpen, size, elp);
+ GreGetObject(pdcattr->hpen, size, elp);
- obj_type = GDIOBJ_GetObjectType(pdcattr->hpen);
+ obj_type = GDI_HANDLE_GET_TYPE(pdcattr->hpen);
if(obj_type == GDI_OBJECT_TYPE_PEN)
{
penStyle = ((LOGPEN*)elp)->lopnStyle;
DPRINT1("Assign path failed\n");
PATH_DestroyGdiPath(pNewPath);
ExFreePoolWithTag(pNewPath, TAG_PATH);
+ PATH_UnlockPath(pPath);
return ret;
}
}
pPath = PATH_LockPath(dc->dclevel.hPath);
+ if (!pPath)
{
DC_UnlockDc(dc);
return FALSE;
PATH_EmptyPath(pPath);
PATH_UnlockPath(pPath);
+ dc->dclevel.flPath &= ~DCPATH_ACTIVE;
+
DC_UnlockDc ( dc );
return TRUE;
}
DPRINT("BeginPath 2 h 0x%x p 0x%x\n", dc->dclevel.hPath, pPath);
// Path handles are shared. Also due to recursion with in the same thread.
- GDIOBJ_UnlockObjByPtr((POBJ)pPath); // Unlock
+ GDIOBJ_vUnlockObject((POBJ)pPath); // Unlock
pPath = PATH_LockPath(dc->dclevel.hPath); // Share Lock.
/* Make sure that path is empty */
PBRUSH
FASTCALL
-PEN_LockPen(HGDIOBJ hBMObj)
+PEN_ShareLockPen(HGDIOBJ hobj)
{
- if (GDI_HANDLE_GET_TYPE(hBMObj) == GDI_OBJECT_TYPE_EXTPEN)
- return GDIOBJ_LockObj( hBMObj, GDI_OBJECT_TYPE_EXTPEN);
- else
- return GDIOBJ_LockObj( hBMObj, GDI_OBJECT_TYPE_PEN);
-}
+ if (GDI_HANDLE_GET_TYPE(hobj) != GDILoObjType_LO_PEN_TYPE &&
+ GDI_HANDLE_GET_TYPE(hobj) != GDILoObjType_LO_EXTPEN_TYPE)
+ {
+ return NULL;
+ }
-PBRUSH
-FASTCALL
-PEN_ShareLockPen(HGDIOBJ hBMObj)
-{
- if (GDI_HANDLE_GET_TYPE(hBMObj) == GDI_OBJECT_TYPE_EXTPEN)
- return GDIOBJ_ShareLockObj( hBMObj, GDI_OBJECT_TYPE_EXTPEN);
- else
- return GDIOBJ_ShareLockObj( hBMObj, GDI_OBJECT_TYPE_PEN);
+ return (PBRUSH)GDIOBJ_ReferenceObjectByHandle(hobj, GDIObjType_BRUSH_TYPE);
}
HPEN APIENTRY
ExitCleanup:
EngSetLastError(ERROR_INVALID_PARAMETER);
pbrushPen->pStyle = NULL;
- PEN_UnlockPen(pbrushPen);
- if (bOldStylePen)
- PEN_FreePenByHandle(hPen);
- else
- PEN_FreeExtPenByHandle(hPen);
+ GDIOBJ_vDeleteObject(&pbrushPen->BaseObject);
return NULL;
}
VOID FASTCALL
IntGdiSetSolidPenColor(HPEN hPen, COLORREF Color)
{
- PBRUSH pbrushPen;
+ PBRUSH pbrPen;
- pbrushPen = PEN_LockPen(hPen);
- if (pbrushPen)
+ pbrPen = PEN_ShareLockPen(hPen);
+ if (pbrPen)
{
- if (pbrushPen->flAttrs & GDIBRUSH_IS_SOLID)
+ if (pbrPen->flAttrs & GDIBRUSH_IS_SOLID)
{
- pbrushPen->BrushAttr.lbColor = Color & 0xFFFFFF;
+ pbrPen->BrushAttr.lbColor = Color & 0xFFFFFF;
}
- PEN_UnlockPen(pbrushPen);
+ PEN_ShareUnlockPen(pbrPen);
}
}
HRGN hReg;
PROSRGNDATA pReg;
- pReg = (PROSRGNDATA)GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_REGION);
- if(!pReg)
+ pReg = (PROSRGNDATA)GDIOBJ_AllocateObject(GDIObjType_RGN_TYPE,
+ sizeof(REGION),
+ BASEFLAG_LOOKASIDE);
+ if (!pReg)
{
+ DPRINT1("Could not allocate a palette.\n");
+ return NULL;
+ }
+
+ if (!GDIOBJ_hInsertObject(&pReg->BaseObject, GDI_OBJ_HMGR_POWNED))
+ {
+ DPRINT1("Could not insert palette into handle table.\n");
+ GDIOBJ_vFreeObject(&pReg->BaseObject);
return NULL;
}
pReg->Buffer = ExAllocatePoolWithTag(PagedPool, nReg * sizeof(RECT), TAG_REGION);
if (!pReg->Buffer)
{
- RGNOBJAPI_Unlock(pReg);
- GDIOBJ_FreeObjByHandle(hReg, GDI_OBJECT_TYPE_REGION);
+ DPRINT1("Could not allocate region buffer\n");
+ GDIOBJ_vDeleteObject(&pReg->BaseObject);
return NULL;
}
}
pReg->rdh.dwSize = sizeof(RGNDATAHEADER);
pReg->rdh.nCount = nReg;
pReg->rdh.nRgnSize = nReg * sizeof(RECT);
+ pReg->prgnattr = &pReg->rgnattr;
return pReg;
}
+BOOL
+NTAPI
+REGION_bAllocRgnAttr(PREGION prgn)
+{
+ PPROCESSINFO ppi;
+ PRGN_ATTR prgnattr;
+
+ ppi = PsGetCurrentProcessWin32Process();
+ ASSERT(ppi);
+
+ prgnattr = GdiPoolAllocate(ppi->pPoolRgnAttr);
+ if (!prgnattr)
+ {
+ DPRINT1("Could not allocate RGN attr\n");
+ return FALSE;
+ }
+
+ /* Set the object attribute in the handle table */
+ prgn->prgnattr = prgnattr;
+ GDIOBJ_vSetObjectAttr(&prgn->BaseObject, prgnattr);
+
+ return TRUE;
+}
+
+
//
// Allocate User Space Region Handle.
//
FASTCALL
REGION_AllocUserRgnWithHandle(INT nRgn)
{
- PROSRGNDATA pRgn;
- PGDI_TABLE_ENTRY Entry;
+ PREGION prgn;
+
+ prgn = REGION_AllocRgnWithHandle(nRgn);
+ if (!prgn)
+ {
+ return NULL;
+ }
- pRgn = REGION_AllocRgnWithHandle(nRgn);
- if (pRgn)
+ if (!REGION_bAllocRgnAttr(prgn))
{
- Entry = GDI_HANDLE_GET_ENTRY(GdiHandleTable, pRgn->BaseObject.hHmgr);
- Entry->UserData = AllocateObjectAttr();
- RtlZeroMemory(Entry->UserData, sizeof(RGN_ATTR));
+ ASSERT(FALSE);
}
- return pRgn;
+
+ return prgn;
}
-PROSRGNDATA
-FASTCALL
-RGNOBJAPI_Lock(HRGN hRgn, PRGN_ATTR *ppRgn_Attr)
+VOID
+NTAPI
+REGION_vSyncRegion(PREGION pRgn)
{
- PGDI_TABLE_ENTRY Entry;
- PRGN_ATTR pRgn_Attr;
- BOOL Hit = FALSE;
- PROSRGNDATA pRgn = NULL;
-
- pRgn = REGION_LockRgn(hRgn);
+ PRGN_ATTR pRgn_Attr = NULL;
- if (pRgn && GDIOBJ_OwnedByCurrentProcess(hRgn))
+ if (pRgn && pRgn->prgnattr != &pRgn->rgnattr)
{
- Entry = GDI_HANDLE_GET_ENTRY(GdiHandleTable, hRgn);
- pRgn_Attr = Entry->UserData;
+ pRgn_Attr = GDIOBJ_pvGetObjectAttr(&pRgn->BaseObject);
if ( pRgn_Attr )
{
pRgn_Attr->AttrFlags &= ~ATTR_RGN_DIRTY;
}
}
- else
- { // This object is cached an waiting for it's resurrection by the users.
- Hit = TRUE;
- }
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
}
_SEH2_END;
-
- if (Hit)
- {
- REGION_UnlockRgn(pRgn);
- return NULL;
- }
- if (ppRgn_Attr)
- *ppRgn_Attr = pRgn_Attr;
- }
- else
- {
- if (ppRgn_Attr)
- *ppRgn_Attr = NULL;
}
}
+
+}
+
+PROSRGNDATA
+FASTCALL
+RGNOBJAPI_Lock(HRGN hRgn, PRGN_ATTR *ppRgn_Attr)
+{
+ PROSRGNDATA pRgn = NULL;
+
+ pRgn = REGION_LockRgn(hRgn);
+
+ REGION_vSyncRegion(pRgn);
+
+ if (ppRgn_Attr)
+ *ppRgn_Attr = pRgn->prgnattr;
+
return pRgn;
}
FASTCALL
RGNOBJAPI_Unlock(PROSRGNDATA pRgn)
{
- PGDI_TABLE_ENTRY Entry;
PRGN_ATTR pRgn_Attr;
- if (pRgn && GDIOBJ_OwnedByCurrentProcess(pRgn->BaseObject.hHmgr))
+ if (pRgn && GreGetObjectOwner(pRgn->BaseObject.hHmgr) == GDI_OBJ_HMGR_POWNED)
{
- Entry = GDI_HANDLE_GET_ENTRY(GdiHandleTable, pRgn->BaseObject.hHmgr);
- pRgn_Attr = Entry->UserData;
+ pRgn_Attr = GDIOBJ_pvGetObjectAttr(&pRgn->BaseObject);
if ( pRgn_Attr )
{
FASTCALL
IntSysCreateRectpRgn(INT LeftRect, INT TopRect, INT RightRect, INT BottomRect)
{
- PROSRGNDATA pRgn;
+ PREGION prgn;
- pRgn = (PROSRGNDATA)GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_REGION);
- if (!pRgn)
- {
- return NULL;
- }
- pRgn->Buffer = &pRgn->rdh.rcBound;
- REGION_SetRectRgn(pRgn, LeftRect, TopRect, RightRect, BottomRect);
- REGION_UnlockRgn(pRgn);
- return pRgn;
+ /* Allocate a region, witout a handle */
+ prgn = (PREGION)GDIOBJ_AllocateObject(GDIObjType_RGN_TYPE, sizeof(REGION), 0);
+ if (!prgn)
+ {
+ return NULL;
+ }
+
+ /* Initialize it */
+ prgn->Buffer = &prgn->rdh.rcBound;
+ prgn->prgnattr = &prgn->rgnattr;
+ REGION_SetRectRgn(prgn, LeftRect, TopRect, RightRect, BottomRect);
+
+ return prgn;
}
HRGN
FASTCALL
IntSysCreateRectRgn(INT LeftRect, INT TopRect, INT RightRect, INT BottomRect)
{
- PROSRGNDATA pRgn = IntSysCreateRectpRgn(LeftRect,TopRect,RightRect,BottomRect);
- return (pRgn ? pRgn->BaseObject.hHmgr : NULL);
+ PREGION prgn;
+ HRGN hrgn;
+
+ /* Allocate a region, witout a handle */
+ prgn = (PREGION)GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_REGION, sizeof(REGION));
+ if (!prgn)
+ {
+ return NULL;
+ }
+
+ /* Initialize it */
+ prgn->Buffer = &prgn->rdh.rcBound;
+ REGION_SetRectRgn(prgn, LeftRect, TopRect, RightRect, BottomRect);
+ hrgn = prgn->BaseObject.hHmgr;
+ prgn->prgnattr = &prgn->rgnattr;
+
+ REGION_UnlockRgn(prgn);
+
+ return hrgn;
}
BOOL INTERNAL_CALL
REGION_Cleanup(PVOID ObjectBody)
{
PROSRGNDATA pRgn = (PROSRGNDATA)ObjectBody;
+ PPROCESSINFO ppi = PsGetCurrentProcessWin32Process();
+ ASSERT(ppi);
+
+ ASSERT(pRgn->prgnattr);
+ if (pRgn->prgnattr != &pRgn->rgnattr)
+ GdiPoolFree(ppi->pPoolRgnAttr, pRgn->prgnattr);
+
if (pRgn->Buffer && pRgn->Buffer != &pRgn->rdh.rcBound)
ExFreePoolWithTag(pRgn->Buffer, TAG_REGION);
return TRUE;
}
-// use REGION_FreeRgnByHandle(hRgn); for systems regions.
VOID FASTCALL
REGION_Delete(PROSRGNDATA pRgn)
{
if ( pRgn == prgnDefault) return;
- REGION_FreeRgn(pRgn);
+ GDIOBJ_vDeleteObject(&pRgn->BaseObject);
}
VOID FASTCALL
FASTCALL
IntGdiSetRegionOwner(HRGN hRgn, DWORD OwnerMask)
{
- INT Index;
- PGDI_TABLE_ENTRY Entry;
-/*
- System Regions:
- These regions do not use attribute sections and when allocated, use gdiobj
- level functions.
- */
- // FIXME! HAX!!! Remove this once we get everything right!
- Index = GDI_HANDLE_GET_INDEX(hRgn);
- Entry = &GdiHandleTable->Entries[Index];
- if (Entry->UserData) FreeObjectAttr(Entry->UserData);
- Entry->UserData = NULL;
- //
- if ((OwnerMask == GDI_OBJ_HMGR_PUBLIC) || OwnerMask == GDI_OBJ_HMGR_NONE)
- {
- return GDIOBJ_SetOwnership(hRgn, NULL);
- }
- if (OwnerMask == GDI_OBJ_HMGR_POWNED)
- {
- return GDIOBJ_SetOwnership((HGDIOBJ) hRgn, PsGetCurrentProcess() );
- }
- return FALSE;
+ PREGION prgn;
+ PRGN_ATTR prgnattr;
+ PPROCESSINFO ppi;
+
+ prgn = REGION_LockRgn(hRgn);
+ if (!prgn)
+ {
+ return FALSE;
+ }
+
+ prgnattr = GDIOBJ_pvGetObjectAttr(&prgn->BaseObject);
+ if (prgnattr)
+ {
+ GDIOBJ_vSetObjectAttr(&prgn->BaseObject, NULL);
+ prgn->prgnattr = NULL;
+ ppi = PsGetCurrentProcessWin32Process();
+ GdiPoolFree(ppi->pPoolRgnAttr, prgnattr);
+ }
+ RGNOBJAPI_Unlock(prgn);
+
+ return GreSetObjectOwner(hRgn, OwnerMask);
}
INT
{
DPRINT1("IntGdiCombineRgn requires hSrc2 != NULL for combine mode %d!\n", CombineMode);
EngSetLastError(ERROR_INVALID_HANDLE);
+ ASSERT(FALSE);
}
}
}
if (!REGION_LPTODP(dc, tmpVisRgn, hRgn) ||
NtGdiOffsetRgn(tmpVisRgn, dc->ptlDCOrig.x, dc->ptlDCOrig.y) == ERROR)
{
- REGION_FreeRgnByHandle(tmpVisRgn);
+ GreDeleteObject(tmpVisRgn);
return FALSE;
}
visrgn = RGNOBJAPI_Lock(tmpVisRgn, NULL);
if (visrgn == NULL)
{
- REGION_FreeRgnByHandle(tmpVisRgn);
+ GreDeleteObject(tmpVisRgn);
return FALSE;
}
0xFFFF);//FIXME:don't know what to put here
RGNOBJAPI_Unlock(visrgn);
- REGION_FreeRgnByHandle(tmpVisRgn);
+ GreDeleteObject(tmpVisRgn);
// Fill the region
return bRet;
//
INT
APIENTRY
-NtGdiCombineRgn(HRGN hDest,
- HRGN hSrc1,
- HRGN hSrc2,
- INT CombineMode)
+NtGdiCombineRgn(
+ IN HRGN hrgnDst,
+ IN HRGN hrgnSrc1,
+ IN HRGN hrgnSrc2,
+ IN INT iMode)
{
- INT result = ERROR;
- PROSRGNDATA destRgn, src1Rgn, src2Rgn = NULL;
-
- if ( CombineMode > RGN_COPY && CombineMode < RGN_AND)
- {
- EngSetLastError(ERROR_INVALID_PARAMETER);
- return ERROR;
- }
+ HRGN ahrgn[3];
+ PREGION aprgn[3];
+ INT iResult;
- destRgn = RGNOBJAPI_Lock(hDest, NULL);
- if (!destRgn)
- {
- EngSetLastError(ERROR_INVALID_HANDLE);
- return ERROR;
- }
+ if (iMode < RGN_AND || iMode > RGN_COPY)
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ return ERROR;
+ }
- src1Rgn = RGNOBJAPI_Lock(hSrc1, NULL);
- if (!src1Rgn)
- {
- RGNOBJAPI_Unlock(destRgn);
- EngSetLastError(ERROR_INVALID_HANDLE);
- return ERROR;
- }
+ if (!hrgnDst || !hrgnSrc1 || (iMode != RGN_COPY && !hrgnSrc2))
+ {
+ DPRINT1("NtGdiCombineRgn: %p, %p, %p, %d\n",
+ hrgnDst, hrgnSrc1, hrgnSrc2, iMode);
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ return ERROR;
+ }
- if (hSrc2)
- src2Rgn = RGNOBJAPI_Lock(hSrc2, NULL);
+ /* Lock all regions */
+ ahrgn[0] = hrgnDst;
+ ahrgn[1] = hrgnSrc1;
+ ahrgn[2] = iMode != RGN_COPY ? hrgnSrc2 : NULL;
+ if (!GDIOBJ_bLockMultipleObjects(3, ahrgn, (PVOID*)aprgn, GDIObjType_RGN_TYPE))
+ {
+ DPRINT1("NtGdiCombineRgn: %p, %p, %p, %d\n",
+ hrgnDst, hrgnSrc1, hrgnSrc2, iMode);
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ return ERROR;
+ }
- result = IntGdiCombineRgn( destRgn, src1Rgn, src2Rgn, CombineMode);
+ /* HACK: Sync usermode attributes */
+ REGION_vSyncRegion(aprgn[0]);
+ REGION_vSyncRegion(aprgn[1]);
+ if (aprgn[2]) REGION_vSyncRegion(aprgn[2]);
- if (src2Rgn)
- RGNOBJAPI_Unlock(src2Rgn);
- RGNOBJAPI_Unlock(src1Rgn);
- RGNOBJAPI_Unlock(destRgn);
+ /* Call the internal function */
+ iResult = IntGdiCombineRgn(aprgn[0], aprgn[1], aprgn[2], iMode);
- return result;
+ /* Cleanup and return */
+ REGION_UnlockRgn(aprgn[0]);
+ REGION_UnlockRgn(aprgn[1]);
+ if (aprgn[2]) REGION_UnlockRgn(aprgn[2]);
+ return iResult;
}
HRGN
}
if (!REGION_CreateFrameRgn(FrameRgn, hRgn, Width, Height))
{
- REGION_FreeRgnByHandle(FrameRgn);
+ GreDeleteObject(FrameRgn);
return FALSE;
}
Ret = NtGdiFillRgn(hDC, FrameRgn, hBrush);
- REGION_FreeRgnByHandle(FrameRgn);
+ GreDeleteObject(FrameRgn);
return Ret;
}
set(CMAKE_ASM_COMPILER ${MINGW_PREFIX}gcc)
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -x assembler-with-cpp -o <OBJECT> -I${REACTOS_SOURCE_DIR}/include/asm -I${REACTOS_BINARY_DIR}/include/asm <FLAGS> <DEFINES> -D__ASM__ -c <SOURCE>")
+if(NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
+ set(CMAKE_AR ${MINGW_PREFIX}ar)
+ set(CMAKE_C_CREATE_STATIC_LIBRARY "${CMAKE_AR} crs <TARGET> <LINK_FLAGS> <OBJECTS>")
+ set(CMAKE_CXX_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
+ set(CMAKE_ASM_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
+endif()
+
# Use stdcall fixups, and don't link with anything by default unless we say so
set(CMAKE_C_STANDARD_LIBRARIES "-lgcc" CACHE STRING "Standard C Libraries")
--- /dev/null
+/*
+ * PE Fixup Utility
+ * Copyright (C) 2005 Filip Navara
+ *
+ * The purpose of this utility is fix PE binaries generated by binutils and
+ * to manipulate flags that can't be set by binutils.
+ *
+ * Currently two features are implemented:
+ *
+ * - Setting flags on PE sections for use by drivers. The sections
+ * .text, .data, .idata, .bss are marked as non-pageable and
+ * non-discarable, section PAGE is marked as pageable and section
+ * INIT is marked as discaradable.
+ *
+ * - Sorting of export name table in executables. DLLTOOL has bug
+ * in sorting algorithm when the --kill-at flag is used. The exports
+ * are sorted in the decorated form and so the fastcall symbols are
+ * incorrectly put at the beginning of export table. This option
+ * allow to correct sort the table, so binary search can be used
+ * to process them.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
+/* The following definitions are ripped from MinGW W32API headers. We don't
+ use these headers directly in order to allow compilation on Linux hosts. */
+
+typedef unsigned char BYTE, *PBYTE;
+typedef unsigned short WORD;
+typedef unsigned int DWORD;
+typedef int LONG;
+typedef long LONG_PTR;
+
+#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
+#define IMAGE_SIZEOF_SHORT_NAME 8
+#define IMAGE_DOS_SIGNATURE 0x5A4D
+#define IMAGE_NT_SIGNATURE 0x00004550
+#define IMAGE_SCN_MEM_DISCARDABLE 0x2000000
+#define IMAGE_SCN_MEM_NOT_PAGED 0x8000000
+#define FIELD_OFFSET(t,f) ((LONG)(LONG_PTR)&(((t*)0)->f))
+#define IMAGE_FIRST_SECTION(h) ((PIMAGE_SECTION_HEADER) ((unsigned long)h+FIELD_OFFSET(IMAGE_NT_HEADERS,OptionalHeader)+((PIMAGE_NT_HEADERS)(h))->FileHeader.SizeOfOptionalHeader))
+#define IMAGE_DIRECTORY_ENTRY_EXPORT 0
+
+#pragma pack(2)
+typedef struct _IMAGE_DOS_HEADER {
+ WORD e_magic;
+ WORD e_cblp;
+ WORD e_cp;
+ WORD e_crlc;
+ WORD e_cparhdr;
+ WORD e_minalloc;
+ WORD e_maxalloc;
+ WORD e_ss;
+ WORD e_sp;
+ WORD e_csum;
+ WORD e_ip;
+ WORD e_cs;
+ WORD e_lfarlc;
+ WORD e_ovno;
+ WORD e_res[4];
+ WORD e_oemid;
+ WORD e_oeminfo;
+ WORD e_res2[10];
+ LONG e_lfanew;
+} IMAGE_DOS_HEADER,*PIMAGE_DOS_HEADER;
+#pragma pack(4)
+#pragma pack(4)
+typedef struct _IMAGE_EXPORT_DIRECTORY {
+ DWORD Characteristics;
+ DWORD TimeDateStamp;
+ WORD MajorVersion;
+ WORD MinorVersion;
+ DWORD Name;
+ DWORD Base;
+ DWORD NumberOfFunctions;
+ DWORD NumberOfNames;
+ DWORD AddressOfFunctions;
+ DWORD AddressOfNames;
+ DWORD AddressOfNameOrdinals;
+} IMAGE_EXPORT_DIRECTORY,*PIMAGE_EXPORT_DIRECTORY;
+typedef struct _IMAGE_FILE_HEADER {
+ WORD Machine;
+ WORD NumberOfSections;
+ DWORD TimeDateStamp;
+ DWORD PointerToSymbolTable;
+ DWORD NumberOfSymbols;
+ WORD SizeOfOptionalHeader;
+ WORD Characteristics;
+} IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER;
+typedef struct _IMAGE_DATA_DIRECTORY {
+ DWORD VirtualAddress;
+ DWORD Size;
+} IMAGE_DATA_DIRECTORY,*PIMAGE_DATA_DIRECTORY;
+typedef struct _IMAGE_OPTIONAL_HEADER {
+ WORD Magic;
+ BYTE MajorLinkerVersion;
+ BYTE MinorLinkerVersion;
+ DWORD SizeOfCode;
+ DWORD SizeOfInitializedData;
+ DWORD SizeOfUninitializedData;
+ DWORD AddressOfEntryPoint;
+ DWORD BaseOfCode;
+ DWORD BaseOfData;
+ DWORD ImageBase;
+ DWORD SectionAlignment;
+ DWORD FileAlignment;
+ WORD MajorOperatingSystemVersion;
+ WORD MinorOperatingSystemVersion;
+ WORD MajorImageVersion;
+ WORD MinorImageVersion;
+ WORD MajorSubsystemVersion;
+ WORD MinorSubsystemVersion;
+ DWORD Reserved1;
+ DWORD SizeOfImage;
+ DWORD SizeOfHeaders;
+ DWORD CheckSum;
+ WORD Subsystem;
+ WORD DllCharacteristics;
+ DWORD SizeOfStackReserve;
+ DWORD SizeOfStackCommit;
+ DWORD SizeOfHeapReserve;
+ DWORD SizeOfHeapCommit;
+ DWORD LoaderFlags;
+ DWORD NumberOfRvaAndSizes;
+ IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
+} IMAGE_OPTIONAL_HEADER,*PIMAGE_OPTIONAL_HEADER;
+typedef struct _IMAGE_NT_HEADERS {
+ DWORD Signature;
+ IMAGE_FILE_HEADER FileHeader;
+ IMAGE_OPTIONAL_HEADER OptionalHeader;
+} IMAGE_NT_HEADERS,*PIMAGE_NT_HEADERS;
+typedef struct _IMAGE_SECTION_HEADER {
+ BYTE Name[IMAGE_SIZEOF_SHORT_NAME];
+ union {
+ DWORD PhysicalAddress;
+ DWORD VirtualSize;
+ } Misc;
+ DWORD VirtualAddress;
+ DWORD SizeOfRawData;
+ DWORD PointerToRawData;
+ DWORD PointerToRelocations;
+ DWORD PointerToLinenumbers;
+ WORD NumberOfRelocations;
+ WORD NumberOfLinenumbers;
+ DWORD Characteristics;
+} IMAGE_SECTION_HEADER,*PIMAGE_SECTION_HEADER;
+#pragma pack(4)
+
+/* End of ripped definitions */
+
+typedef struct _export_t {
+ DWORD name;
+ WORD ordinal;
+} export_t;
+
+unsigned char *buffer;
+PIMAGE_DOS_HEADER dos_header;
+PIMAGE_NT_HEADERS nt_header;
+
+static inline WORD dtohs(WORD in)
+{
+ PBYTE in_ptr = (PBYTE)∈
+ return in_ptr[0] | (in_ptr[1] << 8);
+}
+
+static inline WORD htods(WORD in)
+{
+ WORD out;
+ PBYTE out_ptr = (PBYTE)&out;
+ out_ptr[0] = in; out_ptr[1] = in >> 8;
+ return out;
+}
+
+static inline DWORD dtohl(DWORD in)
+{
+ PBYTE in_ptr = (PBYTE)∈
+ return in_ptr[0] | (in_ptr[1] << 8) | (in_ptr[2] << 16) | (in_ptr[3] << 24);
+}
+
+static inline DWORD htodl(DWORD in)
+{
+ DWORD out;
+ PBYTE out_ptr = (PBYTE)&out;
+ out_ptr[0] = in ; out_ptr[1] = in >> 8;
+ out_ptr[2] = in >> 16; out_ptr[3] = in >> 24;
+ return out;
+}
+
+void *rva_to_ptr(DWORD rva)
+{
+ PIMAGE_SECTION_HEADER section_header;
+ unsigned int i;
+
+ for (i = 0, section_header = IMAGE_FIRST_SECTION(nt_header);
+ i < dtohl(nt_header->FileHeader.NumberOfSections);
+ i++, section_header++)
+ {
+ if (rva >= dtohl(section_header->VirtualAddress) &&
+ rva < dtohl(section_header->VirtualAddress) +
+ dtohl(section_header->Misc.VirtualSize))
+ {
+ return buffer + rva - dtohl(section_header->VirtualAddress) +
+ dtohl(section_header->PointerToRawData);
+ }
+ }
+
+ return NULL;
+}
+
+int export_compare_func(const void *a, const void *b)
+{
+ const export_t *ap = a;
+ const export_t *bp = b;
+ char *an = rva_to_ptr(ap->name);
+ char *bn = rva_to_ptr(bp->name);
+ return strcmp(an, bn);
+}
+
+int main(int argc, char **argv)
+{
+ int fd_in, fd_out;
+ long len;
+ char hdrbuf[4] = { }, elfhdr[4] = { '\177', 'E', 'L', 'F' };
+ PIMAGE_SECTION_HEADER section_header;
+ PIMAGE_DATA_DIRECTORY data_dir;
+ unsigned int i;
+ unsigned long checksum;
+ int fixup_exports = 0;
+ int fixup_sections = 0;
+
+ /*
+ * Process parameters.
+ */
+
+ if (argc < 2)
+ {
+ printf("Usage: %s <filename> <options>\n"
+ "Options:\n"
+ " -sections Sets section flags for PE image.\n"
+ " -exports Sort the names in export table.\n",
+ argv[0]);
+ return 1;
+ }
+
+ for (i = 2; i < argc; i++)
+ {
+ if (!strcmp(argv[i], "-sections"))
+ fixup_sections = 1;
+ else if (!strcmp(argv[i], "-exports"))
+ fixup_exports = 1;
+ else
+ { fprintf(stderr, "Invalid option: %s\n", argv[i]); return 1; }
+ }
+
+ /*
+ * Nothing to do.
+ */
+ if (fixup_sections == 0 && fixup_exports == 0)
+ return 0;
+
+ /*
+ * Read the whole file to memory.
+ */
+
+ fd_in = open(argv[1], O_RDONLY | O_BINARY);
+ if (fd_in == 0)
+ {
+ fprintf(stderr, "Can't open input file.\n");
+ return 1;
+ }
+
+ /*
+ * PowerPC ReactOS uses elf, so doesn't need pefixup
+ */
+ len = read(fd_in, hdrbuf, sizeof(elfhdr));
+ if (!memcmp(hdrbuf, elfhdr, sizeof(elfhdr)))
+ return 0;
+
+ len = lseek(fd_in, 0, SEEK_END);
+ if (len < sizeof(IMAGE_DOS_HEADER))
+ {
+ close(fd_in);
+ fprintf(stderr, "'%s' isn't a PE image (too short)\n", argv[1]);
+ return 1;
+ }
+
+ /* Lower down we overwrite the byte at len, so here, we need at least
+ * one more byte than len. We'll be guaranteed one or two now. */
+ buffer = malloc((len + 2) & ~1);
+ if (buffer == NULL)
+ {
+ close(fd_in);
+ fprintf(stderr, "Not enough memory available.\n");
+ return 1;
+ }
+
+ /* Read the whole input file into a buffer */
+ lseek(fd_in, 0, SEEK_SET);
+ read(fd_in, buffer, len);
+ /* Here is where the block end overwrite was */
+ if (len & 1)
+ buffer[len] = 0;
+
+ close(fd_in);
+
+ /*
+ * Check the headers and save pointers to them.
+ */
+
+ dos_header = (PIMAGE_DOS_HEADER)buffer;
+ nt_header = (PIMAGE_NT_HEADERS)(buffer + dtohl(dos_header->e_lfanew));
+
+ if (dtohs(dos_header->e_magic) != IMAGE_DOS_SIGNATURE ||
+ dtohl(nt_header->Signature) != IMAGE_NT_SIGNATURE)
+ {
+ fprintf(stderr, "'%s' isn't a PE image (bad headers)\n", argv[1]);
+ free(buffer);
+ return 1;
+ }
+
+ if (fixup_exports)
+ {
+ /* Sort export directory */
+ data_dir = &nt_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT];
+ if (dtohl(data_dir->Size) != 0)
+ {
+ PIMAGE_EXPORT_DIRECTORY export_directory;
+ DWORD *name_ptr;
+ WORD *ordinal_ptr;
+ export_t *exports;
+
+ export_directory = (PIMAGE_EXPORT_DIRECTORY)rva_to_ptr(dtohl(data_dir->VirtualAddress));
+ if (export_directory != NULL)
+ {
+ exports = malloc(sizeof(export_t) * dtohl(export_directory->NumberOfNames));
+ if (exports == NULL)
+ {
+ fprintf(stderr, "Not enough memory.\n");
+ free(buffer);
+ return 1;
+ }
+
+ name_ptr = (DWORD *)rva_to_ptr(dtohl(export_directory->AddressOfNames));
+ ordinal_ptr = (WORD *)rva_to_ptr(dtohl(export_directory->AddressOfNameOrdinals));
+
+ for (i = 0; i < dtohl(export_directory->NumberOfNames); i++)
+ {
+ exports[i].name = dtohl(name_ptr[i]);
+ exports[i].ordinal = dtohl(ordinal_ptr[i]);
+ }
+
+ qsort(exports, dtohl(export_directory->NumberOfNames), sizeof(export_t),
+ export_compare_func);
+
+ for (i = 0; i < dtohl(export_directory->NumberOfNames); i++)
+ {
+ name_ptr[i] = htodl(exports[i].name);
+ ordinal_ptr[i] = htodl(exports[i].ordinal);
+ }
+
+ free(exports);
+ }
+ }
+ }
+
+ if (fixup_sections)
+ {
+ /* Update section flags */
+ for (i = 0, section_header = IMAGE_FIRST_SECTION(nt_header);
+ i < dtohl(nt_header->OptionalHeader.NumberOfRvaAndSizes);
+ i++, section_header++)
+ {
+ if (!strcmp((char*)section_header->Name, ".text") ||
+ !strcmp((char*)section_header->Name, ".data") ||
+ !strcmp((char*)section_header->Name, ".idata") ||
+ !strcmp((char*)section_header->Name, ".rdata") ||
+ !strcmp((char*)section_header->Name, ".bss"))
+ {
+ section_header->Characteristics |= htodl(IMAGE_SCN_MEM_NOT_PAGED);
+ section_header->Characteristics &= htodl(~IMAGE_SCN_MEM_DISCARDABLE);
+ }
+ else if (!strcmp((char*)section_header->Name, "INIT"))
+ {
+ section_header->Characteristics |= htodl(IMAGE_SCN_MEM_DISCARDABLE);
+ }
+ else if (!strcmp((char*)section_header->Name, "PAGE"))
+ {
+ section_header->Characteristics |= htodl(IMAGE_SCN_MEM_NOT_PAGED);
+ }
+ }
+ }
+
+ /* Recalculate checksum */
+ nt_header->OptionalHeader.CheckSum = 0;
+ checksum = 0;
+ for (i = 0; i < len; i += 2)
+ {
+ checksum += *(unsigned short *)(buffer + i);
+ checksum = (checksum + (checksum >> 16)) & 0xffff;
+ }
+ checksum += len;
+ nt_header->OptionalHeader.CheckSum = htods(checksum);
+
+ /* Write the output file */
+ fd_out = open(argv[1], O_WRONLY | O_BINARY);
+ write(fd_out, buffer, len);
+ close(fd_out);
+
+ return 0;
+}