Commit c652ddbb authored by Éric Thiébaut's avatar Éric Thiébaut
Browse files

Fix English

parent 284e0c23
......@@ -74,7 +74,7 @@ const char* FUNC(
CASE(AT_ERR_CONNECTION, "Error connecting to or disconnecting from hardware");
CASE(AT_ERR_NODATA, "No data");
CASE(AT_ERR_INVALIDHANDLE, "Invalid device handle passed to function");
CASE(AT_ERR_TIMEDOUT, "Time out occured while waiting for data from output queue");
CASE(AT_ERR_TIMEDOUT, "Time out occurred while waiting for data from output queue");
CASE(AT_ERR_BUFFERFULL, "Input queue has reached its capacity");
CASE(AT_ERR_INVALIDSIZE, "Queued buffer size does not match frame size");
CASE(AT_ERR_INVALIDALIGNMENT, "Queued buffer is not aligned on an 8-byte boundary");
......
......@@ -318,7 +318,7 @@ ssize_t tao_buffer_read_from_fd(
// bytes). FIXME: bad idea.
ssize_t nr = read(fd, buf->data + buf->offset, avail);
if (nr == -1) {
// Some error occured.
// Some error occurred.
tao_store_system_error("read");
return -1;
}
......@@ -362,7 +362,7 @@ ssize_t tao_buffer_write_to_fd(
// The operation would block.
return 0;
} else {
// Some error occured.
// Some error occurred.
tao_store_system_error("write");
return -1;
}
......@@ -404,7 +404,7 @@ tao_status tao_buffer_vprintf(
va_end(temp);
if (len < siz) {
if (len < 0) {
// Some error occured.
// Some error occurred.
tao_store_system_error("vsnprintf");
return TAO_ERROR;
} else {
......
......@@ -303,7 +303,7 @@ void tao_retrieve_error_details(
}
}
if (reason != NULL && *reason == NULL) {
*reason = "Some error occured";
*reason = "Some error occurred";
}
if (info != NULL && *info == NULL && buffer != NULL) {
// Use the numerical value of the error code.
......
......@@ -228,7 +228,7 @@ tao_serial tao_remote_object_wait_serial(
}
}
// An error has occured.
// An error has occurred.
error:
return -3;
}
......
......@@ -152,7 +152,7 @@ static int callback_done(
srv->message = NULL;
}
} else {
// Some errors occured.
// Some errors occurred.
XPAError((XPARec*)srv->handle, (char*)get_error_message(srv));
status = FAILURE;
}
......
......@@ -170,7 +170,7 @@ static inline tao_shared_array* fetch_next_frame(
// Shared array is now locked for writing.
drop = false;
} else if (code != TAO_TIMEOUT) {
// Some error occured.
// Some error occurred.
return NULL;
}
}
......
......@@ -55,9 +55,9 @@
* @ref TAO_ERROR has updated the caller's last error.
*/
typedef enum tao_status_ {
TAO_ERROR = -1, ///< An error occured in called function.
TAO_ERROR = -1, ///< An error occurred in called function.
TAO_OK = 0, ///< Called function completed successfully.
TAO_TIMEOUT = 1 ///< Time-out occured in called function.
TAO_TIMEOUT = 1 ///< Time-out occurred in called function.
} tao_status;
/**
......
......@@ -31,7 +31,7 @@ TAO_BEGIN_DECLS
*
* Camera @b run-level has only 5 levels: @b 0 when initialization is not
* complete, @b 1 when initialized but acquisition not started, @b 2 when
* acquiring, @b 3 if an error occured that requires an explicit reset to
* acquiring, @b 3 if an error occurred that requires an explicit reset to
* return to run-level 1 or @b 4 if camera is no longer usable and can only be
* finalized (e.g. upon unrecoverable error).
*
......
......@@ -127,7 +127,7 @@ extern tao_status tao_camera_roi_check(
*
* - @b TAO_EVENT_START: Start acquisition.
* - @b TAO_EVENT_FRAME: A new frame is available.
* - @b TAO_EVENT_ERROR: Some (recoverable) error occured.
* - @b TAO_EVENT_ERROR: Some (recoverable) error occurred.
* - @b TAO_EVENT_STOP: Stop acquisition.
* - @b TAO_EVENT_ABORT: Abort acquisition.
* - @b TAO_EVENT_QUIT: Acquisition thread must quit.
......@@ -136,7 +136,7 @@ typedef unsigned int tao_event;
#define TAO_EVENT_COMMAND (((tao_event)1) << 0) // Command sent
#define TAO_EVENT_FRAME (((tao_event)1) << 1) // New frame available
#define TAO_EVENT_ERROR (((tao_event)1) << 2) // Some error occured
#define TAO_EVENT_ERROR (((tao_event)1) << 2) // Some error occurred
/**
* Common camera configuration.
......
......@@ -32,7 +32,7 @@ TAO_BEGIN_DECLS
* indicating that a failure occurred.
*
* Function tao_get_last_error() yields the address of the structure storing
* the last TAO error that may have occured in the calling thread. This
* the last TAO error that may have occurred in the calling thread. This
* address will never change during the thread life.
*
* Functions tao_clear_error() and tao_any_errors() cab be used to clear error
......@@ -155,7 +155,7 @@ typedef enum tao_error_code_ {
* > $prefix $reason in `$func` [$info]
*
* where `$prefix` is usually a string like `"ERROR:"`, `$reason` is the string
* provided by the callback (or `"Some error occured"` if `NULL`), `$func` is
* provided by the callback (or `"Some error occurred"` if `NULL`), `$func` is
* the name of the function which raised the error and `$info` is the string
* provided by the callback (or the textual value of error code if `NULL`).
*
......@@ -165,7 +165,7 @@ typedef enum tao_error_code_ {
* void get_error_details(int code, const char** reason, const char** info)
* {
* if (reason != NULL) {
* *reason = "Some frame-grabber error occured";
* *reason = "Some frame-grabber error occurred";
* }
* if (info != NULL) {
* *info = NULL; // textual value of error code will be used
......@@ -197,7 +197,7 @@ typedef struct tao_error_ {
*
* This function is called to set the information about the last error that
* occurred in the calling thread. This information consist in the name @b
* func of the function where the error occured, the numerical identifier @b
* func of the function where the error occurred, the numerical identifier @b
* code of the error, and an optional procedure @b proc to retrieve textual
* details given the error code.
*
......@@ -209,7 +209,7 @@ typedef struct tao_error_ {
*
* @warning @b func must be a static string.
*
* @param func Name of the function where the error occured.
* @param func Name of the function where the error occurred.
*
* @param code Error identifier.
*
......@@ -231,7 +231,7 @@ extern void tao_store_other_error(
*
* @warning @b func must be a static string.
*
* @param func Name of the function where the error occured.
* @param func Name of the function where the error occurred.
*
* @param code Error identifier.
*
......@@ -251,7 +251,7 @@ extern void tao_store_error(
* tao_store_error(func, errno);
* ~~~~~
*
* @param func Name of the function where the error occured.
* @param func Name of the function where the error occurred.
*
* @see tao_store_error().
*/
......@@ -262,7 +262,7 @@ extern void tao_store_system_error(
* Error handler.
*
* An error handler is called by tao_report_error() with the address of the
* last error that occured in the calling thread as argument.
* last error that occurred in the calling thread as argument.
*
* The error handler shall call tao_retrieve_error_details() to retrieve
* pieces of error information in textual form.
......@@ -308,7 +308,7 @@ extern void tao_report_error(
/**
* Report last error and exit.
*
* This function prints the last error that occured for the calling thread to
* This function prints the last error that occurred for the calling thread to
* the standard error stream and then calls `exit(1)`.
*
* @see tao_report_error().
......@@ -398,7 +398,7 @@ extern tao_status tao_report_error_to_buffer(
*
* @param ctx Contextual data needed by the callback.
* @param reason String describing the error.
* @param func Name of the function where the error occured.
* @param func Name of the function where the error occurred.
* @param info Textual equivalent of the error code.
* @param code Code of the error.
*
......@@ -461,7 +461,7 @@ extern void tao_clear_error(
tao_error* err);
/**
* Check whether errors occured.
* Check whether errors occurred.
*
* @param err Address of the error structure. If `NULL`, the last error
* of the calling thread is cleared.
......
......@@ -114,7 +114,7 @@ extern tao_status tao_mutex_try_lock(
* @param abstime Absolute time limit for waiting.
*
* @return @ref TAO_OK if the lock has been locked by the caller before the
* specified number of seconds; @ref TAO_TIMEOUT if timeout occured
* specified number of seconds; @ref TAO_TIMEOUT if timeout occurred
* before; @ref TAO_ERROR in case of failure.
*
* @see tao_mutex_lock(), tao_mutex_try_lock(), tao_mutex_timed_lock(),
......@@ -140,7 +140,7 @@ extern tao_status tao_mutex_abstimed_lock(
*
* @return @ref TAO_OK if the read/write lock has been locked for reading by
* the caller before the specified number of seconds; @ref TAO_TIMEOUT
* if timeout occured before; @ref TAO_ERROR in case of failure.
* if timeout occurred before; @ref TAO_ERROR in case of failure.
*
* @see tao_mutex_lock(), tao_mutex_try_lock(), tao_get_absolute_timeout(),
* tao_mutex_abstimed_lock(), tao_status.
......@@ -305,7 +305,7 @@ extern tao_status tao_condition_wait(
* tao_get_current_time().
*
* @return @ref TAO_OK if the condition is signaled before the specified number
* of seconds; @ref TAO_TIMEOUT if timeout occured before; @ref
* of seconds; @ref TAO_TIMEOUT if timeout occurred before; @ref
* TAO_ERROR in case of failure.
*
* @see tao_condition_wait(), tao_condition_timed_wait(),
......@@ -332,7 +332,7 @@ extern tao_status tao_condition_abstimed_wait(
* effect is the same as calling tao_condition_wait().
*
* @return @ref TAO_OK if the condition is signaled before the specified number
* of seconds; @ref TAO_TIMEOUT if timeout occured before; @ref
* of seconds; @ref TAO_TIMEOUT if timeout occurred before; @ref
* TAO_ERROR in case of failure.
*
* @see tao_condition_wait(), tao_get_absolute_timeout(),
......@@ -745,7 +745,7 @@ extern tao_status tao_semaphore_try_wait(
* @param abstime Absolute time limit for waiting.
*
* @return @ref TAO_OK if the was successfully decremented before the specified
* number of seconds; @ref TAO_TIMEOUT if timeout occured before; @ref
* number of seconds; @ref TAO_TIMEOUT if timeout occurred before; @ref
* TAO_ERROR in case of another failure.
*/
extern tao_status tao_semaphore_abstimed_wait(
......@@ -767,7 +767,7 @@ extern tao_status tao_semaphore_abstimed_wait(
* calling tao_semaphore_try_wait().
*
* @return @ref TAO_OK if the was successfully decremented before the specified
* number of seconds; @ref TAO_TIMEOUT if timeout occured before; @ref
* number of seconds; @ref TAO_TIMEOUT if timeout occurred before; @ref
* TAO_ERROR in case of another failure.
*/
extern tao_status tao_semaphore_timed_wait(
......
......@@ -234,7 +234,7 @@ extern tao_status tao_remote_camera_try_lock(
* @param lim Absolute time limit.
*
* @return @ref TAO_OK if the lock has been locked by the caller before the
* specified number of seconds, @ref TAO_TIMEOUT if timeout occured
* specified number of seconds, @ref TAO_TIMEOUT if timeout occurred
* before or @ref TAO_ERROR in case of error.
*/
extern tao_status tao_remote_camera_abstimed_lock(
......@@ -260,7 +260,7 @@ extern tao_status tao_remote_camera_abstimed_lock(
* calling tao_remote_camera_try_lock().
*
* @return @ref TAO_OK if the lock has been locked by the caller before the
* specified number of seconds, @ref TAO_TIMEOUT if timeout occured
* specified number of seconds, @ref TAO_TIMEOUT if timeout occurred
* before or @ref TAO_ERROR in case of error.
*/
extern tao_status tao_remote_camera_timed_lock(
......@@ -339,7 +339,7 @@ extern tao_status tao_remote_camera_wait_condition(
* tao_get_current_time().
*
* @return @ref TAO_OK if the lock has been locked by the caller before the
* specified number of seconds, @ref TAO_TIMEOUT if timeout occured
* specified number of seconds, @ref TAO_TIMEOUT if timeout occurred
* before or @ref TAO_ERROR in case of error.
*/
extern tao_status tao_remote_camera_abstimed_wait_condition(
......@@ -362,7 +362,7 @@ extern tao_status tao_remote_camera_abstimed_wait_condition(
* tao_remote_camera_wait_condition().
*
* @return @ref TAO_OK if the lock has been locked by the caller before the
* specified number of seconds, @ref TAO_TIMEOUT if timeout occured
* specified number of seconds, @ref TAO_TIMEOUT if timeout occurred
* before or @ref TAO_ERROR in case of error.
*/
extern tao_status tao_remote_camera_timed_wait_condition(
......
......@@ -267,7 +267,7 @@ extern tao_status tao_remote_mirror_try_lock(
* @param lim Absolute time limit.
*
* @return @ref TAO_OK if the lock has been locked by the caller before the
* specified number of seconds, @ref TAO_TIMEOUT if timeout occured
* specified number of seconds, @ref TAO_TIMEOUT if timeout occurred
* before or @ref TAO_ERROR in case of error.
*/
extern tao_status tao_remote_mirror_abstimed_lock(
......@@ -293,7 +293,7 @@ extern tao_status tao_remote_mirror_abstimed_lock(
* calling tao_remote_mirror_try_lock().
*
* @return @ref TAO_OK if the lock has been locked by the caller before the
* specified number of seconds, @ref TAO_TIMEOUT if timeout occured
* specified number of seconds, @ref TAO_TIMEOUT if timeout occurred
* before or @ref TAO_ERROR in case of error.
*/
extern tao_status tao_remote_mirror_timed_lock(
......@@ -372,7 +372,7 @@ extern tao_status tao_remote_mirror_wait_condition(
* tao_get_current_time().
*
* @return @ref TAO_OK if the lock has been locked by the caller before the
* specified number of seconds, @ref TAO_TIMEOUT if timeout occured
* specified number of seconds, @ref TAO_TIMEOUT if timeout occurred
* before or @ref TAO_ERROR in case of error.
*/
extern tao_status tao_remote_mirror_abstimed_wait_condition(
......@@ -395,7 +395,7 @@ extern tao_status tao_remote_mirror_abstimed_wait_condition(
* tao_remote_mirror_wait_condition().
*
* @return @ref TAO_OK if the lock has been locked by the caller before the
* specified number of seconds, @ref TAO_TIMEOUT if timeout occured
* specified number of seconds, @ref TAO_TIMEOUT if timeout occurred
* before or @ref TAO_ERROR in case of error.
*/
extern tao_status tao_remote_mirror_timed_wait_condition(
......
......@@ -328,7 +328,7 @@ extern tao_status tao_remote_object_try_lock(
* @param lim Absolute time limit.
*
* @return @ref TAO_OK if the lock has been locked by the caller before the
* specified number of seconds, @ref TAO_TIMEOUT if timeout occured
* specified number of seconds, @ref TAO_TIMEOUT if timeout occurred
* before or @ref TAO_ERROR in case of error.
*/
extern tao_status tao_remote_object_abstimed_lock(
......@@ -354,7 +354,7 @@ extern tao_status tao_remote_object_abstimed_lock(
* calling tao_remote_object_try_lock().
*
* @return @ref TAO_OK if the lock has been locked by the caller before the
* specified number of seconds, @ref TAO_TIMEOUT if timeout occured
* specified number of seconds, @ref TAO_TIMEOUT if timeout occurred
* before or @ref TAO_ERROR in case of error.
*/
extern tao_status tao_remote_object_timed_lock(
......@@ -433,7 +433,7 @@ extern tao_status tao_remote_object_wait_condition(
* tao_get_current_time().
*
* @return @ref TAO_OK if the lock has been locked by the caller before the
* specified number of seconds, @ref TAO_TIMEOUT if timeout occured
* specified number of seconds, @ref TAO_TIMEOUT if timeout occurred
* before or @ref TAO_ERROR in case of error.
*/
extern tao_status tao_remote_object_abstimed_wait_condition(
......@@ -456,7 +456,7 @@ extern tao_status tao_remote_object_abstimed_wait_condition(
* tao_remote_object_wait_condition().
*
* @return @ref TAO_OK if the lock has been locked by the caller before the
* specified number of seconds, @ref TAO_TIMEOUT if timeout occured
* specified number of seconds, @ref TAO_TIMEOUT if timeout occurred
* before or @ref TAO_ERROR in case of error.
*/
extern tao_status tao_remote_object_timed_wait_condition(
......
......@@ -174,7 +174,7 @@ extern tao_status tao_shared_camera_try_rdlock(
* calling tao_shared_camera_try_rdlock().
*
* @return @ref TAO_OK if the lock has been locked by the caller before the
* specified number of seconds, @ref TAO_TIMEOUT if timeout occured
* specified number of seconds, @ref TAO_TIMEOUT if timeout occurred
* before or @ref TAO_ERROR in case of error.
*/
extern tao_status tao_shared_camera_abstimed_rdlock(
......
......@@ -318,7 +318,7 @@ extern tao_status tao_shared_object_try_lock(
* @param lim Absolute time limit.
*
* @return @ref TAO_OK if the lock has been locked by the caller before the
* specified number of seconds, @ref TAO_TIMEOUT if timeout occured
* specified number of seconds, @ref TAO_TIMEOUT if timeout occurred
* before or @ref TAO_ERROR in case of error.
*/
extern tao_status tao_shared_object_abstimed_lock(
......@@ -344,7 +344,7 @@ extern tao_status tao_shared_object_abstimed_lock(
* calling tao_shared_object_try_lock().
*
* @return @ref TAO_OK if the lock has been locked by the caller before the
* specified number of seconds, @ref TAO_TIMEOUT if timeout occured
* specified number of seconds, @ref TAO_TIMEOUT if timeout occurred
* before or @ref TAO_ERROR in case of error.
*/
extern tao_status tao_shared_object_timed_lock(
......@@ -423,7 +423,7 @@ extern tao_status tao_shared_object_wait_condition(
* tao_get_current_time().
*
* @return @ref TAO_OK if the lock has been locked by the caller before the
* specified number of seconds, @ref TAO_TIMEOUT if timeout occured
* specified number of seconds, @ref TAO_TIMEOUT if timeout occurred
* before or @ref TAO_ERROR in case of error.
*/
extern tao_status tao_shared_object_abstimed_wait_condition(
......@@ -446,7 +446,7 @@ extern tao_status tao_shared_object_abstimed_wait_condition(
* tao_shared_object_wait_condition().
*
* @return @ref TAO_OK if the lock has been locked by the caller before the
* specified number of seconds, @ref TAO_TIMEOUT if timeout occured
* specified number of seconds, @ref TAO_TIMEOUT if timeout occurred
* before or @ref TAO_ERROR in case of error.
*/
extern tao_status tao_shared_object_timed_wait_condition(
......
......@@ -714,7 +714,7 @@ extern void tao_fprintf_time(
* TAO_TIMEOUT_FUTURE if timeout may occur in the future, @ref
* TAO_TIMEOUT_NOW if absolute value of @a secs is smaller than @ref
* TAO_TIMEOUT_MIN, @ref TAO_TIMEOUT_PAST if @a secs is negative and
* @ref TAO_TIMEOUT_ERROR if some errors occured.
* @ref TAO_TIMEOUT_ERROR if some errors occurred.
*
* @see tao_timeout, TAO_TIMEOUT_MIN, tao_get_maximum_absolute_time().
*/
......
......@@ -400,7 +400,7 @@ int main(
fprintf(stderr, "%s: worker did not start after "
"%.1f seconds.\n", progname, timeout);
} else {
fprintf(stderr, "%s: some error occured while waiting "
fprintf(stderr, "%s: some error occurred while waiting "
"for worker thread to start.\n", progname);
goto error;
}
......@@ -954,7 +954,7 @@ static void* run_worker(
// The "stop" command is executed after processing a possible pending
// frame, other commands are executed before.
if (CHECK_BITS(cam->events, EVENT_ERROR)) {
// A new error has occured and the corresponding "private" camera
// A new error has occurred and the corresponding "private" camera
// counter has been incremented. We just reflect this change in
// the "public" resources.
reflect_settings();
......@@ -1506,7 +1506,7 @@ static tao_status recv_command(
void* buf,
size_t siz)
{
const char* errmsg = NULL; // Non-NULL means an error occured.
const char* errmsg = NULL; // Non-NULL means an error occurred.
if (siz > 0) {
recv_takes_no_data(srv, argv[0]);
return TAO_ERROR;
......
......@@ -497,7 +497,7 @@ extern void phx_keyboard_init(
void);
/**
* Cross-platform routine to check whether keyboard hit occured.
* Cross-platform routine to check whether keyboard hit occurred.
*/
extern bool phx_keyboard_hit(
void);
......
......@@ -288,7 +288,7 @@ static void tao_get_error_details(
}
}
if (*reason == NULL) {
*reason = "Some error occured";
*reason = "Some error occurred";
}
if (*info == NULL) {
// Use the numerical value of the error code.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment