diff options
author | Alexei Podtelezhnikov <apodtele@gmail.com> | 2017-06-29 22:47:51 -0400 |
---|---|---|
committer | Alexei Podtelezhnikov <apodtele@gmail.com> | 2017-06-29 22:47:51 -0400 |
commit | 48cf13380365f38280323442eb49166cb3b55973 (patch) | |
tree | d0c5d598d8f751023cdf1bd323e3f0483ce6e2a9 /frommacbinary.c | |
parent | 3d80b3d7d3a6f24e4c326f77196b20926238452a (diff) |
Diffstat (limited to 'frommacbinary.c')
-rw-r--r-- | frommacbinary.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/frommacbinary.c b/frommacbinary.c index 6657dc9..67f985e 100644 --- a/frommacbinary.c +++ b/frommacbinary.c @@ -73,6 +73,7 @@ static void ProcessFile(char *filename) { unsigned char header[128]; char name[80]; int dlen, rlen; + time_t stamp; int i,ch; binfile = fopen(filename,"r"); @@ -129,14 +130,20 @@ return; } else { name[header[1]] = '\0'; fprintf( infofile, "Mac filename = %s\n", name ); - fprintf( infofile, "Data fork length = %d\n", dlen ); - fprintf( infofile, "Resource fork length = %d\n", rlen ); fprintf( infofile, "File Type = %c%c%c%c\n", header[65], header[66], header[67], header[68]); fprintf( infofile, "File Creator = %c%c%c%c\n", header[69], header[70], header[71], header[72]); fprintf( infofile, "Finder Flags = %08x\n", header[73]); + fprintf( infofile, "Data fork length = %d\n", dlen ); + fprintf( infofile, "Resource fork length = %d\n", rlen ); + stamp = ((header[91]<<24)|(header[92]<<16)|(header[93]<<8)|header[94]) + - 2082844800; + fprintf( infofile, "Creation time = %s", ctime(&stamp) ); + stamp = ((header[95]<<24)|(header[96]<<16)|(header[97]<<8)|header[98]) + - 2082844800; + fprintf( infofile, "Modification time = %s", ctime(&stamp) ); fclose( infofile ); } } |