diff intercom/gsm/gsm_crea.c @ 2:13be24d74cd2

import intercom-0.4.1
author Peter Meerwald <pmeerw@cosy.sbg.ac.at>
date Fri, 25 Jun 2010 09:57:52 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/intercom/gsm/gsm_crea.c	Fri Jun 25 09:57:52 2010 +0200
@@ -0,0 +1,43 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+#include	"config.h"
+
+#ifdef	HAS_STDLIB_H
+#include	<stdlib.h>
+#include	<string.h>
+#else
+#	include "proto.h"
+extern char *memset P((char *, int, int));
+#endif
+#include <stdio.h>
+
+#include "private.h"
+#include "gsm.h"
+#include "proto.h"
+
+gsm gsm_create P0()
+{
+  gsm r;
+
+#ifdef	USE_TABLE_MUL
+
+  static int mul_init = 0;
+  if (!mul_init) {
+    mul_init = 1;
+    init_umul_table();
+  }
+#endif
+
+  r = (gsm) malloc(sizeof(struct gsm_state));
+  if (!r)
+    return r;
+
+  memset((char *) r, 0, sizeof(*r));
+  r->nrp = 40;
+
+  return r;
+}

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.