Skip to content
This repository has been archived by the owner on May 8, 2019. It is now read-only.

Commit

Permalink
Fixes misc. typos
Browse files Browse the repository at this point in the history
found via `codespell -q 3`
  • Loading branch information
luzpaz authored and 9EOR9 committed Apr 13, 2018
1 parent 128d152 commit b2e6ed0
Show file tree
Hide file tree
Showing 36 changed files with 82 additions and 82 deletions.
2 changes: 1 addition & 1 deletion client/ma_plugin_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ static struct option long_options[]=
static char *values[] =
{
"show information for all plugins",
"show informaion for builtin plugins",
"show information for builtin plugins",
"show information for dynamic plugins",
"show information for dynamic plugins in specified directory",
"show information for specified plugin",
Expand Down
2 changes: 1 addition & 1 deletion cmake/CheckFunctions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# This file is included by CMakeLists.txt and
# checks for various functions.
# You will find the appropiate defines in
# You will find the appropriate defines in
# include/my_config.h.in

INCLUDE(CheckFunctionExists)
Expand Down
2 changes: 1 addition & 1 deletion cmake/CheckIncludeFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
# This file is included by CMakeLists.txt and
# checks for various header files.
# You will find the appropiate defines in
# You will find the appropriate defines in
# include/my_config.h.in

INCLUDE(CheckIncludeFiles)
Expand Down
2 changes: 1 addition & 1 deletion cmake/CheckTypes.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
# This file is included by CMakeLists.txt and
# checks for type sizes.
# You will find the appropiate defines in
# You will find the appropriate defines in
# include/my_config.h.in
INCLUDE (CheckTypeSize)

Expand Down
2 changes: 1 addition & 1 deletion examples/mysql_affected_rows.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ int main(int argc, char *argv[])
(unsigned long) mysql_affected_rows(mysql));
mysql_free_result(result);

/* Affected rows with DELETE statment */
/* Affected rows with DELETE statement */
query= "DELETE FROM affected_rows";
if (mysql_real_query(mysql, query, strlen(query)))
show_error(mysql);
Expand Down
10 changes: 5 additions & 5 deletions include/ma_global.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ typedef int (*qsort_cmp)(const void *,const void *);
#undef QSORT_TYPE_IS_VOID
#define QSORT_TYPE_IS_VOID
#else
#define qsort_t RETQSORTTYPE /* Broken GCC cant handle typedef !!!! */
#define qsort_t RETQSORTTYPE /* Broken GCC can't handle typedef !!!! */
#endif

#ifdef HAVE_SYS_SOCKET_H
Expand Down Expand Up @@ -457,7 +457,7 @@ typedef SOCKET_SIZE_TYPE size_socket;
#define NO_MISAM /* Not needed anymore */
#define NO_HASH /* Not needed anymore */
#ifdef _WIN32
#define NO_DIR_LIBRARY /* Not standar dir-library */
#define NO_DIR_LIBRARY /* Not standard dir-library */
#define USE_MY_STAT_STRUCT /* For my_lib */
#ifdef _MSC_VER
typedef SSIZE_T ssize_t;
Expand Down Expand Up @@ -580,20 +580,20 @@ extern double my_atof(const char*);

/*
Max size that must be added to a so that we know Size to make
adressable obj.
addressable obj.
*/
typedef long my_ptrdiff_t;
#define MY_ALIGN(A,L) (((A) + (L) - 1) & ~((L) - 1))
#define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double))
/* Size to make adressable obj. */
/* Size to make addressable obj. */
#define ALIGN_PTR(A, t) ((t*) MY_ALIGN((A),sizeof(t)))
/* Offset of filed f in structure t */
#define OFFSET(t, f) ((size_t)(char *)&((t *)0)->f)
#define ADD_TO_PTR(ptr,size,type) (type) ((unsigned char*) (ptr)+size)
#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((unsigned char*) (A) - (unsigned char*) (B))

