fix typos in code comments

remove duplicate words from a comment
This commit is contained in:
0tkl
2025-05-14 15:40:26 +08:00
parent a81158c446
commit 56c44c04f6
11 changed files with 22 additions and 22 deletions

View File

@@ -1019,7 +1019,7 @@ int DLLEXPORT EN_getversion(int *version)
int DLLEXPORT EN_geterror(int errcode, char *errmsg, int maxLen)
/*----------------------------------------------------------------
** Input: errcode = an error or warnng code
** Input: errcode = an error or warning code
** maxLen = maximum characters that errmsg can hold
** Output: errmsg = text of error/warning message
** Returns: error code
@@ -1283,7 +1283,7 @@ int DLLEXPORT EN_setoption(EN_Project p, int option, double value)
// All other option values must be non-negative
if (value < 0.0) return 213;
// Process the speficied option
// Process the specified option
switch (option)
{
case EN_TRIALS:
@@ -1920,7 +1920,7 @@ int DLLEXPORT EN_addnode(EN_Project p, const char *id, int nodeType, int *index)
// Check for valid node type
if (nodeType < EN_JUNCTION || nodeType > EN_TANK) return 251;
// Grow node-related arrays to accomodate the new node
// Grow node-related arrays to accommodate the new node
size = (net->Nnodes + 2) * sizeof(Snode);
net->Node = (Snode *)realloc(net->Node, size);
size = (net->Nnodes + 2) * sizeof(double);
@@ -3345,7 +3345,7 @@ int DLLEXPORT EN_addlink(EN_Project p, const char *id, int linkType,
if (errcode) return errcode;
}
// Grow link-related arrays to accomodate the new link
// Grow link-related arrays to accommodate the new link
net->Nlinks++;
p->parser.MaxLinks = net->Nlinks;
n = net->Nlinks;
@@ -3364,7 +3364,7 @@ int DLLEXPORT EN_addlink(EN_Project p, const char *id, int linkType,
if (linkType <= PIPE) net->Npipes++;
else if (linkType == PUMP)
{
// Grow pump array to accomodate the new link
// Grow pump array to accommodate the new link
net->Npumps++;
size = (net->Npumps + 1) * sizeof(Spump);
net->Pump = (Spump *)realloc(net->Pump, size);
@@ -3386,7 +3386,7 @@ int DLLEXPORT EN_addlink(EN_Project p, const char *id, int linkType,
}
else
{
// Grow valve array to accomodate the new link
// Grow valve array to accommodate the new link
net->Nvalves++;
size = (net->Nvalves + 1) * sizeof(Svalve);
net->Valve = (Svalve *)realloc(net->Valve, size);