GE-115 Emulator
An Emulator of the General Electrics GE-115 computer
Functions | Variables
main.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <unistd.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
#include "ge.h"
#include "console_socket.h"
#include "cardreader.h"
#include "printer.h"
#include "disk.h"
#include "tape.h"
#include "cap.h"
#include "transcode.h"
#include "binimage.h"
#include "log.h"
#include "sat_batches.h"
#include <fcntl.h>

Go to the source code of this file.

Functions

void ge_log_set_active_types_from_spec (const char *spec)
 Set active log types from a comma-separated name specification.
 
static void on_sigusr1 (int sig)
 
static void on_sigusr2 (int sig)
 
static pid_t spawn_tui (const char *argv0)
 
static void print_usage (const char *argv0)
 
int main (int argc, char *argv[])
 

Variables

static volatile sig_atomic_t g_toggle_js1 = 0
 
static volatile sig_atomic_t g_toggle_js2 = 0
 

Function Documentation

◆ ge_log_set_active_types_from_spec()

void ge_log_set_active_types_from_spec ( const char *  spec)
extern

Set active log types from a comma-separated name specification.

Parses spec as a comma-separated list of category names and enables exactly those log types by calling ge_log_set_active_types(). Surrounding whitespace around each name is ignored.

Recognised names: err, debug, regs, states, conds, regs_v, future, cycle, console, peri, reader, cmds, all (enable everything), none (disable all).

If spec is NULL or empty the active types are left unchanged. Unknown names are silently ignored except that a LOG_ERR message is emitted.

Parameters
specComma-separated list of category names, or NULL / empty string

Definition at line 47 of file log.c.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 111 of file main.c.

◆ on_sigusr1()

static void on_sigusr1 ( int  sig)
static

Definition at line 47 of file main.c.

◆ on_sigusr2()

static void on_sigusr2 ( int  sig)
static

Definition at line 48 of file main.c.

◆ print_usage()

static void print_usage ( const char *  argv0)
static

Definition at line 81 of file main.c.

◆ spawn_tui()

static pid_t spawn_tui ( const char *  argv0)
static

Definition at line 50 of file main.c.

Variable Documentation

◆ g_toggle_js1

volatile sig_atomic_t g_toggle_js1 = 0
static

Definition at line 45 of file main.c.

◆ g_toggle_js2

volatile sig_atomic_t g_toggle_js2 = 0
static

Definition at line 46 of file main.c.