Skip to content

Commit

Permalink
Get test apps compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
LegNeato committed Oct 23, 2022
1 parent 5edbc6a commit 386d0f4
Show file tree
Hide file tree
Showing 82 changed files with 1,724 additions and 2,271 deletions.
12 changes: 4 additions & 8 deletions src/apps/Cargo.toml → src/apps/applib/lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "unsafe-h3lib-apps"
name = "unsafe-h3lib-applib"
authors = ["C2Rust"]
version = "0.0.0"
publish = false
Expand All @@ -8,14 +8,10 @@ autobins = false

[lib]
name = "unsafe_h3lib_applib"
path = "applib/lib/lib.rs"
path = "lib.rs"
crate-type = ["staticlib", "rlib"]

[dependencies]
unsafe-h3lib = { version = "*", path = "../h3lib" }
unsafe-h3lib = { version = "*", path = "../../../h3lib" }
num-traits = "0.2"
libc = "0.2"

[[bin]]
name = "mkRangGeo"
path = "testapps/mkRandGeo.rs"
libc = "0.2"
4 changes: 2 additions & 2 deletions src/apps/filters/cellToBoundary.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

static mut __stdinp: *mut FILE;
fn feof(_: *mut FILE) -> libc::c_int;
fn fgets(_: *mut libc::c_char, _: libc::c_int, _: *mut FILE) -> *mut libc::c_char;
Expand Down Expand Up @@ -55,7 +55,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/filters/cellToLatLng.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

fn fgets(_: *mut libc::c_char, _: libc::c_int, _: *mut FILE) -> *mut libc::c_char;
fn printf(_: *const libc::c_char, _: ...) -> libc::c_int;
static mut __stdinp: *mut FILE;
Expand Down Expand Up @@ -55,7 +55,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/filters/cellToLocalIj.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

static mut __stdinp: *mut FILE;
static mut __stderrp: *mut FILE;
fn feof(_: *mut FILE) -> libc::c_int;
Expand Down Expand Up @@ -59,7 +59,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/filters/gridDisk.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

static mut __stdinp: *mut FILE;
fn feof(_: *mut FILE) -> libc::c_int;
fn fgets(_: *mut libc::c_char, _: libc::c_int, _: *mut FILE) -> *mut libc::c_char;
Expand Down Expand Up @@ -58,7 +58,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/filters/gridDiskUnsafe.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

static mut __stdinp: *mut FILE;
fn feof(_: *mut FILE) -> libc::c_int;
fn fgets(_: *mut libc::c_char, _: libc::c_int, _: *mut FILE) -> *mut libc::c_char;
Expand Down Expand Up @@ -53,7 +53,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/filters/h3ToComponents.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

fn fgets(_: *mut libc::c_char, _: libc::c_int, _: *mut FILE) -> *mut libc::c_char;
fn printf(_: *const libc::c_char, _: ...) -> libc::c_int;
static mut __stdinp: *mut FILE;
Expand Down Expand Up @@ -50,7 +50,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/filters/latLngToCell.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

static mut __stdinp: *mut FILE;
static mut __stderrp: *mut FILE;
fn feof(_: *mut FILE) -> libc::c_int;
Expand Down Expand Up @@ -59,7 +59,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/filters/localIjToCell.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

static mut __stdinp: *mut FILE;
static mut __stderrp: *mut FILE;
fn feof(_: *mut FILE) -> libc::c_int;
Expand Down Expand Up @@ -65,7 +65,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/fuzzers/fuzzerCellArea.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

fn strcmp(_: *const libc::c_char, _: *const libc::c_char) -> libc::c_int;
fn fclose(_: *mut FILE) -> libc::c_int;
fn fopen(_: *const libc::c_char, _: *const libc::c_char) -> *mut FILE;
Expand Down Expand Up @@ -52,7 +52,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/fuzzers/fuzzerCellProperties.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

fn strcmp(_: *const libc::c_char, _: *const libc::c_char) -> libc::c_int;
fn fclose(_: *mut FILE) -> libc::c_int;
fn fopen(_: *const libc::c_char, _: *const libc::c_char) -> *mut FILE;
Expand Down Expand Up @@ -58,7 +58,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/fuzzers/fuzzerCellToLatLng.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

fn strcmp(_: *const libc::c_char, _: *const libc::c_char) -> libc::c_int;
fn fclose(_: *mut FILE) -> libc::c_int;
fn fopen(_: *const libc::c_char, _: *const libc::c_char) -> *mut FILE;
Expand Down Expand Up @@ -51,7 +51,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/fuzzers/fuzzerCellsToLinkedMultiPolygon.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