#define NullS (char *) 0
/* Nowdays we do not support MessyDos */
/* Nowadays we do not support MessyDos */
#ifndef NEAR
#define NEAR /* Who needs segments ? */
#define FAR /* On a good machine */
Expand Down
2 changes: 1 addition & 1 deletion include/ma_pthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ extern int my_pthread_cond_init(pthread_cond_t *mp,
#endif

#if !defined(HAVE_SIGWAIT) && !defined(HAVE_mit_thread) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX)
int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */
int sigwait(sigset_t *setp, int *sigp); /* Use our implementation */
#endif
#if !defined(HAVE_SIGSET) && !defined(my_sigset)
#define my_sigset(A,B) do { struct sigaction s; sigset_t set; \
Expand Down
18 changes: 9 additions & 9 deletions include/ma_sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ typedef struct my_aio_result {

/* General bitmaps for my_func's */
#define MY_FFNF 1 /* Fatal if file not found */
#define MY_FNABP 2 /* Fatal if not all bytes read/writen */
#define MY_NABP 4 /* Error if not all bytes read/writen */
#define MY_FNABP 2 /* Fatal if not all bytes read/written */
#define MY_NABP 4 /* Error if not all bytes read/written */
#define MY_FAE 8 /* Fatal if any error */
#define MY_WME 16 /* Write message on error */
#define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */
#define MY_RAID 64 /* Support for RAID (not the "Johnson&Johnson"-s one ;) */
#define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */
#define MY_LINK_WARNING 32 /* my_redel() gives warning if links */
#define MY_COPYTIME 64 /* my_redel() copys time */
#define MY_COPYTIME 64 /* my_redel() copies time */
#define MY_DELETE_OLD 256 /* my_create_with_symlink() */
#define MY_RESOLVE_LINK 128 /* my_realpath(); Only resolve links */
#define MY_HOLD_ORIGINAL_MODES 128 /* my_copy() holds to file modes */
Expand All @@ -79,8 +79,8 @@ typedef struct my_aio_result {
#define ME_HOLDTANG 8 /* Don't delete last keys */
#define ME_WAITTOT 16 /* Wait for errtime secs of for a action */
#define ME_WAITTANG 32 /* Wait for a user action */
#define ME_NOREFRESH 64 /* Dont refresh screen */
#define ME_NOINPUT 128 /* Dont use the input libary */
#define ME_NOREFRESH 64 /* Don't refresh screen */
#define ME_NOINPUT 128 /* Don't use the input library */
#define ME_COLOUR1 ((1 << ME_HIGHBYTE)) /* Possibly error-colours */
#define ME_COLOUR2 ((2 << ME_HIGHBYTE))
#define ME_COLOUR3 ((3 << ME_HIGHBYTE))
Expand Down Expand Up @@ -195,7 +195,7 @@ extern void (*my_sigtstp_cleanup)(void),
/* Executed before jump to shell */
(*my_sigtstp_restart)(void),
(*my_abort_hook)(int);
/* Executed when comming from shell */
/* Executed when coming from shell */
extern int NEAR ma_umask, /* Default creation mask */
NEAR ma_umask_dir,
NEAR my_recived_signals, /* Signals we have got */
Expand Down Expand Up @@ -233,7 +233,7 @@ enum cache_type {READ_CACHE,WRITE_CACHE,READ_FIFO,READ_NET,WRITE_NET};
enum flush_type { FLUSH_KEEP, FLUSH_RELEASE, FLUSH_IGNORE_CHANGED,
FLUSH_FORCE_WRITE};

typedef struct st_record_cache /* Used when cacheing records */
typedef struct st_record_cache /* Used when caching records */
{
File file;
int rc_seek,error,inited;
Expand Down Expand Up @@ -274,7 +274,7 @@ typedef struct st_dynamic_string {
} DYNAMIC_STRING;


typedef struct st_io_cache /* Used when cacheing files */
typedef struct st_io_cache /* Used when caching files */
{
my_off_t pos_in_file,end_of_file;
unsigned char *rc_pos,*rc_end,*buffer,*rc_request_pos;
Expand Down Expand Up @@ -319,7 +319,7 @@ typedef int (*qsort2_cmp)(const void *, const void *, const void *);
((info)->rc_pos+=(Count)),0) :\
_my_b_write(info,Buffer,Count))

/* my_b_write_byte dosn't have any err-check */
/* my_b_write_byte doesn't have any err-check */
#define my_b_write_byte(info,chr) \
(((info)->rc_pos < (info)->rc_end) ?\
((*(info)->rc_pos++)=(chr)) :\
Expand Down
6 changes: 3 additions & 3 deletions include/ma_tls.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ typedef struct st_ma_pvio_tls {
errmsg_len length of error message buffer
Returns:
0 success
1 if an error occured
1 if an error occurred
Notes:
On success the global variable ma_tls_initialized will be set to 1
*/
Expand Down Expand Up @@ -77,7 +77,7 @@ my_bool ma_tls_connect(MARIADB_TLS *ctls);
length buffer length
Returns:
0-n bytes read
-1 if an error occured
-1 if an error occurred
*/
ssize_t ma_tls_read(MARIADB_TLS *ctls, const uchar* buffer, size_t length);

Expand All @@ -89,7 +89,7 @@ ssize_t ma_tls_read(MARIADB_TLS *ctls, const uchar* buffer, size_t length);
length buffer length
Returns:
0-n bytes written
-1 if an error occured
-1 if an error occurred
*/
ssize_t ma_tls_write(MARIADB_TLS *ctls, const uchar* buffer, size_t length);

Expand Down
6 changes: 3 additions & 3 deletions include/mariadb_com.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ enum enum_server_command
struct st_ma_pvio;
typedef struct st_ma_pvio MARIADB_PVIO;

#define MAX_CHAR_WIDTH 255 /* Max length for a CHAR colum */
#define MAX_CHAR_WIDTH 255 /* Max length for a CHAR column */
#define MAX_BLOB_WIDTH 8192 /* Default width for blob */

/* the following defines were added for PHP's mysqli and pdo extensions:
Expand Down Expand Up @@ -345,8 +345,8 @@ enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
MYSQL_TYPE_GEOMETRY=255,
MAX_NO_FIELD_TYPES };

#define FIELD_TYPE_CHAR FIELD_TYPE_TINY /* For compability */
#define FIELD_TYPE_INTERVAL FIELD_TYPE_ENUM /* For compability */
#define FIELD_TYPE_CHAR FIELD_TYPE_TINY /* For compatibility */
#define FIELD_TYPE_INTERVAL FIELD_TYPE_ENUM /* For compatibility */
#define FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL
#define FIELD_TYPE_NEWDECIMAL MYSQL_TYPE_NEWDECIMAL
#define FIELD_TYPE_TINY MYSQL_TYPE_TINY
Expand Down
4 changes: 2 additions & 2 deletions libmariadb/ma_array.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111-1301, USA */

/* Handling of arrays that can grow dynamicly. */
/* Handling of arrays that can grow dynamically. */

#undef SAFEMALLOC /* Problems with threads */

Expand Down Expand Up @@ -59,7 +59,7 @@ my_bool ma_insert_dynamic(DYNAMIC_ARRAY *array, void *element)
{
void *buffer;
if (array->elements == array->max_element)
{ /* Call only when nessesary */
{ /* Call only when necessary */
if (!(buffer=ma_alloc_dynamic(array)))
return TRUE;
}
Expand Down
2 changes: 1 addition & 1 deletion libmariadb/ma_client_plugin.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ static void load_env_plugins(MYSQL *mysql)
This function must be called before any other client plugin function.

@retval 0 successful
@retval != 0 error occured
@retval != 0 error occurred
*/

int mysql_client_plugin_init()
Expand Down
2 changes: 1 addition & 1 deletion libmariadb/ma_dtoa.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ size_t ma_gcvt(double x, my_gcvt_arg_type type, int width, char *to,
Assume that we don't have enough space to place all significant digits in
the 'f' format. We have to choose between the 'e' format and the 'f' one
to keep as many significant digits as possible.
Let E and F be the lengths of decimal representaion in the 'e' and 'f'
Let E and F be the lengths of decimal representation in the 'e' and 'f'
formats, respectively. We want to use the 'f' format if, and only if F <= E.
Consider the following cases:
1. decpt <= 0.
Expand Down
2 changes: 1 addition & 1 deletion libmariadb/ma_errmsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const char *client_errors[]=
/* 2032 */ "Data truncated",
/* 2033 */ "",
/* 2034 */ "Invalid parameter number",
/* 2035 */ "Invalid buffer type: %d (paraneter: %d)",
/* 2035 */ "Invalid buffer type: %d (parameter: %d)",
/* 2036 */ "Buffer type is not supported",
/* 2037 */ "Shared memory: %-.64s",
/* 2038 */ "Shared memory connection failed during %s. (%lu)",
Expand Down
6 changes: 3 additions & 3 deletions libmariadb/ma_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
is freely available from http://www.php.net
*************************************************************************************/

/* The hash functions used for saveing keys */
/* The hash functions used for saving keys */
/* One of key_length or key_length_offset must be given */
/* Key length of 0 isn't allowed */

Expand Down Expand Up @@ -131,7 +131,7 @@ static uint calc_hashnr(const uchar *key,uint length)
return((uint) nr);
}

/* Calc hashvalue for a key, case indepenently */
/* Calc hashvalue for a key, case independently */

static uint calc_hashnr_caseup(const uchar *key,uint length)
{
Expand Down Expand Up @@ -505,7 +505,7 @@ my_bool hash_delete(HASH *hash,uchar *record)

/*
Update keys when record has changed.
This is much more efficent than using a delete & insert.
This is much more efficient than using a delete & insert.
*/

my_bool hash_update(HASH *hash,uchar *record,uchar *old_key,uint old_key_length)
Expand Down
2 changes: 1 addition & 1 deletion libmariadb/ma_loaddata.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ my_bool mysql_handle_local_infile(MYSQL *conn, const char *filename)
goto infile_error;
}

/* error during read occured */
/* error during read occurred */
if (bufread < 0)
{
char tmp_buf[MYSQL_ERRMSG_SIZE];
Expand Down
2 changes: 1 addition & 1 deletion libmariadb/ma_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/* Write and read of logical packets to/from socket
** Writes are cached into net_buffer_length big packets.
** Read packets are reallocated dynamicly when reading big packets.
** Read packets are reallocated dynamically when reading big packets.
** Each logical packet has the following pre-info:
** 3 byte length & 1 byte package-number.
*/
Expand Down
2 changes: 1 addition & 1 deletion libmariadb/ma_password.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void ma_hash_password(ulong *result, const char *password, size_t len)
for (; password < password_end; password++)
{
if (*password == ' ' || *password == '\t')
continue; /* skipp space in password */
continue; /* skip space in password */
tmp= (ulong) (uchar) *password;
nr^= (((nr & 63)+add)*tmp)+ (nr << 8);
nr2+=(nr2 << 8) ^ nr;
Expand Down
4 changes: 2 additions & 2 deletions libmariadb/ma_pvio.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
component of the client library.
PVIO support various protcols like sockets, pipes and shared memory, which are
implemented as plugins and can be extended therfore easily.
implemented as plugins and can be extended therefore easily.
Interface function description:
Expand Down Expand Up @@ -114,7 +114,7 @@ MARIADB_PVIO *ma_pvio_init(MA_PVIO_CINFO *cinfo)
pvio->set_error= my_set_error;
pvio->type= cinfo->type;

/* set timeout to connect timeout - after successfull connect we will set
/* set timeout to connect timeout - after successful connect we will set
* correct values for read and write */
if (pvio->methods->set_timeout)
{
Expand Down
2 changes: 1 addition & 1 deletion libmariadb/ma_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
MA 02111-1301, USA */

/*
Code for handling strings with can grow dynamicly.
Code for handling strings which can grow dynamically.
Copyright Monty Program KB.
By monty.
*/
Expand Down
12 changes: 6 additions & 6 deletions libmariadb/mariadb_dyncol.c
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ dynamic_column_decimal_store(DYNAMIC_COLUMN *str,
/**
Prepare the value to be used as decimal.
@param value The value structure which sould be setup.
@param value The value structure which should be setup.
*/

void mariadb_dyncol_prepare_decimal(DYNAMIC_COLUMN_VALUE *value)
Expand Down Expand Up @@ -2093,7 +2093,7 @@ static uchar *find_entry_named(DYN_HEADER *hdr, LEX_STRING *key)
/**
Write number in the buffer (backward direction - starts from the buffer end)
@return pointer on the number begining
@return pointer on the number beginning
*/

static char *backwritenum(char *chr, uint numkey)
Expand Down Expand Up @@ -2163,7 +2163,7 @@ find_column(DYN_HEADER *hdr, uint numkey, LEX_STRING *strkey)
hdr->length= hdr_interval_length(hdr, hdr->entry + hdr->entry_size);
hdr->data= hdr->dtpool + hdr->offset;
/*
Check that the found data is withing the ranges. This can happen if
Check that the found data is within the ranges. This can happen if
we get data with wrong offsets.
*/
if (hdr->length == DYNCOL_OFFSET_ERROR ||
Expand Down Expand Up @@ -3502,7 +3502,7 @@ dynamic_column_update_many_fmt(DYNAMIC_COLUMN *str,

if (plan[i].val->type == DYN_COL_NULL)
{
plan[i].act= PLAN_NOP; /* Mark entry to be skiped */
plan[i].act= PLAN_NOP; /* Mark entry to be skipped */
}
else
{
Expand Down Expand Up @@ -4144,7 +4144,7 @@ mariadb_dyncol_json_internal(DYNAMIC_COLUMN *str, DYNAMIC_STRING *json,
hdr_interval_length(&header, header.entry + header.entry_size);
header.data= header.dtpool + header.offset;
/*
Check that the found data is withing the ranges. This can happen if
Check that the found data is within the ranges. This can happen if
we get data with wrong offsets.
*/
if (header.length == DYNCOL_OFFSET_ERROR ||
Expand Down Expand Up @@ -4283,7 +4283,7 @@ mariadb_dyncol_unpack(DYNAMIC_COLUMN *str,
hdr_interval_length(&header, header.entry + header.entry_size);
header.data= header.dtpool + header.offset;
/*
Check that the found data is withing the ranges. This can happen if
Check that the found data is within the ranges. This can happen if
we get data with wrong offsets.
*/
if (header.length == DYNCOL_OFFSET_ERROR ||
Expand Down
Loading

0 comments on commit b2e6ed0

Please sign in to comment.