Fix build

This was SVN commit r9412.
This commit is contained in:
Ykkrosh 2011-05-03 15:58:25 +00:00
parent cce3bebe0c
commit 178a700c16
9 changed files with 30 additions and 29 deletions

View File

@ -154,7 +154,7 @@ static void* fam_event_loop(void*)
}
}
LibError dir_watch_Add(const OsPath& path, PDirWatch& dirWatch)
Status dir_watch_Add(const OsPath& path, PDirWatch& dirWatch)
{
// init already failed; don't try again or complain
if(initialized == -1)
@ -203,7 +203,7 @@ LibError dir_watch_Add(const OsPath& path, PDirWatch& dirWatch)
LibError dir_watch_Poll(DirWatchNotifications& notifications)
Status dir_watch_Poll(DirWatchNotifications& notifications)
{
if(initialized == -1)
return ERR::FAIL; // NOWARN

View File

@ -142,7 +142,7 @@ uintptr_t os_cpu_SetThreadAffinityMask(uintptr_t processorMask)
}
LibError os_cpu_CallByEachCPU(OsCpuCallback cb, uintptr_t cbData)
Status os_cpu_CallByEachCPU(OsCpuCallback cb, uintptr_t cbData)
{
for(size_t processor = 0; processor < os_cpu_NumProcessors(); processor++)
{

View File

@ -49,7 +49,7 @@ void* debug_GetCaller(void* UNUSED(context), const wchar_t* UNUSED(lastFuncToSki
return bt[2];
}
LibError debug_DumpStack(wchar_t* buf, size_t max_chars, void* UNUSED(context), const wchar_t* UNUSED(lastFuncToSkip))
Status debug_DumpStack(wchar_t* buf, size_t max_chars, void* UNUSED(context), const wchar_t* UNUSED(lastFuncToSkip))
{
static const size_t N_FRAMES = 16;
void *bt[N_FRAMES];
@ -96,7 +96,7 @@ LibError debug_DumpStack(wchar_t* buf, size_t max_chars, void* UNUSED(context),
return INFO::OK;
}
LibError debug_ResolveSymbol(void* ptr_of_interest, wchar_t* sym_name, wchar_t* file, int* line)
Status debug_ResolveSymbol(void* ptr_of_interest, wchar_t* sym_name, wchar_t* file, int* line)
{
if (sym_name)
*sym_name = 0;

View File

@ -25,12 +25,12 @@
// stub implementations
LibError dir_watch_Add(const OsPath& UNUSED(path), PDirWatch& UNUSED(dirWatch))
Status dir_watch_Add(const OsPath& UNUSED(path), PDirWatch& UNUSED(dirWatch))
{
return INFO::OK;
}
LibError dir_watch_Poll(DirWatchNotifications& UNUSED(notifications))
Status dir_watch_Poll(DirWatchNotifications& UNUSED(notifications))
{
return INFO::OK;
}

View File

@ -108,7 +108,7 @@ uintptr_t os_cpu_SetThreadAffinityMask(uintptr_t processorMask)
}
LibError os_cpu_CallByEachCPU(OsCpuCallback cb, uintptr_t cbData)
Status os_cpu_CallByEachCPU(OsCpuCallback cb, uintptr_t cbData)
{
for(size_t processor = 0; processor < os_cpu_NumProcessors(); processor++)
{

View File

@ -33,12 +33,12 @@ void* debug_GetCaller(void* UNUSED(context), const wchar_t* UNUSED(lastFuncToSki
return NULL;
}
LibError debug_DumpStack(wchar_t* UNUSED(buf), size_t UNUSED(max_chars), void* UNUSED(context), const wchar_t* UNUSED(lastFuncToSkip))
Status debug_DumpStack(wchar_t* UNUSED(buf), size_t UNUSED(max_chars), void* UNUSED(context), const wchar_t* UNUSED(lastFuncToSkip))
{
return ERR::NOT_IMPLEMENTED;
}
LibError debug_ResolveSymbol(void* UNUSED(ptr_of_interest), wchar_t* UNUSED(sym_name), wchar_t* UNUSED(file), int* UNUSED(line))
Status debug_ResolveSymbol(void* UNUSED(ptr_of_interest), wchar_t* UNUSED(sym_name), wchar_t* UNUSED(file), int* UNUSED(line))
{
return ERR::NOT_IMPLEMENTED;
}

View File

@ -31,7 +31,7 @@
// "copy" text into the clipboard. replaces previous contents.
LibError sys_clipboard_set(const wchar_t* text)
Status sys_clipboard_set(const wchar_t* text)
{
return INFO::OK;
}
@ -48,7 +48,7 @@ wchar_t* sys_clipboard_get(void)
// frees memory used by <copy>, which must have been returned by
// sys_clipboard_get. see note above.
LibError sys_clipboard_free(wchar_t* copy)
Status sys_clipboard_free(wchar_t* copy)
{
// Since clipboard_get never returns allocated memory (unimplemented), we
// should only ever get called with a NULL pointer.
@ -65,12 +65,12 @@ LibError sys_clipboard_free(wchar_t* copy)
* @param xres, yres (optional out) resolution [pixels]
* @param bpp (optional out) bits per pixel
* @param freq (optional out) vertical refresh rate [Hz]
* @return LibError; INFO::OK unless: some information was requested
* @return Status; INFO::OK unless: some information was requested
* (i.e. pointer is non-NULL) but cannot be returned.
* on failure, the outputs are all left unchanged (they are
* assumed initialized to defaults)
**/
LibError gfx_get_video_mode(int* xres, int* yres, int* bpp, int* freq)
Status gfx_get_video_mode(int* xres, int* yres, int* bpp, int* freq)
{
// TODO Implement
return ERR::NOT_IMPLEMENTED;

View File

@ -83,7 +83,7 @@ static ErrorReactionInternal try_gui_display_error(const wchar_t* text, bool man
// should only call async-signal-safe functions before exec.
// So prepare all the child's data in advance, before forking:
LibError err; // ignore UTF-8 errors
Status err; // ignore UTF-8 errors
std::string message = utf8_from_wstring(text, &err);
// Replace CRLF->LF
@ -262,7 +262,7 @@ ErrorReactionInternal sys_display_error(const wchar_t* text, size_t flags)
}
LibError sys_error_description_r(int err, wchar_t* buf, size_t max_chars)
Status sys_StatusDescription(int err, wchar_t* buf, size_t max_chars)
{
UNUSED2(err);
UNUSED2(buf);
@ -279,7 +279,7 @@ LibError sys_error_description_r(int err, wchar_t* buf, size_t max_chars)
// note: do not return ERR_NOT_IMPLEMENTED or similar because that
// would result in WARN_ERRs.
LibError sys_cursor_create(size_t w, size_t h, void* bgra_img, size_t hx, size_t hy, sys_cursor* cursor)
Status sys_cursor_create(size_t w, size_t h, void* bgra_img, size_t hx, size_t hy, sys_cursor* cursor)
{
UNUSED2(w);
UNUSED2(h);
@ -292,7 +292,7 @@ LibError sys_cursor_create(size_t w, size_t h, void* bgra_img, size_t hx, size_t
}
// returns a dummy value representing an empty cursor
LibError sys_cursor_create_empty(sys_cursor* cursor)
Status sys_cursor_create_empty(sys_cursor* cursor)
{
*cursor = (void*)1; // any non-zero value, since the cursor NULL has special meaning
return INFO::OK;
@ -300,7 +300,7 @@ LibError sys_cursor_create_empty(sys_cursor* cursor)
// replaces the current system cursor with the one indicated. need only be
// called once per cursor; pass 0 to restore the default.
LibError sys_cursor_set(sys_cursor cursor)
Status sys_cursor_set(sys_cursor cursor)
{
if (cursor) // dummy empty cursor
SDL_ShowCursor(SDL_DISABLE);
@ -312,7 +312,7 @@ LibError sys_cursor_set(sys_cursor cursor)
// destroys the indicated cursor and frees its resources. if it is
// currently the system cursor, the default cursor is restored first.
LibError sys_cursor_free(sys_cursor cursor)
Status sys_cursor_free(sys_cursor cursor)
{
// bail now to prevent potential confusion below; there's nothing to do.
if(!cursor)
@ -323,7 +323,7 @@ LibError sys_cursor_free(sys_cursor cursor)
return INFO::OK;
}
LibError sys_cursor_reset()
Status sys_cursor_reset()
{
return INFO::OK;
}
@ -356,7 +356,7 @@ std::wstring sys_get_user_name()
return L"";
}
LibError sys_generate_random_bytes(u8* buf, size_t count)
Status sys_generate_random_bytes(u8* buf, size_t count)
{
FILE* f = fopen("/dev/urandom", "rb");
if (!f)
@ -376,12 +376,12 @@ LibError sys_generate_random_bytes(u8* buf, size_t count)
return INFO::OK;
}
LibError sys_get_proxy_config(const std::wstring& UNUSED(url), std::wstring& UNUSED(proxy))
Status sys_get_proxy_config(const std::wstring& UNUSED(url), std::wstring& UNUSED(proxy))
{
return INFO::SKIPPED;
}
LibError sys_open_url(const std::string& url)
Status sys_open_url(const std::string& url)
{
pid_t pid = fork();
if (pid < 0)

View File

@ -46,6 +46,7 @@
#include <algorithm>
#undef Cursor
#undef Status
static Display *SDL_Display;
static Window SDL_Window;
@ -56,7 +57,7 @@ static size_t selection_size=0;
// useful for choosing a video mode. not called by detect().
// if we fail, outputs are unchanged (assumed initialized to defaults)
LibError gfx_get_video_mode(int* xres, int* yres, int* bpp, int* freq)
Status gfx_get_video_mode(int* xres, int* yres, int* bpp, int* freq)
{
Display* disp = XOpenDisplay(0);
if(!disp)
@ -90,7 +91,7 @@ LibError gfx_get_video_mode(int* xres, int* yres, int* bpp, int* freq)
// useful for determining aspect ratio. not called by detect().
// if we fail, outputs are unchanged (assumed initialized to defaults)
LibError gfx_get_monitor_size(int& width_mm, int& height_mm)
Status gfx_get_monitor_size(int& width_mm, int& height_mm)
{
Display* disp = XOpenDisplay(0);
if(!disp)
@ -212,7 +213,7 @@ wchar_t *sys_clipboard_get()
return NULL;
}
LibError sys_clipboard_free(wchar_t *clip_buf)
Status sys_clipboard_free(wchar_t *clip_buf)
{
free(clip_buf);
return INFO::OK;
@ -281,7 +282,7 @@ int clipboard_filter(const SDL_Event *event)
* Initialization for X clipboard handling, called on-demand by
* sys_clipboard_set.
*/
LibError x11_clipboard_init()
Status x11_clipboard_init()
{
SDL_SysWMinfo info;
@ -321,7 +322,7 @@ LibError x11_clipboard_init()
* <li>Listen for Selection events and respond to them as appropriate
* </ul>
*/
LibError sys_clipboard_set(const wchar_t *str)
Status sys_clipboard_set(const wchar_t *str)
{
ONCE(x11_clipboard_init());