+QueryDev
authorshort <>
Wed, 8 Oct 2003 05:52:09 +0000 (05:52 +0000)
committershort <>
Wed, 8 Oct 2003 05:52:09 +0000 (05:52 +0000)
configure.ac
project/Makefile.am
project/QueryDev/Index.html.pl [new file with mode: 0755]
project/QueryDev/ListItem.pm [new file with mode: 0755]
project/QueryDev/Makefile.am [new file with mode: 0644]
project/QueryDev/QueryDev.asm [new file with mode: 0644]
project/QueryDev/QueryDev.lha [new file with mode: 0644]

index 2fc6add..0c747e4 100644 (file)
@@ -84,6 +84,7 @@ Makefile
 ./project/lynxilla/Makefile
 ./project/wayback/Makefile
 ./project/kewensis/Makefile
+./project/QueryDev/Makefile
 ])
 
 echo done.
index 01aa558..8cdf6fc 100644 (file)
@@ -67,7 +67,8 @@ SUBDIRS= \
                332             \
                lynxilla        \
                wayback         \
-               kewensis
+               kewensis        \
+               QueryDev
 
 EXTRA_DIST+= \
                Index.html.pl \
diff --git a/project/QueryDev/Index.html.pl b/project/QueryDev/Index.html.pl
new file mode 100755 (executable)
index 0000000..498db71
--- /dev/null
@@ -0,0 +1,39 @@
+#! /usr/bin/perl
+# 
+# $Id$
+# Main page of 'My::Project::QueryDev'
+# Copyright (C) 2003 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
+# 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; exactly version 2 of June 1991 is required
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+package project::QueryDev::Index;
+require 5.6.0; # at least 'use warnings;' but we need some 5.6.0+ modules anyway
+our $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; };
+our $CVS_ID=q$Id$;
+use strict;
+use warnings;
+
+BEGIN{ open F,"Makefile"; our $top_dir=pop @{[split /\s/,(grep /^top_srcdir/,<F>)[0]]}; eval "use lib '$top_dir'"; close F; }
+use My::Web;
+Wuse 'My::Project';
+Wuse 'project::QueryDev::ListItem';
+
+
+My::Project->init_project(
+               "__PACKAGE__"=>__PACKAGE__,
+               "ListItem"=>\@project::QueryDev::ListItem::ListItem,
+               );
+
+My::Web->footer();
diff --git a/project/QueryDev/ListItem.pm b/project/QueryDev/ListItem.pm
new file mode 100755 (executable)
index 0000000..6342d65
--- /dev/null
@@ -0,0 +1,49 @@
+#! /usr/bin/perl
+# 
+# $Id$
+# Definition of 'My::Project::QueryDev' for list.cgi.pl
+# Copyright (C) 2003 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
+# 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; exactly version 2 of June 1991 is required
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+package project::QueryDev::ListItem;
+require 5.6.0; # at least 'use warnings;' but we need some 5.6.0+ modules anyway
+our $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; };
+our $CVS_ID=q$Id$;
+use strict;
+use warnings;
+
+use My::Web;
+
+
+our @ListItem=(
+               "name"=>"QueryDev",
+               "platform"=>"amiga",
+               "priority"=>3,
+               "download"=>"QueryDev.lha",
+               "link-source file"=>"QueryDev.asm",
+               "summary"=>"Detect disk device name from its volume name",
+               "license"=>"PD",
+               "maintenance"=>"ready",
+               "language"=>"680x0 asm",
+               "description"=><<"HERE",
+<p>QueryDev detects the device name from the given volume name. Volume must be
+locked in the system. Useful for DiskCopy which has the parameter DEVICE and
+you want to copy the diskette from any drive. QueryDev writes the detected
+device name to the specified variable.</p>
+HERE
+               );
+
+1;
diff --git a/project/QueryDev/Makefile.am b/project/QueryDev/Makefile.am
new file mode 100644 (file)
index 0000000..b4a1946
--- /dev/null
@@ -0,0 +1,23 @@
+# $Id$
+# automake source for the Makefile of project/QueryDev/ subdir
+# Copyright (C) 2003 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
+# 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; exactly version 2 of June 1991 is required
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+include $(top_srcdir)/Makefile-head.am
+
+EXTRA_DIST+= \
+       ListItem.pm \
+       Index.html.pl
diff --git a/project/QueryDev/QueryDev.asm b/project/QueryDev/QueryDev.asm
new file mode 100644 (file)
index 0000000..fb2521c
--- /dev/null
@@ -0,0 +1,65 @@
+;DEBUG equ     1
+
+       include "SSMac.h"
+
+       clistart
+
+       moveq   #LDF_VOLUMES+LDF_DEVICES+LDF_READ,d1
+       call    dos,LockDosList
+       move.l  d0,d1
+       move.l  d0,d4
+       get.l   Arg_Volume,d2
+       moveq   #LDF_VOLUMES,d3
+       call    FindDosEntry
+       tst.l   d0
+       bne.s   EntryFound
+       dtl     <Volume %s not found>,a0
+VolumeError    geta    Arg_Volume,a1
+       jump    ss,ExitError
+
+EntryFound     move.l  d0,a2
+       move.l  dl_Task(a2),a2
+       moveq   #LDF_DEVICES,d2
+NextDevice     move.l  d4,d1
+       call    NextDosEntry
+       dtl     <No device matching volume %s>,a0
+       move.l  d0,d4
+       beq.s   VolumeError
+       move.l  d0,a0
+       cmp.l   dvi_Task(a0),a2
+       bne.s   NextDevice
+       move.l  dvi_Name(a0),d2
+       moveq   #LDF_VOLUMES+LDF_DEVICES+LDF_READ,d1
+       call    UnLockDosList
+       lsl.l   #2,d2
+       move.l  d2,a0
+       get.l   Arg_VarName,d1
+       bne.s   SomeVarName
+       dtl     <DevName>,a1
+       move.l  a1,d1
+SomeVarName    push    d1
+       moveq   #0,d3
+       move.b  (a0)+,d3
+       move.l  a0,d2
+       moveq   #1,d4
+       lsl.l   #GVB_GLOBAL_ONLY,d4
+       tstv.l  Arg_Global
+       bne.s   GlobalVar
+       lsl.l   #GVB_LOCAL_ONLY-GVB_GLOBAL_ONLY,d4
+GlobalVar      call    SetVar
+       tst.l   d0
+       bne.s   Return
+       dtl     <Variable %s cannot be set>,a0
+       move.l  sp,a1
+       jump    ss,DosError
+
+Return addq    #4,sp
+       rts
+
+       tags
+       template <VOLUME/A,TO=VARNAME,GLOBAL/S>
+       dv.l    Arg_Volume
+       dv.l    Arg_VarName
+       dv.l    Arg_Global
+       finish
+       end
diff --git a/project/QueryDev/QueryDev.lha b/project/QueryDev/QueryDev.lha
new file mode 100644 (file)
index 0000000..6e9769d
Binary files /dev/null and b/project/QueryDev/QueryDev.lha differ