File: save.c

package info (click to toggle)
gcl27 2.7.1-12
  • links: PTS
  • area: main
  • in suites: forky
  • size: 30,844 kB
  • sloc: lisp: 211,942; ansic: 52,944; sh: 9,347; makefile: 647; tcl: 53; awk: 52
file content (39 lines) | stat: -rw-r--r-- 553 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* Copyright (C) 2024 Camm Maguire */
#ifndef FIRSTWORD
#include "include.h"
#endif

static void
memory_save(char *original_file, char *save_file)
{
#ifdef DO_BEFORE_SAVE
  DO_BEFORE_SAVE ;
#endif    
  
  unexec(save_file,original_file,0,0,0);
}

#ifdef USE_CLEANUP
extern void _cleanup();
#endif

LFD(siLsave)(void) {

  extern char *kcl_self;

  check_arg(1);

  gcl_cleanup(1);

  coerce_to_filename(vs_base[0], FN1);

#ifdef MEMORY_SAVE
  MEMORY_SAVE(kcl_self,FN1);
#else	  
  memory_save(kcl_self, FN1);
#endif	

  /*  no return  */
  exit(0);

}