|
|
| version 1.3, 2025/03/09 19:50:47 | version 1.4, 2025/03/22 18:43:54 |
|---|---|
| Line 24 | Line 24 |
| * along with FreeM. If not, see <https://www.gnu.org/licenses/>. | * along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
| * | * |
| * $Log$ | * $Log$ |
| * Revision 1.4 2025/03/22 18:43:54 snw | |
| * Make STRLEN 255 chars and add BIGSTR macro for larger buffers | |
| * | |
| * Revision 1.3 2025/03/09 19:50:47 snw | * Revision 1.3 2025/03/09 19:50:47 snw |
| * Second phase of REUSE compliance and header reformat | * Second phase of REUSE compliance and header reformat |
| * | * |
| Line 58 cptab *cptab_insert(int tlevel, char *gl | Line 61 cptab *cptab_insert(int tlevel, char *gl |
| gc_ns = (char *) malloc (STRLEN * sizeof (char)); | gc_ns = (char *) malloc (STRLEN * sizeof (char)); |
| NULLPTRCHK(gc_ns,"cptab_insert"); | NULLPTRCHK(gc_ns,"cptab_insert"); |
| gc_pth = (char *) malloc (STRLEN * sizeof (char)); | gc_pth = (char *) malloc (PATHLEN * sizeof (char)); |
| NULLPTRCHK(gc_pth,"cptab_insert"); | NULLPTRCHK(gc_pth,"cptab_insert"); |
| for (t = cptab_head[tlevel]; t != NULL; t = t->next) { | for (t = cptab_head[tlevel]; t != NULL; t = t->next) { |
| Line 84 cptab *cptab_insert(int tlevel, char *gl | Line 87 cptab *cptab_insert(int tlevel, char *gl |
| t->file = (char *) malloc (sizeof (char) * (strlen (gc_pth))); | t->file = (char *) malloc (sizeof (char) * (strlen (gc_pth))); |
| NULLPTRCHK(t->file,"cptab_insert"); | NULLPTRCHK(t->file,"cptab_insert"); |
| t->cp_file = (char *) malloc (sizeof (char) * STRLEN); | t->cp_file = (char *) malloc (sizeof (char) * PATHLEN); |
| NULLPTRCHK(t->cp_file,"cptab_insert"); | NULLPTRCHK(t->cp_file,"cptab_insert"); |
| strcpy (t->file, gc_pth); | strcpy (t->file, gc_pth); |
| stcnv_m2c (t->file); | stcnv_m2c (t->file); |
| snprintf (t->cp_file, STRLEN - 1, "%s.%d.%d.chk", t->file, pid, tp_level); | snprintf (t->cp_file, PATHLEN, "%s.%d.%d.chk", t->file, pid, tp_level); |
| free (gc_ns); | free (gc_ns); |
| free (gc_pth); | free (gc_pth); |