From 0dc07384eb2d49bec5c759d74e707d19f3165353 Mon Sep 17 00:00:00 2001 From: Juan Potato Date: Mon, 28 Nov 2016 17:04:59 -0500 Subject: [PATCH] Various spelling corrections. --- src/ccextractor.c | 4 +-- src/lib_ccx/avc_functions.h | 2 +- src/lib_ccx/ccx_common_constants.h | 4 +-- src/lib_ccx/ccx_common_option.h | 4 +-- src/lib_ccx/ccx_decoders_structs.h | 6 ++-- src/lib_ccx/list.h | 2 +- src/lib_ccx/myth.c | 4 +-- src/lib_ccx/networking.c | 52 +++++++++++++++--------------- src/lib_ccx/ocr.c | 2 +- src/lib_ccx/stream_functions.c | 2 +- src/lib_ccx/telxcc.c | 4 +-- src/lib_ccx/ts_functions.c | 4 +-- src/lib_ccx/ts_tables.c | 2 +- src/lib_ccx/ts_tables_epg.c | 12 +++---- src/lib_ccx/wtv_constants.h | 2 +- src/lib_ccx/wtv_functions.c | 2 +- 16 files changed, 54 insertions(+), 54 deletions(-) diff --git a/src/ccextractor.c b/src/ccextractor.c index 7a67b089..3275565f 100644 --- a/src/ccextractor.c +++ b/src/ccextractor.c @@ -125,7 +125,7 @@ int main(int argc, char *argv[]) switch (ctx->total_inputsize) { case -1*ENOENT: - fatal(EXIT_NO_INPUT_FILES, "Failed to open file: File not Exist"); + fatal(EXIT_NO_INPUT_FILES, "Failed to open file: File does not exist."); case -1*EACCES: fatal(EXIT_READ_ERROR, "Failed to open file: Unable to access"); case -1*EINVAL: @@ -388,7 +388,7 @@ int main(int argc, char *argv[]) if (is_decoder_processed_enough(ctx) == CCX_TRUE) { - mprint ("\rNote: Processing was cancelled before all data was processed because\n"); + mprint ("\rNote: Processing was canceled before all data was processed because\n"); mprint ("\rone or more user-defined limits were reached.\n"); } mprint ("This is beta software. Report issues to carlos at ccextractor org...\n"); diff --git a/src/lib_ccx/avc_functions.h b/src/lib_ccx/avc_functions.h index 58b72f36..0e3ed362 100644 --- a/src/lib_ccx/avc_functions.h +++ b/src/lib_ccx/avc_functions.h @@ -18,7 +18,7 @@ struct avc_ctx int log2_max_pic_order_cnt_lsb; int frame_mbs_only_flag; - // Use and throw stats for debug, remove this uglyness soon + // Use and throw stats for debug, remove this ugliness soon long num_nal_unit_type_7; long num_vcl_hrd; long num_nal_hrd; diff --git a/src/lib_ccx/ccx_common_constants.h b/src/lib_ccx/ccx_common_constants.h index 3b072916..2d0d1aa8 100644 --- a/src/lib_ccx/ccx_common_constants.h +++ b/src/lib_ccx/ccx_common_constants.h @@ -286,13 +286,13 @@ enum cdp_section_type * we give false value if f_sel is equal to n_sel * and vice versa true if ... * - * @param f_sel pass the codec name whom you are tesing to be feasible + * @param f_sel pass the codec name whom you are testing to be feasible * to parse. */ #define IS_FEASIBLE(u_sel,u_nsel,f_sel) ( ( (u_sel) == CCX_CODEC_ANY && (u_nsel) != (f_sel) ) || (u_sel) == (f_sel) ) #define CCX_TXT_FORBIDDEN 0 // Ignore teletext packets #define CCX_TXT_AUTO_NOT_YET_FOUND 1 -#define CCX_TXT_IN_USE 2 // Positive autodetected, or forced, etc +#define CCX_TXT_IN_USE 2 // Positive auto-detected, or forced, etc #define NB_LANGUAGE 100 extern const char *language[NB_LANGUAGE]; diff --git a/src/lib_ccx/ccx_common_option.h b/src/lib_ccx/ccx_common_option.h index 37e6f5fb..618b56ac 100644 --- a/src/lib_ccx/ccx_common_option.h +++ b/src/lib_ccx/ccx_common_option.h @@ -115,8 +115,8 @@ struct ccx_s_options // Options from user parameters /* General settings */ int usepicorder; // Force the use of pic_order_cnt_lsb in AVC/H.264 data streams int xmltv; // 1 = full output. 2 = live output. 3 = both - int xmltvliveinterval; // interval in seconds between writting xmltv output files in live mode - int xmltvoutputinterval; // interval in seconds between writting xmltv full file output + int xmltvliveinterval; // interval in seconds between writing xmltv output files in live mode + int xmltvoutputinterval; // interval in seconds between writing xmltv full file output int xmltvonlycurrent; // 0 off 1 on int keep_output_closed; int force_flush; // Force flush on content write diff --git a/src/lib_ccx/ccx_decoders_structs.h b/src/lib_ccx/ccx_decoders_structs.h index b3331423..b1cfdfad 100644 --- a/src/lib_ccx/ccx_decoders_structs.h +++ b/src/lib_ccx/ccx_decoders_structs.h @@ -52,7 +52,7 @@ enum cc_modes * This structure have fields which need to be ignored according to format, * for example if format is SFORMAT_XDS then all fields other then * xds related (xds_str, xds_len and cur_xds_packet_class) should be -* ignored and not to be derefrenced. +* ignored and not to be dereferenced. * * TODO use union inside struct for each kind of fields */ @@ -150,7 +150,7 @@ struct lib_cc_decode unsigned int current_aspect_ratio; unsigned int current_frame_rate; // Assume standard fps, 29.97 - /* Reguired in es_function.c */ + /* Required in es_function.c */ int no_bitstream_error; int saw_seqgoppic; int in_pic_data; @@ -164,7 +164,7 @@ struct lib_cc_decode unsigned repeat_first_field; unsigned progressive_frame; unsigned pulldownfields; - /* Reguired in es_function.c and es_userdata.c */ + /* Required in es_function.c and es_userdata.c */ unsigned top_field_first; // Needs to be global /* Stats. Modified in es_userdata.c*/ diff --git a/src/lib_ccx/list.h b/src/lib_ccx/list.h index d08dec01..d956a3be 100644 --- a/src/lib_ccx/list.h +++ b/src/lib_ccx/list.h @@ -1,6 +1,6 @@ /** * - * Grabed from linux kernel source code and fix it for user space + * Grabbed from linux kernel source code and fix it for user space * program. Of course, this is a GPL licensed header file. * * diff --git a/src/lib_ccx/myth.c b/src/lib_ccx/myth.c index ecf2a3d1..fdd26325 100644 --- a/src/lib_ccx/myth.c +++ b/src/lib_ccx/myth.c @@ -82,7 +82,7 @@ enum CodecID { CODEC_ID_NONE, CODEC_ID_MPEG1VIDEO, - CODEC_ID_MPEG2VIDEO, /* prefered ID for MPEG Video 1 or 2 decoding */ + CODEC_ID_MPEG2VIDEO, /* preferred ID for MPEG Video 1 or 2 decoding */ CODEC_ID_MPEG2VIDEO_XVMC, CODEC_ID_MPEG2VIDEO_XVMC_VLD, CODEC_ID_H261, @@ -227,7 +227,7 @@ enum CodecID CODEC_ID_SOL_DPCM, CODEC_ID_MP2= 0x15000, - CODEC_ID_MP3, /* prefered ID for MPEG Audio layer 1, 2 or3 decoding */ + CODEC_ID_MP3, /* preferred ID for MPEG Audio layer 1, 2 or 3 decoding */ CODEC_ID_AAC, CODEC_ID_MPEG4AAC, CODEC_ID_AC3, diff --git a/src/lib_ccx/networking.c b/src/lib_ccx/networking.c index 6454325b..8574be0c 100644 --- a/src/lib_ccx/networking.c +++ b/src/lib_ccx/networking.c @@ -67,7 +67,7 @@ ssize_t readn(int fd, void *vptr, size_t n); /* Writes n bytes to descriptor */ ssize_t writen(int fd, const void *vptr, size_t n); -/* Convinence functions */ +/* Convenience functions */ ssize_t write_byte(int fd, char status); ssize_t read_byte(int fd, char *status); @@ -84,7 +84,7 @@ void connect_to_srv(const char *addr, const char *port, const char *cc_desc, con { if (NULL == addr) { - mprint("Server addres is not set\n"); + mprint("Server address is not set\n"); fatal(EXIT_FAILURE, "Unable to connect\n"); } @@ -131,7 +131,7 @@ void net_send_header(const unsigned char *data, size_t len) return; if ((srv_header = malloc(len)) == NULL) - fatal(EXIT_FAILURE, "Not enought memory"); + fatal(EXIT_FAILURE, "Not enough memory"); memcpy(srv_header, data, len); srv_header_len = len; @@ -176,7 +176,7 @@ void net_check_conn() rc = read_byte(srv_sd, &c); if (c == PING) { #if DEBUG_OUT - fprintf(stderr, "[S] Recieved PING\n"); + fprintf(stderr, "[S] Received PING\n"); #endif last_ping = now; } @@ -185,7 +185,7 @@ void net_check_conn() if (now - last_ping > NO_RESPONCE_INTERVAL) { fprintf(stderr, - "[S] No PING recieved from the server in %u sec, reconnecting\n", + "[S] No PING received from the server in %u sec, reconnecting\n", NO_RESPONCE_INTERVAL); close(srv_sd); srv_sd = -1; @@ -328,8 +328,8 @@ int net_tcp_read(int socket, void *buffer, size_t length) } /* - * command | lenght | data | \r\n - * 1 byte | INT_LEN bytes | lenght bytes | 2 bytes + * command | length | data | \r\n + * 1 byte | INT_LEN bytes | length bytes | 2 bytes */ ssize_t write_block(int fd, char command, const char *buf, size_t buf_len) { @@ -427,18 +427,18 @@ int tcp_connect(const char *host, const char *port) struct addrinfo *p; int sockfd; - /* Try each address until we sucessfully connect */ + /* Try each address until we successfully connect */ for (p = ai; p != NULL; p = p->ai_next) { sockfd = socket(p->ai_family, SOCK_STREAM, p->ai_protocol); if (-1 == sockfd) { #if _WIN32 - wprintf(L"socket() eror: %ld\n", WSAGetLastError()); + wprintf(L"socket() error: %ld\n", WSAGetLastError()); #else mprint("socket() error: %s\n", strerror(errno)); #endif if (p->ai_next != NULL) - mprint("trying next addres ...\n"); + mprint("trying next address ...\n"); continue; } @@ -446,12 +446,12 @@ int tcp_connect(const char *host, const char *port) if (connect(sockfd, p->ai_addr, p->ai_addrlen) == 0) break; #if _WIN32 - wprintf(L"connect() eror: %ld\n", WSAGetLastError()); + wprintf(L"connect() error: %ld\n", WSAGetLastError()); #else mprint("connect() error: %s\n", strerror(errno)); #endif if (p->ai_next != NULL) - mprint("trying next addres ...\n"); + mprint("trying next address ...\n"); #if _WIN32 closesocket(sockfd); @@ -511,7 +511,7 @@ int start_tcp_srv(const char *port, const char *pwd) else { #if _WIN32 - wprintf(L"accept() eror: %ld\n", WSAGetLastError()); + wprintf(L"accept() error: %ld\n", WSAGetLastError()); exit(EXIT_FAILURE); #else fatal(EXIT_FAILURE, "accept() error: %s\n", strerror(errno)); @@ -529,7 +529,7 @@ int start_tcp_srv(const char *port, const char *pwd) } else { - mprint("%s:%s Connceted\n", host, serv); + mprint("%s:%s Connected\n", host, serv); } free(cliaddr); @@ -574,7 +574,7 @@ int check_password(int fd, const char *pwd) } #if DEBUG_OUT - fprintf(stderr, "[C] Wrong passsword\n"); + fprintf(stderr, "[C] Wrong password\n"); #endif #if DEBUG_OUT @@ -605,7 +605,7 @@ int tcp_bind(const char *port, int *family) struct addrinfo *p; int sockfd = -1; - /* Try each address until we sucessfully bind */ + /* Try each address until we successfully bind */ for (p = ai; p != NULL; p = p->ai_next) { sockfd = socket(p->ai_family, SOCK_STREAM, p->ai_protocol); @@ -613,13 +613,13 @@ int tcp_bind(const char *port, int *family) if (-1 == sockfd) { #if _WIN32 - wprintf(L"socket() eror: %ld\n", WSAGetLastError()); + wprintf(L"socket() error: %ld\n", WSAGetLastError()); #else mprint("socket() error: %s\n", strerror(errno)); #endif if (p->ai_next != NULL) - mprint("trying next addres ...\n"); + mprint("trying next address ...\n"); continue; } @@ -630,13 +630,13 @@ int tcp_bind(const char *port, int *family) if (setsockopt(sockfd, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&no, sizeof(no)) < 0) { #if _WIN32 - wprintf(L"setsockopt() eror: %ld\n", WSAGetLastError()); + wprintf(L"setsockopt() error: %ld\n", WSAGetLastError()); #else mprint("setsockopt() error: %s\n", strerror(errno)); #endif if (p->ai_next != NULL) - mprint("trying next addres ...\n"); + mprint("trying next address ...\n"); continue; } @@ -652,7 +652,7 @@ int tcp_bind(const char *port, int *family) close(sockfd); #endif if (p->ai_next != NULL) - mprint("trying next addres ...\n"); + mprint("trying next address ...\n"); continue; } @@ -670,7 +670,7 @@ int tcp_bind(const char *port, int *family) if (listen(sockfd, SOMAXCONN) != 0) { #if _WIN32 - wprintf(L"listen() eror: %ld\n", WSAGetLastError()); + wprintf(L"listen() error: %ld\n", WSAGetLastError()); closesocket(sockfd); #else perror("listen() error"); @@ -853,7 +853,7 @@ ssize_t readn(int fd, void *vptr, size_t n) else { #if _WIN32 - wprintf(L"recv() eror: %ld\n", WSAGetLastError()); + wprintf(L"recv() error: %ld\n", WSAGetLastError()); #else mprint("recv() error: %s\n", strerror(errno)); #endif @@ -953,7 +953,7 @@ int start_upd_srv(const char *addr_str, unsigned port) int sockfd = socket(AF_INET, SOCK_DGRAM, 0); if (-1 == sockfd) { #if _WIN32 - wprintf(L"socket() eror: %ld\n", WSAGetLastError()); + wprintf(L"socket() error: %ld\n", WSAGetLastError()); exit(EXIT_FAILURE); #else mprint("socket() error: %s\n", strerror(errno)); @@ -1062,7 +1062,7 @@ void handle_write_error() if (rc < 0) { #if _WIN32 - wprintf(L"send() eror: %ld\n", err); + wprintf(L"send() error: %ld\n", err); #else mprint("send() error: %s\n", err); #endif @@ -1083,7 +1083,7 @@ void handle_write_error() break; default: #if _WIN32 - wprintf(L"send() eror: %ld\n", err); + wprintf(L"send() error: %ld\n", err); #else mprint("send() error: %s\n", err); #endif diff --git a/src/lib_ccx/ocr.c b/src/lib_ccx/ocr.c index 2020f1a7..81921854 100644 --- a/src/lib_ccx/ocr.c +++ b/src/lib_ccx/ocr.c @@ -28,7 +28,7 @@ static int check_trans_tn_intensity(const void *p1, const void *p2, void *arg) unsigned char tmp_i; unsigned char act_i; /** TODO verify that RGB follow ITU-R BT.709 - * Below fomula is valid only for 709 standurd + * Below formula is valid only for 709 standard * Y = 0.2126 R + 0.7152 G + 0.0722 B */ tmp_i = (0.2126 * ti->palette[*tmp].red) + (0.7152 * ti->palette[*tmp].green) + (0.0722 * ti->palette[*tmp].blue); diff --git a/src/lib_ccx/stream_functions.c b/src/lib_ccx/stream_functions.c index 275a96fd..da683b01 100644 --- a/src/lib_ccx/stream_functions.c +++ b/src/lib_ccx/stream_functions.c @@ -387,7 +387,7 @@ int read_video_pes_header (struct ccx_demuxer *ctx, struct demuxer_data *data, u } // This might happen in PES packets in TS stream. It seems that when the - // packet length is unkown it is set to 0. + // packet length is unknown it is set to 0. if (peslen+6 >= hskip+9) { payloadlength = peslen - (hskip + 3); // for [6], [7] and [8] diff --git a/src/lib_ccx/telxcc.c b/src/lib_ccx/telxcc.c index 6cdea00f..e88f79bc 100644 --- a/src/lib_ccx/telxcc.c +++ b/src/lib_ccx/telxcc.c @@ -1400,7 +1400,7 @@ int tlt_process_pes_packet(struct lib_cc_decode *dec_ctx, uint8_t *buffer, uint1 // presentation and decoder timestamps use the 90 KHz clock, hence PTS/90 = [ms] uint64_t pts = 0; // __MUST__ assign value to uint64_t and __THEN__ rotate left by 29 bits - // << is defined for signed int (as in "C" spec.) and overflow occures + // << is defined for signed int (as in "C" spec.) and overflow occurs pts = (buffer[9] & 0x0e); pts <<= 29; pts |= (buffer[10] << 22); @@ -1456,7 +1456,7 @@ int tlt_process_pes_packet(struct lib_cc_decode *dec_ctx, uint8_t *buffer, uint1 tlt_write_rcwt(dec_ctx, data_unit_id, &buffer[i], ctx->last_timestamp, sub); else { - // FIXME: This explicit type conversion could be a problem some day -- do not need to be platform independant + // FIXME: This explicit type conversion could be a problem some day -- do not need to be platform independent process_telx_packet(ctx, (data_unit_t) data_unit_id, (teletext_packet_payload_t *)&buffer[i], ctx->last_timestamp, sub); } } diff --git a/src/lib_ccx/ts_functions.c b/src/lib_ccx/ts_functions.c index 74b7b72f..4a534e7a 100644 --- a/src/lib_ccx/ts_functions.c +++ b/src/lib_ccx/ts_functions.c @@ -120,7 +120,7 @@ void init_ts(struct ccx_demuxer *ctx) } -// Return 1 for sucessfully read ts packet +// Return 1 for successfully read ts packet int ts_readpacket(struct ccx_demuxer* ctx, struct ts_payload *payload) { unsigned int adaptation_field_length = 0; @@ -230,7 +230,7 @@ int ts_readpacket(struct ccx_demuxer* ctx, struct ts_payload *payload) payload->pcr |= (tspacket[8] << 9); payload->pcr |= (tspacket[9] << 1); payload->pcr |= (tspacket[10] >> 7); - /* Ignore 27 Mhz clock since we dont deal in nano seconds*/ + /* Ignore 27 Mhz clock since we dont deal in nanoseconds*/ //payload->pcr = ((tspacket[10] & 0x01) << 8); //payload->pcr |= tspacket[11]; } diff --git a/src/lib_ccx/ts_tables.c b/src/lib_ccx/ts_tables.c index d8e5a227..8c975e9e 100644 --- a/src/lib_ccx/ts_tables.c +++ b/src/lib_ccx/ts_tables.c @@ -171,7 +171,7 @@ int parse_PMT (struct ccx_demuxer *ctx, unsigned char *buf, int len, struct pro } else if ( (pinfo->version+1)%32 != version_number) - mprint("TS PMT:Glitch in version number incremnt"); + mprint("TS PMT:Glitch in version number increment"); } pinfo->version = version_number; diff --git a/src/lib_ccx/ts_tables_epg.c b/src/lib_ccx/ts_tables_epg.c index 968f880c..34ca07a3 100644 --- a/src/lib_ccx/ts_tables_epg.c +++ b/src/lib_ccx/ts_tables_epg.c @@ -451,7 +451,7 @@ void EPG_decode_parental_rating_descriptor(uint8_t *offset, uint32_t descriptor_ } } -// an ungly function to convert from dvb codepages to UTF-8859-9 using iconv +// an ugly function to convert from dvb codepages to UTF-8859-9 using iconv // returns a null terminated UTF8-strings // EN 300 468 V1.7.1 (2006-05) // A.2 Selection of Character table @@ -697,7 +697,7 @@ void EPG_decode_extended_event_descriptor(uint8_t *offset, uint32_t descriptor_l } // decode an ATSC multiple_string -// extremly basic implementation +// extremely basic implementation // only handles single segment, single language ANSI string! void EPG_ATSC_decode_multiple_string(uint8_t *offset, uint32_t length, struct EPG_event *event) { @@ -786,7 +786,7 @@ void EPG_ATSC_decode_EIT(struct lib_ccx_ctx *ctx, uint8_t *payload_start, uint32 pmt_map=i; } - //Don't know how to stroe EPG until we know the programs. Ignore it. + //Don't know how to store EPG until we know the programs. Ignore it. if(pmt_map==-1) pmt_map=TS_PMT_MAP_SIZE; @@ -1004,14 +1004,14 @@ void EPG_handle_output(struct lib_ccx_ctx *ctx) } } -//determin table type and call the correct function to handle it +//determine table type and call the correct function to handle it void EPG_parse_table(struct lib_ccx_ctx *ctx, uint8_t *b, uint32_t size) { uint8_t pointer_field = b[0]; uint8_t *payload_start; uint8_t table_id; - //XXX hack, should accumalate data + //XXX hack, should accumulate data if(pointer_field + 2 > size) { return; } @@ -1032,7 +1032,7 @@ void EPG_parse_table(struct lib_ccx_ctx *ctx, uint8_t *b, uint32_t size) EPG_handle_output(ctx); } -// recounsructs DVB EIT and ATSC tables +// reconstructs DVB EIT and ATSC tables void parse_EPG_packet(struct lib_ccx_ctx *ctx) { unsigned char *payload_start = tspacket + 4; diff --git a/src/lib_ccx/wtv_constants.h b/src/lib_ccx/wtv_constants.h index d22b8519..515a69af 100644 --- a/src/lib_ccx/wtv_constants.h +++ b/src/lib_ccx/wtv_constants.h @@ -16,7 +16,7 @@ #define WTV_TABLE_ENTRIES ".entries." -//Maximum size we will try and malloc for chunked_buffer. 100MB +//Maximum size we will try and alloc for chunked_buffer. 100MB #define WTV_MAX_ALLOC 1024*1024*100 #define WTV_CC_TIMESTAMP_MAGIC 1668330 diff --git a/src/lib_ccx/wtv_functions.c b/src/lib_ccx/wtv_functions.c index 2d7c2f7d..9fdef0e8 100644 --- a/src/lib_ccx/wtv_functions.c +++ b/src/lib_ccx/wtv_functions.c @@ -58,7 +58,7 @@ uint64_t time_to_pes_time(uint64_t time) } // Read the actual values of the passed lookup offset and add them to -// the list of chunks to skip as nessasary. Returns false on error. +// the list of chunks to skip as necessary. Returns false on error. int add_skip_chunks(struct ccx_demuxer *ctx, struct wtv_chunked_buffer *cb, uint32_t offset, uint32_t flag) {