Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/runtime/config/gen-win32-signals.c
ViewVC logotype

Annotation of /sml/trunk/runtime/config/gen-win32-signals.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1799 - (view) (download) (as text)
Original Path: sml/trunk/src/runtime/config/gen-win32-signals.c

1 : monnier 249 /* gen-win32-signals.c
2 :     *
3 :     * COPYRIGHT (c) 1996 by Bell Laboratories, Lucent Technologies
4 :     *
5 :     * Generate the "system-signals.h" file for Win32 systems.
6 :     * signals aren't currently implemented (since Win32 doesn't have signals)
7 :     */
8 :    
9 :     #include <signal.h>
10 :     #include <stdio.h>
11 :     #include "gen.h"
12 :     #include "win32-sigtab.h"
13 :    
14 :     #ifndef DST_FILE
15 :     #define DST_FILE "system-signals.h"
16 :     #endif
17 :    
18 :     main ()
19 :     {
20 :     FILE *f;
21 :     int numSigs = 1;
22 :     int i;
23 :    
24 :     f = OpenFile (DST_FILE, "_SYSTEM_SIGNALS_");
25 :    
26 :     fprintf (f, "#define NUM_SYSTEM_SIGS %2d\n", 0);
27 : mblume 1799 fprintf (f, "#define MIN_SYSTEM_SIG %2d /* %s */\n",
28 :     0, "none");
29 : monnier 249 fprintf (f, "#define MAX_SYSTEM_SIG %2d /* %s */\n",
30 :     0, "none");
31 :     fprintf (f, "#define NUM_SIGS %2d\n", NUM_SIGS);
32 :     fprintf (f, "#define MAX_SIG %2d\n", NUM_SIGS);
33 : mblume 1799 fprintf (f, "#define SIGMAP_SZ %2d\n", NUM_SIGS+1);
34 : monnier 249 fprintf (f, "\n");
35 :    
36 :     /* the signals */
37 :     for (i = 0; i < NUM_SIGS; i++) {
38 :     fprintf(f, "#define %s %2d\n", win32SigTab[i].lname, win32SigTab[i].n);
39 :     }
40 :    
41 :     fprintf (f, "#define IS_SYSTEM_SIG(S) (0)\n");
42 :    
43 :     CloseFile (f, "_SYSTEM_SIGNALS_");
44 :    
45 :     exit (0);
46 :    
47 :     }
48 :    
49 :     /* end of gen-win32-signals.c */

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0