Skip to content

Commit

Permalink
[repatch] fixing a few typos in sources folder
Browse files Browse the repository at this point in the history
Repatched 9d7eeb9 (#441)
  • Loading branch information
fchapoton authored and tueda committed Apr 19, 2023
1 parent 8d58643 commit 2b32ea5
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 30 deletions.
18 changes: 9 additions & 9 deletions sources/extcmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
By default, the terminator if an empty line. For the current external
channel it can be set by means of the function
int setTerminatorForExternalChannel(newterminaror).
int setTerminatorForExternalChannel(newterminator).
The function returns 0 in success, or !0 if something is wrong (no
current channel, too long terminator).
Expand Down Expand Up @@ -110,7 +110,7 @@
List of all public functions:
int openExternalChannel(UBYTE *cmd,int daemonize,UBYTE *shellname, UBYTE * stderrname);
int initPresetExternalChannels(UBYTE *theline, int thetimeout);
int setTerminatorForExternalChannel(char *newterminaror);
int setTerminatorForExternalChannel(char *newterminator);
int setKillModeForExternalChannel(int signum, int sentToWholeGroup);
int closeExternalChannel(int n);
int selectExternalChannel(int n);
Expand Down Expand Up @@ -1054,7 +1054,7 @@ mysighandler_t oldPIPE=NULL;
/*Ignore SIGPIPE (up to the end of the process):*/
signal(SIGPIPE,SIG_IGN);

/*Wait on read() while the granchild close the pipe
/*Wait on read() while the grandchild close the pipe
(on success) or send -2 (if exec() fails).*/
/*There are two possibilities:
-1 -- this is ok, the pipe was closed on exec,
Expand All @@ -1064,7 +1064,7 @@ mysighandler_t oldPIPE=NULL;
*/
if( readpid(fdsig2[0]) != (pid_t)-1 )/*something is wrong*/
writepid(fdsig[1],(pid_t)-1);
else/*ok, send PID of the granchild to the father:*/
else/*ok, send PID of the grandchild to the father:*/
writepid(fdsig[1],childpid);
/*Die and free the life space for the grandchild:*/
_exit(0);/*The child, just exit, not return*/
Expand Down Expand Up @@ -1253,7 +1253,7 @@ static FORM_INLINE void *createExternalChannel(
}
#ifdef WITHMPI
if(h->pid<0)
statusbuf[0]='!';/*Brodcast fail to slaves*/
statusbuf[0]='!';/*Broadcast fail to slaves*/
}
/*else: Keep h->pid = 0 and h->fsend = 0 for slaves in parallel mode!*/

