Lines Matching refs:fh
35 static int from_open(int un, char *file, struct FHeader *fh, int flags)
41 return( hqx_open( file, O_RDONLY, fh, flags ));
45 return( bin_open( file, O_RDONLY, fh, flags ));
49 return( nad_open( file, O_RDONLY, fh, flags ));
53 return( single_open( file, O_RDONLY, fh, flags ));
106 static int to_open(int to, char *file, struct FHeader *fh, int flags)
113 return( nad_open( file, O_RDWR|O_CREAT|O_EXCL, fh, flags ));
118 return( bin_open( file, O_RDWR|O_CREAT|O_EXCL, fh, flags ));
169 struct FHeader fh;
194 memset( &fh, 0, sizeof( fh ));
195 if ( from_open( module, path, &fh, flags ) < 0 ) {
204 printf("name: %s\n",fh.name);
205 printf("comment: %s\n",fh.comment);
206 memcpy(&buf, &fh.finder_info.fdCreator, sizeof(u_int32_t));
208 memcpy(&buf, &fh.finder_info.fdType, sizeof(u_int32_t));
211 printf("fork length[%d]: %u\n", i, ntohl(fh.forklen[i]));
212 t = AD_DATE_TO_UNIX(fh.create_date);
214 t = AD_DATE_TO_UNIX(fh.mod_date);
216 t = AD_DATE_TO_UNIX(fh.backup_date);
227 strcpy(fh.name, newname);
229 if ( to_open( module, path, &fh, flags ) < 0 ) {
252 fprintf( stderr, "megatron: fh.forklen[%d] is \t%d\n", fork,
253 ntohl( fh.forklen[ fork ] ));
255 if (( bufc < 0 ) || ( forkred != ntohl( fh.forklen[ fork ] ))) {