Created
December 28, 2019 01:33
-
-
Save guidovranken/88da11e0f96e0d8bae52b9ab96afc9c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <string.h> | |
| #include <stdio.h> | |
| static void | |
| xcp(unsigned long *dst, const unsigned long *src, int top) | |
| { | |
| for (int i = 0; i < top; i++) { | |
| dst[i] = src[i]; | |
| printf("%zu\n", src[i]); | |
| } | |
| } | |
| #define X 6 | |
| unsigned int x(int top) | |
| { | |
| unsigned int* bp; | |
| unsigned long a_d[12]; | |
| union { | |
| unsigned long bn[X]; | |
| unsigned int ui[X]; | |
| } buf; | |
| memset(a_d, 0, sizeof(a_d)); | |
| xcp(buf.bn, a_d + X, top - X); | |
| bp = buf.ui; | |
| return *bp; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment