MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / adfEnvInitDefault

Function adfEnvInitDefault

dep/adflib/src/adf_env.c:91–152  ·  view source on GitHub ↗

* adfInitEnv * */

Source from the content-addressed store, hash-verified

89 *
90 */
91void adfEnvInitDefault()
92{
93/* char str[80];*/
94 union u val;
95
96 /* internal checking */
97
98 if (sizeof(short)!=2)
99 { fprintf(stderr,"Compilation error : sizeof(short)!=2\n"); exit(1); }
100 if (sizeof(int32_t)!=4)
101 { fprintf(stderr,"Compilation error : sizeof(short)!=2\n"); exit(1); }
102 if (sizeof(struct bEntryBlock)!=512)
103 { fprintf(stderr,"Internal error : sizeof(struct bEntryBlock)!=512\n"); exit(1); }
104 if (sizeof(struct bRootBlock)!=512)
105 { fprintf(stderr,"Internal error : sizeof(struct bRootBlock)!=512\n"); exit(1); }
106 if (sizeof(struct bDirBlock)!=512)
107 { fprintf(stderr,"Internal error : sizeof(struct bDirBlock)!=512\n"); exit(1); }
108 if (sizeof(struct bBootBlock)!=1024)
109 { fprintf(stderr,"Internal error : sizeof(struct bBootBlock)!=1024\n"); exit(1); }
110 if (sizeof(struct bFileHeaderBlock)!=512)
111 { fprintf(stderr,"Internal error : sizeof(struct bFileHeaderBlock)!=512\n"); exit(1); }
112 if (sizeof(struct bFileExtBlock)!=512)
113 { fprintf(stderr,"Internal error : sizeof(struct bFileExtBlock)!=512\n"); exit(1); }
114 if (sizeof(struct bOFSDataBlock)!=512)
115 { fprintf(stderr,"Internal error : sizeof(struct bOFSDataBlock)!=512\n"); exit(1); }
116 if (sizeof(struct bBitmapBlock)!=512)
117 { fprintf(stderr,"Internal error : sizeof(struct bBitmapBlock)!=512\n"); exit(1); }
118 if (sizeof(struct bBitmapExtBlock)!=512)
119 { fprintf(stderr,"Internal error : sizeof(struct bBitmapExtBlock)!=512\n"); exit(1); }
120 if (sizeof(struct bLinkBlock)!=512)
121 { fprintf(stderr,"Internal error : sizeof(struct bLinkBlock)!=512\n"); exit(1); }
122
123 val.l=1L;
124/* if LITT_ENDIAN not defined : must be BIG endian */
125#ifndef LITT_ENDIAN
126 if (val.c[3]!=1) /* little endian : LITT_ENDIAN must be defined ! */
127 { fprintf(stderr,"Compilation error : #define LITT_ENDIAN must exist\n"); exit(1); }
128#else
129 if (val.c[3]==1) /* big endian : LITT_ENDIAN must not be defined ! */
130 { fprintf(stderr,"Compilation error : #define LITT_ENDIAN must not exist\n"); exit(1); }
131#endif
132
133 adfEnv.wFct = Warning;
134 adfEnv.eFct = Error;
135 adfEnv.vFct = Verbose;
136 adfEnv.notifyFct = Changed;
137 adfEnv.rwhAccess = rwHeadAccess;
138 adfEnv.progressBar = progressBar;
139
140 adfEnv.useDirCache = FALSE;
141 adfEnv.useRWAccess = FALSE;
142 adfEnv.useNotify = FALSE;
143 adfEnv.useProgressBar = FALSE;
144
145/* sprintf(str,"ADFlib %s (%s)",adfGetVersionNumber(),adfGetVersionDate());
146 (*adfEnv.vFct)(str);
147*/
148 adfEnv.nativeFct=(struct nativeFunctions*)malloc(sizeof(struct nativeFunctions));

Callers 1

AdfMountMethod · 0.85

Calls 1

adfInitNativeFctFunction · 0.85

Tested by

no test coverage detected