diff --git a/members/c-bindings/lib/test.c b/members/c-bindings/lib/test.c index e7eae97..494180a 100644 --- a/members/c-bindings/lib/test.c +++ b/members/c-bindings/lib/test.c @@ -9,9 +9,16 @@ int ret19() { char* structInfo(MyStruct *st) { char* buf = malloc(1024*sizeof(char)); - /* snprintf(buf, sizeof(buf), "foo: %d\n", st->foo); */ - /* snprintf(buf, sizeof(buf), "bar: %c", st->bar); */ - sprintf(buf,"Infos about the struct:\nfoo:\t%d\nbar:\t%c\n\ngreetings from C", st->foo, st->bar); + sprintf(buf, + "Infos about the struct:\n" + "\tfoo:\t%d\n" + "\tbar:\t%c\n" + "\n" + "greetings from C" + , + st->foo, + st->bar + ); return buf; } diff --git a/members/c-bindings/src/build.rs b/members/c-bindings/src/build.rs index fb5d0c4..04d6c3a 100644 --- a/members/c-bindings/src/build.rs +++ b/members/c-bindings/src/build.rs @@ -1,4 +1,3 @@ -/// /// we could simply do this to compile the test lib to a static lib, /// but that solution might not scale as good as calling a professional /// build system diff --git a/src/main.rs b/src/main.rs index 2b7abb0..c19ca67 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,7 @@ fn main() { println!( -"This is the default executable! It does not do much, use another executable. +"SUCCESS!!! +This is the default executable! It does not do much, use another executable. Select your target like this: `cargo run --bin $TARGET`