6868 *
6969 */
7070
71+ #include "scl_memmgr.h"
7172#include "express/basic.h"
7273#include <ctype.h>
7374#include <stdlib.h>
@@ -274,7 +275,7 @@ Symbol * EXPRESS_get_symbol( Generic e ) {
274275
275276Express EXPRESScreate () {
276277 Express model = SCOPEcreate ( OBJ_EXPRESS );
277- model -> u .express = ( struct Express_ * )calloc ( 1 , sizeof ( struct Express_ ) );
278+ model -> u .express = ( struct Express_ * )scl_calloc ( 1 , sizeof ( struct Express_ ) );
278279 return model ;
279280}
280281
@@ -293,7 +294,7 @@ static void EXPRESS_PATHinit() {
293294 p = getenv ( "EXPRESS_PATH" );
294295 if ( !p ) {
295296 /* if no EXPRESS_PATH, search current directory anyway */
296- dir = ( Dir * )malloc ( sizeof ( Dir ) );
297+ dir = ( Dir * )scl_malloc ( sizeof ( Dir ) );
297298 dir -> leaf = dir -> full ;
298299 LISTadd ( EXPRESS_path , ( Generic )dir );
299300 } else {
@@ -325,7 +326,7 @@ static void EXPRESS_PATHinit() {
325326 }
326327 p ++ ; /* leave p after terminating null */
327328
328- dir = ( Dir * )malloc ( sizeof ( Dir ) );
329+ dir = ( Dir * )scl_malloc ( sizeof ( Dir ) );
329330
330331 /* if it's just ".", make it as if it was */
331332 /* just "" to make error messages cleaner */
@@ -523,7 +524,7 @@ void EXPRESSparse( Express model, FILE * fp, char * filename ) {
523524 length -= 4 ;
524525 }
525526
526- model -> u .express -> basename = ( char * )malloc ( length + 1 );
527+ model -> u .express -> basename = ( char * )scl_malloc ( length + 1 );
527528 memcpy ( model -> u .express -> basename , filename , length );
528529 model -> u .express -> basename [length ] = '\0' ;
529530
0 commit comments