+ Addition of function prototypes.
+ Change function definitions to ANSI C style.
+ Convert to sed scripts some shell scripts for better portability.
+ Reduce usage of em_path.h (TMPDIR is no longer hard coded)
--- /dev/null
+cmake_minimum_required (VERSION 3.0)
+project(em_mes)
+
+
+set(SRC_C
+ C_ms_com.c
+ C_ms_ego.c
+ C_ms_emx.c
+ C_ms_err.c
+ C_ms_flt.c
+ C_ms_gto.c
+ C_ms_opt.c
+ C_ms_par.c
+ C_ms_reg.c
+ C_ms_src.c
+ C_ms_stb.c
+ C_ms_std.c
+)
+
+set(INCLUDE_DIRS
+ .
+)
+
+
+add_library(${PROJECT_NAME} ${SRC_C})
+target_compile_definitions(${PROJECT_NAME} PUBLIC NORCSID=1)
+target_include_directories(${PROJECT_NAME} PUBLIC ${INCLUDE_DIRS})
+
+target_link_libraries(${PROJECT_NAME} emheaders emh emk em_data)
+
+install(TARGETS ${PROJECT_NAME}
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ PUBLIC_HEADER DESTINATION include
+)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/em_mes.3 DESTINATION man OPTIONAL)
#include <stdlib.h>
#include <string.h>
-#include <em.h>
-#include <em_mes.h>
+#include "em.h"
+#include "em_mes.h"
-void
-C_ms_com(str)
- char *str;
+void C_ms_com(char* str)
{
C_mes_begin(ms_com);
C_scon(str, (arith) (strlen(str) + 1));
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
-#include <em.h>
-#include <em_mes.h>
+#include "em.h"
+#include "em_mes.h"
-void
-C_ms_ego(hint, offs, siz, regno)
- int hint, regno;
- arith offs, siz;
+void C_ms_ego(int hint, arith offs, arith siz, int regno)
{
C_mes_begin(ms_ego);
C_cst((arith)hint);
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
-#include <em.h>
-#include <em_mes.h>
+#include "em.h"
+#include "em_mes.h"
-void
-C_ms_emx(wsiz, psiz)
- arith wsiz, psiz;
+void C_ms_emx(arith wsiz, arith psiz)
{
C_mes_begin(ms_emx);
C_cst(wsiz);
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
-#include <em.h>
-#include <em_mes.h>
+#include "em.h"
+#include "em_mes.h"
-void
-C_ms_err()
+void C_ms_err(void)
{
C_mes_begin(ms_err);
C_mes_end();
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
-#include <em.h>
-#include <em_mes.h>
+#include "em.h"
+#include "em_mes.h"
-void
-C_ms_flt()
+void C_ms_flt(void)
{
C_mes_begin(ms_flt);
C_mes_end();
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
-#include <em.h>
-#include <em_mes.h>
+#include "em.h"
+#include "em_mes.h"
-void
-C_ms_gto()
+void C_ms_gto(void)
{
C_mes_begin(ms_gto);
C_mes_end();
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
-#include <em.h>
-#include <em_mes.h>
+#include "em.h"
+#include "em_mes.h"
-void
-C_ms_opt()
+void C_ms_opt(void)
{
C_mes_begin(ms_opt);
C_mes_end();
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
-#include <em.h>
-#include <em_mes.h>
+#include "em.h"
+#include "em_mes.h"
-void
-C_ms_par(nparams)
- arith nparams;
+void C_ms_par(arith nparams)
{
C_mes_begin(ms_par);
C_cst(nparams);
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
-#include <em.h>
-#include <em_mes.h>
+#include "em.h"
+#include "em_mes.h"
-void
-C_ms_reg(offs, siz, class, prior)
- arith offs, siz;
- int class, prior;
+void C_ms_reg(arith offs, arith siz, int class, int prior)
{
C_mes_begin(ms_reg);
C_cst(offs);
#include <stdlib.h>
#include <string.h>
-#include <em.h>
-#include <em_mes.h>
+#include "em.h"
+#include "em_mes.h"
-void
-C_ms_src(nlines, filnam)
- int nlines;
- char *filnam;
+void C_ms_src(int nlines, char* filnam)
{
C_mes_begin(ms_src);
C_cst((arith)nlines);
#include <stdlib.h>
#include <string.h>
-#include <em.h>
-#include <em_mes.h>
+#include "em.h"
+#include "em_mes.h"
-void
-C_ms_stb_cst(s, e1, e2, e3)
- char *s;
- int e1, e2;
- arith e3;
+void C_ms_stb_cst(char* s, int e1, int e2, arith e3)
{
C_mes_begin(ms_stb);
if (s) C_scon(s, (arith) (strlen(s)+1));
#include <stdlib.h>
#include <string.h>
-#include <em.h>
-#include <em_mes.h>
+#include "em.h"
+#include "em_mes.h"
-void
-C_ms_std(s, e1, l)
- char *s;
- int e1;
- int l;
+void C_ms_std(char* s, int e1, int l)
{
C_mes_begin(ms_std);
if (s) C_scon(s, (arith) (strlen(s)+1));