Applied another patch by Vasilis: this one replaces all C++ style comments with
C style ones, as this is a C header, too (and a very basic one). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19984 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+20
-20
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2007, Haiku Inc. All Rights Reserved.
|
* Copyright 2007, Haiku, Inc. All Rights Reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef _ERRORS_H
|
#ifndef _ERRORS_H
|
||||||
@@ -9,13 +9,13 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
|
|
||||||
// Error baselines
|
/* Error baselines */
|
||||||
#define B_GENERAL_ERROR_BASE LONG_MIN
|
#define B_GENERAL_ERROR_BASE LONG_MIN
|
||||||
#define B_OS_ERROR_BASE B_GENERAL_ERROR_BASE + 0x1000
|
#define B_OS_ERROR_BASE B_GENERAL_ERROR_BASE + 0x1000
|
||||||
#define B_APP_ERROR_BASE B_GENERAL_ERROR_BASE + 0x2000
|
#define B_APP_ERROR_BASE B_GENERAL_ERROR_BASE + 0x2000
|
||||||
#define B_INTERFACE_ERROR_BASE B_GENERAL_ERROR_BASE + 0x3000
|
#define B_INTERFACE_ERROR_BASE B_GENERAL_ERROR_BASE + 0x3000
|
||||||
#define B_MEDIA_ERROR_BASE B_GENERAL_ERROR_BASE + 0x4000 // - 0x41ff
|
#define B_MEDIA_ERROR_BASE B_GENERAL_ERROR_BASE + 0x4000 /* - 0x41ff */
|
||||||
#define B_TRANSLATION_ERROR_BASE B_GENERAL_ERROR_BASE + 0x4800 // - 0x48ff
|
#define B_TRANSLATION_ERROR_BASE B_GENERAL_ERROR_BASE + 0x4800 /* - 0x48ff */
|
||||||
#define B_MIDI_ERROR_BASE B_GENERAL_ERROR_BASE + 0x5000
|
#define B_MIDI_ERROR_BASE B_GENERAL_ERROR_BASE + 0x5000
|
||||||
#define B_STORAGE_ERROR_BASE B_GENERAL_ERROR_BASE + 0x6000
|
#define B_STORAGE_ERROR_BASE B_GENERAL_ERROR_BASE + 0x6000
|
||||||
#define B_POSIX_ERROR_BASE B_GENERAL_ERROR_BASE + 0x7000
|
#define B_POSIX_ERROR_BASE B_GENERAL_ERROR_BASE + 0x7000
|
||||||
@@ -23,10 +23,10 @@
|
|||||||
#define B_PRINT_ERROR_BASE B_GENERAL_ERROR_BASE + 0x9000
|
#define B_PRINT_ERROR_BASE B_GENERAL_ERROR_BASE + 0x9000
|
||||||
#define B_DEVICE_ERROR_BASE B_GENERAL_ERROR_BASE + 0xa000
|
#define B_DEVICE_ERROR_BASE B_GENERAL_ERROR_BASE + 0xa000
|
||||||
|
|
||||||
// Developer-defined errors start at (B_ERRORS_END+1)
|
/* Developer-defined errors start at (B_ERRORS_END+1) */
|
||||||
#define B_ERRORS_END (B_GENERAL_ERROR_BASE + 0xffff)
|
#define B_ERRORS_END (B_GENERAL_ERROR_BASE + 0xffff)
|
||||||
|
|
||||||
// General Errors
|
/* General Errors */
|
||||||
enum {
|
enum {
|
||||||
B_NO_MEMORY = B_GENERAL_ERROR_BASE,
|
B_NO_MEMORY = B_GENERAL_ERROR_BASE,
|
||||||
B_IO_ERROR,
|
B_IO_ERROR,
|
||||||
@@ -52,7 +52,7 @@ enum {
|
|||||||
B_NO_ERROR = 0
|
B_NO_ERROR = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
// Kernel Kit Errors
|
/* Kernel Kit Errors */
|
||||||
enum {
|
enum {
|
||||||
B_BAD_SEM_ID = B_OS_ERROR_BASE,
|
B_BAD_SEM_ID = B_OS_ERROR_BASE,
|
||||||
B_NO_MORE_SEMS,
|
B_NO_MORE_SEMS,
|
||||||
@@ -75,7 +75,7 @@ enum {
|
|||||||
B_DEBUGGER_ALREADY_INSTALLED = B_OS_ERROR_BASE + 0x400,
|
B_DEBUGGER_ALREADY_INSTALLED = B_OS_ERROR_BASE + 0x400,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Application Kit Errors
|
/* Application Kit Errors */
|
||||||
enum {
|
enum {
|
||||||
B_BAD_REPLY = B_APP_ERROR_BASE,
|
B_BAD_REPLY = B_APP_ERROR_BASE,
|
||||||
B_DUPLICATE_REPLY,
|
B_DUPLICATE_REPLY,
|
||||||
@@ -98,10 +98,10 @@ enum {
|
|||||||
B_SHUTTING_DOWN
|
B_SHUTTING_DOWN
|
||||||
};
|
};
|
||||||
|
|
||||||
// Storage Kit/File System Errors
|
/* Storage Kit/File System Errors */
|
||||||
enum {
|
enum {
|
||||||
B_FILE_ERROR = B_STORAGE_ERROR_BASE,
|
B_FILE_ERROR = B_STORAGE_ERROR_BASE,
|
||||||
B_FILE_NOT_FOUND, // deprecated: use B_ENTRY_NOT_FOUND instead
|
B_FILE_NOT_FOUND, /* deprecated: use B_ENTRY_NOT_FOUND instead */
|
||||||
B_FILE_EXISTS,
|
B_FILE_EXISTS,
|
||||||
B_ENTRY_NOT_FOUND,
|
B_ENTRY_NOT_FOUND,
|
||||||
B_NAME_TOO_LONG,
|
B_NAME_TOO_LONG,
|
||||||
@@ -118,7 +118,7 @@ enum {
|
|||||||
B_PARTITION_TOO_SMALL
|
B_PARTITION_TOO_SMALL
|
||||||
};
|
};
|
||||||
|
|
||||||
// POSIX Errors
|
/* POSIX Errors */
|
||||||
#define E2BIG (B_POSIX_ERROR_BASE + 1)
|
#define E2BIG (B_POSIX_ERROR_BASE + 1)
|
||||||
#define ECHILD (B_POSIX_ERROR_BASE + 2)
|
#define ECHILD (B_POSIX_ERROR_BASE + 2)
|
||||||
#define EDEADLK (B_POSIX_ERROR_BASE + 3)
|
#define EDEADLK (B_POSIX_ERROR_BASE + 3)
|
||||||
@@ -179,7 +179,7 @@ enum {
|
|||||||
#define ETIME (B_POSIX_ERROR_BASE + 58)
|
#define ETIME (B_POSIX_ERROR_BASE + 58)
|
||||||
#define ETXTBSY (B_POSIX_ERROR_BASE + 59)
|
#define ETXTBSY (B_POSIX_ERROR_BASE + 59)
|
||||||
|
|
||||||
// POSIX errors that can be mapped to BeOS error codes
|
/* POSIX errors that can be mapped to BeOS error codes */
|
||||||
#define ENOMEM B_NO_MEMORY
|
#define ENOMEM B_NO_MEMORY
|
||||||
#define EACCES B_PERMISSION_DENIED
|
#define EACCES B_PERMISSION_DENIED
|
||||||
#define EINTR B_INTERRUPTED
|
#define EINTR B_INTERRUPTED
|
||||||
@@ -187,8 +187,8 @@ enum {
|
|||||||
#define EBUSY B_BUSY
|
#define EBUSY B_BUSY
|
||||||
#define EFAULT B_BAD_ADDRESS
|
#define EFAULT B_BAD_ADDRESS
|
||||||
#define ETIMEDOUT B_TIMED_OUT
|
#define ETIMEDOUT B_TIMED_OUT
|
||||||
#define EAGAIN B_WOULD_BLOCK // SysV compatibility
|
#define EAGAIN B_WOULD_BLOCK /* SysV compatibility */
|
||||||
#define EWOULDBLOCK B_WOULD_BLOCK // BSD compatibility
|
#define EWOULDBLOCK B_WOULD_BLOCK /* BSD compatibility */
|
||||||
#define EBADF B_FILE_ERROR
|
#define EBADF B_FILE_ERROR
|
||||||
#define EEXIST B_FILE_EXISTS
|
#define EEXIST B_FILE_EXISTS
|
||||||
#define EINVAL B_BAD_VALUE
|
#define EINVAL B_BAD_VALUE
|
||||||
@@ -206,7 +206,7 @@ enum {
|
|||||||
#define ENOEXEC B_NOT_AN_EXECUTABLE
|
#define ENOEXEC B_NOT_AN_EXECUTABLE
|
||||||
#define EPIPE B_BUSTED_PIPE
|
#define EPIPE B_BUSTED_PIPE
|
||||||
|
|
||||||
// new error codes that can be mapped to POSIX errors
|
/* new error codes that can be mapped to POSIX errors */
|
||||||
#define B_BUFFER_OVERFLOW EOVERFLOW
|
#define B_BUFFER_OVERFLOW EOVERFLOW
|
||||||
#define B_TOO_MANY_ARGS E2BIG
|
#define B_TOO_MANY_ARGS E2BIG
|
||||||
#define B_FILE_TOO_LARGE EFBIG
|
#define B_FILE_TOO_LARGE EFBIG
|
||||||
@@ -214,7 +214,7 @@ enum {
|
|||||||
#define B_DEVICE_NOT_FOUND ENODEV
|
#define B_DEVICE_NOT_FOUND ENODEV
|
||||||
#define B_NOT_SUPPORTED EOPNOTSUPP
|
#define B_NOT_SUPPORTED EOPNOTSUPP
|
||||||
|
|
||||||
// Media Kit Errors
|
/* Media Kit Errors */
|
||||||
enum {
|
enum {
|
||||||
B_STREAM_NOT_FOUND = B_MEDIA_ERROR_BASE,
|
B_STREAM_NOT_FOUND = B_MEDIA_ERROR_BASE,
|
||||||
B_SERVER_NOT_FOUND,
|
B_SERVER_NOT_FOUND,
|
||||||
@@ -226,7 +226,7 @@ enum {
|
|||||||
B_LAST_BUFFER_ERROR
|
B_LAST_BUFFER_ERROR
|
||||||
};
|
};
|
||||||
|
|
||||||
// Mail Kit Errors
|
/* Mail Kit Errors */
|
||||||
enum {
|
enum {
|
||||||
B_MAIL_NO_DAEMON = B_MAIL_ERROR_BASE,
|
B_MAIL_NO_DAEMON = B_MAIL_ERROR_BASE,
|
||||||
B_MAIL_UNKNOWN_USER,
|
B_MAIL_UNKNOWN_USER,
|
||||||
@@ -238,12 +238,12 @@ enum {
|
|||||||
B_MAIL_INVALID_MAIL
|
B_MAIL_INVALID_MAIL
|
||||||
};
|
};
|
||||||
|
|
||||||
// Printing Errors
|
/* Printing Errors */
|
||||||
enum {
|
enum {
|
||||||
B_NO_PRINT_SERVER = B_PRINT_ERROR_BASE
|
B_NO_PRINT_SERVER = B_PRINT_ERROR_BASE
|
||||||
};
|
};
|
||||||
|
|
||||||
// Device Kit Errors
|
/* Device Kit Errors */
|
||||||
enum {
|
enum {
|
||||||
B_DEV_INVALID_IOCTL = B_DEVICE_ERROR_BASE,
|
B_DEV_INVALID_IOCTL = B_DEVICE_ERROR_BASE,
|
||||||
B_DEV_NO_MEMORY,
|
B_DEV_NO_MEMORY,
|
||||||
@@ -279,4 +279,4 @@ enum {
|
|||||||
B_DEV_TOO_LATE,
|
B_DEV_TOO_LATE,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _ERRORS_H
|
#endif /* _ERRORS_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user