Fix typos
llvm-svn: 202018
This commit is contained in:
parent
4f8f890ade
commit
8f2d3f0f90
@ -301,7 +301,7 @@ void computeExternalSymbols(const char *fileName, set<string> *defined, set<stri
|
||||
}
|
||||
}
|
||||
|
||||
/* For each occurence of an external symbol in the object file named by
|
||||
/* For each occurrence of an external symbol in the object file named by
|
||||
by <fileName> that is a member of <hide>, renames it by prefixing
|
||||
with "__kmp_external_", writing back the file in-place
|
||||
*/
|
||||
|
||||
@ -259,7 +259,7 @@ WrongDefinition "Wrong definition."
|
||||
TLSSetValueFailed "Windows* OS: TLS Set Value failed."
|
||||
TLSOutOfIndexes "Windows* OS: TLS out of indexes."
|
||||
OBSOLETE "PDONE directive must be nested within a DO directive."
|
||||
CantGetNumAvailCPU "Cannot get number of availabe CPUs."
|
||||
CantGetNumAvailCPU "Cannot get number of available CPUs."
|
||||
AssumedNumCPU "Assumed number of CPUs is 2."
|
||||
ErrorInitializeAffinity "Error initializing affinity - not using affinity."
|
||||
AffThreadsMayMigrate "Threads may migrate across all available OS procs (granularity setting too coarse)."
|
||||
|
||||
@ -1179,7 +1179,7 @@ typedef struct kmpc_task_queue_t {
|
||||
kmp_int32 tq_hiwat; /* high-water mark for tq_nfull and queue scheduling */
|
||||
volatile kmp_int32 tq_flags; /* TQF_xxx */
|
||||
|
||||
/* bookkeeping for oustanding thunks */
|
||||
/* bookkeeping for outstanding thunks */
|
||||
struct kmpc_aligned_int32_t *tq_th_thunks; /* per-thread array for # of regular thunks currently being executed */
|
||||
kmp_int32 tq_nproc; /* number of thunks in the th_thunks array */
|
||||
|
||||
@ -2305,7 +2305,7 @@ typedef int (*launch_t)( int gtid );
|
||||
|
||||
typedef struct KMP_ALIGN_CACHE kmp_base_team {
|
||||
/*
|
||||
* Syncronization Data
|
||||
* Synchronization Data
|
||||
*/
|
||||
KMP_ALIGN_CACHE kmp_ordered_team_t t_ordered;
|
||||
kmp_balign_team_t t_bar[ bs_last_barrier ];
|
||||
|
||||
@ -320,7 +320,7 @@ __kmp_affinity_cmp_Address_child_num(const void *a, const void *b)
|
||||
// When sorting by labels, __kmp_affinity_assign_child_nums() must first be
|
||||
// called to renumber the labels from [0..n] and place them into the child_num
|
||||
// vector of the address object. This is done in case the labels used for
|
||||
// the children at one node of the heirarchy differ from those used for
|
||||
// the children at one node of the hierarchy differ from those used for
|
||||
// another node at the same level. Example: suppose the machine has 2 nodes
|
||||
// with 2 packages each. The first node contains packages 601 and 602, and
|
||||
// second node contains packages 603 and 604. If we try to sort the table
|
||||
@ -1740,7 +1740,7 @@ __kmp_affinity_create_cpuinfo_map(AddrUnsPair **address2os, int *line,
|
||||
|
||||
//
|
||||
// Scan of the file, and count the number of "processor" (osId) fields,
|
||||
// and find the higest value of <n> for a node_<n> field.
|
||||
// and find the highest value of <n> for a node_<n> field.
|
||||
//
|
||||
char buf[256];
|
||||
unsigned num_records = 0;
|
||||
@ -2512,7 +2512,7 @@ __kmp_create_masks(unsigned *maxIndex, unsigned *numUnique,
|
||||
KMP_CPU_SET(address2os[0].second, sum);
|
||||
for (i = 1; i < numAddrs; i++) {
|
||||
//
|
||||
// If this thread is sufficiently close to the leader (withing the
|
||||
// If this thread is sufficiently close to the leader (within the
|
||||
// granularity setting), then set the bit for this os thread in the
|
||||
// affinity mask for this group, and go on to the next thread.
|
||||
//
|
||||
@ -3368,7 +3368,7 @@ __kmp_aux_affinity_initialize(void)
|
||||
kmp_i18n_id_t msg_id = kmp_i18n_null;
|
||||
|
||||
//
|
||||
// For backward compatiblity, setting KMP_CPUINFO_FILE =>
|
||||
// For backward compatibility, setting KMP_CPUINFO_FILE =>
|
||||
// KMP_TOPOLOGY_METHOD=cpuinfo
|
||||
//
|
||||
if ((__kmp_cpuinfo_file != NULL) &&
|
||||
@ -4055,7 +4055,7 @@ __kmp_affinity_set_place(int gtid)
|
||||
gtid, th->th.th_new_place, th->th.th_current_place));
|
||||
|
||||
//
|
||||
// Check that the new place is withing this thread's partition.
|
||||
// Check that the new place is within this thread's partition.
|
||||
//
|
||||
KMP_DEBUG_ASSERT(th->th.th_affin_mask != NULL);
|
||||
KMP_DEBUG_ASSERT(th->th.th_new_place >= 0);
|
||||
|
||||
@ -260,7 +260,7 @@ compare_and_swap< kmp_int64 >( volatile kmp_int64 *p, kmp_int64 c, kmp_int64 s )
|
||||
Does NOT put threads to sleep.
|
||||
#if USE_ITT_BUILD
|
||||
Arguments:
|
||||
obj -- is higher-level syncronization object to report to ittnotify. It is used to report
|
||||
obj -- is higher-level synchronization object to report to ittnotify. It is used to report
|
||||
locks consistently. For example, if lock is acquired immediately, its address is
|
||||
reported to ittnotify via KMP_FSYNC_ACQUIRED(). However, it lock cannot be acquired
|
||||
immediately and lock routine calls to KMP_WAIT_YIELD(), the later should report the same
|
||||
|
||||
@ -30,13 +30,13 @@
|
||||
#endif // __cplusplus
|
||||
|
||||
/*
|
||||
* For compatiblity with the Gnu/MS Open MP codegen, omp_set_num_threads(),
|
||||
* For compatibility with the Gnu/MS Open MP codegen, omp_set_num_threads(),
|
||||
* omp_set_nested(), and omp_set_dynamic() [in lowercase on MS, and w/o
|
||||
* a trailing underscore on Linux* OS] take call by value integer arguments.
|
||||
* + omp_set_max_active_levels()
|
||||
* + omp_set_schedule()
|
||||
*
|
||||
* For backward compatiblity with 9.1 and previous Intel compiler, these
|
||||
* For backward compatibility with 9.1 and previous Intel compiler, these
|
||||
* entry points take call by reference integer arguments.
|
||||
*/
|
||||
#ifdef KMP_GOMP_COMPAT
|
||||
|
||||
@ -358,7 +358,7 @@ KMP_ALIGN_CACHE
|
||||
kmp_global_t __kmp_global = {{ 0 }};
|
||||
|
||||
/* ----------------------------------------------- */
|
||||
/* GLOBAL SYNCRONIZATION LOCKS */
|
||||
/* GLOBAL SYNCHRONIZATION LOCKS */
|
||||
/* TODO verify the need for these locks and if they need to be global */
|
||||
KMP_ALIGN_CACHE
|
||||
|
||||
|
||||
@ -361,7 +361,7 @@ __kmp_i18n_do_catopen(
|
||||
reinterpret_cast< LPCSTR >( & __kmp_i18n_do_catopen ),
|
||||
& handle
|
||||
);
|
||||
if ( ! brc ) { // Error occured.
|
||||
if ( ! brc ) { // Error occurred.
|
||||
status = KMP_I18N_ABSENT; // mark catalog as absent so it will not be re-opened.
|
||||
goto end;
|
||||
// TODO: Enable multiple messages (KMP_MSG) to be passed to __kmp_msg; and print
|
||||
@ -371,7 +371,7 @@ __kmp_i18n_do_catopen(
|
||||
// Now get path to the our DLL.
|
||||
for ( ; ; ) {
|
||||
DWORD drc = GetModuleFileName( handle, path.str, path.size );
|
||||
if ( drc == 0 ) { // Error occured.
|
||||
if ( drc == 0 ) { // Error occurred.
|
||||
status = KMP_I18N_ABSENT;
|
||||
goto end;
|
||||
}; // if
|
||||
@ -473,7 +473,7 @@ __kmp_i18n_catclose(
|
||||
/*
|
||||
We use FormatMessage() to get strings from catalog, get system error messages, etc.
|
||||
FormatMessage() tends to return Windows* OS-style end-of-lines, "\r\n". When string is printed,
|
||||
printf() also replaces all the occurences of "\n" with "\r\n" (again!), so sequences like
|
||||
printf() also replaces all the occurrences of "\n" with "\r\n" (again!), so sequences like
|
||||
"\r\r\r\n" appear in output. It is not too good.
|
||||
|
||||
Additional mess comes from message catalog: Our catalog source en_US.mc file (generated by
|
||||
@ -492,7 +492,7 @@ __kmp_i18n_catclose(
|
||||
Thus, stripping all "\r" normalizes string and returns it to canonical form, so printf() will
|
||||
produce correct end-of-line sequences.
|
||||
|
||||
___strip_crs() serves for this purpose: it removes all the occurences of "\r" in-place and
|
||||
___strip_crs() serves for this purpose: it removes all the occurrences of "\r" in-place and
|
||||
returns new length of string.
|
||||
*/
|
||||
static
|
||||
|
||||
@ -515,7 +515,7 @@ __kmp_itt_task_finished(
|
||||
|
||||
* __kmp_itt_lock_creating( lock ) should be called *before* the first lock operation
|
||||
(set/unset). It is not a real event shown to the user but just setting a name for
|
||||
syncronization object. `lock' is an address of sync object, the same address should be
|
||||
synchronization object. `lock' is an address of sync object, the same address should be
|
||||
used in all subsequent calls.
|
||||
|
||||
* __kmp_itt_lock_acquiring() should be called before setting the lock.
|
||||
|
||||
@ -484,7 +484,7 @@ __kmp_acquire_futex_lock_timed_template( kmp_futex_lock_t *lck, kmp_int32 gtid )
|
||||
KA_TRACE( 1000, ("__kmp_acquire_futex_lock: lck:%p, T#%d after futex_wait(0x%x)\n",
|
||||
lck, gtid, poll_val ) );
|
||||
//
|
||||
// This thread has now done a succesful futex wait call and was
|
||||
// This thread has now done a successful futex wait call and was
|
||||
// entered on the OS futex queue. We must now perform a futex
|
||||
// wake call when releasing the lock, as we have no idea how many
|
||||
// other threads are in the queue.
|
||||
@ -2548,7 +2548,7 @@ __kmp_acquire_drdpa_lock_timed_template( kmp_drdpa_lock_t *lck, kmp_int32 gtid )
|
||||
|
||||
//
|
||||
// If we are oversubscribed,
|
||||
// or ahve waited a bit (and KMP_LIBRARY=turnaround), then yield.
|
||||
// or have waited a bit (and KMP_LIBRARY=turnaround), then yield.
|
||||
// CPU Pause is in the macros for yield.
|
||||
//
|
||||
KMP_YIELD(TCR_4(__kmp_nth)
|
||||
@ -2733,7 +2733,7 @@ __kmp_test_drdpa_lock( kmp_drdpa_lock_t *lck, kmp_int32 gtid )
|
||||
lck->lk.now_serving = ticket; // non-volatile store
|
||||
|
||||
//
|
||||
// Since no threads are waiting, there is no possiblity that
|
||||
// Since no threads are waiting, there is no possibility that
|
||||
// we would want to reconfigure the polling area. We might
|
||||
// have the cleanup ticket value (which says that it is now
|
||||
// safe to deallocate old_polls), but we'll let a later thread
|
||||
|
||||
@ -415,7 +415,7 @@ struct kmp_base_drdpa_lock {
|
||||
|
||||
//
|
||||
// now_serving is used to store our ticket value while we hold the lock.
|
||||
// It has a slighly different meaning in the DRDPA ticket locks (where
|
||||
// It has a slightly different meaning in the DRDPA ticket locks (where
|
||||
// it is written by the acquiring thread) than it does in the simple
|
||||
// ticket locks (where it is written by the releasing thread).
|
||||
//
|
||||
|
||||
@ -1987,7 +1987,7 @@ __kmp_barrier( enum barrier_type bt, int gtid, int is_split,
|
||||
}; // if
|
||||
|
||||
#if USE_ITT_BUILD
|
||||
// TODO: In case of split reduction barrier, master thread may send aquired event early,
|
||||
// TODO: In case of split reduction barrier, master thread may send acquired event early,
|
||||
// before the final summation into the shared variable is done (final summation can be a
|
||||
// long operation for array reductions).
|
||||
if ( __itt_sync_create_ptr || KMP_ITT_DEBUG )
|
||||
@ -4366,7 +4366,7 @@ __kmp_expand_threads(int nWish, int nNeed) {
|
||||
added += newCapacity - __kmp_threads_capacity;
|
||||
*(volatile int*)&__kmp_threads_capacity = newCapacity;
|
||||
__kmp_release_bootstrap_lock(&__kmp_tp_cached_lock);
|
||||
break; /* succeded, so we can exit the loop */
|
||||
break; /* succeeded, so we can exit the loop */
|
||||
}
|
||||
}
|
||||
return added;
|
||||
@ -4458,7 +4458,7 @@ __kmp_register_root( int initial_thread )
|
||||
|
||||
#ifdef KMP_ADJUST_BLOCKTIME
|
||||
/* Adjust blocktime to zero if necessary */
|
||||
/* Middle initialization might not have ocurred yet */
|
||||
/* Middle initialization might not have occurred yet */
|
||||
if ( !__kmp_env_blocktime && ( __kmp_avail_proc > 0 ) ) {
|
||||
if ( __kmp_nth > __kmp_avail_proc ) {
|
||||
__kmp_zero_bt = TRUE;
|
||||
@ -4863,7 +4863,7 @@ __kmp_allocate_thread( kmp_root_t *root, kmp_team_t *team, int new_tid )
|
||||
|
||||
#ifdef KMP_ADJUST_BLOCKTIME
|
||||
/* Adjust blocktime back to zero if necessar y */
|
||||
/* Middle initialization might not have ocurred yet */
|
||||
/* Middle initialization might not have occurred yet */
|
||||
if ( !__kmp_env_blocktime && ( __kmp_avail_proc > 0 ) ) {
|
||||
if ( __kmp_nth > __kmp_avail_proc ) {
|
||||
__kmp_zero_bt = TRUE;
|
||||
@ -5016,7 +5016,7 @@ __kmp_allocate_thread( kmp_root_t *root, kmp_team_t *team, int new_tid )
|
||||
|
||||
#ifdef KMP_ADJUST_BLOCKTIME
|
||||
/* Adjust blocktime back to zero if necessary */
|
||||
/* Middle initialization might not have ocurred yet */
|
||||
/* Middle initialization might not have occurred yet */
|
||||
if ( !__kmp_env_blocktime && ( __kmp_avail_proc > 0 ) ) {
|
||||
if ( __kmp_nth > __kmp_avail_proc ) {
|
||||
__kmp_zero_bt = TRUE;
|
||||
@ -5253,7 +5253,7 @@ __kmp_set_thread_affinity_mask_full_tmp( kmp_affin_mask_t *old_mask )
|
||||
//
|
||||
// __kmp_partition_places() is the heart of the OpenMP 4.0 affinity mechanism.
|
||||
// It calculats the worker + master thread's partition based upon the parent
|
||||
// thread's partition, and binds each worker to a thread in thier partition.
|
||||
// thread's partition, and binds each worker to a thread in their partition.
|
||||
// The master thread's partition should already include its current binding.
|
||||
//
|
||||
static void
|
||||
@ -6152,7 +6152,7 @@ __kmp_free_thread( kmp_info_t *this_th )
|
||||
|
||||
#ifdef KMP_ADJUST_BLOCKTIME
|
||||
/* Adjust blocktime back to user setting or default if necessary */
|
||||
/* Middle initialization might never have ocurred */
|
||||
/* Middle initialization might never have occurred */
|
||||
if ( !__kmp_env_blocktime && ( __kmp_avail_proc > 0 ) ) {
|
||||
KMP_DEBUG_ASSERT( __kmp_avail_proc > 0 );
|
||||
if ( __kmp_nth <= __kmp_avail_proc ) {
|
||||
@ -6691,7 +6691,7 @@ __kmp_reap_thread(
|
||||
int is_root
|
||||
) {
|
||||
|
||||
// It is assumed __kmp_forkjoin_lock is aquired.
|
||||
// It is assumed __kmp_forkjoin_lock is acquired.
|
||||
|
||||
int gtid;
|
||||
|
||||
@ -6756,7 +6756,7 @@ __kmp_reap_thread(
|
||||
|
||||
#ifdef KMP_ADJUST_BLOCKTIME
|
||||
/* Adjust blocktime back to user setting or default if necessary */
|
||||
/* Middle initialization might never have ocurred */
|
||||
/* Middle initialization might never have occurred */
|
||||
if ( !__kmp_env_blocktime && ( __kmp_avail_proc > 0 ) ) {
|
||||
KMP_DEBUG_ASSERT( __kmp_avail_proc > 0 );
|
||||
if ( __kmp_nth <= __kmp_avail_proc ) {
|
||||
|
||||
@ -210,7 +210,7 @@ __kmp_convert_to_seconds( char const * data )
|
||||
Here, multipliers are like __kmp_convert_to_seconds, but floating-point
|
||||
values are allowed, and the return value is in milliseconds. The default
|
||||
multiplier is milliseconds. Returns INT_MAX only if the value specified
|
||||
matches "infinit*". Returns -1 if specified string is invalid.
|
||||
matches "infinite*". Returns -1 if specified string is invalid.
|
||||
*/
|
||||
int
|
||||
__kmp_convert_to_milliseconds( char const * data )
|
||||
@ -220,7 +220,7 @@ __kmp_convert_to_milliseconds( char const * data )
|
||||
double value;
|
||||
|
||||
if (data == NULL) return (-1);
|
||||
if ( __kmp_str_match( "infinit", -1, data)) return (INT_MAX);
|
||||
if ( __kmp_str_match( "infinite", -1, data)) return (INT_MAX);
|
||||
value = (double) 0.0;
|
||||
mult = '\0';
|
||||
nvalues = sscanf (data, "%lf%c%c", &value, &mult, &extra);
|
||||
@ -442,7 +442,7 @@ __kmp_stg_parse_size(
|
||||
#endif
|
||||
}; // if
|
||||
} else {
|
||||
// If integer overflow occured, * out == KMP_SIZE_T_MAX. Cut it to size_max silently.
|
||||
// If integer overflow occurred, * out == KMP_SIZE_T_MAX. Cut it to size_max silently.
|
||||
if ( * out < size_min ) {
|
||||
* out = size_max;
|
||||
}
|
||||
@ -493,7 +493,7 @@ __kmp_stg_parse_int(
|
||||
uint = max;
|
||||
}; // if
|
||||
} else {
|
||||
// If overflow occured msg contains error message and uint is very big. Cut tmp it
|
||||
// If overflow occurred msg contains error message and uint is very big. Cut tmp it
|
||||
// to INT_MAX.
|
||||
if ( uint < (unsigned int)min ) {
|
||||
uint = min;
|
||||
|
||||
@ -226,7 +226,7 @@ __kmp_str_buf_vprint(
|
||||
break;
|
||||
}; // if
|
||||
|
||||
// Error occured, buffer is too small.
|
||||
// Error occurred, buffer is too small.
|
||||
if ( rc >= 0 ) {
|
||||
// C99-conforming implementation of vsnprintf returns required buffer size.
|
||||
size = buffer->used + rc + 1;
|
||||
@ -512,7 +512,7 @@ __kmp_str_format( // Allocated string.
|
||||
break;
|
||||
}; // if
|
||||
|
||||
// Error occured, buffer is too small.
|
||||
// Error occurred, buffer is too small.
|
||||
if ( rc >= 0 ) {
|
||||
// C99-conforming implementation of vsnprintf returns required buffer size.
|
||||
size = rc + 1;
|
||||
|
||||
@ -1643,7 +1643,7 @@ __kmp_execute_tasks( kmp_info_t *thread,
|
||||
__kmp_resume( __kmp_gtid_from_thread( other_thread ), NULL );
|
||||
|
||||
// A sleeping thread should not have any tasks on it's queue.
|
||||
// There is a slight possiblility that it resumes, steals a task from
|
||||
// There is a slight possibility that it resumes, steals a task from
|
||||
// another thread, which spawns more tasks, all in the that it takes
|
||||
// this thread to check => don't write an assertion that the victim's
|
||||
// queue is empty. Try stealing from a different thread.
|
||||
|
||||
@ -1008,7 +1008,7 @@ endif
|
||||
|
||||
# Copy object files, wiping out references to libirc library. Object files (ours and extracted
|
||||
# from libirc.lib) have "-defaultlib:libirc.lib" linker directive, so linker will require libirc.lib
|
||||
# regardless of absense of real dependency. Actually, this rule is required only on Windows* OS, but
|
||||
# regardless of absence of real dependency. Actually, this rule is required only on Windows* OS, but
|
||||
# there is no Windows* OS-specific commands, so I omit conditions to keep code shorter and be able test
|
||||
# the rule on Linux* OS.
|
||||
# Note: If we are not going to pick up objects from libirc, there is no point in wiping out
|
||||
@ -1227,7 +1227,7 @@ ifneq "$(os)" "lrb"
|
||||
tt-libs += $(imp_file)
|
||||
endif
|
||||
ifneq "$(arch)" "32"
|
||||
# To succesfully build with VS2008
|
||||
# To successfully build with VS2008
|
||||
# tt-libs += bufferoverflowu.lib
|
||||
# Preventing "unresolved external symbol __security_cookie" (and
|
||||
# "... __security_check_cookie") linker errors on win_32e and win_64.
|
||||
|
||||
@ -2044,7 +2044,7 @@ void ITTAPI __itt_frame_end_v3(const __itt_domain *domain, __itt_id *id);
|
||||
* take the current timestamp as the end timestamp.
|
||||
* @param[in] domain The domain for this frame instance
|
||||
* @param[in] id The instance ID for this frame instance or NULL
|
||||
* @param[in] begin Timestamp of the beggining of the frame
|
||||
* @param[in] begin Timestamp of the beginning of the frame
|
||||
* @param[in] end Timestamp of the end of the frame
|
||||
*/
|
||||
void ITTAPI __itt_frame_submit_v3(const __itt_domain *domain, __itt_id *id,
|
||||
|
||||
@ -428,7 +428,7 @@ ITT_STUBV(ITTAPI, void, sync_set_name, (void *addr, const char *objtype, con
|
||||
* @param[in] objname - null-terminated object name string. If NULL, no name will be assigned
|
||||
* to the object -- you can use the __itt_sync_rename call later to assign
|
||||
* the name
|
||||
* @param[in] typelen, namelen - a lenght of string for appropriate objtype and objname parameter
|
||||
* @param[in] typelen, namelen - a length of string for appropriate objtype and objname parameter
|
||||
* @param[in] attribute - one of [#__itt_attr_barrier, #__itt_attr_mutex] values which defines the
|
||||
* exact semantics of how prepare/acquired/releasing calls work.
|
||||
* @return __itt_err upon failure (name or namelen being null,name and namelen mismatched)
|
||||
|
||||
@ -227,7 +227,7 @@ __kmp_affinity_determine_capable(const char *env_var)
|
||||
// then we don't have to search for an appropriate size.
|
||||
gCode = syscall( __NR_sched_getaffinity, 0, KMP_CPU_SET_SIZE_LIMIT, buf );
|
||||
KA_TRACE(30, ( "__kmp_affinity_determine_capable: "
|
||||
"intial getaffinity call returned %d errno = %d\n",
|
||||
"initial getaffinity call returned %d errno = %d\n",
|
||||
gCode, errno));
|
||||
|
||||
//if ((gCode < 0) && (errno == ENOSYS))
|
||||
@ -2281,7 +2281,7 @@ __kmp_get_load_balance( int max )
|
||||
ret_avg = averages[1];// 5 min
|
||||
} else if ( ( __kmp_load_balance_interval >= 600 ) && ( res == 3 ) ) {
|
||||
ret_avg = averages[2];// 15 min
|
||||
} else {// Error occured
|
||||
} else {// Error occurred
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -262,7 +262,7 @@ variable before use. See examples.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
Replace occurences of C<$year>, C<$month>, and C<$day> in C<input.txt> file with C<2007>, C<09>, C<01>
|
||||
Replace occurrences of C<$year>, C<$month>, and C<$day> in C<input.txt> file with C<2007>, C<09>, C<01>
|
||||
respectively and write result to C<output.txt> file:
|
||||
|
||||
$ cat input.var
|
||||
|
||||
@ -216,7 +216,7 @@ B<generate-def.pl> I<OPTION>... I<file>
|
||||
|
||||
=item B<-D> I<name>[=I<value>]
|
||||
|
||||
Define specified name. If I<value> is ommitted, I<name> is defined to 1. If I<value> is 0 or empty,
|
||||
Define specified name. If I<value> is omitted, I<name> is defined to 1. If I<value> is 0 or empty,
|
||||
name is B<not> defined.
|
||||
|
||||
=item B<--output=>I<file>
|
||||
@ -284,7 +284,7 @@ Comments start with C<#> symbol and continue to the end of line.
|
||||
%ifndef name
|
||||
%endif
|
||||
|
||||
A part of file surronded by C<%ifdef I<name>> and C<%endif> directives is a conditional part -- it
|
||||
A part of file surrounded by C<%ifdef I<name>> and C<%endif> directives is a conditional part -- it
|
||||
has effect only if I<name> is defined in the comman line by B<--define> option. C<%ifndef> is a
|
||||
negated version of C<%ifdef> -- conditional part has an effect only if I<name> is B<not> defined.
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ my @aux =
|
||||
qw{ host_name domain_name },
|
||||
map( "operating_system_$_", qw{ name release codename description } )
|
||||
);
|
||||
# Auxillary properties.
|
||||
# Auxiliary properties.
|
||||
my @all = ( @base, @aux );
|
||||
# All the properties.
|
||||
my @meta = qw{ base_names all_names value };
|
||||
@ -209,7 +209,7 @@ if ( 0 ) {
|
||||
if ( 0 ) {
|
||||
} elsif ( $values{ kernel_name } eq "Linux" ) {
|
||||
$values{ operating_system } = "GNU/Linux";
|
||||
my $release; # Name of choosen "*-release" file.
|
||||
my $release; # Name of chosen "*-release" file.
|
||||
my $bulk; # Content of release file.
|
||||
# On Ubuntu, lsb-release is quite informative, e. g.:
|
||||
# DISTRIB_ID=Ubuntu
|
||||
@ -454,7 +454,7 @@ C</bin/uname> and C<POSIX::uname()>.
|
||||
$hardware_platform = Uname::hardware_platform();
|
||||
$operating_system = Uname::operating_system();
|
||||
|
||||
# Auxillary property functions.
|
||||
# Auxiliary property functions.
|
||||
$host_name = Uname::host_name();
|
||||
$domain_name = Uname::domain_name();
|
||||
$os_name = Uname::operating_system_name();
|
||||
@ -547,11 +547,11 @@ One of: C<GNU/Linux>, C<OS X*>, or C<MS Windows>.
|
||||
|
||||
=back
|
||||
|
||||
=head2 Auxillary Functions
|
||||
=head2 Auxiliary Functions
|
||||
|
||||
Auxillary functions extends base functions with information not reported by C<uname> program.
|
||||
Auxiliary functions extends base functions with information not reported by C<uname> program.
|
||||
|
||||
Auxillary functions collect information from different sources. For example, on OS X*, they may
|
||||
Auxiliary functions collect information from different sources. For example, on OS X*, they may
|
||||
call C<sw_vers> program to find out OS release; on Linux* OS they may parse C</etc/redhat-release> file,
|
||||
etc.
|
||||
|
||||
|
||||
@ -544,7 +544,7 @@ sub question($;\$$) {
|
||||
my $a = ( defined( $answer ) ? $$answer : undef );
|
||||
|
||||
if ( ref( $choices ) eq "Regexp" ) {
|
||||
# It is aready a regular expression, do nothing.
|
||||
# It is already a regular expression, do nothing.
|
||||
} elsif ( defined( $choices ) ) {
|
||||
# Convert string to a regular expression.
|
||||
$choices = qr/[@{ [ quotemeta( $choices ) ] }]/i;
|
||||
@ -705,7 +705,7 @@ Look for all occurenses of "cp" in the PATH:
|
||||
|
||||
my @cps = which( "cp", -all => 1 );
|
||||
|
||||
Look for the first occurence of "icc" in the specified directories:
|
||||
Look for the first occurrence of "icc" in the specified directories:
|
||||
|
||||
my $icc = which( "icc", -dirs => [ ".", "/usr/local/bin", "/usr/bin", "/bin" ] );
|
||||
|
||||
@ -1163,7 +1163,7 @@ sub del_dir($@) {
|
||||
|
||||
Change current directory.
|
||||
|
||||
If any error occured, error issues and script exits.
|
||||
If any error occurred, error issues and script exits.
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
@ -92,12 +92,12 @@ sub dump_symbols($$$) {
|
||||
|
||||
# --------------------------------------------------------------------------------------------------
|
||||
# Name:
|
||||
# load_symbols -- Fullfill objects data structure with symbol names.
|
||||
# load_symbols -- Fulfill objects data structure with symbol names.
|
||||
# Synopsis:
|
||||
# load_symbols( $objects );
|
||||
# Arguments:
|
||||
# $objects (in/out) -- Set of objects. On enter, it is expected that top-level hash has filled
|
||||
# with object names only. On exit, it is completely fullfilled with lists of symbols
|
||||
# with object names only. On exit, it is completely fulfilled with lists of symbols
|
||||
# defined or referenced in each object file.
|
||||
# Returns:
|
||||
# Nothing.
|
||||
@ -333,7 +333,7 @@ sub _required_extra_objects($$$$) {
|
||||
# Arguments:
|
||||
# $base (in/out) -- A set of base objects to be searched for undefined symbols. On enter, it is
|
||||
# expected that top-level hash has filled with object names only. On exit, it is completely
|
||||
# fullfilled with lists of symbols defined and/or referenced in each object file.
|
||||
# fulfilled with lists of symbols defined and/or referenced in each object file.
|
||||
# $extra (in/out) -- A set of extra objects to be searched for defined symbols required to
|
||||
# resolve undefined symbols in a set of base objects. Usage is similar to base objects.
|
||||
# Returns:
|
||||
|
||||
@ -176,7 +176,7 @@ Wipe "defaultlib" directive in all the library files:
|
||||
wipe-string.pl --wipe-regexp="-defaultlib:[A-Za-z0-9_.]+" *.lib
|
||||
|
||||
(Be careful: the script does not analyze structure of library and object files, it just wipes
|
||||
U<strings>, so it wipes all the occurences of strings matching to specified regular expression.)
|
||||
U<strings>, so it wipes all the occurrences of strings matching to specified regular expression.)
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user