diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000..aec40e5 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,8 @@ +[codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = .git*,*.pdf,.codespellrc +check-hidden = true +# Ignore localities records, could be replaced with blocked ignores +# after next version after 2.3.0 of codespell is released +ignore-regex = .*{ ".*, 0x.*, 0x.*|"[a-z][a-z]" +ignore-words-list = ser,trough,dum diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..c59e047 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,25 @@ +# Codespell configuration is within .codespellrc +--- +name: Codespell + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Annotate locations with typos + uses: codespell-project/codespell-problem-matcher@v1 + - name: Codespell + uses: codespell-project/actions-codespell@v2 diff --git a/medlib_m12.c b/medlib_m12.c index 6555cad..f1d5e33 100644 --- a/medlib_m12.c +++ b/medlib_m12.c @@ -89,7 +89,7 @@ // All library versions associated with a particular major format version are guaranteed to work on MED files of that major version. // Minor format versions may add fields to the format in protected regions, but no preexisting fields will be removed or moved. -// Only library versions released on or afer a minor version will make use of new fields, and only if the minor version of the files contains them. +// Only library versions released on or after a minor version will make use of new fields, and only if the minor version of the files contains them. // Backward compatibility will be maintained between major versions if practical. @@ -305,7 +305,7 @@ SEGMENT_m12 *G_allocate_segment_m12(SEGMENT_m12 *seg, FILE_PROCESSING_STRUCT_m12 // enclosing_path is the path to the enclosing directory // chan_name is the base name, with no extension - // if time series channels are requested, the CMP_PROCESSING_STRUCT_m12 structures must be allocated seperately. + // if time series channels are requested, the CMP_PROCESSING_STRUCT_m12 structures must be allocated separately. // if time series data are requested, enough memory for one time series index is allocated. // if records are requested, enough memory for 1 record of size REC_LARGEST_RECORD_BYTES_m12 is allocated (use FPS_reallocate_processing_struct_m12() to change this) // if records are requested, enough memory for 1 record index is allocated (FPS_reallocate_processing_struct_m12() to change this) @@ -541,7 +541,7 @@ TERN_m12 G_allocated_en_bloc_m12(LEVEL_HEADER_m12 *level_header) test_ptr_ptr = (LEVEL_HEADER_m12 **) ((ui1 *) level_header - sizeof(void *)); if (*test_ptr_ptr == level_header) en_bloc = TRUE_m12; - // else not allocated en bloc + // else not allocated en block } } @@ -1889,7 +1889,7 @@ TERN_m12 G_correct_universal_header_m12(FILE_PROCESSING_STRUCT_m12 *fps) break; case VIDEO_METADATA_FILE_TYPE_CODE_m12: case TIME_SERIES_METADATA_FILE_TYPE_CODE_m12: - break; // these are wirtten on close - there won't be anything to read except universal header + break; // these are written on close - there won't be anything to read except universal header case RECORD_DATA_FILE_TYPE_CODE_m12: // see if indices known level_header = (LEVEL_HEADER_m12 *) fps->parent; // try using parent @@ -2449,7 +2449,7 @@ TERN_m12 G_en_bloc_allocation_m12(LEVEL_HEADER_m12 *level_header) test_ptr_ptr = (LEVEL_HEADER_m12 **) ((ui1 *) level_header - sizeof(void *)); if (*test_ptr_ptr == level_header) en_bloc = TRUE_m12; - // else not allocated en bloc + // else not allocated en block } } @@ -4154,7 +4154,7 @@ TERN_m12 G_free_channel_m12(CHANNEL_m12 *channel, TERN_m12 free_channel_structur if (seg) G_free_segment_m12(seg, TRUE_m12); } - free_m12((void *) channel->segments, __FUNCTION__); // ok whether allocated en bloc or not + free_m12((void *) channel->segments, __FUNCTION__); // ok whether allocated en block or not } if (channel->metadata_fps) FPS_free_processing_struct_m12(channel->metadata_fps, TRUE_m12); @@ -4367,7 +4367,7 @@ void G_free_globals_m12(TERN_m12 cleanup_for_exit) if (globals->AT_nodes) { AT_free_all_m12(); // display memory still allocated & free it #ifdef MATLAB_PERSISTENT_m12 - mxFree((void *) globals->AT_nodes); // AT nodes are not allocted with AT functions + mxFree((void *) globals->AT_nodes); // AT nodes are not allocated with AT functions #else free((void *) globals->AT_nodes); // AT nodes are not allocated with AT functions #endif @@ -4433,7 +4433,7 @@ TERN_m12 G_free_segment_m12(SEGMENT_m12 *segment, TERN_m12 free_segment_structur if (free_segment_structure == TRUE_m12) { if (segment->en_bloc_allocation == FALSE_m12) - free_m12((void *) segment, __FUNCTION__); // not allocated en bloc + free_m12((void *) segment, __FUNCTION__); // not allocated en block return(FALSE_m12); } else { // leave name, path, & slice intact (i.e. clear everything with allocated memory) @@ -4516,7 +4516,7 @@ void G_free_session_m12(SESSION_m12 *session, TERN_m12 free_session_structure) if (chan) G_free_channel_m12(chan, TRUE_m12); } - free_m12((void *) session->time_series_channels, __FUNCTION__); // ok whether allocated en bloc or not + free_m12((void *) session->time_series_channels, __FUNCTION__); // ok whether allocated en block or not } if (session->video_channels) { for (i = 0; i < session->number_of_video_channels; ++i) { @@ -5742,7 +5742,7 @@ si1 *G_get_session_directory_m12(si1 *session_directory, si1 *MED_file_name, FIL // up one level case TIME_SERIES_CHANNEL_DIRECTORY_TYPE_CODE_m12: case VIDEO_CHANNEL_DIRECTORY_TYPE_CODE_m12: - case RECORD_DIRECTORY_TYPE_CODE_m12: // segmented session records is only MED component that uses a diectory - session level + case RECORD_DIRECTORY_TYPE_CODE_m12: // segmented session records is only MED component that uses a directory - session level G_extract_path_parts_m12(session_directory, session_directory, NULL, NULL); break; @@ -6145,7 +6145,7 @@ TERN_m12 G_initialize_globals_m12(TERN_m12 initialize_all_tables) // initialize global list mutex if (globals_list_m12 == NULL) PROC_pthread_mutex_init_m12(&globals_list_mutex_m12, NULL); - PROC_pthread_mutex_lock_m12(&globals_list_mutex_m12); // lock immediately - only this function initializes other global mutices + PROC_pthread_mutex_lock_m12(&globals_list_mutex_m12); // lock immediately - only this function initializes other global mutexes // realloc global list #ifdef MATLAB_PERSISTENT_m12 @@ -6173,7 +6173,7 @@ TERN_m12 G_initialize_globals_m12(TERN_m12 initialize_all_tables) globals_list_m12[globals_list_len_m12++] = globals; PROC_pthread_mutex_unlock_m12(&globals_list_mutex_m12); - // initialize new globals mutices + // initialize new globals mutexes PROC_pthread_mutex_init_m12(&globals->behavior_mutex, NULL); // AT (do this as soon as possible) @@ -7160,7 +7160,7 @@ TERN_m12 G_merge_metadata_m12(FILE_PROCESSING_STRUCT_m12 *md_fps_1, FILE_PROCESS } if (tmd2_1->sampling_frequency != tmd2_2->sampling_frequency) { if (tmd2_1->sampling_frequency == FREQUENCY_NO_ENTRY_m12 || tmd2_2->sampling_frequency == FREQUENCY_NO_ENTRY_m12) - tmd2_m->sampling_frequency = FREQUENCY_NO_ENTRY_m12; // no entry supercedes variable frequency + tmd2_m->sampling_frequency = FREQUENCY_NO_ENTRY_m12; // no entry supersedes variable frequency else tmd2_m->sampling_frequency = FREQUENCY_VARIABLE_m12; equal = FALSE_m12; @@ -8372,7 +8372,7 @@ SESSION_m12 *G_open_session_m12(SESSION_m12 *sess, TIME_SLICE_m12 *slice, void * chan = sess->video_channels[i]; chan->flags |= LH_CHANNEL_ACTIVE_m12; // need to mark active for change_reference_channel_m12() } - } else { // lists are in alphbetical order + } else { // lists are in alphabetical order for (i = j = 0; i < n_vid_chans; ++i) { for (; strcmp(vid_chan_list[i], full_vid_chan_list[j]); ++j); chan = sess->video_channels[j]; @@ -8672,7 +8672,7 @@ SESSION_m12 *G_open_session_nt_m12(SESSION_m12 *sess, TIME_SLICE_m12 *slice, voi G_message_m12("%s()\n", __FUNCTION__); #endif - // if file_list is a pointer to single string, make list_len zero to indicate a one dimentional char array + // if file_list is a pointer to single string, make list_len zero to indicate a one dimensional char array // if list_len > 0, assumed to be two dimensional array // allocate session @@ -8894,7 +8894,7 @@ SESSION_m12 *G_open_session_nt_m12(SESSION_m12 *sess, TIME_SLICE_m12 *slice, voi chan = sess->video_channels[i]; chan->flags |= LH_CHANNEL_ACTIVE_m12; } - } else { // lists are in alphbetical order + } else { // lists are in alphabetical order for (i = j = 0; i < n_vid_chans; ++i) { for (; strcmp(vid_chan_list[i], full_vid_chan_list[j]); ++j); chan = sess->video_channels[j]; @@ -10071,7 +10071,7 @@ FILE_PROCESSING_STRUCT_m12 *G_read_file_m12(FILE_PROCESSING_STRUCT_m12 *fps, si1 G_get_session_directory_m12(NULL, NULL, fps); if (number_of_items == FPS_UNIVERSAL_HEADER_ONLY_m12) { if (fps->parameters.password_data->processed == 0) // better if done with a metadata file read (for password hints) below - G_process_password_data_m12(fps, password); // done here to satify rule that any read of any MED file will process password + G_process_password_data_m12(fps, password); // done here to satisfy rule that any read of any MED file will process password FPS_set_pointers_m12(fps, UNIVERSAL_HEADER_BYTES_m12); fps->number_of_items = 0; return(fps); @@ -10205,7 +10205,7 @@ si8 G_read_record_data_m12(LEVEL_HEADER_m12 *level_header, TIME_SLICE_m12 *s G_message_m12("%s()\n", __FUNCTION__); #endif - // seg_num only reqired for segmented session records levels + // seg_num only required for segmented session records levels switch (level_header->type_code) { case LH_SESSION_m12: @@ -10371,7 +10371,7 @@ SEGMENT_m12 *G_read_segment_m12(SEGMENT_m12 *seg, TIME_SLICE_m12 *slice, ...) / inactive_ref = TRUE_m12; } if (inactive_ref == TRUE_m12) - seg->flags &= ~LH_REFERENCE_INACTIVE_m12; // reset segment level flag in case propogated in call + seg->flags &= ~LH_REFERENCE_INACTIVE_m12; // reset segment level flag in case propagated in call else // read data G_read_time_series_data_m12(seg, slice); break; @@ -16222,7 +16222,7 @@ TERN_m12 AT_remove_entry_m12(void *address, const si1 *function) return(FALSE_m12); #endif - // Note this function does not free the accociated memory, just marks it as freed in the AT list + // Note this function does not free the associated memory, just marks it as freed in the AT list if (address == NULL) { G_warning_message_m12("%s(): attempting to free NULL object, called from function %s()\n", __FUNCTION__, function); @@ -19943,7 +19943,7 @@ void CMP_MBE_encode_m12(CMP_PROCESSING_STRUCT_m12 *cps) } -// Mofified Akima cubic interpolation +// Modified Akima cubic interpolation // Attribution: modifications based on Matlab's adjustments to weights of Akima function // Note: input x's are integers, output x's are floats sf8 *CMP_mak_interp_sf8_m12(CMP_BUFFERS_m12 *in_bufs, si8 in_len, CMP_BUFFERS_m12 *out_bufs, si8 out_len) @@ -22883,7 +22883,7 @@ void CMP_show_block_model_m12(CMP_PROCESSING_STRUCT_m12 *cps, TERN_m12 recurs } printf_m12("\n"); } - printf_m12("%sPRED Model Flag Bits: ", indent); + printf_m12("%spread Model Flag Bits: ", indent); for (i = 0, mask = 1; i < 16; ++i, mask <<= 1) { if (PRED_header->flags & mask) printf_m12("%d ", i); @@ -24144,7 +24144,7 @@ void CMP_zero_buffers_m12(CMP_BUFFERS_m12 *buffers) // // "This library provides general CRC calculation & validation functions and an // operation to combine the CRCs of two sequences of bytes into a single CRC. -// The routines in this libary only work with the particular CRC-32 polynomial +// The routines in this library only work with the particular CRC-32 polynomial // provided here." // // Minor modifications for compatibility with the MED Library. @@ -25130,7 +25130,7 @@ DATA_MATRIX_m12 *DM_get_matrix_m12(DATA_MATRIX_m12 *matrix, SESSION_m12 *sess, T // NOTE: // DM_EXTMD_COUNT_AND_FREQ_m12: If the caller wants a fixed number of valid output samples, at a specific output frequency, they should set this flag, // and fill in both of these values. DM_get_matrix_m12() will use the slice start time, or start sample number, but adjust the end time if there are - // discontinuities. The session time slice will reflect what actually occured upon return. + // discontinuities. The session time slice will reflect what actually occurred upon return. // DM_EXTMD_COUNT_AND_FREQ_m12 is not compatible with DM_DSCNT_NAN_m12 or DM_DSCNT_ZERO_m12. If these are set the function will return. // If discontinuity information is desired with DM_EXTMD_COUNT_AND_FREQ_m12, set DM_DSCNT_CONTIG_m12. This is because DM_EXTMD_COUNT_AND_FREQ_m12 // implies the caller wants only valid sample values & also, if padding were requested, the number of output samples could be enormous. @@ -25442,7 +25442,7 @@ DATA_MATRIX_m12 *DM_get_matrix_m12(DATA_MATRIX_m12 *matrix, SESSION_m12 *sess, T new_data_bytes = matrix->maj_dim * matrix->min_dim * matrix->el_size; if (matrix->flags & DM_2D_INDEXING_m12) { new_data_bytes += matrix->maj_dim * sizeof(void *); - if (matrix->maj_dim != old_maj_dim || matrix->min_dim != old_min_dim || matrix->el_size != old_el_size) // everthing must match + if (matrix->maj_dim != old_maj_dim || matrix->min_dim != old_min_dim || matrix->el_size != old_el_size) // everything must match matrix->data_bytes = 0; // force failure below } if (matrix->data_bytes < (si8) new_data_bytes) { @@ -26539,7 +26539,7 @@ void FILT_complex_div_m12(FILT_COMPLEX_m12 *a, FILT_COMPLEX_m12 *b, FILT_COMPLEX #ifndef WINDOWS_m12 // inline causes linking problem in Windows inline #endif -void FILT_complex_exp_m12(FILT_COMPLEX_m12 *exponent, FILT_COMPLEX_m12 *ans) +void FILT_complex_exp_m12(FILT_COMPLEX_m12 *exponent, FILT_COMPLEX_m12 *and) { FILT_COMPLEX_m12 t; sf8 c; @@ -27364,7 +27364,7 @@ sf8 FILT_line_noise_filter_m12(sf8 *y, sf8 *fy, si8 len, sf8 samp_freq, sf8 line #endif // if zero passed for cycles_per_template, it is set to line frequency cycles in 1 second - // returns score == proportion of line noise in unfiltered data (range 0 - 1; -1 indicates errpr, nan indicates no score) + // returns score == proportion of line noise in unfiltered data (range 0 - 1; -1 indicates error, nan indicates no score) filt_order = 4; // degenerate above 4 for these settings free_buffers = FALSE_m12; @@ -28715,7 +28715,7 @@ void FPS_free_processing_struct_m12(FILE_PROCESSING_STRUCT_m12 *fps, TERN_m12 fr // leave full_file_name intact fps->parameters.last_access_time = UUTC_NO_ENTRY_m12; fps->parameters.cps = NULL; - if (fps->parameters.password_data != &globals_m12->password_data) // if points to global password data, leave intact for re-use + if (fps->parameters.password_data != &globals_m12->password_data) // if points to global password data, leave intact for reuse fps->parameters.password_data = NULL; fps->universal_header = NULL; fps->data_pointers = NULL; // Note: if free_CMP_processing_struct == FALSE_m12, this pointer is still set to NULL => assumes cps address is also stored elsewhere @@ -30803,7 +30803,7 @@ TERN_m12 NET_get_config_m12(NET_PARAMS_m12 *np, TERN_m12 copy_global) PROC_pthread_mutex_unlock_m12(&global_tables_m12->NET_mutex); return(FALSE_m12); } - iface_start = c; // start all subsequent searches fro this point + iface_start = c; // start all subsequent searches from this point // find next network adapter pattern = "adapter"; @@ -31555,7 +31555,7 @@ si1 *NET_iface_name_for_addr_m12(si1 *iface_name, si1 *iface_addr) *iface_name = 0; if (ret_val == 0) { // parse ipconfig() output to find internet ip address if ((c = STR_match_start_m12(iface_addr, buffer))) { - // find "LAN adapter" backwards fromm here + // find "LAN adapter" backwards from here while (c >= buffer) { if (*c == 'L') if (strncmp(c, "LAN adapter ", 12) == 0) @@ -31997,7 +31997,7 @@ PAR_INFO_m12 *PAR_launch_m12(PAR_INFO_m12 *par_info, ...) // varargs (par_info } } - // "unthreaded" mechanism => just want seperate globals + // "unthreaded" mechanism => just want separate globals if (par_info->detached == PAR_UNTHREADED_m12) { unthreaded = TRUE_m12; par_info->detached = FALSE_m12; // launch as attached thread @@ -33694,7 +33694,7 @@ si8 PRTY_pcrc_length_m12(FILE *fp, si1 *file_path) #endif // returns length of pcrc including crcs & structure, zero indicates no pcrc data - // if fp passed: assumes file is open with read priveleges, returns fp to where it was when called + // if fp passed: assumes file is open with read privileges, returns fp to where it was when called // if path passed: file is opened & closed offset = -1; @@ -36230,7 +36230,7 @@ si1 *STR_duration_string_m12(si1 *dur_str, si8 int_usecs, TERN_m12 abbreviat G_message_m12("%s()\n", __FUNCTION__); #endif - // Note: if dur_str == NULL, it will be allocated & calling functio is responsible for freeing + // Note: if dur_str == NULL, it will be allocated & calling function is responsible for freeing if (dur_str == NULL) dur_str = calloc_m12((size_t) TIME_STRING_BYTES_m12, sizeof(si1), __FUNCTION__, USE_GLOBAL_BEHAVIOR_m12); @@ -36773,7 +36773,7 @@ const si1 *STR_tern_m12(TERN_m12 val) } -si1 *STR_time_string_m12(si8 uutc, si1 *time_str, TERN_m12 fixed_width, TERN_m12 relative_days, si4 colored_text, ...) // time_str buffer sould be of length TIME_STRING_BYTES_m12 +si1 *STR_time_string_m12(si8 uutc, si1 *time_str, TERN_m12 fixed_width, TERN_m12 relative_days, si4 colored_text, ...) // time_str buffer should be of length TIME_STRING_BYTES_m12 { si1 *standard_timezone_acronym, *standard_timezone_string, *date_color, *time_color, *color_reset, *meridian; static si1 private_time_str[TIME_STRING_BYTES_m12]; @@ -37596,7 +37596,7 @@ si8 TR_recv_transmission_m12(TR_INFO_m12 *trans_info, TR_HEADER_m12 **caller_hea G_warning_message_m12("%s(): transmission info is NULL\n", __FUNCTION__); return((si8) FALSE_m12); } - trans_info->mode = TR_MODE_NONE_m12; // zero until transmission successful (not set for acknowlegements) + trans_info->mode = TR_MODE_NONE_m12; // zero until transmission successful (not set for acknowledgements) if (trans_info->sock_fd == -1) { // try to reopen socket if (TR_create_socket_m12(trans_info) == FALSE_m12) return((si8) FALSE_m12); @@ -37843,7 +37843,7 @@ TERN_m12 TR_send_message_m12(TR_INFO_m12 *trans_info, ui1 type, TERN_m12 encrypt } -si8 TR_send_transmission_m12(TR_INFO_m12 *trans_info) // expanded_key can be NULL if not encypting +si8 TR_send_transmission_m12(TR_INFO_m12 *trans_info) // expanded_key can be NULL if not encrypting { TERN_m12 password_passed, acknowledge, no_destruct_flag; ui1 *buffer, *data; @@ -37862,7 +37862,7 @@ si8 TR_send_transmission_m12(TR_INFO_m12 *trans_info) // expanded_key can be NU G_warning_message_m12("%s(): transmission info is NULL\n", __FUNCTION__); return((si8) FALSE_m12); } - trans_info->mode = TR_MODE_NONE_m12; // zero until transmission successful (not set for acknowlegements) + trans_info->mode = TR_MODE_NONE_m12; // zero until transmission successful (not set for acknowledgements) if (trans_info->sock_fd == -1) { // try to reopen socket if (TR_create_socket_m12(trans_info) == FALSE_m12) return((si8) FALSE_m12); @@ -40334,7 +40334,7 @@ TERN_m12 freeable_m12(void *address) if (address_val > hw_params->heap_max_address) return(FALSE_m12); -#ifndef MATLAB_m12 // Matlab mex functions= heaps are within the Matlab heap. So heap base in Matlab is from Matlab itself and ths far below first allocated medlib variable. +#ifndef MATLAB_m12 // Matlab mex functions= heaps are within the Matlab heap. So heap base in Matlab is from Matlab itself and this far below first allocated medlib variable. if (address_val < hw_params->heap_base_address) // covers NULL address case & Windows stack return(FALSE_m12); #endif diff --git a/medlib_m12.h b/medlib_m12.h index 0cb2af4..d05850b 100644 --- a/medlib_m12.h +++ b/medlib_m12.h @@ -92,7 +92,7 @@ // All library versions associated with a particular major format version are guaranteed to work on MED files of that major version. // Minor format versions may add fields to the format in protected regions, but no preexisting fields will be removed or moved. -// Only library versions released on or afer a minor version will make use of new fields, and only if the minor version of the files contains them. +// Only library versions released on or after a minor version will make use of new fields, and only if the minor version of the files contains them. // Backward compatibility will be maintained between major versions if practical. @@ -270,7 +270,7 @@ typedef struct { } REC_Sgmt_v10_m12; // Description follows sampling_frequency / frame_rate in structure. -// The description is an aribitrary length array of si1s padded to 16 byte alignment (total of structure + string). +// The description is an arbitrary length array of si1s padded to 16 byte alignment (total of structure + string). typedef struct { si8 end_time; @@ -287,7 +287,7 @@ typedef struct { } REC_Sgmt_v11_m12; // Description follows acquisition_channel_number in structure. -// The description is an aribitrary length array of si1s padded to 16 byte alignment (total of structure + string). +// The description is an arbitrary length array of si1s padded to 16 byte alignment (total of structure + string). @@ -689,13 +689,13 @@ typedef struct { #define GFL_PATH_PARTS_MASK_m12 GFL_FULL_PATH_m12 // Other Options #define GFL_FREE_INPUT_LIST_m12 ((ui4) 16) -#define GFL_INCLUDE_PARITY_m12 ((ui4) 32) // files or directrories -#define GFL_INCLUDE_INVISIBLE_m12 ((ui4) 64) // files or directrories +#define GFL_INCLUDE_PARITY_m12 ((ui4) 32) // files or directories +#define GFL_INCLUDE_INVISIBLE_m12 ((ui4) 64) // files or directories // System Pipe flags #define SP_DEFAULT_m12 0 // no flags set (default) #define SP_TEE_TO_TERMINAL_m12 1 // print buffer(s) to terminal in addition to returning -#define SP_SEPARATE_STREAMS_m12 2 // return seprate "stdout" & "stderr" buffers (buffer = stdout, e_buffer = stderr), otherwise ganged +#define SP_SEPARATE_STREAMS_m12 2 // return separate "stdout" & "stderr" buffers (buffer = stdout, e_buffer = stderr), otherwise ganged // Spaces Constants #define NO_SPACES_m12 0 @@ -1216,7 +1216,7 @@ typedef struct { va_list args; } PAR_THREAD_INFO_m12; -// Protoypes +// Prototypes void PAR_free_m12(PAR_INFO_m12 **par_info_ptr); PAR_INFO_m12 *PAR_init_m12(PAR_INFO_m12 *par_info, si1 *function, si1 *label, ...); // varagrgs(label == PAR_DEFAULTS_m12): si4 priority, si1 *affinity, si4 detached PAR_INFO_m12 *PAR_launch_m12(PAR_INFO_m12 *par_info, ...); // varargs (par_info == NULL): si1 *function, si1 *label, si4 priority, si1 *affinity, si4 detached, @@ -1717,7 +1717,7 @@ typedef struct { TERN_m12 verbose; ui4 behavior_on_fail; si1 temp_dir[FULL_FILE_NAME_BYTES_m12]; // system temp directory (periodically auto-cleared) - si1 temp_file[FULL_FILE_NAME_BYTES_m12]; // full path to temp file (i.e. incudes temp_dir), not thread safe => use G_unique_temp_file_m12() in threaded applications + si1 temp_file[FULL_FILE_NAME_BYTES_m12]; // full path to temp file (i.e. includes temp_dir), not thread safe => use G_unique_temp_file_m12() in threaded applications ui4 *behavior_stack; volatile ui4 behavior_stack_entries; volatile ui4 behavior_stack_size; @@ -2266,7 +2266,7 @@ typedef struct { FILE_PROCESSING_STRUCT_m12 **record_data_fps; FILE_PROCESSING_STRUCT_m12 **record_indices_fps; si1 path[FULL_FILE_NAME_BYTES_m12]; // full path to segmented session records directory (including directory itself) - si1 name[BASE_FILE_NAME_BYTES_m12]; // session name, duplcated in globals + si1 name[BASE_FILE_NAME_BYTES_m12]; // session name, duplicated in globals TIME_SLICE_m12 time_slice; } SEGMENTED_SESS_RECS_m12; #else @@ -2567,7 +2567,7 @@ si8 WN_filetime_to_uutc_m12(ui1 *win_filetime); // for conversion of windows f //**********************************************************************************// -//******************** MED Alignmment Checking (ALCK) Functions ******************// +//******************** MED Alignment Checking (ALCK) Functions ******************// //**********************************************************************************// TERN_m12 ALCK_all_m12(void); @@ -3382,7 +3382,7 @@ void CMP_zero_buffers_m12(CMP_BUFFERS_m12 *buffers); // // "This library provides general CRC calculation & validation functions and an // operation to combine the CRCs of two sequences of bytes into a single CRC. -// The routines in this libary only work with the particular CRC-32 polynomial +// The routines in this library only work with the particular CRC-32 polynomial // provided here." // // Minor modifications for compatibility with the MED Library. @@ -3494,7 +3494,7 @@ si4 UTF8_wc_to_utf8_m12(si1 *dest, ui4 ch); // single character to UTF-8 //************************************* AES-128 **********************************// //**********************************************************************************// -// ATRIBUTION +// ATTRIBUTION // // Advanced Encryption Standard implementation in C. // By Niyaz PK @@ -3750,7 +3750,7 @@ QUANTFILT_DATA_m12 *FILT_alloc_quantfilt_data_m12(si8 len, si8 span); void FILT_balance_m12(sf8 **a, si4 poles); si4 FILT_butter_m12(FILT_PROCESSING_STRUCT_m12 *filtps); void FILT_complex_div_m12(FILT_COMPLEX_m12 *a, FILT_COMPLEX_m12 *b, FILT_COMPLEX_m12 *quotient); -void FILT_complex_exp_m12(FILT_COMPLEX_m12 *exponent, FILT_COMPLEX_m12 *ans); +void FILT_complex_exp_m12(FILT_COMPLEX_m12 *exponent, FILT_COMPLEX_m12 *and); void FILT_complex_mult_m12(FILT_COMPLEX_m12 *a, FILT_COMPLEX_m12 *b, FILT_COMPLEX_m12 *product); void FILT_elmhes_m12(sf8 **a, si4 poles); void FILT_excise_transients_m12(CMP_PROCESSING_STRUCT_m12 *cps, si8 data_len, si8 *n_extrema); @@ -3791,7 +3791,7 @@ void FILT_unsymmeig_m12(sf8 **a, si4 poles, FILT_COMPLEX_m12 *eigs); // read session by sample numbers // Samples specified, padding requested: // NOTE: There is potential for huge discontinuities being padded in output matrix, so samples are treated as relative. -// NOTE: If discontinuity does ocurr in the specified slice, a warning message is displayed that relative output was produced. +// NOTE: If discontinuity does occur in the specified slice, a warning message is displayed that relative output was produced. // start_time = time of start sample number // duration = (end_sample_number - start_sample_number) / ref_chan_samp_freq; // end_time = start_time + duration @@ -3878,7 +3878,7 @@ void FILT_unsymmeig_m12(sf8 **a, si4 poles, FILT_COMPLEX_m12 *eigs); #define DM_MAXIMUM_INPUT_COUNT_m12 ((si8) -3) // value chosen to parallel DM_MAXIMUM_INPUT_FREQUENCY_m12 & not conflict with NUMBER_OF_SAMPLES_NO_ENTRY_m12 (-1) -// Note: if arrays are allocted as 2D arrays, array[0] is beginning of one dimensional array containing (channel_count * sample_count) values of specfified type +// Note: if arrays are allocated as 2D arrays, array[0] is beginning of one dimensional array containing (channel_count * sample_count) values of specfified type typedef struct { si8 channel_count; // defines dimension of allocated matrix: updated based on active channels si8 sample_count; // defines dimension of allocated matrix: if extent mode (EXTMD) == DM_EXTMD_SAMP_FREQ_m12, resultant sample count filled in @@ -3989,7 +3989,7 @@ void DM_transpose_out_of_place_m12(DATA_MATRIX_m12 *in_matrix, DATA_MATRIX_m12 #define TR_E_ID_MISMATCH_STR_m12 "transmission ID mismatch" #define TR_E_TRANS_FAILED_STR_m12 "transmission failed" #define TR_E_CRC_MISMATCH_STR_m12 "checksum mismatch" -#define TR_E_NO_ACK_STR_m12 "no acknowlegment" +#define TR_E_NO_ACK_STR_m12 "no acknowledgment" // Transmission Flags #define TR_FLAGS_DEFAULT_m12 ((ui2) 0) @@ -4000,7 +4000,7 @@ void DM_transpose_out_of_place_m12(DATA_MATRIX_m12 *in_matrix, DATA_MATRIX_m12 #define TR_FLAGS_CLOSE_m12 ((ui2) 1 << 4) // Bit 4 (close socket after send/recv) #define TR_FLAGS_ACKNOWLEDGE_m12 ((ui2) 1 << 5) // Bit 5 (acknowledge receipt with OK or retransmit) #define TR_FLAGS_CRC_m12 ((ui2) 1 << 6) // Bit 6 (calculate/check transmission CRC - last 4 bytes of transmission) -#define TR_FLAGS_NO_DESTRUCT_m12 ((ui2) 1 << 7) // Bit 7 (set if local memory should not be altered - applies to encrpyted transmissions & transmissions that exceed TR_MTU_BYTES_m12) +#define TR_FLAGS_NO_DESTRUCT_m12 ((ui2) 1 << 7) // Bit 7 (set if local memory should not be altered - applies to encrypted transmissions & transmissions that exceed TR_MTU_BYTES_m12) #define TR_FLAGS_TO_FILE_m12 ((ui2) 1 << 8) // Bit 8 (set if received data should go to a file rather than buffer - pseudo FTP) // TR Defaults @@ -4075,7 +4075,7 @@ typedef struct { }; }; }; - si8 transmission_bytes; // full size of tramsmitted data in bytes (*** does not include header ***) + si8 transmission_bytes; // full size of transmitted data in bytes (*** does not include header ***) si8 offset; // offset (in bytes) of packet data into full data (*** does not include header ***) } TR_HEADER_m12; @@ -4134,7 +4134,7 @@ si1 *TR_strerror(si4 err_num); // Notes: // // Western Sahara: -// DST is on most of the year and off during Ramadan, whose dates change annually in a way that is not accomodated by this schema. +// DST is on most of the year and off during Ramadan, whose dates change annually in a way that is not accommodated by this schema. // As Ramadan only lasts a month, and can occur at virtually any time of year, this table treats it as if it's Daylight Time // is it's Standard Time, and it does not observe DST. // @@ -4549,8 +4549,8 @@ si1 *TR_strerror(si4 err_num); #define TZ_COUNTRY_ALIASES_ENTRIES_m12 16 #define TZ_COUNTRY_ALIASES_TABLE_m12 { \ - { "CHINA", "PEOPLE'S REPUBIC OF CHINA" }, \ - { "CHINA", "PEOPLES REPUBIC OF CHINA" }, \ + { "CHINA", "PEOPLE'S REPUBLIC OF CHINA" }, \ + { "CHINA", "PEOPLES REPUBLIC OF CHINA" }, \ { "CZECH REPUBLIC", "CZECHIA" }, \ { "RUSSIA", "RUSSIAN FEDERATION" }, \ { "TURKS AND CAICOS", "TURKS & CAICOS" }, \ @@ -4575,7 +4575,7 @@ si1 *TR_strerror(si4 err_num); //**********************************************************************************// -//***************************** DATBASE (DB) FUNCTIONS ***************************// +//***************************** DATABASE (DB) FUNCTIONS ***************************// //**********************************************************************************// // Currently only postgres databases are supported. diff --git a/medlib_m13.c b/medlib_m13.c index 7901b71..733b8ed 100644 --- a/medlib_m13.c +++ b/medlib_m13.c @@ -89,7 +89,7 @@ // All library versions associated with a particular major format version are guaranteed to work on MED files of that major version. // Minor format versions may add fields to the format in protected regions, but no preexisting fields will be removed or moved. -// Only library versions released on or afer a minor version will make use of new fields, and only if the minor version of the files contains them. +// Only library versions released on or after a minor version will make use of new fields, and only if the minor version of the files contains them. // Backward compatibility will be maintained between major versions if practical. @@ -465,7 +465,7 @@ SEGMENT_m13 *G_allocate_segment_m13(SEGMENT_m13 *seg, FPS_m13 *proto_fps, si1 *e // enclosing_path is the path to the enclosing directory // chan_name is the base name, with no extension - // if time series channels are requested, the CPS_m13 structures must be allocated seperately. + // if time series channels are requested, the CPS_m13 structures must be allocated separately. // if time series data are requested, enough memory for one time series index is allocated. // if records are requested, enough memory for 1 record of size REC_LARGEST_RECORD_BYTES_m13 is allocated (use FPS_reallocate_m13() to change this) // if records are requested, enough memory for 1 record index is allocated (FPS_reallocate_m13() to change this) @@ -2168,7 +2168,7 @@ tern G_correct_universal_header_m13(FPS_m13 *fps) break; case VIDEO_METADATA_FILE_TYPE_CODE_m13: case TIME_SERIES_METADATA_FILE_TYPE_CODE_m13: - break; // these are wirtten on close - there won't be anything to read except universal header + break; // these are written on close - there won't be anything to read except universal header case RECORD_DATA_FILE_TYPE_CODE_m13: // see if indices known level_header = (LEVEL_HEADER_m13 *) fps->parent; // try using parent @@ -2597,7 +2597,7 @@ void G_delete_behavior_stack_m13(void) if (stack == list->stacks + list->top_idx) --list->top_idx; - // reset stack for re-use (leave size intact, behaviors allocated) + // reset stack for reuse (leave size intact, behaviors allocated) stack->_id = 0; stack->top_idx = -1; @@ -2626,7 +2626,7 @@ void G_delete_function_stack_m13(void) if (stack == list->stacks + list->top_idx) --list->top_idx; - // reset stack for re-use (leave size intact, functions allocated) + // reset stack for reuse (leave size intact, functions allocated) stack->_id = 0; stack->top_idx = -1; @@ -2802,7 +2802,7 @@ tern G_en_bloc_allocation_m13(LEVEL_HEADER_m13 *level_header) struct_bytes = sizeof(FPS_m13); break; case LH_PROC_GLOBALS_m13: - struct_bytes = sizeof(PROC_GLOBALS_m13); // not typically allocated en bloc + struct_bytes = sizeof(PROC_GLOBALS_m13); // not typically allocated en block break; default: return(FALSE_m13); @@ -2824,7 +2824,7 @@ tern G_en_bloc_allocation_m13(LEVEL_HEADER_m13 *level_header) test_ptr_ptr = (LEVEL_HEADER_m13 **) ((ui1 *) level_header - sizeof(void *)); if (*test_ptr_ptr == level_header) en_bloc = TRUE_m13; - // else not allocated en bloc + // else not allocated en block } } @@ -4505,7 +4505,7 @@ tern G_free_channel_m13(CHANNEL_m13 *channel, tern free_structure) if (seg) G_free_segment_m13(seg, TRUE_m13); } - free_m13((void *) channel->segments); // ok whether allocated en bloc or not + free_m13((void *) channel->segments); // ok whether allocated en block or not } if (channel->metadata_fps) FPS_free_m13(channel->metadata_fps, TRUE_m13); @@ -6307,7 +6307,7 @@ si1 *G_get_session_directory_m13(si1 *session_directory, si1 *MED_file_name, FPS // up one level case TIME_SERIES_CHANNEL_DIRECTORY_TYPE_CODE_m13: case VIDEO_CHANNEL_DIRECTORY_TYPE_CODE_m13: - case RECORD_DIRECTORY_TYPE_CODE_m13: // segmented session records is only MED component that uses a diectory - session level + case RECORD_DIRECTORY_TYPE_CODE_m13: // segmented session records is only MED component that uses a directory - session level G_extract_path_parts_m13(session_directory, session_directory, NULL, NULL); break; @@ -7622,7 +7622,7 @@ tern G_merge_metadata_m13(FPS_m13 *md_fps_1, FPS_m13 *md_fps_2, FPS_m13 *merged_ } if (tmd2_1->sampling_frequency != tmd2_2->sampling_frequency) { if (tmd2_1->sampling_frequency == FREQUENCY_NO_ENTRY_m13 || tmd2_2->sampling_frequency == FREQUENCY_NO_ENTRY_m13) - tmd2_m->sampling_frequency = FREQUENCY_NO_ENTRY_m13; // no entry supercedes variable frequency + tmd2_m->sampling_frequency = FREQUENCY_NO_ENTRY_m13; // no entry supersedes variable frequency else tmd2_m->sampling_frequency = FREQUENCY_VARIABLE_m13; equal = FALSE_m13; @@ -8769,7 +8769,7 @@ SESSION_m13 *G_open_session_m13(SESSION_m13 *sess, TIME_SLICE_m13 *slice, void * // divide channel lists if (flags & LH_EXCLUDE_TIME_SERIES_CHANNELS_m13) { n_ts_chans = 0; - flags &= ~LH_MAP_ALL_TIME_SERIES_CHANNELS_m13; // exclude flag supercedes map all flag + flags &= ~LH_MAP_ALL_TIME_SERIES_CHANNELS_m13; // exclude flag supersedes map all flag } else if (n_ts_chans) { ts_chan_list = (si1 **) calloc_2D_m13((size_t) n_ts_chans, FULL_FILE_NAME_BYTES_m13, sizeof(si1), FALSE_m13); if (ts_chan_list == NULL) { @@ -8780,7 +8780,7 @@ SESSION_m13 *G_open_session_m13(SESSION_m13 *sess, TIME_SLICE_m13 *slice, void * } if (flags & LH_EXCLUDE_VIDEO_CHANNELS_m13) { n_vid_chans = 0; - flags &= ~LH_MAP_ALL_VIDEO_CHANNELS_m13; // exclude flag supercedes map all flag + flags &= ~LH_MAP_ALL_VIDEO_CHANNELS_m13; // exclude flag supersedes map all flag } else if (n_vid_chans) { vid_chan_list = (si1 **) calloc_2D_m13((size_t) n_vid_chans, FULL_FILE_NAME_BYTES_m13, sizeof(si1), FALSE_m13); if (vid_chan_list == NULL) { @@ -8905,7 +8905,7 @@ SESSION_m13 *G_open_session_m13(SESSION_m13 *sess, TIME_SLICE_m13 *slice, void * chan = sess->video_channels[i]; chan->flags |= LH_CHANNEL_ACTIVE_m13; } - } else { // lists are in alphbetical order + } else { // lists are in alphabetical order for (i = j = 0; i < n_vid_chans; ++i) { for (; strcmp(vid_chan_list[i], full_vid_chan_list[j]); ++j); chan = sess->video_channels[j]; @@ -9382,7 +9382,7 @@ PROC_GLOBALS_m13 *G_proc_globals_m13(LEVEL_HEADER_m13 *level_header) // initialize *proc_globals_ptr = G_proc_globals_init_m13(level_header); - // relase mutex + // release mutex PROC_pthread_mutex_unlock_m13(&list->mutex); return(*proc_globals_ptr); @@ -9453,7 +9453,7 @@ void G_proc_globals_delete_m13(LEVEL_HEADER_m13 *level_header) } } - // relase mutex + // release mutex PROC_pthread_mutex_unlock_m13(&list->mutex); return; @@ -10273,7 +10273,7 @@ FPS_m13 *G_read_file_m13(FPS_m13 *fps, si1 *full_file_name, si8 file_offset, si8 G_get_session_directory_m13(NULL, NULL, fps); if (number_of_items == FPS_UNIVERSAL_HEADER_ONLY_m13) { if (proc_globals->password_data.processed != TRUE_m13) // better if done with a metadata file read (for password hints) below - G_process_password_data_m13(fps, password); // done here to satify rule that any read of any MED file will process password + G_process_password_data_m13(fps, password); // done here to satisfy rule that any read of any MED file will process password FPS_set_pointers_m13(fps, UNIVERSAL_HEADER_BYTES_m13); fps->number_of_items = 0; return_m13(fps); @@ -10407,7 +10407,7 @@ si8 G_read_record_data_m13(LEVEL_HEADER_m13 *level_header, TIME_SLICE_m13 *s G_push_function_m13(); #endif - seg_num = 0; // seg_num only reqired for segmented session records levels + seg_num = 0; // seg_num only required for segmented session records levels switch (level_header->type_code) { case LH_SESSION_m13: sess = (SESSION_m13 *) level_header; @@ -10616,7 +10616,7 @@ SEGMENT_m13 *G_read_segment_m13(SEGMENT_m13 *seg, TIME_SLICE_m13 *slice, ...) / inactive_ref = TRUE_m13; } if (inactive_ref == TRUE_m13) - seg->flags &= ~LH_REFERENCE_INACTIVE_m13; // reset segment level flag in case propogated during call + seg->flags &= ~LH_REFERENCE_INACTIVE_m13; // reset segment level flag in case propagated during call else // read data G_read_time_series_data_m13(seg, slice); break; @@ -12039,7 +12039,7 @@ void G_set_error_exec_m13(const si1 *function, si4 line, si4 code, si1 *message, vsnprintf_m13(err->message, E_MESSAGE_LEN_m13, message, args); va_end(args); - if (code == E_NONE_m13) // caller passsed an error message, but did not set code + if (code == E_NONE_m13) // caller passed an error message, but did not set code code = E_UNSPEC_m13; } @@ -12364,7 +12364,7 @@ Sgmt_RECORD_m13 *G_Sgmt_records(LEVEL_HEADER_m13 *level_header) else // LH_VIDEO_CHANNEL_m13 rate = chan->segments[seg_idx]->metadata_fps->metadata->video_section_2.frame_rate; - // search for matching entery + // search for matching entry list = proc_globals->current_session.Sgmt_records_list; PROC_pthread_mutex_lock_m13(&list->mutex); rec_entry = list->entries; @@ -16295,7 +16295,7 @@ tern AT_remove_entry_m13(void *address, const si1 *function) AT_ENTRY_m13 *ate, *freed_ate; - // Note this function does not free the accociated memory, just marks it as freed in the AT list + // Note this function does not free the associated memory, just marks it as freed in the AT list if (address == NULL) { G_warning_message_m13("%s(): attempting to free NULL object, called from function %s()\n", __FUNCTION__, function); @@ -16916,7 +16916,7 @@ tern CMP_binterpolate_sf8_m13(sf8 *in_data, si8 in_len, sf8 *out_data, si8 out_l } // central bins - // Note: every combination is done to avoid unnessary computation where possible + // Note: every combination is done to avoid unnecessary computation where possible if (extrema == TRUE_m13) { switch (center_mode) { case CMP_CENT_MODE_NONE_m13: @@ -19970,7 +19970,7 @@ tern CMP_MBE_encode_m13(CPS_m13 *cps) } -// Mofified Akima cubic interpolation +// Modified Akima cubic interpolation // Attribution: modifications based on Matlab's adjustments to weights of Akima function // Note: input x's are integers, output x's are floats sf8 *CMP_mak_interp_sf8_m13(CMP_BUFFERS_m13 *in_bufs, si8 in_len, CMP_BUFFERS_m13 *out_bufs, si8 out_len) @@ -22896,7 +22896,7 @@ tern CMP_show_block_model_m13(CPS_m13 *cps, tern recursed_call) } printf_m13("\n"); } - printf_m13("%sPRED Model Flag Bits: ", indent); + printf_m13("%spread Model Flag Bits: ", indent); for (i = 0, mask = 1; i < 16; ++i, mask <<= 1) { if (PRED_header->flags & mask) printf_m13("%d ", i); @@ -24160,7 +24160,7 @@ tern CMP_zero_buffers_m13(CMP_BUFFERS_m13 *buffers) // // "This library provides general CRC calculation & validation functions and an // operation to combine the CRCs of two sequences of bytes into a single CRC. -// The routines in this libary only work with the particular CRC-32 polynomial +// The routines in this library only work with the particular CRC-32 polynomial // provided here." // // Minor modifications for compatibility with the MED Library. @@ -25107,7 +25107,7 @@ DATA_MATRIX_m13 *DM_get_matrix_m13(DATA_MATRIX_m13 *matrix, SESSION_m13 *sess, T // NOTE: // DM_EXTMD_COUNT_AND_FREQ_m13: If the caller wants a fixed number of valid output samples, at a specific output frequency, they should set this flag, // and fill in both of these values. DM_get_matrix_m13() will use the slice start time, or start sample number, but adjust the end time if there are - // discontinuities. The session time slice will reflect what actually occured upon return. + // discontinuities. The session time slice will reflect what actually occurred upon return. // DM_EXTMD_COUNT_AND_FREQ_m13 is not compatible with DM_DSCNT_NAN_m13 or DM_DSCNT_ZERO_m13. If these are set the function will return. // If discontinuity information is desired with DM_EXTMD_COUNT_AND_FREQ_m13, set DM_DSCNT_CONTIG_m13. This is because DM_EXTMD_COUNT_AND_FREQ_m13 // implies the caller wants only valid sample values & also, if padding were requested, the number of output samples could be enormous. @@ -25420,7 +25420,7 @@ DATA_MATRIX_m13 *DM_get_matrix_m13(DATA_MATRIX_m13 *matrix, SESSION_m13 *sess, T new_data_bytes = matrix->maj_dim * matrix->min_dim * matrix->el_size; if (matrix->flags & DM_2D_INDEXING_m13) { new_data_bytes += matrix->maj_dim * sizeof(void *); - if (matrix->maj_dim != old_maj_dim || matrix->min_dim != old_min_dim || matrix->el_size != old_el_size) // everthing must match + if (matrix->maj_dim != old_maj_dim || matrix->min_dim != old_min_dim || matrix->el_size != old_el_size) // everything must match matrix->data_bytes = 0; // force failure below } if (matrix->data_bytes < (si8) new_data_bytes) { @@ -26850,7 +26850,7 @@ void FILT_complex_div_m13(FILT_COMPLEX_m13 *a, FILT_COMPLEX_m13 *b, FILT_COMPLEX #ifndef WINDOWS_m13 // inline causes linking problem in Windows inline #endif -void FILT_complex_exp_m13(FILT_COMPLEX_m13 *exponent, FILT_COMPLEX_m13 *ans) +void FILT_complex_exp_m13(FILT_COMPLEX_m13 *exponent, FILT_COMPLEX_m13 *and) { FILT_COMPLEX_m13 t; sf8 c; @@ -27672,7 +27672,7 @@ sf8 FILT_line_noise_filter_m13(sf8 *y, sf8 *fy, si8 len, sf8 samp_freq, sf8 line #endif // if zero passed for cycles_per_template, it is set to line frequency cycles in 1 second - // returns score == proportion of line noise in unfiltered data (range 0 - 1; -1 indicates errpr, nan indicates no score) + // returns score == proportion of line noise in unfiltered data (range 0 - 1; -1 indicates error, nan indicates no score) filt_order = 4; // degenerate above 4 for these settings free_buffers = FALSE_m13; @@ -30965,7 +30965,7 @@ tern NET_get_config_m13(NET_PARAMS_m13 *np, tern copy_global) PROC_pthread_mutex_unlock_m13(&globals_m13->tables->mutex); return_m13(FALSE_m13); } - iface_start = c; // start all subsequent searches fro this point + iface_start = c; // start all subsequent searches from this point // find next network adapter pattern = "adapter"; @@ -31722,7 +31722,7 @@ si1 *NET_iface_name_for_addr_m13(si1 *iface_name, si1 *iface_addr) *iface_name = 0; if (ret_val > 0) { // parse ipconfig() output to find internet ip address if ((c = STR_match_start_m13(iface_addr, buffer))) { - // find "LAN adapter" backwards fromm here + // find "LAN adapter" backwards from here while (c >= buffer) { if (*c == 'L') if (strncmp(c, "LAN adapter ", 12) == 0) @@ -32130,7 +32130,7 @@ PAR_INFO_m13 *PAR_launch_m13(PAR_INFO_m13 *par_info, ...) // varargs (par_info } } - // "unthreaded" mechanism => just want seperate globals + // "unthreaded" mechanism => just want separate globals if (par_info->detached == PAR_UNTHREADED_m13) { unthreaded = TRUE_m13; par_info->detached = FALSE_m13; // launch as attached thread @@ -32222,7 +32222,7 @@ pthread_rval_m13 PAR_thread_m13(void *arg) break; } } - PROC_pthread_mutex_unlock_m13(&list->mutex); // relase mutex + PROC_pthread_mutex_unlock_m13(&list->mutex); // release mutex if (i == -1) // proc_globals not found, create new proc_globals = G_proc_globals_m13(NULL); @@ -33776,7 +33776,7 @@ si8 PRTY_pcrc_length_m13(FILE_m13 *fp, si1 *file_path) #endif // returns length of pcrc including crcs & structure, zero indicates no pcrc data - // if fp passed: assumes file is open with read priveleges, returns fp to where it was when called + // if fp passed: assumes file is open with read privileges, returns fp to where it was when called // if path passed: file is opened & closed offset = -1; @@ -36832,7 +36832,7 @@ const si1 *STR_tern_m13(tern val) } -si1 *STR_time_m13(LEVEL_HEADER_m13 *level_header, si8 uutc, si1 *time_str, tern fixed_width, tern relative_days, si4 colored_text, ...) // time_str buffer sould be of length TIME_STRING_BYTES_m13 +si1 *STR_time_m13(LEVEL_HEADER_m13 *level_header, si8 uutc, si1 *time_str, tern fixed_width, tern relative_days, si4 colored_text, ...) // time_str buffer should be of length TIME_STRING_BYTES_m13 { si1 *standard_timezone_acronym, *standard_timezone_string, *date_color, *time_color, *color_reset, *meridian; const si1 *mos[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; @@ -37880,7 +37880,7 @@ tern TR_send_message_m13(TR_INFO_m13 *trans_info, ui1 type, tern encrypt, si1 *f } -si8 TR_send_transmission_m13(TR_INFO_m13 *trans_info) // expanded_key can be NULL if not encypting +si8 TR_send_transmission_m13(TR_INFO_m13 *trans_info) // expanded_key can be NULL if not encrypting { tern password_passed, acknowledge, no_destruct_flag; ui1 *buffer, *data; @@ -40544,7 +40544,7 @@ FILE_m13 *fopen_m13(si1 *path, si1 *mode, ...) // varargs(mode == NULL): si1 *m if (fp == NULL) return(NULL); if (permissions) - fp->permissions = permissions; // custom permissions (overwitten by system permission if opened as read only) + fp->permissions = permissions; // custom permissions (overwritten by system permission if opened as read only) if (flags) fp->flags = flags; @@ -40709,7 +40709,7 @@ FILE_m13 *fopen_m13(si1 *path, si1 *mode, ...) // varargs(mode == NULL): si1 *m if (write_mode == TRUE_m13 || plus_mode == TRUE_m13) fp->flags |= FILE_FLAGS_WRITE_m13; - // set permissions to file system valuess (may have been altered by umask) + // set permissions to file system values (may have been altered by umask) #if defined MACOS_m13 || defined LINUX_m13 fp->permissions = (ui2) sb.st_mode & FILE_PERM_STAT_MASK_m13; #endif @@ -40913,7 +40913,7 @@ void AT_free_2D_m13(const si1 *function, void **ptr, size_t dim1) void *base_address; - // dim1 == 0 indicates allocated en bloc per caller (caller could just use free_m13() in this case, as here) + // dim1 == 0 indicates allocated en block per caller (caller could just use free_m13() in this case, as here) if (dim1 == 0) { #ifdef AT_DEBUG_m13 AT_free_m13(function, (void *) ptr); @@ -40923,7 +40923,7 @@ void AT_free_2D_m13(const si1 *function, void **ptr, size_t dim1) return; } - // allocated en bloc (check all addresses because pointers may have been sorted) + // allocated en block (check all addresses because pointers may have been sorted) base_address = (void *) ((ui1 *) ptr + (dim1 * sizeof(void *))); for (i = 0; i < dim1; ++i) { if (ptr[i] == base_address) { diff --git a/medlib_m13.h b/medlib_m13.h index b84ebb9..5c4d74c 100644 --- a/medlib_m13.h +++ b/medlib_m13.h @@ -92,7 +92,7 @@ // All library versions associated with a particular major format version are guaranteed to work on MED files of that major version. // Minor format versions may add fields to the format in protected regions, but no preexisting fields will be removed or moved. -// Only library versions released on or afer a minor version will make use of new fields, and only if the minor version of the files contains them. +// Only library versions released on or after a minor version will make use of new fields, and only if the minor version of the files contains them. // Backward compatibility will be maintained between major versions if practical. @@ -288,7 +288,7 @@ typedef struct { } REC_Sgmt_v11_m13; // Description follows acquisition_channel_number in structure. -// The description is an aribitrary length array of si1s padded to 16 byte alignment (total of structure + string). +// The description is an arbitrary length array of si1s padded to 16 byte alignment (total of structure + string). typedef struct { si8 end_time; @@ -310,7 +310,7 @@ typedef struct { } REC_Sgmt_v10_m13; // version 1.0 included for backward compatibility // Description follows sampling_frequency / frame_rate in structure. -// The description is an aribitrary length array of si1s padded to 16 byte alignment (total of structure + string). +// The description is an arbitrary length array of si1s padded to 16 byte alignment (total of structure + string). @@ -718,13 +718,13 @@ typedef struct { #define GFL_PATH_PARTS_MASK_m13 GFL_FULL_PATH_m13 // Other Options #define GFL_FREE_INPUT_LIST_m13 ((ui4) 16) -#define GFL_INCLUDE_PARITY_m13 ((ui4) 32) // files or directrories -#define GFL_INCLUDE_INVISIBLE_m13 ((ui4) 64) // files or directrories +#define GFL_INCLUDE_PARITY_m13 ((ui4) 32) // files or directories +#define GFL_INCLUDE_INVISIBLE_m13 ((ui4) 64) // files or directories // System Pipe flags #define SP_DEFAULT_m13 0 // no flags set (default) #define SP_TEE_TO_TERMINAL_m13 1 // print buffer(s) to terminal in addition to returning -#define SP_SEPARATE_STREAMS_m13 2 // return seprate "stdout" & "stderr" buffers (buffer = stdout, e_buffer = stderr), otherwise ganged +#define SP_SEPARATE_STREAMS_m13 2 // return separate "stdout" & "stderr" buffers (buffer = stdout, e_buffer = stderr), otherwise ganged // Spaces Constants #define NO_SPACES_m13 ((ui4) 0) @@ -1167,10 +1167,10 @@ typedef struct { #define FILE_FLAGS_MED_m13 ((ui2) 1 << 3) // file is a MED file #define FILE_FLAGS_READ_m13 ((ui2) 1 << 4) // file is open for reading #define FILE_FLAGS_WRITE_m13 ((ui2) 1 << 5) // file is open for writing -#define FILE_FLAGS_APPEND_m13 ((ui2) 1 << 5) // file is open in append mode (all writes will append regarless of fp) +#define FILE_FLAGS_APPEND_m13 ((ui2) 1 << 5) // file is open in append mode (all writes will append regardless of fp) #define FILE_FLAGS_LEN_m13 ((ui2) 1 << 6) // update len with each operation #define FILE_FLAGS_POS_m13 ((ui2) 1 << 7) // update pos with each operation -#define FILE_FLAGS_TIME_m13 ((ui2) 1 << 8) // update access time with each operation (global sets flag here, but flag supersedes global in exectution) +#define FILE_FLAGS_TIME_m13 ((ui2) 1 << 8) // update access time with each operation (global sets flag here, but flag supersedes global in execution) #define FILE_FLAGS_DEFAULT_m13 (FILE_FLAGS_LEN_m13 | FILE_FLAGS_POS_m13) #define FILE_FD_EPHEMERAL_m13 ((si4) -3) @@ -1347,7 +1347,7 @@ typedef struct { va_list args; } PAR_THREAD_INFO_m13; -// Protoypes +// Prototypes tern PAR_free_m13(PAR_INFO_m13 **par_info_ptr); PAR_INFO_m13 *PAR_init_m13(PAR_INFO_m13 *par_info, si1 *function, si1 *label, ...); // varargs(label != PAR_DEFAULTS_m13 or NULL): si4 priority, si1 *affinity, si4 detached PAR_INFO_m13 *PAR_launch_m13(PAR_INFO_m13 *par_info, ...); // varargs (par_info == NULL): si1 *function, si1 *label, si4 priority, si1 *affinity, si4 detached, @@ -2095,7 +2095,7 @@ typedef struct { #endif // AT_DEBUG_m13 // Miscellaneous si1 temp_dir[FULL_FILE_NAME_BYTES_m13]; // system temp directory (periodically auto-cleared) - si1 temp_file[FULL_FILE_NAME_BYTES_m13]; // full path to temp file (i.e. incudes temp_dir) + si1 temp_file[FULL_FILE_NAME_BYTES_m13]; // full path to temp file (i.e. includes temp_dir) // not thread safe => use G_unique_temp_file_m13() in threaded applications si1 file_lock_mode; // enable global file locking tern access_times; // record times of each structure & file access @@ -2318,7 +2318,7 @@ typedef struct { si1 type_string_terminal_zero; // not used - there for clarity }; }; -} RECORD_INDEX_m13; // m12 version for backward compatability +} RECORD_INDEX_m13; // m12 version for backward compatibility // Time Series Indices Structures typedef struct { @@ -2339,7 +2339,7 @@ typedef struct { si8 file_offset; // negative values indicate discontinuity (in time series & video indices) si8 start_time; ui1 pad[8]; -} GENERIC_INDEX_m13; // m12 version for backward compatability +} GENERIC_INDEX_m13; // m12 version for backward compatibility // All index structures are the same size, and have the same first two fields (hence GENERIC_INDEX_m13) typedef struct { @@ -2632,7 +2632,7 @@ typedef struct { FPS_m13 **record_data_fps; FPS_m13 **record_indices_fps; si1 path[FULL_FILE_NAME_BYTES_m13]; // full path to segmented session records directory (including directory itself) - si1 name[BASE_FILE_NAME_BYTES_m13]; // session name, duplcated in globals + si1 name[BASE_FILE_NAME_BYTES_m13]; // session name, duplicated in globals TIME_SLICE_m13 slice; } SEGMENTED_SESS_RECS_m13; #else // __cplusplus @@ -2853,7 +2853,7 @@ void G_pop_function_m13(void); void G_proc_error_clear_m13(LEVEL_HEADER_m13 *level_header); void G_proc_error_set_m13(LEVEL_HEADER_m13 *level_header); tern G_proc_error_state_m13(LEVEL_HEADER_m13 *level_header); -PROC_GLOBALS_m13 *G_proc_globals_m13(LEVEL_HEADER_m13 *level_header); // top of process heirarchy +PROC_GLOBALS_m13 *G_proc_globals_m13(LEVEL_HEADER_m13 *level_header); // top of process hierarchy void G_proc_globals_delete_m13(LEVEL_HEADER_m13 *level_header); PROC_GLOBALS_m13 *G_proc_globals_init_m13(LEVEL_HEADER_m13 *level_header); tern G_process_password_data_m13(FPS_m13 *fps, si1 *unspecified_pw); @@ -2954,7 +2954,7 @@ si8 WN_filetime_to_uutc_m13(ui1 *win_filetime); // for conversion of windows f //**********************************************************************************// -//******************** MED Alignmment Checking (ALCK) Functions ******************// +//******************** MED Alignment Checking (ALCK) Functions ******************// //**********************************************************************************// tern ALCK_all_m13(void); @@ -3797,7 +3797,7 @@ tern CMP_zero_buffers_m13(CMP_BUFFERS_m13 *buffers); // // "This library provides general CRC calculation & validation functions and an // operation to combine the CRCs of two sequences of bytes into a single CRC. -// The routines in this libary only work with the particular CRC-32 polynomial +// The routines in this library only work with the particular CRC-32 polynomial // provided here." // // Minor modifications for compatibility with the MED Library. @@ -3906,7 +3906,7 @@ si4 UTF8_wc_to_utf8_m13(si1 *dest, ui4 ch); // single character to UTF-8 //************************************* AES-128 **********************************// //**********************************************************************************// -// ATRIBUTION +// ATTRIBUTION // // Advanced Encryption Standard implementation in C. // By Niyaz PK @@ -4162,7 +4162,7 @@ QUANTFILT_DATA_m13 *FILT_alloc_quantfilt_data_m13(si8 len, si8 span); tern FILT_balance_m13(sf8 **a, si4 poles); si4 FILT_butter_m13(FILTPS_m13 *filtps); void FILT_complex_div_m13(FILT_COMPLEX_m13 *a, FILT_COMPLEX_m13 *b, FILT_COMPLEX_m13 *quotient); -void FILT_complex_exp_m13(FILT_COMPLEX_m13 *exponent, FILT_COMPLEX_m13 *ans); +void FILT_complex_exp_m13(FILT_COMPLEX_m13 *exponent, FILT_COMPLEX_m13 *and); void FILT_complex_mult_m13(FILT_COMPLEX_m13 *a, FILT_COMPLEX_m13 *b, FILT_COMPLEX_m13 *product); tern FILT_elmhes_m13(sf8 **a, si4 poles); tern FILT_excise_transients_m13(CPS_m13 *cps, si8 data_len, si8 *n_extrema); @@ -4203,7 +4203,7 @@ tern FILT_unsymmeig_m13(sf8 **a, si4 poles, FILT_COMPLEX_m13 *eigs); // read session by sample numbers // Samples specified, padding requested: // NOTE: There is potential for huge discontinuities being padded in output matrix, so samples are treated as relative. -// NOTE: If discontinuity does ocurr in the specified slice, a warning message is displayed that relative output was produced. +// NOTE: If discontinuity does occur in the specified slice, a warning message is displayed that relative output was produced. // start_time = time of start sample number // duration = (end_sample_number - start_sample_number) / ref_chan_samp_freq; // end_time = start_time + duration @@ -4290,7 +4290,7 @@ tern FILT_unsymmeig_m13(sf8 **a, si4 poles, FILT_COMPLEX_m13 *eigs); #define DM_MAXIMUM_INPUT_COUNT_m13 ((si8) -3) // value chosen to parallel DM_MAXIMUM_INPUT_FREQUENCY_m13 & not conflict with NUMBER_OF_SAMPLES_NO_ENTRY_m13 (-1) -// Note: if arrays are allocted as 2D arrays, array[0] is beginning of one dimensional array containing (channel_count * sample_count) values of specfified type +// Note: if arrays are allocated as 2D arrays, array[0] is beginning of one dimensional array containing (channel_count * sample_count) values of specfified type typedef struct { si8 channel_count; // defines dimension of allocated matrix: updated based on active channels si8 sample_count; // defines dimension of allocated matrix: if extent mode (EXTMD) == DM_EXTMD_SAMP_FREQ_m13, resultant sample count filled in @@ -4401,7 +4401,7 @@ tern DM_transpose_out_of_place_m13(DATA_MATRIX_m13 *in_matrix, DATA_MATRIX_m13 #define TR_E_ID_MISMATCH_STR_m13 "transmission ID mismatch" #define TR_E_TRANS_FAILED_STR_m13 "transmission failed" #define TR_E_CRC_MISMATCH_STR_m13 "checksum mismatch" -#define TR_E_NO_ACK_STR_m13 "no acknowlegment" +#define TR_E_NO_ACK_STR_m13 "no acknowledgment" // Transmission Flags #define TR_FLAGS_DEFAULT_m13 ((ui2) 0) @@ -4412,7 +4412,7 @@ tern DM_transpose_out_of_place_m13(DATA_MATRIX_m13 *in_matrix, DATA_MATRIX_m13 #define TR_FLAGS_CLOSE_m13 ((ui2) 1 << 4) // Bit 4 (close socket after send/recv) #define TR_FLAGS_ACKNOWLEDGE_m13 ((ui2) 1 << 5) // Bit 5 (acknowledge receipt with OK or retransmit) #define TR_FLAGS_CRC_m13 ((ui2) 1 << 6) // Bit 6 (calculate/check transmission CRC - last 4 bytes of transmission) -#define TR_FLAGS_NO_DESTRUCT_m13 ((ui2) 1 << 7) // Bit 7 (set if local memory should not be altered - applies to encrpyted transmissions & transmissions that exceed TR_MTU_BYTES_m13) +#define TR_FLAGS_NO_DESTRUCT_m13 ((ui2) 1 << 7) // Bit 7 (set if local memory should not be altered - applies to encrypted transmissions & transmissions that exceed TR_MTU_BYTES_m13) #define TR_FLAGS_TO_FILE_m13 ((ui2) 1 << 8) // Bit 8 (set if received data should go to a file rather than buffer - pseudo FTP) // TR Defaults @@ -4487,7 +4487,7 @@ typedef struct { }; }; }; - si8 transmission_bytes; // full size of tramsmitted data in bytes (*** does not include header ***) + si8 transmission_bytes; // full size of transmitted data in bytes (*** does not include header ***) si8 offset; // offset (in bytes) of packet data into full data (*** does not include header ***) } TR_HEADER_m13; @@ -4546,7 +4546,7 @@ si1 *TR_strerror(si4 err_num); // Notes: // // Western Sahara: -// DST is on most of the year and off during Ramadan, whose dates change annually in a way that is not accomodated by this schema. +// DST is on most of the year and off during Ramadan, whose dates change annually in a way that is not accommodated by this schema. // As Ramadan only lasts a month, and can occur at virtually any time of year, this table treats it as if it's Daylight Time // is it's Standard Time, and it does not observe DST. // @@ -4961,8 +4961,8 @@ si1 *TR_strerror(si4 err_num); #define TZ_COUNTRY_ALIASES_ENTRIES_m13 16 #define TZ_COUNTRY_ALIASES_TABLE_m13 { \ - { "CHINA", "PEOPLE'S REPUBIC OF CHINA" }, \ - { "CHINA", "PEOPLES REPUBIC OF CHINA" }, \ + { "CHINA", "PEOPLE'S REPUBLIC OF CHINA" }, \ + { "CHINA", "PEOPLES REPUBLIC OF CHINA" }, \ { "CZECH REPUBLIC", "CZECHIA" }, \ { "RUSSIA", "RUSSIAN FEDERATION" }, \ { "TURKS AND CAICOS", "TURKS & CAICOS" }, \ @@ -4987,7 +4987,7 @@ si1 *TR_strerror(si4 err_num); //**********************************************************************************// -//***************************** DATBASE (DB) FUNCTIONS ***************************// +//***************************** DATABASE (DB) FUNCTIONS ***************************// //**********************************************************************************// // Currently only postgres databases are supported. @@ -5055,7 +5055,7 @@ si4 vsnprintf_m13(si1 *target, si4 target_field_bytes, si1 *fmt, va_list args); si4 vsprintf_m13(si1 *target, si1 *fmt, va_list args); // standard functions with AT_DEBUG_m13 versions -#ifndef AT_DEBUG_m13 // use these protoypes in all cases, defines will convert if needed +#ifndef AT_DEBUG_m13 // use these prototypes in all cases, defines will convert if needed void *calloc_m13(size_t n_members, size_t el_size); void **calloc_2D_m13(size_t dim1, size_t dim2, size_t el_size, tern is_level_header); void free_m13(void *ptr); diff --git a/medrec_m12.c b/medrec_m12.c index fd8f224..967b8ca 100644 --- a/medrec_m12.c +++ b/medrec_m12.c @@ -89,7 +89,7 @@ // All library versions associated with a particular major format version are guaranteed to work on MED files of that major version. // Minor format versions may add fields to the format in protected regions, but no preexisting fields will be removed or moved. -// Only library versions released on or afer a minor version will make use of new fields, and only if the minor version of the files contains them. +// Only library versions released on or after a minor version will make use of new fields, and only if the minor version of the files contains them. // Backward compatibility will be maintained between major versions if practical. @@ -110,7 +110,7 @@ void REC_show_record_m12(FILE_PROCESSING_STRUCT_m12 *fps, RECORD_HEADER_m12 *rec G_message_m12("%s()\n", __FUNCTION__); #endif - // decrypt record body if necesary + // decrypt record body if necessary if (record_header->encryption_level > NO_ENCRYPTION_m12) G_decrypt_record_data_m12(fps, record_header, 1); diff --git a/medrec_m12.h b/medrec_m12.h index 6f9cf65..481bb44 100644 --- a/medrec_m12.h +++ b/medrec_m12.h @@ -89,7 +89,7 @@ // All library versions associated with a particular major format version are guaranteed to work on MED files of that major version. // Minor format versions may add fields to the format in protected regions, but no preexisting fields will be removed or moved. -// Only library versions released on or afer a minor version will make use of new fields, and only if the minor version of the files contains them. +// Only library versions released on or after a minor version will make use of new fields, and only if the minor version of the files contains them. // Backward compatibility will be maintained between major versions if practical. @@ -265,7 +265,7 @@ TERN_m12 REC_check_Stat_type_alignment_m12(ui1 *bytes); typedef struct { si8 duration; // microseconds (single element structure not really necessary, but done for consistency). } REC_EDFA_v10_m12; -// Annotation follows structure - aribitrary length array of si1s padded to 16 byte alignment (for structure + string) +// Annotation follows structure - arbitrary length array of si1s padded to 16 byte alignment (for structure + string) // Prototypes void REC_show_EDFA_type_m12(RECORD_HEADER_m12 *record_header); @@ -287,7 +287,7 @@ TERN_m12 REC_check_EDFA_type_alignment_m12(ui1 *bytes); // Structures // (none) -// Annotation follows header - aribitrary length array of si1s padded to 16 byte alignment +// Annotation follows header - arbitrary length array of si1s padded to 16 byte alignment // Version 1.1 #define REC_Note_v11_BYTES_m12 16 @@ -304,7 +304,7 @@ typedef struct { }; } REC_Note_v11_m12; -// Annotation begins in structure, but may extend beyond it - aribitrary length array of si1s padded to 16 byte alignment (struct plus excess text) +// Annotation begins in structure, but may extend beyond it - arbitrary length array of si1s padded to 16 byte alignment (struct plus excess text) // Prototypes @@ -390,7 +390,7 @@ TERN_m12 REC_check_Seiz_type_alignment_m12(ui1 *bytes); // Structures // (none) -// Log text follows header - aribitrary length array of si1s padded to 16 byte alignment +// Log text follows header - arbitrary length array of si1s padded to 16 byte alignment // Prototype void REC_show_SyLg_type_m12(RECORD_HEADER_m12 *record_header); diff --git a/medrec_m13.c b/medrec_m13.c index c317688..5495aa1 100644 --- a/medrec_m13.c +++ b/medrec_m13.c @@ -89,7 +89,7 @@ // All library versions associated with a particular major format version are guaranteed to work on MED files of that major version. // Minor format versions may add fields to the format in protected regions, but no preexisting fields will be removed or moved. -// Only library versions released on or afer a minor version will make use of new fields, and only if the minor version of the files contains them. +// Only library versions released on or after a minor version will make use of new fields, and only if the minor version of the files contains them. // Backward compatibility will be maintained between major versions if practical. @@ -110,7 +110,7 @@ tern REC_show_record_m13(FPS_m13 *fps, RECORD_HEADER_m13 *record_header, si8 rec G_push_function_m13(); #endif - // decrypt record body if necesary + // decrypt record body if necessary if (record_header->encryption_level > NO_ENCRYPTION_m13) G_decrypt_record_data_m13(fps, record_header, 1); diff --git a/medrec_m13.h b/medrec_m13.h index 45b5c67..34db33e 100644 --- a/medrec_m13.h +++ b/medrec_m13.h @@ -89,7 +89,7 @@ // All library versions associated with a particular major format version are guaranteed to work on MED files of that major version. // Minor format versions may add fields to the format in protected regions, but no preexisting fields will be removed or moved. -// Only library versions released on or afer a minor version will make use of new fields, and only if the minor version of the files contains them. +// Only library versions released on or after a minor version will make use of new fields, and only if the minor version of the files contains them. // Backward compatibility will be maintained between major versions if practical. @@ -264,7 +264,7 @@ tern REC_check_Stat_type_alignment_m13(ui1 *bytes); typedef struct { si8 duration; // microseconds (single element structure not really necessary, but done for consistency). } REC_EDFA_v10_m13; -// Annotation follows structure - aribitrary length array of si1s padded to 16 byte alignment (for structure + string) +// Annotation follows structure - arbitrary length array of si1s padded to 16 byte alignment (for structure + string) // Prototypes tern REC_show_EDFA_type_m13(RECORD_HEADER_m13 *record_header); @@ -286,7 +286,7 @@ tern REC_check_EDFA_type_alignment_m13(ui1 *bytes); // Structures // (none) -// Annotation follows header - aribitrary length array of si1s padded to 16 byte alignment +// Annotation follows header - arbitrary length array of si1s padded to 16 byte alignment // Version 1.1 #define REC_Note_v11_BYTES_m13 16 @@ -303,7 +303,7 @@ typedef struct { }; } REC_Note_v11_m13; -// Annotation begins in structure, but may extend beyond it - aribitrary length array of si1s padded to 16 byte alignment (struct plus excess text) +// Annotation begins in structure, but may extend beyond it - arbitrary length array of si1s padded to 16 byte alignment (struct plus excess text) // Prototypes @@ -389,7 +389,7 @@ tern REC_check_Seiz_type_alignment_m13(ui1 *bytes); // Structures // (none) -// Log text follows header - aribitrary length array of si1s padded to 16 byte alignment +// Log text follows header - arbitrary length array of si1s padded to 16 byte alignment // Prototype tern REC_show_SyLg_type_m13(RECORD_HEADER_m13 *record_header); diff --git a/mklib.sh b/mklib.sh index d8d741a..59c82f9 100644 --- a/mklib.sh +++ b/mklib.sh @@ -81,7 +81,7 @@ echo $CMD; echo " " $CMD -# build libaries +# build libraries LIBNAME="medlib_m12" if [ $BIN = "x86" ]; then TMP_CC_OPT="${CC_OPT} -arch x86_64" diff --git a/targets_m12.h b/targets_m12.h index c660a7e..6483aac 100644 --- a/targets_m12.h +++ b/targets_m12.h @@ -45,7 +45,7 @@ // #ifdef MATLAB_PERSISTENT_m12 // void mexExitFcn(void) { // - // // free session seperately to close files + // // free session separately to close files // free_session_m12(sess, TRUE_m12); // // // free everything else diff --git a/targets_m13.h b/targets_m13.h index 4896f3c..de2c2ea 100644 --- a/targets_m13.h +++ b/targets_m13.h @@ -49,7 +49,7 @@ // #ifdef MATLAB_PERSISTENT_m13 // void mexExitFcn(void) { // -// // free session seperately to close files +// // free session separately to close files // free_session_m13(sess, TRUE_m13); // // // free everything else (if using AT_DEBUG mode)