fn strcmp(_: *const libc::c_char, _: *const libc::c_char) -> libc::c_int;
fn error(msg: *const libc::c_char);
fn cellsToLinkedMultiPolygon(
Expand Down Expand Up @@ -55,7 +55,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/fuzzers/fuzzerCompact.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

fn strcmp(_: *const libc::c_char, _: *const libc::c_char) -> libc::c_int;
fn fclose(_: *mut FILE) -> libc::c_int;
fn fopen(_: *const libc::c_char, _: *const libc::c_char) -> *mut FILE;
Expand Down Expand Up @@ -70,7 +70,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/fuzzers/fuzzerDirectedEdge.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

fn strcmp(_: *const libc::c_char, _: *const libc::c_char) -> libc::c_int;
fn fclose(_: *mut FILE) -> libc::c_int;
fn fopen(_: *const libc::c_char, _: *const libc::c_char) -> *mut FILE;
Expand Down Expand Up @@ -57,7 +57,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/fuzzers/fuzzerDistances.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

fn strcmp(_: *const libc::c_char, _: *const libc::c_char) -> libc::c_int;
fn fclose(_: *mut FILE) -> libc::c_int;
fn fopen(_: *const libc::c_char, _: *const libc::c_char) -> *mut FILE;
Expand Down Expand Up @@ -52,7 +52,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/fuzzers/fuzzerEdgeLength.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

fn strcmp(_: *const libc::c_char, _: *const libc::c_char) -> libc::c_int;
fn fclose(_: *mut FILE) -> libc::c_int;
fn fopen(_: *const libc::c_char, _: *const libc::c_char) -> *mut FILE;
Expand Down Expand Up @@ -52,7 +52,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/fuzzers/fuzzerGridDisk.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

fn strcmp(_: *const libc::c_char, _: *const libc::c_char) -> libc::c_int;
fn fclose(_: *mut FILE) -> libc::c_int;
fn fopen(_: *const libc::c_char, _: *const libc::c_char) -> *mut FILE;
Expand Down Expand Up @@ -80,7 +80,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/fuzzers/fuzzerHierarchy.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

fn strcmp(_: *const libc::c_char, _: *const libc::c_char) -> libc::c_int;
fn fclose(_: *mut FILE) -> libc::c_int;
fn fopen(_: *const libc::c_char, _: *const libc::c_char) -> *mut FILE;
Expand Down Expand Up @@ -57,7 +57,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/fuzzers/fuzzerIndexIO.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

fn memcpy(_: *mut libc::c_void, _: *const libc::c_void, _: libc::c_ulong) -> *mut libc::c_void;
fn strcmp(_: *const libc::c_char, _: *const libc::c_char) -> libc::c_int;
fn fclose(_: *mut FILE) -> libc::c_int;
Expand Down Expand Up @@ -52,7 +52,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/fuzzers/fuzzerInternalAlgos.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

fn strcmp(_: *const libc::c_char, _: *const libc::c_char) -> libc::c_int;
fn fclose(_: *mut FILE) -> libc::c_int;
fn fopen(_: *const libc::c_char, _: *const libc::c_char) -> *mut FILE;
Expand Down Expand Up @@ -64,7 +64,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/fuzzers/fuzzerLatLngToCell.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

fn strcmp(_: *const libc::c_char, _: *const libc::c_char) -> libc::c_int;
fn fclose(_: *mut FILE) -> libc::c_int;
fn fopen(_: *const libc::c_char, _: *const libc::c_char) -> *mut FILE;
Expand Down Expand Up @@ -50,7 +50,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
4 changes: 2 additions & 2 deletions src/apps/fuzzers/fuzzerLocalIj.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::libc;
extern "C" {
pub type __sFILEX;

fn strcmp(_: *const libc::c_char, _: *const libc::c_char) -> libc::c_int;
fn fclose(_: *mut FILE) -> libc::c_int;
fn fopen(_: *const libc::c_char, _: *const libc::c_char) -> *mut FILE;
Expand Down Expand Up @@ -62,7 +62,7 @@ pub struct __sFILE {
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, libc::c_int) -> libc::c_int,
>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _extra: *mut libc::c_void,
pub _ur: libc::c_int,
pub _ubuf: [libc::c_uchar; 3],
pub _nbuf: [libc::c_uchar; 1],
Expand Down
Loading

0 comments on commit 386d0f4

Please sign in to comment.