Expand Down Expand Up @@ -1339,7 +1339,7 @@ int i=0;
#] openExternalChannel :
#[ initPresetExternalChannels :
*/
/*Just simpe wrapper to invoke openExternalChannel()
/*Just simple wrapper to invoke openExternalChannel()
from initPresetExternalChannels():*/
static FORM_INLINE int openPresetExternalChannel(int fdin, int fdout, pid_t theppid)
{
Expand Down Expand Up @@ -1368,7 +1368,7 @@ r#,w# where r# is a read-only descriptor and w# is a write-only
descriptor. Alternatively, the environment variable FORM_PIPES can be
used.
The following function expects as the first argument
this comma-separated list of the desctiptor pairs and tries to
this comma-separated list of the descriptor pairs and tries to
initialize each of channel during thetimeout milliseconds:*/

int initPresetExternalChannels(UBYTE *theline, int thetimeout)
Expand Down Expand Up @@ -1412,7 +1412,7 @@ int initPresetExternalChannels(UBYTE *theline, int thetimeout)
if( ( *b != ',' ) || ( ppid != getpid() ) )goto presetFails;
/*read the parent PID:*/
/*The problem is that we do not know the the real type of pid_t.
But long should be ehough. On obsolete systems (when LONG_MAX
But long should be enough. On obsolete systems (when LONG_MAX
is not defined) we assume pid_t is 32-bit integer.
This can lead to problem with portability: */
ppid = (pid_t)str2i(b+1,&b,LONG_MAX);
Expand Down Expand Up @@ -1602,7 +1602,7 @@ int main (void)
printf("Initial channel:%d\n",last=openExternalChannel((UBYTE*)"cat",0,NULL,NULL));

if( ( i = setTerminatorForExternalChannel("qu") ) != 0 ) return 1;
printf("Terminaror is 'qu'\n");
printf("Terminator is 'qu'\n");

while ( fgets(buf, 1024, stdin) != NULL ) {
if ( *buf == 'N' ) {
Expand Down
2 changes: 1 addition & 1 deletion sources/mpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ int PF_Unpack(void *buffer, size_t count, MPI_Datatype type)
* the string. If the string does not fit to the buffer PF_packbuf,
* the function packs only the initial portion. It returns
* the number of packed bytes, so if (str[length-1]=='\0') then the whole
* string fits to the buffer, if not, then the rest (str+length) bust be
* string fits to the buffer, if not, then the rest (str+length) must be
* packed and send again. On error, the function returns the negative
* error code.
*
Expand Down
2 changes: 1 addition & 1 deletion sources/parallel.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ static int PF_InitTree(void)
}

if ( PF_root == NULL )
if ( ( PF_root = (NODE*)Malloc1(sizeof(NODE)*numnodes,"nodes in mergtree") ) == NULL )
if ( ( PF_root = (NODE*)Malloc1(sizeof(NODE)*numnodes,"nodes in mergetree") ) == NULL )
return(-1);
/*
then initialize all the nodes
Expand Down
4 changes: 2 additions & 2 deletions sources/polyfact.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
#include <string>

// First prime modulo which factorization is tried. Too small results
// in more unsuccesful attempts; too large is slower.
// in more unsuccessful attempts; too large is slower.
const int POLYFACT_FIRST_PRIME = 17;

// Fraction of [1,p) that is used for substitutions of variables. Too
// small results in more unsuccesful attempts; too large is slower.
// small results in more unsuccessful attempts; too large is slower.
const int POLYFACT_IDEAL_FRACTION = 5;

// Number of ideals that are tried before failure due to unlucky
Expand Down
2 changes: 1 addition & 1 deletion sources/polywrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ WORD *poly_ratfun_add (PHEAD WORD *t1, WORD *t2) {
*
* Description
* ===========
* This method seaches a term for multiple polyratfuns and
* This method searches a term for multiple polyratfuns and
* multiplies their contents. The result is properly
* normalized. Normalization also works for terms with a single
* polyratfun.
Expand Down
10 changes: 5 additions & 5 deletions sources/reken.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Hence there are routines for dealing with integers and with rational
* of 'arbitrary precision' (within limits)
* There are also routines for that calculus modulus an integer.
* In addition there are the routines for factorials and bernoulli numbers.
* In addition there are the routines for factorials and Bernoulli numbers.
* The random number function is currently only for internal purposes.
*/
/* #[ License : */
Expand Down Expand Up @@ -522,7 +522,7 @@ WORD DivRat(PHEAD UWORD *a, WORD na, UWORD *b, WORD nb, UWORD *c, WORD *nc)
#[ Simplify : WORD Simplify(a,na,b,nb)
Determines the greatest common denominator of a and b and
devides both by it. A possible sign is put in a. This is
divides both by it. A possible sign is put in a. This is
the simplification of the fraction a/b.
*/
Expand Down Expand Up @@ -1651,7 +1651,7 @@ UWORD Quotient(UWORD *a, WORD *na, WORD b)
#] Quotient :
#[ Remain10 : WORD Remain10(a,na)
Routine devides a by 10 and gives the remainder as return value.
Routine divides a by 10 and gives the remainder as return value.
The value of a will be the quotient! a must be positive.
*/
Expand All @@ -1678,7 +1678,7 @@ WORD Remain10(UWORD *a, WORD *na)
#] Remain10 :
#[ Remain4 : WORD Remain4(a,na)
Routine devides a by 10000 and gives the remainder as return value.
Routine divides a by 10000 and gives the remainder as return value.
The value of a will be the quotient! a must be positive.
*/
Expand Down Expand Up @@ -3516,7 +3516,7 @@ int Factorial(PHEAD WORD n, UWORD *a, WORD *na)
Builds up what is needed and remembers it for the next time.
b_0 = 1
(n+1)*b_n = -b_{n-1}-sum_(i,1,n-1,b_i*b_{n-i})
The n-1 playes only a role for b_2.
The n-1 plays only a role for b_2.
We have hard coded b_0,b_1,b_2 and b_odd. After that:
(2n+1)*b_2n = -sum_(i,1,n-1,b_2i*b_{2n-2i})
Expand Down
2 changes: 1 addition & 1 deletion sources/startup.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* This file contains the main program.
* It also deals with the very early stages of the startup of FORM
* and the final stages when the program attemps some cleanup.
* and the final stages when the program attempts some cleanup.
* Here is the routine that analyses the command tail.
*/
/* #[ License : */
Expand Down
4 changes: 2 additions & 2 deletions sources/store.c
Original file line number Diff line number Diff line change
Expand Up @@ -4161,7 +4161,7 @@ WORD ReadSaveHeader(VOID)
*
* Called by CoLoad() and FindInIndex().
*
* @param fileind contains the read FILEINDEX after succesful return. must
* @param fileind contains the read FILEINDEX after successful return. must
* point to allocated, big enough memory.
* @return = 0 everything okay, != 0 an error occurred
*/
Expand All @@ -4170,7 +4170,7 @@ WORD ReadSaveIndex(FILEINDEX *fileind)
/* do we need some translation for the FILEINDEX? */
if ( AO.transFlag ) {
/* if a translated FILEINDEX can hold less entries than the original
FILEINDEX, then we need to buffer the extra entires in this static
FILEINDEX, then we need to buffer the extra entries in this static
variable (can happen going from 32bit to 64bit */
static FILEINDEX sbuffer;

Expand Down
10 changes: 5 additions & 5 deletions sources/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1452,7 +1452,7 @@ struct M_const {
LONG CompressSize; /* (M) Size of Compress buffer */
LONG ScratSize; /* (M) Size of Fscr[] buffers */
LONG HideSize; /* (M) Size of Fscr[2] buffer */
LONG SizeStoreCache; /* (M) Size of the chaches for reading global expr. */
LONG SizeStoreCache; /* (M) Size of the caches for reading global expr. */
LONG MaxStreamSize; /* (M) Maximum buffer size in reading streams */
LONG SIOsize; /* (M) Sort InputOutput buffer size */
LONG SLargeSize; /* (M) */
Expand Down Expand Up @@ -1929,7 +1929,7 @@ struct C_const {
WORD SymChangeFlag; /* (C) */
WORD CollectPercentage; /* (C) Collect function percentage */
WORD ShortStatsMax; /* For On FewerStatistics 10; */
WORD extrasymbols; /* Flag for the extra symbsols output mode */
WORD extrasymbols; /* Flag for the extra symbols output mode */
WORD PolyRatFunChanged; /* Keeps track whether we changed in the compiler */
WORD ToBeInFactors;
WORD InnerTest; /* For debugging */
Expand Down Expand Up @@ -2136,7 +2136,7 @@ struct T_const {
UWORD *factorials; /* (T) buffer of factorials. Dynamic. */
WORD *small_power_n; /* length of the number */
UWORD **small_power; /* the number*/
UWORD *bernoullis; /* (T) The buffer with bernoulli numbers. Dynamic. */
UWORD *bernoullis; /* (T) The buffer with Bernoulli numbers. Dynamic. */
WORD *primelist;
LONG *pfac; /* (T) array of positions of factorials. Dynamic. */
LONG *pBer; /* (T) array of positions of Bernoulli's. Dynamic. */
Expand All @@ -2161,7 +2161,7 @@ struct T_const {
VOID *auxr_;
#endif
PARTI partitions;
LONG sBer; /* (T) Size of the bernoullis buffer */
LONG sBer; /* (T) Size of the Bernoullis buffer */
LONG pWorkPointer; /* (R) Offset-pointer in pWorkSpace */
LONG lWorkPointer; /* (R) Offset-pointer in lWorkSpace */
LONG posWorkPointer; /* (R) Offset-pointer in posWorkSpace */
Expand Down Expand Up @@ -2215,7 +2215,7 @@ struct T_const {
WORD TMbuff; /* (R) Communication between TestSub and Genera */
WORD TMdolfac; /* factor number for dollar */
WORD nfac; /* (T) Number of highest stored factorial */
WORD nBer; /* (T) Number of highest bernoulli number. */
WORD nBer; /* (T) Number of highest Bernoulli number. */
WORD mBer; /* (T) Size of buffer pBer. */
WORD PolyAct; /* (R) Used for putting the PolyFun at end. ini at 0 */
WORD RecFlag; /* (R) Used in TestSub. ini at zero. */
Expand Down
2 changes: 1 addition & 1 deletion sources/tables.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @file tables.c
*
* Contains all functions that deal with the table bases on the 'FORM level'
* The low level databse routines are in minos.c
* The low level database routines are in minos.c
*/
/* #[ License : */
/*
Expand Down
2 changes: 1 addition & 1 deletion sources/threads.c
Original file line number Diff line number Diff line change
Expand Up @@ -3271,7 +3271,7 @@ restart:;
*/
if ( thr->totnum-thr->usenum < numtogo ) goto restart;
/*
If the thread is in the term loading phace
If the thread is in the term loading phase
(thr->busy == BUCKETPREPARINGTERM) we better stay away from it.
We wait now for the thread to be busy, and don't allow it
now to drop out of this state till we are done here.
Expand Down
2 changes: 1 addition & 1 deletion sources/transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -2167,7 +2167,7 @@ WORD RunPermute(PHEAD WORD *fun, WORD *args, WORD *info)
if ( *info > totarg ) return(0);
/*
Now we have a look whether there are dollar variables to be expanded
We also sift out all values that are out of range.
We also shift out all values that are out of range.
*/
withdollar = 0; in = info;
while ( in < infostop ) {
Expand Down

0 comments on commit 2b32ea5

Please sign in to comment.