mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Removed more stray files.
This commit is contained in:
parent
da48bc61e8
commit
638393fdfb
33
align_test.c
33
align_test.c
@ -1,33 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define is_aligned(POINTER, BYTE_COUNT) \
|
||||
(((uintptr_t)(const void *)(POINTER)) % (BYTE_COUNT) == 0)
|
||||
|
||||
#ifndef uintptr_t
|
||||
#define uintptr_t int
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
float lat;
|
||||
float lon;
|
||||
char* stid;
|
||||
double time;
|
||||
float temp;
|
||||
} obs_t;
|
||||
|
||||
int main (int argc, char **argv) {
|
||||
|
||||
obs_t p;
|
||||
|
||||
|
||||
printf("Sizeof(int): %d\n",sizeof(int));
|
||||
|
||||
printf("IS_ALIGNED (p,4): %d\n",is_aligned(&p,4u));
|
||||
printf("IS_ALIGNED (p,8): %d\n",is_aligned(&p,8u));
|
||||
printf("IS_ALIGNED (p,16): %d\n",is_aligned(&p,16u));
|
||||
printf("IS_ALIGNED (p,32): %d\n",is_aligned(&p,32u));
|
||||
printf("IS_ALIGNED (p,64): %d\n",is_aligned(&p,64u));
|
||||
printf("Finished.\n");
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user