styling
This commit is contained in:
parent
27afb6247b
commit
15cafc6dae
|
@ -9,9 +9,16 @@ int ret19() {
|
||||||
|
|
||||||
char* structInfo(MyStruct *st) {
|
char* structInfo(MyStruct *st) {
|
||||||
char* buf = malloc(1024*sizeof(char));
|
char* buf = malloc(1024*sizeof(char));
|
||||||
/* snprintf(buf, sizeof(buf), "foo: %d\n", st->foo); */
|
sprintf(buf,
|
||||||
/* snprintf(buf, sizeof(buf), "bar: %c", st->bar); */
|
"Infos about the struct:\n"
|
||||||
sprintf(buf,"Infos about the struct:\nfoo:\t%d\nbar:\t%c\n\ngreetings from C", st->foo, st->bar);
|
"\tfoo:\t%d\n"
|
||||||
|
"\tbar:\t%c\n"
|
||||||
|
"\n"
|
||||||
|
"greetings from C"
|
||||||
|
,
|
||||||
|
st->foo,
|
||||||
|
st->bar
|
||||||
|
);
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
///
|
|
||||||
/// we could simply do this to compile the test lib to a static lib,
|
/// 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
|
/// but that solution might not scale as good as calling a professional
|
||||||
/// build system
|
/// build system
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
fn main() {
|
fn main() {
|
||||||
println!(
|
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:
|
Select your target like this:
|
||||||
`cargo run --bin $TARGET`
|
`cargo run --bin $TARGET`
|
||||||
|
|
Loading…
Reference in New Issue