mirror of
https://github.com/gryf/gryf-overlay.git
synced 2026-03-31 10:23:33 +02:00
Added unadf
This commit is contained in:
2367
app-arch/unadf/files/64-bit-fixes
Normal file
2367
app-arch/unadf/files/64-bit-fixes
Normal file
File diff suppressed because it is too large
Load Diff
44
app-arch/unadf/files/add-hardening-flags-in-compiler-options
Normal file
44
app-arch/unadf/files/add-hardening-flags-in-compiler-options
Normal file
@@ -0,0 +1,44 @@
|
||||
Description: Add hardening flags in compiler options
|
||||
Author: Boris Pek <tehnick-8@mail.ru>
|
||||
Last-Update: 2012-06-19
|
||||
|
||||
--- a/Demo/Makefile
|
||||
+++ b/Demo/Makefile
|
||||
@@ -8,6 +8,9 @@
|
||||
CFLAGS=-I$(LIBDIR) -Wall -Wno-uninitialized -pedantic -std=gnu99 -ggdb
|
||||
LDFLAGS=-L$(LIBDIR) -ladf
|
||||
|
||||
+CFLAGS+=$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
|
||||
+LDFLAGS+=$(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed
|
||||
+
|
||||
EXES= unadf
|
||||
|
||||
|
||||
--- a/Lib/Makefile
|
||||
+++ b/Lib/Makefile
|
||||
@@ -16,11 +16,13 @@
|
||||
DEFINES=
|
||||
|
||||
CFLAGS=$(DEFINES) -I${NATIV_DIR} -I.. -I. -Wall -ggdb -std=gnu99
|
||||
+CFLAGS+=$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
|
||||
|
||||
CC=gcc
|
||||
DEPEND=makedepend
|
||||
|
||||
LDFLAGS=-L. -ladf
|
||||
+LDFLAGS+=$(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed
|
||||
LDSHARED=$(CC)
|
||||
|
||||
OBJS= adf_hd.o adf_disk.o adf_raw.o adf_bitm.o adf_dump.o\
|
||||
--- a/Demo/unadf.c
|
||||
+++ b/Demo/unadf.c
|
||||
@@ -489,8 +489,7 @@
|
||||
|
||||
dev = adfMountDev( devname,TRUE );
|
||||
if (!dev) {
|
||||
- sprintf(strbuf,"Can't mount the dump device '%s'.\n", devname);
|
||||
- fprintf(stderr, strbuf);
|
||||
+ fprintf(stderr,"Can't mount the dump device '%s'.\n", devname);
|
||||
adfEnvCleanUp(); exit(1);
|
||||
}
|
||||
if (!qflag)
|
||||
100
app-arch/unadf/files/source-code-fixes
Normal file
100
app-arch/unadf/files/source-code-fixes
Normal file
@@ -0,0 +1,100 @@
|
||||
Description: fix header files
|
||||
Last-Update: 2012-05-31
|
||||
|
||||
--- unadf-0.7.11a.orig/Lib/adf_env.c
|
||||
+++ unadf-0.7.11a/Lib/adf_env.c
|
||||
@@ -33,7 +33,7 @@
|
||||
#include"adf_nativ.h"
|
||||
#include"adf_env.h"
|
||||
|
||||
-#include"defendian.h"
|
||||
+#include"Win32/defendian.h"
|
||||
|
||||
union u{
|
||||
long l;
|
||||
--- unadf-0.7.11a.orig/Lib/adf_file.c
|
||||
+++ unadf-0.7.11a/Lib/adf_file.c
|
||||
@@ -31,7 +31,7 @@
|
||||
#include"adf_util.h"
|
||||
#include"adf_file.h"
|
||||
#include"adf_str.h"
|
||||
-#include"defendian.h"
|
||||
+#include"Win32/defendian.h"
|
||||
#include"adf_raw.h"
|
||||
#include"adf_disk.h"
|
||||
#include"adf_dir.h"
|
||||
--- unadf-0.7.11a.orig/Lib/adf_dir.c
|
||||
+++ unadf-0.7.11a/Lib/adf_dir.c
|
||||
@@ -32,7 +32,7 @@
|
||||
#include"adf_dir.h"
|
||||
#include"adf_str.h"
|
||||
#include"adf_util.h"
|
||||
-#include"defendian.h"
|
||||
+#include"Win32/defendian.h"
|
||||
#include"adf_blk.h"
|
||||
#include"adf_raw.h"
|
||||
#include"adf_disk.h"
|
||||
--- unadf-0.7.11a.orig/Lib/adf_raw.c
|
||||
+++ unadf-0.7.11a/Lib/adf_raw.c
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "adf_disk.h"
|
||||
#include "adf_util.h"
|
||||
#include "adf_err.h"
|
||||
-#include "defendian.h"
|
||||
+#include "Win32/defendian.h"
|
||||
|
||||
extern struct Env adfEnv;
|
||||
|
||||
--- unadf-0.7.11a.orig/Lib/adf_bitm.c
|
||||
+++ unadf-0.7.11a/Lib/adf_bitm.c
|
||||
@@ -33,7 +33,7 @@
|
||||
#include"adf_err.h"
|
||||
#include"adf_disk.h"
|
||||
#include"adf_util.h"
|
||||
-#include"defendian.h"
|
||||
+#include"Win32/defendian.h"
|
||||
|
||||
extern unsigned long bitMask[32];
|
||||
|
||||
--- unadf-0.7.11a.orig/Lib/adf_cache.c
|
||||
+++ unadf-0.7.11a/Lib/adf_cache.c
|
||||
@@ -31,7 +31,7 @@
|
||||
#include"adf_defs.h"
|
||||
#include"adf_str.h"
|
||||
#include"adf_err.h"
|
||||
-#include"defendian.h"
|
||||
+#include"Win32/defendian.h"
|
||||
#include"adf_cache.h"
|
||||
#include"adf_raw.h"
|
||||
#include"adf_disk.h"
|
||||
--- unadf-0.7.11a.orig/Lib/adf_hd.c
|
||||
+++ unadf-0.7.11a/Lib/adf_hd.c
|
||||
@@ -41,7 +41,7 @@
|
||||
#include"adf_dump.h"
|
||||
#include"adf_err.h"
|
||||
|
||||
-#include"defendian.h"
|
||||
+#include"Win32/defendian.h"
|
||||
|
||||
extern struct Env adfEnv;
|
||||
|
||||
--- unadf-0.7.11a.orig/Lib/Generic/adf_nativ.c
|
||||
+++ unadf-0.7.11a/Lib/Generic/adf_nativ.c
|
||||
@@ -20,7 +20,6 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
- */
|
||||
|
||||
#include<stdio.h>
|
||||
#include<stdlib.h>
|
||||
--- unadf-0.7.11a.orig/Lib/Generic/adf_nativ.h
|
||||
+++ unadf-0.7.11a/Lib/Generic/adf_nativ.h
|
||||
@@ -20,7 +20,6 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
- */
|
||||
|
||||
#ifndef ADF_NATIV_H
|
||||
#define ADF_NATIV_H
|
||||
122
app-arch/unadf/files/unadf_separate_comment.patch
Normal file
122
app-arch/unadf/files/unadf_separate_comment.patch
Normal file
@@ -0,0 +1,122 @@
|
||||
diff -ur unadf-0.7.11a.orig/Demo/unadf.c unadf-0.7.11a/Demo/unadf.c
|
||||
--- unadf-0.7.11a.orig/Demo/unadf.c 2013-05-12 17:59:51.214905177 +0200
|
||||
+++ unadf-0.7.11a/Demo/unadf.c 2013-05-12 17:50:06.843420519 +0200
|
||||
@@ -58,6 +58,7 @@
|
||||
puts(" -r : lists directory tree contents");
|
||||
puts(" -c : use dircache data (must be used with -l)");
|
||||
puts(" -s : display entries logical block pointer (must be used with -l)");
|
||||
+ puts(" -m : display file comments, if exists (must be used with -l)");
|
||||
putchar('\n');
|
||||
puts(" -v n : mount volume #n instead of default #0 volume");
|
||||
putchar('\n');
|
||||
@@ -65,7 +66,8 @@
|
||||
puts(" -d dir : extract to 'dir' directory");
|
||||
}
|
||||
|
||||
-void printEnt(struct Volume *vol, struct Entry* entry, char *path, BOOL sect)
|
||||
+void printEnt(struct Volume *vol, struct Entry* entry, char *path, BOOL sect,
|
||||
+ BOOL comment)
|
||||
{
|
||||
/* do not print the links entries, ADFlib do not support them yet properly */
|
||||
if (entry->type==ST_LFILE || entry->type==ST_LDIR || entry->type==ST_LSOFT)
|
||||
@@ -89,7 +91,7 @@
|
||||
printf("%s/",entry->name);
|
||||
else
|
||||
printf("%s",entry->name);
|
||||
- if (entry->comment!=NULL && strlen(entry->comment)>0)
|
||||
+ if (comment && entry->comment!=NULL && strlen(entry->comment)>0)
|
||||
printf(", %s",entry->comment);
|
||||
putchar('\n');
|
||||
|
||||
@@ -199,13 +201,14 @@
|
||||
}
|
||||
|
||||
|
||||
-void printTree(struct Volume *vol, struct List* tree, char* path, BOOL sect)
|
||||
+void printTree(struct Volume *vol, struct List* tree, char* path, BOOL sect,
|
||||
+ BOOL comment)
|
||||
{
|
||||
char *buf;
|
||||
struct Entry* entry;
|
||||
|
||||
while(tree) {
|
||||
- printEnt(vol, tree->content, path, sect);
|
||||
+ printEnt(vol, tree->content, path, sect, comment);
|
||||
if (tree->subdir!=NULL) {
|
||||
entry = (struct Entry*)tree->content;
|
||||
if (strlen(path)>0) {
|
||||
@@ -215,11 +218,11 @@
|
||||
return;
|
||||
}
|
||||
sprintf(buf,"%s/%s", path, entry->name);
|
||||
- printTree(vol, tree->subdir, buf, sect);
|
||||
+ printTree(vol, tree->subdir, buf, sect, comment);
|
||||
free(buf);
|
||||
}
|
||||
else
|
||||
- printTree(vol, tree->subdir, entry->name, sect);
|
||||
+ printTree(vol, tree->subdir, entry->name, sect, comment);
|
||||
}
|
||||
tree = tree->next;
|
||||
}
|
||||
@@ -370,12 +373,10 @@
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int i, j;
|
||||
- BOOL rflag, lflag, xflag, cflag, vflag, sflag, dflag, pflag, qflag;
|
||||
+ BOOL rflag, lflag, xflag, cflag, vflag, sflag, dflag, pflag, qflag, mflag;
|
||||
struct List* files, *rtfiles;
|
||||
char *devname, *dirname;
|
||||
- char strbuf[80];
|
||||
unsigned char *extbuf;
|
||||
- int vInd, dInd, fInd, aInd;
|
||||
BOOL nextArg;
|
||||
|
||||
struct Device *dev;
|
||||
@@ -389,8 +390,7 @@
|
||||
exit(0);
|
||||
}
|
||||
|
||||
- rflag = lflag = cflag = vflag = sflag = dflag = pflag = qflag = FALSE;
|
||||
- vInd = dInd = fInd = aInd = -1;
|
||||
+ rflag = lflag = cflag = vflag = sflag = dflag = pflag = qflag = mflag = FALSE;
|
||||
xflag = TRUE;
|
||||
dirname = NULL;
|
||||
devname = NULL;
|
||||
@@ -430,6 +430,9 @@
|
||||
case 's':
|
||||
sflag = TRUE;
|
||||
break;
|
||||
+ case 'm':
|
||||
+ mflag = TRUE;
|
||||
+ break;
|
||||
case 'c':
|
||||
cflag = TRUE;
|
||||
break;
|
||||
@@ -522,13 +525,13 @@
|
||||
if (!rflag) {
|
||||
cell = list = adfGetDirEnt(vol,vol->curDirPtr);
|
||||
while(cell) {
|
||||
- printEnt(vol,cell->content,"", sflag);
|
||||
+ printEnt(vol,cell->content,"", sflag, mflag);
|
||||
cell = cell->next;
|
||||
}
|
||||
adfFreeDirList(list);
|
||||
} else {
|
||||
cell = list = adfGetRDirEnt(vol,vol->curDirPtr,TRUE);
|
||||
- printTree(vol,cell,"", sflag);
|
||||
+ printTree(vol,cell,"", sflag, mflag);
|
||||
adfFreeDirList(list);
|
||||
}
|
||||
}else if (xflag) {
|
||||
diff -ur unadf-0.7.11a.orig/Demo/unadf.usage unadf-0.7.11a/Demo/unadf.usage
|
||||
--- unadf-0.7.11a.orig/Demo/unadf.usage 2006-12-03 15:27:00.000000000 +0100
|
||||
+++ unadf-0.7.11a/Demo/unadf.usage 2013-05-12 17:40:23.116966854 +0200
|
||||
@@ -3,6 +3,7 @@
|
||||
-r : lists directory tree contents
|
||||
-c : use dircache data (must be used with -l)
|
||||
-s : display entries logical block pointer (must be used with -l)
|
||||
+ -m : display file comments, if exists (must be used with -l)
|
||||
|
||||
-v n : mount volume #n instead of default #0 volume
|
||||
|
||||
Reference in New Issue
Block a user