main
|
Last change
on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago |
|
Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.
git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c
|
-
Property mode
set to
100644
|
|
File size:
501 bytes
|
| Line | |
|---|
| 1 | #include <civlc.h>
|
|---|
| 2 | #include <stdio.h>
|
|---|
| 3 | #include <stdlib.h>
|
|---|
| 4 |
|
|---|
| 5 | int main(int argc, char** argv)
|
|---|
| 6 | {
|
|---|
| 7 | int * input;
|
|---|
| 8 | int * output;
|
|---|
| 9 |
|
|---|
| 10 | output = (int *)malloc(sizeof(int));
|
|---|
| 11 |
|
|---|
| 12 | int first = 1;
|
|---|
| 13 |
|
|---|
| 14 | input = &first;
|
|---|
| 15 |
|
|---|
| 16 | int sizex = sizeof(int);
|
|---|
| 17 |
|
|---|
| 18 | $bundle what = $bundle_pack(&first, sizex);
|
|---|
| 19 |
|
|---|
| 20 | first = first + 1;
|
|---|
| 21 | //*input = *input + 1;
|
|---|
| 22 |
|
|---|
| 23 | /*
|
|---|
| 24 | what = what + 1;
|
|---|
| 25 | Don't do this
|
|---|
| 26 | */
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 | $bundle_unpack(what, output);
|
|---|
| 30 |
|
|---|
| 31 | printf("%d, %d", input[0], output[0]);
|
|---|
| 32 |
|
|---|
| 33 | free(output);
|
|---|
| 34 |
|
|---|
| 35 | return 0;
|
|---|
| 36 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.