Skip to content

Commit

Permalink
fixing another bunch of typos in sources/
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton authored and tueda committed Dec 5, 2022
1 parent 98f0e04 commit fb26f35
Show file tree
Hide file tree
Showing 23 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion check/check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def read_env_positive_int(key, default_value)
end
end
if value <= 0
warn("environment variable ingored: #{key} must be positive: #{ENV[key]}")
warn("environment variable ignored: #{key} must be positive: #{ENV[key]}")
value = default_value
end
value
Expand Down
2 changes: 1 addition & 1 deletion sources/argument.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ ScaledVariety:;
}
/*
We generate a statement for adapting all terms in the
argument sucessively
argument successively
*/
r4 = AddRHS(AT.ebufnum,1);
while ( (r4+j+12) > CC->Top ) r4 = DoubleCbuffer(AT.ebufnum,r4,3);
Expand Down
4 changes: 2 additions & 2 deletions sources/checkpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -2343,9 +2343,9 @@ int DoRecovery(int *moduletype)
R_SET(AR.SortType, WORD);
R_SET(AR.ShortSortCount, WORD);

/* this is usually done in Process(), but sometimes FORM doesn't
/* this is usually done in Process(), but sometimes FORM does not
end up executing Process() before it uses the AR.CompressPointer,
so we need to explicitely set it here. */
so we need to explicitly set it here. */
AR.CompressPointer = AR.CompressBuffer;

#ifdef WITHPTHREADS
Expand Down
8 changes: 4 additions & 4 deletions sources/extcmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ static VOID pushDescriptor(int *fifo, int top, int fd)
}
}/*pushDescriptor*/

/*Close all descriptors greate or equal than startFrom except those
/*Close all descriptors greater or equal than startFrom except those
listed in the ascendantly ordered array usedFd of length top:*/
static FORM_INLINE VOID closeAllDescriptors(int startFrom, int *usedFd, int top)
{
Expand All @@ -562,7 +562,7 @@ static VOID closepipe(L_APIPE *thepipe)
}/*closepipe*/

/*Parses the cmd line like "sh -c myprg", passes each option to the
correspondinig element of argv, ends agrv by NULL. Returns the
corresponding element of argv, ends agrv by NULL. Returns the
number of stored argv elements, or -1 if fails:*/
static FORM_INLINE int parseline(char **argv, char *cmd)
{
Expand Down Expand Up @@ -1211,7 +1211,7 @@ typedef struct{
}ECINFOSTRUCT;

/* Creates a new external channel starting the command cmd (if cmd !=NULL)
or using informaion from (ECINFOSTRUCT *)shellname, if cmd ==NULL:*/
or using information from (ECINFOSTRUCT *)shellname, if cmd ==NULL:*/
static FORM_INLINE void *createExternalChannel(
EXTHANDLE *h,
char *cmd, /*Command to run or NULL*/
Expand Down Expand Up @@ -1398,7 +1398,7 @@ int initPresetExternalChannels(UBYTE *theline, int thetimeout)
theline = (UBYTE *)c + 1;
/*Now we have two descriptors.
According to the protocol, FORM must send to external channel
it's PID with added '\n' and read back two comma-separaetd
it's PID with added '\n' and read back two comma-separated
decimals with added '\n'. The first must be repeated FORM PID,
the second must be the parent PID
*/
Expand Down
2 changes: 1 addition & 1 deletion sources/gentopo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ EGraph::EGraph(int nnodes, int nedges, int mxdeg)

nNodes = nnodes;
nEdges = nedges;
maxdeg = mxdeg; // maxmum value of degree of nodes
maxdeg = mxdeg; // maximum value of degree of nodes
nExtern = 0;

nodes = new ENode[nNodes];
Expand Down
2 changes: 1 addition & 1 deletion sources/mallocprotect.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ static void *mprotectMalloc(size_t theSize)
#if MALLOCPROTECT > 0

/*Potential problems with alignment if the requested size is not
a multiple of items. But no poblems on x86-64:*/
a multiple of items. But no problems on x86-64:*/
return ret+ (theSize-pageSize-requestedSize);
#endif
}/*mprotectMalloc*/
Expand Down
2 changes: 1 addition & 1 deletion sources/minos.c
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,7 @@ int ExistsObject(DBASE *d,MLONG tablenumber,char *arguments)
#] ExistsObject :
#[ DeleteObject :
Returns 1 if Object has been deleteted.
Returns 1 if Object has been deleted.
We leave a hole. Actually the object is still there but has been
inactivated. It can be reactivated by calling this routine again.
*/
Expand Down
2 changes: 1 addition & 1 deletion sources/opera.c
Original file line number Diff line number Diff line change
Expand Up @@ -1438,7 +1438,7 @@ WORD TraceN(PHEAD WORD *term, WORD *params, WORD num, WORD level)
This routine is a simplified version of Trace4Gen. We know here
only three cases: Adjacent objects, same objects and all different.
The othere difference lies of course in the struct which is now
The other difference lies of course in the struct which is now
not of type TRACES, but of type TRACES.
*/
Expand Down
4 changes: 2 additions & 2 deletions sources/optimize.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2956,7 +2956,7 @@ bool do_optimization (const optimization optim, vector<WORD> &instr, int newid)
instr.push_back(varnumx); // symbol id
instr.push_back(n); // power
instr.push_back(1);
instr.push_back(1); // coeffient 1
instr.push_back(1); // coefficient 1
instr.push_back(3);
instr.push_back(0); // trailing 0
}
Expand Down Expand Up @@ -3273,7 +3273,7 @@ bool do_optimization (const optimization optim, vector<WORD> &instr, int newid)
// check signs (type=4: x+y and -x-y, type=5: x-y and -x+y) ??????
// check signs (type=4: x+y, type=5: x-y) !!!!!!!!!!
if (SGN(ncoeffx) * SGN(ncoeffy) * (optim.type==4 ? 1 : -1) == 1) {
// check absolute value of coeeficients
// check absolute value of coefficients
if (BigLong((UWORD *)coeffx, ABS(ncoeffx)-1, (UWORD *)coeffy, ABS(ncoeffy)-1) == 0) {
// substitute
vector<WORD> coeff(coeffx, coeffx+ABS(ncoeffx));
Expand Down
12 changes: 6 additions & 6 deletions sources/parallel.c
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ static int PF_GetLoser(NODE *n)
* 0 if EndSort() still must perform a regular sorting because it is not
* at the ground level or not on the master or in the sequential mode
* or in the InParallel mode.
* -1 if an error occured.
* -1 if an error occurred.
*
* @remark The slaves will send the sorted terms back to the master in the regular
* sorting (after the initialization of the send buffer in PF_EndSort()).
Expand Down Expand Up @@ -993,7 +993,7 @@ static WORD *PF_CurrentBracket;
*
* To enable keep-brackets when AR.DeferFlag is set, we need to do some
* preparation here:
* \li copy the part ouside brackets to current_bracket
* \li copy the part outside brackets to current_bracket
* \li skip term if part outside brackets is same as for last term
* \li if POfill >= POfull receive new terms as usual
*
Expand Down Expand Up @@ -1514,7 +1514,7 @@ static int PF_WaitAllSlaves(void)

if ( has_sent ) M_free(has_sent,"PF_WaitAllSlaves");
/*
0 on sucess (exit from the main loop by loop condition), or -1 if fails
0 on success (exit from the main loop by loop condition), or -1 if fails
(exit from the main loop since readySlaves=PF.numtasks+1):
*/
return(PF.numtasks-readySlaves);
Expand Down Expand Up @@ -1691,7 +1691,7 @@ int PF_Processor(EXPRESSIONS e, WORD i, WORD LastExpression)
PACK_LONG(sb->fill[0], AN.ninterms);
/*
* For the "slow startup". We double maxinterms up to ProcessBucketSize
* after (houpefully) the all workers got some terms.
* after (hopefully) the all workers got some terms.
*/
if ( cmaxinterms >= PF.numtasks - 2 ) {
maxinterms *= 2;
Expand Down Expand Up @@ -1953,7 +1953,7 @@ int PF_Processor(EXPRESSIONS e, WORD i, WORD LastExpression)
int PF_Init(int *argc, char ***argv)
{
/*
this should definitly be somewhere else ...
this should definitely be somewhere else ...
*/
PF_CurrentBracket = 0;

Expand Down Expand Up @@ -2216,7 +2216,7 @@ int PF_BroadcastPreDollar(WORD **dbuffer, LONG *newsize, int *numterms)
/*
The problem is that sometimes dollar variables are longer
than PF_packbuf! So we split long expression into chunks.
There are n filled chunks and one portially filled chunk:
There are n filled chunks and one partially filled chunk:
*/
LONG n = ((*newsize)+1)/PF_maxDollarChunkSize;
/*
Expand Down
2 changes: 1 addition & 1 deletion sources/poly.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1990,7 +1990,7 @@ int poly::number_of_terms () const {
#[ first_variable :
*/

// returns the lexcicographically first variable of a polynomial
// returns the lexicographically first variable of a polynomial
int poly::first_variable () const {

POLY_GETIDENTITY(*this);
Expand Down
2 changes: 1 addition & 1 deletion sources/polyfact.cc
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ const vector<poly> polyfact::extended_gcd_Euclidean_lifted (const poly &a, const
sa /= s.integer_lcoeff();
sb /= s.integer_lcoeff();

// Lift the result to modolu p^n with p-adic Newton's iteration.
// Lift the result to modulo p^n with p-adic Newton's iteration.
poly samodp(sa);
poly sbmodp(sb);
poly term(BHEAD 1);
Expand Down
4 changes: 2 additions & 2 deletions sources/polygcd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ template<class T> ostream& operator<< (ostream &out, const vector<T> &x) {
* Notes
* =====
* - The input and output integers are represented as polynomials.
* These polynonials must consist of one term with all powers
* These polynomials must consist of one term with all powers
* equal to zero.
* - The result is always positive.
* - Over ZZ/p^n, the gcd is defined as 1.
Expand Down Expand Up @@ -666,7 +666,7 @@ const poly polygcd::sparse_interpolation_fix_poly (const poly &a, int x) {
* e.g. "Computing the Greatest Common Divisor of Multivariate
* Polynomials over Finite Fields" by Suling Yang. [TODO]
* - For calculation modulo small prime numbers, such a Vandermonde
* matrix doesnot exist, because there are not enough different
* matrix does not exist, because there are not enough different
* numbers. In that case, we should resort to random equations of
* which enough exist. [TODO]
* - Non-monic cases are handled inefficiently. Implement LINZIP? [TODO]
Expand Down
2 changes: 1 addition & 1 deletion sources/pre.c
Original file line number Diff line number Diff line change
Expand Up @@ -5589,7 +5589,7 @@ int DoRmExternal(UBYTE *s)
stored.
FORM continues to read the running external
program output until the extrenal program outputs a
program output until the external program outputs a
prompt.
*/
Expand Down
2 changes: 1 addition & 1 deletion sources/proces.c
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ WORD TestSub(PHEAD WORD *term, WORD level)
else if ( t[2] >= 0 ) {
/*
Compute Binom(numterms+power-1,power-1)
We need potentially long arrithmetic.
We need potentially long arithmetic.
That is why we had to allocate AN.BinoScrat
*/
if ( AN.last1 == t[3] && AN.last2 == cbuf[t[4]].NumTerms[t[2]] + t[3] - 1 ) {
Expand Down
2 changes: 1 addition & 1 deletion sources/reken.c
Original file line number Diff line number Diff line change
Expand Up @@ -2223,7 +2223,7 @@ WORD GcdLong(PHEAD UWORD *a, WORD na, UWORD *b, WORD nb, UWORD *c, WORD *nc)
digit Lehmer-Euclid algorithm of Jebelean it seems.
Maybe this can be programmed slightly better and we can get another
few percent speed increase. Further improvements for the assymptotic
few percent speed increase. Further improvements for the asymptotic
case come from splitting the calculation as in Karatsuba and working
with FFT divisions and multiplications etc. But this is when hundreds
of words are involved at the least.
Expand Down
2 changes: 1 addition & 1 deletion sources/sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* Special routines for the parallel sorting are in the file threads.c
* Also the sorting of terms in polynomials is special but most of that is
* controled by changing the address of the compare routine. Other routines
* controlled by changing the address of the compare routine. Other routines
* relevant for adding rational polynomials are in the file polynito.c
*/
/* #[ License : */
Expand Down
2 changes: 1 addition & 1 deletion sources/startup.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ VOID ReserveTempFiles(int par)
they can make the same .str file. We prevent this with first trying
a file that contains the digits of the pid. If this file
has already been taken we fall back on the old scheme.
The whole is controled with the -M (MultiRun) parameter in the
The whole is controlled with the -M (MultiRun) parameter in the
command tail.
*/
if ( AM.MultiRun ) {
Expand Down
4 changes: 2 additions & 2 deletions sources/store.c
Original file line number Diff line number Diff line change
Expand Up @@ -1599,7 +1599,7 @@ WORD GetMoreFromMem(WORD *term, WORD **tpoin)
it at 'to'.
The value to be returned is the number of words read.
Renumbering is done also.
This is controled by the renumber table, given in 'renumber'
This is controlled by the renumber table, given in 'renumber'
This routine should work with a number of cache buffers. The
exact number should be definable in form.set.
Expand Down Expand Up @@ -4636,7 +4636,7 @@ WORD ReadSaveVariables(UBYTE *buffer, UBYTE *top, LONG *size, LONG *outsize,\

RSVEnd:
/* we are here because the remaining buffer cannot hold the next
struct. we position the file behind the last sucessfully translated
struct. we position the file behind the last successfully translated
struct and return. */
ADDPOS(pos, *size);
SeekFile(AO.SaveData.Handle, &pos, SEEK_SET);
Expand Down
2 changes: 1 addition & 1 deletion sources/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ typedef struct ReNuMbEr {

/**
* Much information is stored in arrays of which we can double the size
* if the array proves to be too small. Such arrays are controled by
* if the array proves to be too small. Such arrays are controlled by
* a variable of type #LIST. The routines that expand the lists are in the
* file tools.c
*/
Expand Down
2 changes: 1 addition & 1 deletion sources/symmetr.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ WORD MatchE(PHEAD WORD *pattern, WORD *fun, WORD *inter, WORD par)
while ( n > 0 && ( *wv == FROMSET || *wv == SETTONUM
|| *wv == LOADDOLLAR ) ) { wv += wv[1]; wm++; n--; }
/*
Freak problem: doesn't test for n and ran into a reamining
Freak problem: doesn't test for n and ran into a remaining
code equal to SETTONUM followed by a big number and then
ran out of the memory.
Expand Down
6 changes: 3 additions & 3 deletions sources/threads.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ int UpdateOneThread(int identity)
* because this is part of the 'overhead'.
*
* @param from the source thread which has all the variables already
* @param identity the TFORM defined integer thread identitier of the thread that needs the copy
* @param identity the TFORM defined integer thread identifier of the thread that needs the copy
* @param thr the bucket that contains the terms to be processed by 'identity'
* @param par if 1 copies the already active pieces in the (de)compress buffer
* @return Standard return convention (OK -> 0)
Expand Down Expand Up @@ -2450,7 +2450,7 @@ int SendOneBucket(int type)
/**
* We divide the expressions marked by partodo over the workers.
* The workers are responsible for writing their results into the buffers
* of the master (output). This is to be controled by locks.
* of the master (output). This is to be controlled by locks.
* The order of the expressions may get changed this way.
*
* The InParallel statement allows the execution of complete expressions
Expand Down Expand Up @@ -3556,7 +3556,7 @@ SortBotOut(PHEAD WORD *term)
* but now also each worker part is divided into blocks. This allows the
* worker to fill blocks while the master is already working on blocks that
* were filled before. The blocks are arranged in a circular fashion.
* The whole is controled by locks which seems faster than setting it up
* The whole is controlled by locks which seems faster than setting it up
* with signals.
*
* This routine is run by the master when we don't use the sortbots.
Expand Down
2 changes: 1 addition & 1 deletion sources/tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ STREAM *OpenStream(UBYTE *name, int type, int prevarmode, int raiselow)
{/*Block*/
int n, *tmpn;
if( (n=getCurrentExternalChannel()) == 0 )
Error0("@No current extrenal channel");
Error0("@No current external channel");
stream = CreateStream((UBYTE *)"externalchannel");
stream->handle = CreateHandle();
tmpn = (int *)Malloc1(sizeof(int),"external channel handle");
Expand Down

0 comments on commit fb26f35

Please sign in to comment.