Lines Matching refs:fh
39 static int from_open(int un, char *file, struct FHeader *fh, int flags)
45 return( hqx_open( file, O_RDONLY, fh, flags ));
49 return( bin_open( file, O_RDONLY, fh, flags ));
53 return( nad_open( file, O_RDONLY, fh, flags ));
57 return( single_open( file, O_RDONLY, fh, flags ));
110 static int to_open(int to, char *file, struct FHeader *fh, int flags)
117 return( nad_open( file, O_RDWR|O_CREAT|O_EXCL, fh, flags ));
122 return( bin_open( file, O_RDWR|O_CREAT|O_EXCL, fh, flags ));
173 struct FHeader fh;
198 memset( &fh, 0, sizeof( fh ));
199 if ( from_open( module, path, &fh, flags ) < 0 ) {
208 printf("name: %s\n",fh.name);
209 printf("comment: %s\n",fh.comment);
210 memcpy(&buf, &fh.finder_info.fdCreator, sizeof(u_int32_t));
212 memcpy(&buf, &fh.finder_info.fdType, sizeof(u_int32_t));
215 printf("fork length[%d]: %u\n", i, ntohl(fh.forklen[i]));
216 t = AD_DATE_TO_UNIX(fh.create_date);
218 t = AD_DATE_TO_UNIX(fh.mod_date);
220 t = AD_DATE_TO_UNIX(fh.backup_date);
231 strcpy(fh.name, newname);
233 if ( to_open( module, path, &fh, flags ) < 0 ) {
256 fprintf( stderr, "megatron: fh.forklen[%d] is \t%d\n", fork,
257 ntohl( fh.forklen[ fork ] ));
259 if (( bufc < 0 ) || ( forkred != ntohl( fh.forklen[ fork ] ))) {