Skip to content

Commit

Permalink
Spellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Krotov authored and flub committed Jul 21, 2019
1 parent c116d6f commit 686678c
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# ensures this even if the user has not set core.autocrlf.
* text=auto

# binary files should be detected by git, however, to be sure, you can add them here explictly
# binary files should be detected by git, however, to be sure, you can add them here explicitly
*.png binary
*.jpg binary
*.gif binary
Expand Down
16 changes: 8 additions & 8 deletions deltachat-ffi/deltachat.h
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,8 @@ int dc_chat_is_sending_locations (const dc_chat_t*);
#define DC_STATE_OUT_MDN_RCVD 28


#define DC_MAX_GET_TEXT_LEN 30000 // approx. max. lenght returned by dc_msg_get_text()
#define DC_MAX_GET_INFO_LEN 100000 // approx. max. lenght returned by dc_get_msg_info()
#define DC_MAX_GET_TEXT_LEN 30000 // approx. max. length returned by dc_msg_get_text()
#define DC_MAX_GET_INFO_LEN 100000 // approx. max. length returned by dc_get_msg_info()


dc_msg_t* dc_msg_new (dc_context_t*, int viewtype);
Expand Down Expand Up @@ -667,7 +667,7 @@ int64_t dc_lot_get_timestamp (const dc_lot_t*);
* A voice message that was directly recorded by the user.
* For all other audio messages, the type #DC_MSG_AUDIO should be used.
* File and duration are set via dc_msg_set_file(), dc_msg_set_duration()
* and retieved via dc_msg_get_file(), dc_msg_get_duration()
* and retrieved via dc_msg_get_file(), dc_msg_get_duration()
*/
#define DC_MSG_VOICE 41

Expand Down Expand Up @@ -768,9 +768,9 @@ int64_t dc_lot_get_timestamp (const dc_lot_t*);
* @}
*/

#define DC_LP_AUTH_FLAGS (DC_LP_AUTH_OAUTH2|DC_LP_AUTH_NORMAL) // if none of these flags are set, the default is choosen
#define DC_LP_IMAP_SOCKET_FLAGS (DC_LP_IMAP_SOCKET_STARTTLS|DC_LP_IMAP_SOCKET_SSL|DC_LP_IMAP_SOCKET_PLAIN) // if none of these flags are set, the default is choosen
#define DC_LP_SMTP_SOCKET_FLAGS (DC_LP_SMTP_SOCKET_STARTTLS|DC_LP_SMTP_SOCKET_SSL|DC_LP_SMTP_SOCKET_PLAIN) // if none of these flags are set, the default is choosen
#define DC_LP_AUTH_FLAGS (DC_LP_AUTH_OAUTH2|DC_LP_AUTH_NORMAL) // if none of these flags are set, the default is chosen
#define DC_LP_IMAP_SOCKET_FLAGS (DC_LP_IMAP_SOCKET_STARTTLS|DC_LP_IMAP_SOCKET_SSL|DC_LP_IMAP_SOCKET_PLAIN) // if none of these flags are set, the default is chosen
#define DC_LP_SMTP_SOCKET_FLAGS (DC_LP_SMTP_SOCKET_STARTTLS|DC_LP_SMTP_SOCKET_SSL|DC_LP_SMTP_SOCKET_PLAIN) // if none of these flags are set, the default is chosen



Expand Down Expand Up @@ -851,7 +851,7 @@ int64_t dc_lot_get_timestamp (const dc_lot_t*);
* The library-user should report an error to the end-user.
* Passed to the callback given to dc_context_new().
*
* As most things are asynchrounous, things may go wrong at any time and the user
* As most things are asynchronous, things may go wrong at any time and the user
* should not be disturbed by a dialog or so. Instead, use a bubble or so.
*
* However, for ongoing processes (eg. dc_configure())
Expand Down Expand Up @@ -882,7 +882,7 @@ int64_t dc_lot_get_timestamp (const dc_lot_t*);
*
* Moreover, if the UI detects that the device is offline,
* it is probably more useful to report this to the user
* instread of the string from data2.
* instead of the string from data2.
*
* @param data1 (int) 1=first/new network error, should be reported the user;
* 0=subsequent network error, should be logged only
Expand Down
2 changes: 1 addition & 1 deletion deltachat-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ pub unsafe extern "C" fn dc_delete_chat(context: *mut dc_context_t, chat_id: u32
assert!(!context.is_null());
let context = &*context;

// TODO: update to indiciate public api success/failure of deletion
// TODO: update to indicate public api success/failure of deletion
dc_chat::dc_delete_chat(context, chat_id);
}

Expand Down
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl Context {
}

