Browse Source

Enhancement: Add module net

master
heck 2 years ago
parent
commit
22e3887c1c
  1. 13
      src/ext.cc
  2. 19
      src/net.cc
  3. 15
      src/net.h

13
src/ext.cc

@ -1,13 +0,0 @@
#include "ext.hh"
#include <iostream>
namespace Orca {
int counter{ 0 };
}
void test_cxx(Glyph* gbuf, Mark* mbuf, Usz height, Usz width, Usz tick_number)
{
Orca::counter++;
std::cout << "test_cxx()" << Orca::counter << std::endl;
}

19
src/net.cc

@ -0,0 +1,19 @@
#include "net.h"
#include <iostream>
#include <pEp/std_utils.hh>
namespace Orca {
int counter{ 0 };
}
void net_init() {
pEp::Utils::file_create("field.comm");
}
void net_test_cxx(Glyph* gbuf, Mark* mbuf, Usz height, Usz width, Usz tick_number)
{
Orca::counter++;
std::cout << "test_cxx()" << Orca::counter << std::endl;
}

15
src/ext.hh → src/net.h

@ -1,19 +1,18 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
// clang-format off
#ifndef ORCA_EXT_HH
#define ORCA_EXT_HH
#ifndef ORCA_NET_HH
#define ORCA_NET_HH
#include "base.h"
#ifdef __cplusplus
extern "C" {
#endif
void test_cxx(Glyph * gbuf,
Mark * mbuf,
Usz height,
Usz width,
Usz tick_number);
void net_init(void);
void net_test_cxx(Glyph * gbuf,Mark * mbuf,Usz height,Usz width,Usz tick_number);
@ -21,4 +20,4 @@ Usz tick_number);
};
#endif
#endif //ORCA_EXT_HH
#endif //ORCA_NET_HH
Loading…
Cancel
Save