/// Set the given config key.
/// If `None` is passed as a value the value is cleared and set to the deafult if there is one.
/// If `None` is passed as a value the value is cleared and set to the default if there is one.
pub fn set_config(&self, key: Config, value: Option<&str>) -> Result<(), Error> {
match key {
Config::Selfavatar if value.is_some() => {
Expand Down
16 changes: 8 additions & 8 deletions src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ pub const DC_STATE_OUT_FAILED: usize = 24;
pub const DC_STATE_OUT_DELIVERED: usize = 26;
pub const DC_STATE_OUT_MDN_RCVD: usize = 28;

/// approx. max. lenght returned by dc_msg_get_text()
/// approx. max. length returned by dc_msg_get_text()
pub const DC_MAX_GET_TEXT_LEN: usize = 30000;
/// approx. max. lenght returned by dc_get_msg_info()
/// approx. max. length returned by dc_get_msg_info()
pub const DC_MAX_GET_INFO_LEN: usize = 100000;

pub const DC_CONTACT_ID_SELF: usize = 1;
Expand Down Expand Up @@ -119,7 +119,7 @@ pub const DC_MSG_AUDIO: usize = 40;
/// A voice message that was directly recorded by the user.
/// For all other audio messages, the type #DC_MSG_AUDIO should be used.
/// File and duration are set via dc_msg_set_file(), dc_msg_set_duration()
/// and retieved via dc_msg_get_file(), dc_msg_get_duration()
/// and retrieved via dc_msg_get_file(), dc_msg_get_duration()
pub const DC_MSG_VOICE: usize = 41;

/// Video messages.
Expand Down Expand Up @@ -173,12 +173,12 @@ pub const DC_LP_SMTP_SOCKET_SSL: usize = 0x20000;
/// If this flag is set, automatic configuration is skipped.
pub const DC_LP_SMTP_SOCKET_PLAIN: usize = 0x40000;

/// if none of these flags are set, the default is choosen
/// if none of these flags are set, the default is chosen
pub const DC_LP_AUTH_FLAGS: usize = (DC_LP_AUTH_OAUTH2 | DC_LP_AUTH_NORMAL);
/// if none of these flags are set, the default is choosen
/// if none of these flags are set, the default is chosen
pub const DC_LP_IMAP_SOCKET_FLAGS: usize =
(DC_LP_IMAP_SOCKET_STARTTLS | DC_LP_IMAP_SOCKET_SSL | DC_LP_IMAP_SOCKET_PLAIN);
/// if none of these flags are set, the default is choosen
/// if none of these flags are set, the default is chosen
pub const DC_LP_SMTP_SOCKET_FLAGS: usize =
(DC_LP_SMTP_SOCKET_STARTTLS | DC_LP_SMTP_SOCKET_SSL | DC_LP_SMTP_SOCKET_PLAIN);

Expand Down Expand Up @@ -237,7 +237,7 @@ pub enum Event {
/// The library-user should report an error to the end-user.
/// Passed to the callback given to dc_context_new().
///
/// As most things are asynchrounous, things may go wrong at any time and the user
/// As most things are asynchronous, things may go wrong at any time and the user
/// should not be disturbed by a dialog or so. Instead, use a bubble or so.
///
/// However, for ongoing processes (eg. dc_configure())
Expand Down Expand Up @@ -265,7 +265,7 @@ pub enum Event {
///
/// Moreover, if the UI detects that the device is offline,
/// it is probably more useful to report this to the user
/// instread of the string from data2.
/// instead of the string from data2.
///
/// @param data1 (int) 1=first/new network error, should be reported the user;
/// 0=subsequent network error, should be logged only
Expand Down
8 changes: 4 additions & 4 deletions src/dc_chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1550,7 +1550,7 @@ pub unsafe fn dc_add_contact_to_chat_ex(
"Cannot add contact to group; self not in group.",
);
} else {
/* we shoud respect this - whatever we send to the group, it gets discarded anyway! */
/* we should respect this - whatever we send to the group, it gets discarded anyway! */
if 0 != flags & 0x1 && dc_param_get_int((*chat).param, 'U' as i32, 0) == 1 {
dc_param_set((*chat).param, 'U' as i32, 0 as *const libc::c_char);
dc_chat_update_param(chat);
Expand Down Expand Up @@ -1710,7 +1710,7 @@ pub unsafe fn dc_remove_contact_from_chat(
"Cannot remove contact from chat; self not in group.",
);
} else {
/* we shoud respect this - whatever we send to the group, it gets discarded anyway! */
/* we should respect this - whatever we send to the group, it gets discarded anyway! */
if !contact.is_null() {
if dc_param_get_int((*chat).param, 'U' as i32, 0) == 0 {
(*msg).type_0 = 10;
Expand Down Expand Up @@ -1812,7 +1812,7 @@ pub unsafe fn dc_set_chat_name(
"Cannot set chat name; self not in group",
);
} else {
/* we shoud respect this - whatever we send to the group, it gets discarded anyway! */
/* we should respect this - whatever we send to the group, it gets discarded anyway! */
if sql::execute(
context,
&context.sql,
Expand Down Expand Up @@ -1881,7 +1881,7 @@ pub unsafe fn dc_set_chat_profile_image(
"Cannot set chat profile image; self not in group.",
);
} else {
/* we shoud respect this - whatever we send to the group, it gets discarded anyway! */
/* we should respect this - whatever we send to the group, it gets discarded anyway! */
if !new_image.is_null() {
new_image_rel = dc_strdup(new_image);
if 0 == dc_make_rel_and_copy(context, &mut new_image_rel) {
Expand Down
2 changes: 1 addition & 1 deletion src/dc_contact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ pub unsafe fn dc_contact_empty(mut contact: *mut dc_contact_t) {
/* address is in our address book */
/* set on Alice's side for contacts like Bob that have scanned the QR code offered by her. Only means the contact has once been established using the "securejoin" procedure in the past, getting the current key verification status requires calling dc_contact_is_verified() ! */
/* set on Bob's side for contacts scanned and verified from a QR code. Only means the contact has once been established using the "securejoin" procedure in the past, getting the current key verification status requires calling dc_contact_is_verified() ! */
/* contact added mannually by dc_create_contact(), this should be the largets origin as otherwise the user cannot modify the names */
/* contact added manually by dc_create_contact(), this should be the largets origin as otherwise the user cannot modify the names */
/* contacts with at least this origin value are shown in the contact list */
/* contacts with at least this origin value are verified and known not to be spam */
/* contacts with at least this origin value start a new "normal" chat, defaults to off */
Expand Down
4 changes: 2 additions & 2 deletions src/dc_e2ee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use crate::x::*;
// attachments of 25 mb brutto should work on the majority of providers
// (brutto examples: web.de=50, 1&1=40, t-online.de=32, gmail=25, posteo=50, yahoo=25, all-inkl=100).
// as an upper limit, we double the size; the core won't send messages larger than this
// to get the netto sizes, we substract 1 mb header-overhead and the base64-overhead.
// to get the netto sizes, we subtract 1 mb header-overhead and the base64-overhead.
// some defaults
#[derive(Clone)]
pub struct dc_e2ee_helper_t {
Expand Down Expand Up @@ -1010,7 +1010,7 @@ unsafe fn has_decrypted_pgp_armor(
* that we could use the normal Autocrypt processing.
*
* @private
* @param mime The mime struture to check
* @param mime The mime structure to check
* @return 1=multipart/report found in MIME, 0=no multipart/report found
*/
// TODO should return bool /rtn
Expand Down
2 changes: 1 addition & 1 deletion src/dc_mimeparser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,7 @@ unsafe fn dc_mimeparser_add_single_part_if_known(
}
}
}
/* add object? (we do not add all objetcs, eg. signatures etc. are ignored) */
/* add object? (we do not add all objects, eg. signatures etc. are ignored) */
dc_simplify_unref(simplifier);
if !transfer_decoding_buffer.is_null() {
mmap_string_unref(transfer_decoding_buffer);
Expand Down
4 changes: 2 additions & 2 deletions src/dc_msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ pub unsafe fn dc_msg_new_untyped<'a>(context: &'a Context) -> *mut dc_msg_t<'a>
* If you want an update, you have to recreate the object.
*/
// to check if a mail was sent, use dc_msg_is_sent()
// approx. max. lenght returned by dc_msg_get_text()
// approx. max. lenght returned by dc_get_msg_info()
// approx. max. length returned by dc_msg_get_text()
// approx. max. length returned by dc_get_msg_info()
pub unsafe fn dc_msg_new<'a>(context: &'a Context, viewtype: libc::c_int) -> *mut dc_msg_t<'a> {
let mut msg: *mut dc_msg_t;
msg = calloc(1, ::std::mem::size_of::<dc_msg_t>()) as *mut dc_msg_t;
Expand Down
6 changes: 3 additions & 3 deletions src/dc_param.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub const DC_PARAM_GUARANTEE_E2EE: char = 'c';
pub const DC_PARAM_ERRONEOUS_E2EE: char = 'e';
/// for msgs: force unencrypted message, either DC_FP_ADD_AUTOCRYPT_HEADER (1), DC_FP_NO_AUTOCRYPT_HEADER (2) or 0
pub const DC_PARAM_FORCE_PLAINTEXT: char = 'u';
/// for msgs: an incoming message which requestes a MDN (aka read receipt)
/// for msgs: an incoming message which requests a MDN (aka read receipt)
pub const DC_PARAM_WANTS_MDN: char = 'r';
/// for msgs
pub const DC_PARAM_FORWARDED: char = 'a';
Expand Down Expand Up @@ -60,10 +60,10 @@ pub const DC_PARAM_SELFTALK: char = 'K';
pub const DC_FP_ADD_AUTOCRYPT_HEADER: u8 = 1;
pub const DC_FP_NO_AUTOCRYPT_HEADER: u8 = 2;

/// An object for handling key=value parameter lists; for the key, curently only
/// An object for handling key=value parameter lists; for the key, currently only
/// a single character is allowed.
///
/// The object is used eg. by Chat or dc_msg_t, for readable paramter names,
/// The object is used eg. by Chat or dc_msg_t, for readable parameter names,
/// these classes define some DC_PARAM_* constantats.
///
/// Only for library-internal use.
Expand Down
2 changes: 1 addition & 1 deletion src/dc_qr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ pub unsafe fn dc_check_qr(context: &Context, qr: *const libc::c_char) -> *mut dc
match current_block {
16562876845594826114 => {}
_ => {
/* check the paramters
/* check the parameters
---------------------- */
if !addr.is_null() {
/* urldecoding is needed at least for OPENPGP4FPR but should not hurt in the other cases */
Expand Down
8 changes: 4 additions & 4 deletions src/dc_receive_imf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ unsafe fn calc_timestamps(
}

/* the function tries extracts the group-id from the message and returns the
corresponding chat_id. If the chat_id is not existant, it is created.
corresponding chat_id. If the chat_id is not existent, it is created.
If the message contains groups commands (name, profile image, changed members),
they are executed as well.
Expand Down Expand Up @@ -1397,7 +1397,7 @@ unsafe fn create_or_lookup_adhoc_group(
/* we do not check if the message is a reply to another group, this may result in
chats with unclear member list. instead we create a new group in the following lines ... */
/* create a new ad-hoc group
- there is no need to check if this group exists; otherwise we would have catched it above */
- there is no need to check if this group exists; otherwise we would have caught it above */
grpid = create_adhoc_grp_id(context, member_ids);
if !grpid.is_null() {
if !mime_parser.subject.is_null()
Expand Down Expand Up @@ -1477,7 +1477,7 @@ fn create_group_record(
unsafe fn create_adhoc_grp_id(context: &Context, member_ids: *mut dc_array_t) -> *mut libc::c_char {
/* algorithm:
- sort normalized, lowercased, e-mail addresses alphabetically
- put all e-mail addresses into a single string, separate the addresss by a single comma
- put all e-mail addresses into a single string, separate the address by a single comma
- sha-256 this string (without possibly terminating null-characters)
- encode the first 64 bits of the sha-256 output as lowercase hex (results in 16 characters from the set [0-9a-f])
*/
Expand Down Expand Up @@ -1702,7 +1702,7 @@ unsafe fn check_verified_properties(
to_addr
));
cleanup();
return Err(failure::format_err!("not a valid memember").into());
return Err(failure::format_err!("not a valid member").into());
}
}
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion src/dc_simplify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ unsafe fn is_quoted_headline(buf: *const libc::c_char) -> bool {
/* This function may be called for the line _directly_ before a quote.
The function checks if the line contains sth. like "On 01.02.2016, xy@z wrote:" in various languages.
- Currently, we simply check if the last character is a ':'.
- Checking for the existance of an email address may fail (headlines may show the user's name instead of the address) */
- Checking for the existence of an email address may fail (headlines may show the user's name instead of the address) */
let buf_len: libc::c_int = strlen(buf) as libc::c_int;
if buf_len > 80i32 {
return false;
Expand Down
4 changes: 2 additions & 2 deletions src/dc_tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ pub unsafe fn dc_str_to_color(str: *const libc::c_char) -> libc::c_int {
/* the colors must fulfill some criterions as:
- contrast to black and to white
- work as a text-color
- being noticable on a typical map
- being noticeable on a typical map
- harmonize together while being different enough
(therefore, we cannot just use random rgb colors :) */
static mut colors: [uint32_t; 16] = [
Expand Down Expand Up @@ -1582,7 +1582,7 @@ pub fn as_path<'a>(s: *const libc::c_char) -> &'a std::path::Path {
as_path_unicode(s)
}

// Implmentation for as_path() on Windows.
// Implementation for as_path() on Windows.
//
// Having this as a separate function means it can be tested on unix
// too.
Expand Down
2 changes: 1 addition & 1 deletion src/sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ pub fn get_rowid(
) -> u32 {
// alternative to sqlite3_last_insert_rowid() which MUST NOT be used due to race conditions, see comment above.
// the ORDER BY ensures, this function always returns the most recent id,
// eg. if a Message-ID is splitted into different messages.
// eg. if a Message-ID is split into different messages.
let query = format!(
"SELECT id FROM {} WHERE {}='{}' ORDER BY id DESC",
table.as_ref(),
Expand Down

0 comments on commit 686678c

Please sign in to comment.