[Midnightbsd-cvs] src: src/release: Remove unused architectures and files

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Fri Aug 29 17:59:04 EDT 2008


Log Message:
-----------
Remove unused architectures and files

Tags:
----
RELENG_0_2

Modified Files:
--------------
    src/release:
        Makefile (r1.17.2.6 -> r1.17.2.7)

Removed Files:
-------------
    src/release/ia64:
        boot_crunch.conf
        mkisoimages.sh
    src/release/picobsd/tinyware/simple_httpd:
        Makefile
        README
        simple_httpd.c
    src/release/picobsd/tinyware/view:
        Makefile
        README
        fbsd.png
        picobsd.vu
        view.c
    src/release/powerpc:
        boot.tbxi
        boot_crunch.conf
        hfs.map
        mkisoimages.sh

-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/cvs/src/release/Makefile,v
retrieving revision 1.17.2.6
retrieving revision 1.17.2.7
diff -L release/Makefile -L release/Makefile -u -r1.17.2.6 -r1.17.2.7
--- release/Makefile
+++ release/Makefile
@@ -731,9 +731,7 @@
 	-test -f ${.CURDIR}/install.cfg \
 	    && cp ${.CURDIR}/install.cfg ${RD}/mfsfd
 	@mkdir -p ${RD}/mfsfd/boot
-.if ${TARGET_ARCH} != "ia64" && ${TARGET_ARCH} != "powerpc"
 	@cp ${RD}/trees/base/boot/boot* ${RD}/mfsfd/boot
-.endif
 .if ${TARGET} == "i386" || ${TARGET_ARCH} == "amd64"
 	@cp ${RD}/trees/base/boot/mbr ${RD}/mfsfd/boot
 .endif
--- release/ia64/boot_crunch.conf
+++ /dev/null
@@ -1,48 +0,0 @@
-# $MidnightBSD: src/release/ia64/boot_crunch.conf,v 1.2 2007/03/17 16:02:47 laffer1 Exp $
-# $FreeBSD: src/release/ia64/boot_crunch.conf,v 1.9 2004/10/01 07:54:37 ru Exp $
-
-buildopts -DRELEASE_CRUNCH -Dlint
-
-srcdirs /usr/src/bin
-progs hostname
-progs pwd
-progs rm
-progs sh
-progs test
-ln sh -sh
-ln test [
-
-srcdirs /usr/src/gnu/usr.bin
-progs cpio
-
-srcdirs /usr/src/sbin
-progs camcontrol
-progs dhclient
-progs fsck_ffs
-progs gpt
-progs ifconfig
-progs mount_msdosfs
-progs mount_nfs
-progs newfs
-progs newfs_msdos
-progs route
-progs rtsol
-progs tunefs
-
-srcdirs /usr/src/usr.bin
-progs find
-progs minigzip
-progs sed
-ln minigzip gzip
-ln minigzip gunzip
-ln minigzip zcat
-
-srcdirs /usr/src/usr.sbin
-progs arp
-progs ppp
-progs sysinstall
-progs usbd
-progs usbdevs
-
-libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph
-libs -ldialog -lncurses -ldisk -lcam -lkiconv -lsbuf -lufs
--- release/ia64/mkisoimages.sh
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/bin/sh
-#
-# Module: mkisoimages.sh
-# Author: Jordan K Hubbard
-# Date:   22 June 2001
-#
-# $MidnightBSD: src/release/ia64/mkisoimages.sh,v 1.2 2007/03/17 16:02:47 laffer1 Exp $
-# $FreeBSD: src/release/ia64/mkisoimages.sh,v 1.11 2005/01/30 21:10:52 kensmith Exp $
-#
-# This script is used by release/Makefile to build the (optional) ISO images
-# for a MidnightBSD release.  It is considered architecture dependent since each
-# platform has a slightly unique way of making bootable CDs.  This script
-# is also allowed to generate any number of images since that is more of
-# publishing decision than anything else.
-#
-# Usage:
-#
-# mkisoimages.sh [-b] image-label image-name base-bits-dir [extra-bits-dir]
-#
-# Where -b is passed if the ISO image should be made "bootable" by
-# whatever standards this architecture supports (may be unsupported),
-# image-label is the ISO image label, image-name is the filename of the
-# resulting ISO image, base-bits-dir contains the image contents and
-# extra-bits-dir, if provided, contains additional files to be merged
-# into base-bits-dir as part of making the image.
-
-set -e
-
-if [ "x$1" = "x-b" ]; then
-    bootable=yes
-    shift
-else
-    bootable=no
-fi
-
-if [ $# -lt 3 ]; then
-    echo usage: $0 '[-b] label iso-name base-dir [extra-dir]'
-    exit 1
-fi
-
-LABEL=$1; shift
-NAME=$1; shift
-BASE=$1; shift
-
-MKISOFS=mkisofs
-MKISOFS_PKG=cdrtools
-MKISOFS_PORT=/usr/mports/sysutils/${MKISOFS_PKG}
-
-if ! which ${MKISOFS} > /dev/null; then
-    echo -n "${MKISOFS}(8) does not exist: "
-    if [ -f ${MKISOFS_PORT}/Makefile ]; then
-	echo building the port...
-	if ! (cd ${MKISOFS_PORT} && make install BATCH=yes && make clean); then
-	    echo "error: cannot build ${MKISOFS}(8). Bailing out..."
-	    exit 2
-	fi
-    else
-	echo fetching the package...
-	if ! pkg_add -r ${MKISOFS_PKG}; then
-	    echo "error: cannot fetch ${MKISOFS}(8). Bailing out..."
-	    exit 2
-	fi
-    fi
-fi
-
-EFIPART=efipart.sys
-
-# To create a bootable CD under EFI, the boot image should be an EFI
-# system partition.
-if [ $bootable = yes ]; then
-    EFISZ=32768
-    MNT=/mnt
-    dd if=/dev/zero of=$BASE/$EFIPART count=$EFISZ
-    md=`mdconfig -a -t vnode -f $BASE/$EFIPART`
-    newfs_msdos -F 12 -S 512 -h 4 -o 0 -s $EFISZ -u 16 $md
-    mount -t msdosfs /dev/$md $MNT
-    mkdir -p $MNT/efi/boot $MNT/boot $MNT/boot/kernel
-    cp -R $BASE/boot/defaults $MNT/boot
-    cp $BASE/boot/kernel/kernel $MNT/boot/kernel
-    cp $BASE/boot/kernel/ispfw.ko $MNT/boot/kernel
-    cp $BASE/boot/device.hints $MNT/boot
-    cp $BASE/boot/loader.* $MNT/boot
-    cp $BASE/boot/mfsroot.gz $MNT/boot
-    cp $BASE/boot/support.4th $MNT/boot
-    mv $MNT/boot/loader.efi $MNT/efi/boot/bootia64.efi
-    umount $MNT
-    mdconfig -d -u $md
-    BOOTOPTS="-b $EFIPART -no-emul-boot"
-else
-    BOOTOPTS=""
-fi
-
-publisher="The MidnightBSD Project.  http://www.midnightbsd.org/"
-
-$MKISOFS $BOOTOPTS -r -J -V $LABEL -publisher "$publisher" -o $NAME $BASE $*
-rm -f $BASE/$EFIPART
-exit 0
--- release/picobsd/tinyware/simple_httpd/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $FreeBSD: src/release/picobsd/tinyware/simple_httpd/Makefile,v 1.8 2004/12/21 08:47:06 ru Exp $
-#
-PROG=simple_httpd
-SRCS= 	simple_httpd.c
-NO_MAN=
-
-.include <bsd.prog.mk>
--- release/picobsd/tinyware/simple_httpd/simple_httpd.c
+++ /dev/null
@@ -1,499 +0,0 @@
-/*-
- * Simple_HTTPd v1.1 - a very small, barebones HTTP server
- * 
- * Copyright (c) 1998-1999 Marc Nicholas <marc at netstor.com>
- * All rights reserved.
- *
- * Major rewrite by William Lloyd <wlloyd at slap.net>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD: src/release/picobsd/tinyware/simple_httpd/simple_httpd.c,v 1.16 2004/08/16 09:38:34 dwmalone Exp $
- */
-
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/wait.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <fcntl.h>
-#include <netdb.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <unistd.h>
-
-int             http_port = 80;
-int             daemonize = 1;
-int             verbose = 0;
-int             http_sock, con_sock;
-
-const char     *fetch_mode = NULL;
-char            homedir[100];
-char            logfile[80];
-char           *adate(void);
-void            init_servconnection(void);
-void		http_date(void);
-void            http_output(const char *html);
-void            http_request(void);
-void            log_line(char *req);
-void            wait_connection(void);
-
-struct hostent *hst;
-struct sockaddr_in source;
-
-/* HTTP basics */
-static char httpd_server_ident[] = "Server: FreeBSD/PicoBSD simple_httpd 1.1\r";
-
-static char http_200[] = "HTTP/1.0 200 OK\r";
-
-const char *default_mime_type = "application/octet-stream";
-
-const char *mime_type[][2] = {
-    { "txt",      "text/plain"            },
-    { "htm",      "text/html"             },
-    { "html",     "text/html"             },
-    { "gif",      "image/gif"             },
-    { "jpg",      "image/jpeg"            },
-    { "mp3",      "audio/mpeg"            }
-};
-
-const int mime_type_max = sizeof(mime_type) / sizeof(mime_type[0]) - 1;
-
-/* Two parts, HTTP Header and then HTML */
-static const char *http_404[2] = 
-    {"HTTP/1.0 404 Not found\r\n", 
-"<HTML><HEAD><TITLE>Error</TITLE></HEAD><BODY><H1>Error 404</H1>\
-Not found - file doesn't exist or you do not have permission.\n</BODY></HTML>\r\n"
-};
-
-static const char *http_405[2] = 
-    {"HTTP/1.0 405 Method Not allowed\r\nAllow: GET,HEAD\r\n",
-"<HTML><HEAD><TITLE>Error</TITLE></HEAD><BODY><H1>Error 405</H1>\
-This server only supports GET and HEAD requests.\n</BODY></HTML>\r\n"
-};
-
-/*
- * Only called on initial invocation
- */
-void
-init_servconnection(void)
-{
-	struct sockaddr_in server;
-
-	/* Create a socket */
-	http_sock = socket(AF_INET, SOCK_STREAM, 0);
-	if (http_sock < 0) {
-		perror("socket");
-		exit(1);
-	}
-	server.sin_family = AF_INET;
-	server.sin_port = htons(http_port);
-	server.sin_addr.s_addr = INADDR_ANY;
-	if (bind(http_sock, (struct sockaddr *) & server, sizeof(server)) < 0) {
-		perror("bind socket");
-		exit(1);
-	}
-        if (verbose) printf("simple_httpd:%d\n",http_port);
-}
-
-/*
- * Wait here until we see an incoming http request
- */
-void
-wait_connection(void)
-{
-	socklen_t lg;
-
-	lg = sizeof(struct sockaddr_in);
-
-	con_sock = accept(http_sock, (struct sockaddr *) & source, &lg);
-	if (con_sock <= 0) {
-		perror("accept");
-		exit(1);
-	}
-}
-
-/*
- * Print timestamp for HTTP HEAD and GET
- */
-void
-http_date(void)
-{
-	time_t	tl;
-	char	buff[50];
-
-	tl = time(NULL);
-	strftime(buff, 50, "Date: %a, %d %h %Y %H:%M:%S %Z\r\n", gmtime(&tl));
-	write(con_sock, buff, strlen(buff));
-	/* return(buff); */
-}
-
-/*
- * Send data to the open socket
- */
-void
-http_output(const char *html)
-{
-        write(con_sock, html, strlen(html));
-        write(con_sock, "\r\n", 2);
-}
-
-
-/*
- * Create and write the log information to file
- * Log file format is one line per entry
- */
-void
-log_line(char *req)
-{
-        char            log_buff[256];
-        char            msg[1024];
-	char            env_host[80], env_addr[80];
-	long            addr;
-	FILE           *log;
-
-	strcpy(log_buff,inet_ntoa(source.sin_addr));
-	sprintf(env_addr, "REMOTE_ADDR=%s",log_buff);
-
-        addr=inet_addr(log_buff);
-        
-        strcpy(msg,adate());
-        strcat(msg,"    ");                 
-        hst=gethostbyaddr((char*) &addr, 4, AF_INET);
-
-	/* If DNS hostname exists */
-        if (hst) {
-	  strcat(msg,hst->h_name);
-	  sprintf(env_host, "REMOTE_HOST=%s",hst->h_name);
-	}
-        strcat(msg," (");
-        strcat(msg,log_buff);
-        strcat(msg,")   ");
-        strcat(msg,req);
-
-	if (daemonize) {
-	  log=fopen(logfile,"a");
-	  fprintf(log,"%s\n",msg);
-	  fclose(log);
-	} else
-	  printf("%s\n",msg);
-
-	/* This is for CGI scripts */
-	putenv(env_addr);
-	putenv(env_host);
-}
-
-/*
- * We have a connection.  Identify what type of request GET, HEAD, CGI, etc 
- * and do what needs to be done
- */
-void
-http_request(void)
-{
-	int             fd, lg, i; 
-	int             cmd = 0;
-	char           *p, *par;
-	const char     *filename, *c, *ext, *type;
-	struct stat     file_status;
-	char            req[1024];
-	char            buff[8192];
-
-	lg = read(con_sock, req, 1024);
-
-        if ((p=strstr(req,"\n"))) *p=0;
-        if ((p=strstr(req,"\r"))) *p=0;
-
-	log_line(req);
-
-	c = strtok(req, " ");
-
-	/* Error msg if request is nothing */
-	if (c == NULL) {
-	  http_output(http_404[0]);
-	  http_output(http_404[1]);
-	  goto end_request;
-	}
-
-	if (strncmp(c, "GET", 3) == 0) cmd = 1;
-	if (strncmp(c, "HEAD", 4) == 0) cmd = 2;
-
-	/* Do error msg for any other type of request */
-	if (cmd == 0) {	        
-	  http_output(http_405[0]);
-	  http_output(http_405[1]);
-	  goto end_request;
-	}
-
-	filename = strtok(NULL, " ");
-
-	c = strtok(NULL, " ");
-	if (fetch_mode != NULL) filename=fetch_mode; 
-	if (filename == NULL || 
-            strlen(filename)==1) filename="/index.html"; 
-
-	while (filename[0]== '/') filename++;        
-	
-        /* CGI handling.  Untested */
-        if (!strncmp(filename,"cgi-bin/",8))           
-           {
-           par=0;
-           if ((par=strstr(filename,"?")))                        
-              {
-               *par=0;            
-                par++;      
-              } 
-           if (access(filename,X_OK)) goto conti;
-           stat (filename,&file_status);
-           if (setuid(file_status.st_uid)) return;
-           if (seteuid(file_status.st_uid)) return;
-           if (!fork())
-              {
-               close(1);
-               dup(con_sock);
-               /*printf("HTTP/1.0 200 OK\nContent-type: text/html\n\n\n");*/
-	       printf("HTTP/1.0 200 OK\r\n");
-               /* Plug in environment variable, others in log_line */
-	       putenv("SERVER_SOFTWARE=FreeBSD/PicoBSD");
-
-	       execlp (filename,filename,par,(char *)0);
-              } 
-            wait(&i);
-            return;
-            }
-        conti:
-	if (filename == NULL) {
-	  http_output(http_405[0]);
-	  http_output(http_405[1]);
-	  goto end_request;
-	}
-	/* End of CGI handling */
-	
-	/* Reject any request with '..' in it, bad hacker */
-	c = filename;
-	while (*c != '\0')
-	  if (c[0] == '.' && c[1] == '.') {
-	    http_output(http_404[0]);
-	    http_output(http_404[1]); 
-	    goto end_request;
-	  } else
-	    c++;
-	
-	/* Open filename */
-	fd = open(filename, O_RDONLY);
-	if (fd < 0) {
-	        http_output(http_404[0]);
-	        http_output(http_404[1]);
-		goto end_request;
-	}
-
-	/* Get file status information */
-	if (fstat(fd, &file_status) < 0) {
-	  http_output(http_404[0]);
-	  http_output(http_404[1]);
-	  goto end_request2;
-	}
-
-	/* Is it a regular file? */
-	if (!S_ISREG(file_status.st_mode)) {
-	  http_output(http_404[0]);
-	  http_output(http_404[1]);
-	  goto end_request2;
-	}
-     
-	/* Past this point we are serving either a GET or HEAD */
-	/* Print all the header info */
-	http_output(http_200);
-	http_output(httpd_server_ident);
-	http_date();
-
-	sprintf(buff, "Content-length: %lld\r\n", file_status.st_size);
-	write(con_sock, buff, strlen(buff));
-
-	strcpy(buff, "Content-type: ");
-	type = default_mime_type;
-	if ((ext = strrchr(filename, '.')) != NULL) {
-	  for (i = mime_type_max; i >= 0; i--)
-	    if (strcmp(ext + 1, mime_type[i][0]) == 0) {
-	      type = mime_type[i][1];
-	      break;
-	    }
-	}
-	strcat(buff, type);
-	http_output(buff);
-	
-	strftime(buff, 50, "Last-Modified: %a, %d %h %Y %H:%M:%S %Z\r\n\r\n", gmtime(&file_status.st_mtime));
-	write(con_sock, buff, strlen(buff));
-
-	/* Send data only if GET request */
-	if (cmd == 1) {
-	  while ((lg = read(fd, buff, 8192)) > 0)
-	    write(con_sock, buff, lg);
-	} 
-
-end_request2:
-	close(fd);
-end_request:
-	close(con_sock);
-
-}
-
-/*
- * Simple httpd server for use in PicoBSD or other embedded application. 
- * Should satisfy simple httpd needs.  For more demanding situations
- * apache is probably a better (but much larger) choice.
- */
-int
-main(int argc, char *argv[])
-{
-        int ch, ld;
-	int             httpd_group = 65534;
-        pid_t server_pid;
-  
-	/* Default for html directory */
-	strcpy (homedir,getenv("HOME"));
-        if (!geteuid()) strcpy (homedir,"/httphome");
-           else         strcat (homedir,"/httphome");
-
-	/* Defaults for log file */
-	if (geteuid()) {
-	    strcpy(logfile,getenv("HOME"));
-	    strcat(logfile,"/");
-	    strcat(logfile,"jhttp.log");
-	} else 
-	  strcpy(logfile,"/var/log/jhttpd.log");
-
-	/* Parse command line arguments */
-	while ((ch = getopt(argc, argv, "d:f:g:l:p:vDh")) != -1)
-	  switch (ch) {
-	  case 'd':
-	    strcpy(homedir,optarg);
-	    break;	  
-	  case 'f':
-	    daemonize = 0;
-	    verbose = 1;
-	    fetch_mode = optarg;
-	    break;
-	  case 'g':
-	    httpd_group = atoi(optarg);
-	    break;
-	  case 'l':
-	    strcpy(logfile,optarg);
-	    break;
-	  case 'p':
-	    http_port = atoi(optarg);
-	    break;
-	  case 'v':
-	    verbose = 1;
-	    break;
-	  case 'D':
-	    daemonize = 0;
-	    break;
-	  case '?':
-	  case 'h':
-	  default:
-	    printf("usage: simple_httpd [[-d directory][-g grpid][-l logfile][-p port][-vD]]\n");
-	    exit(1);
-	    /* NOTREACHED */
-	  }                           
-
-	/* Not running as root and no port supplied, assume 1080 */
-        if ((http_port == 80) && geteuid()) {
-	  http_port = 1080;
-	}
-
-	/* Do we really have rights in the html directory? */
-	if (fetch_mode == NULL) {
-	  if (chdir(homedir)) {
-	    perror("chdir");
-	    puts(homedir);
-	    exit(1);
-	  }
-	}
-
-	/* Create log file if it doesn't exit */
-	if ((access(logfile,W_OK)) && daemonize) { 
-	  ld = open (logfile,O_WRONLY);         
-	  chmod (logfile,00600);
-	  close(ld);
-	}
-
-        init_servconnection();                  
-
-        if (verbose) {
-	  printf("Server started with options \n"); 
-	  printf("port: %d\n",http_port);
-	  if (fetch_mode == NULL) printf("html home: %s\n",homedir);
-	  if (daemonize) printf("logfile: %s\n",logfile);
-	}
-
-	/* httpd is spawned */
-        if (daemonize) {
-	  if ((server_pid = fork()) != 0) {
-	    wait3(0,WNOHANG,0);
-	    if (verbose) printf("pid: %d\n",server_pid);
-	    exit(0);
-	  }
-	  wait3(0,WNOHANG,0);
-	}
-
-	if (fetch_mode == NULL) setpgrp(0,httpd_group);
-
-	/* How many connections do you want? 
-	 * Keep this lower than the available number of processes
-	 */
-        if (listen(http_sock,15) < 0) exit(1);
-
-        label:	
-	wait_connection();
-    
-	if (fork()) {
-	  wait3(0,WNOHANG,0);
-	  close(con_sock);
-	  goto label;
-	}
-
-	http_request();
-
-	wait3(0,WNOHANG,0);
-	exit(0);
-}
-
-
-char *
-adate(void)
-{
-        static char out[50];
-        time_t now;
-        struct tm *t;
-        time(&now);
-        t = localtime(&now);
-        sprintf(out, "%02d:%02d:%02d %02d/%02d/%02d",
-                     t->tm_hour, t->tm_min, t->tm_sec,
-                     t->tm_mday, t->tm_mon+1, t->tm_year );
-        return out;
-}
--- release/picobsd/tinyware/simple_httpd/README
+++ /dev/null
@@ -1,167 +0,0 @@
-Simple_httpd  -  A small and free Web server
-
-"Simple_httpd is like /usr/bin/mail is to mail clients, no frills."
-
-This HTTP server can be used in any FreeBSD/PicoBSD application.
-
-It has been tested under FreeBSD 2.2.x, 3.x and 4.x. It might work 
-on other OS systems, but it's for FreeBSD primarily.
-
-The main advantage to Simple_httpd is that it is very small.
-The 25K binary can satisfy most needs in a small or embedded
-appplication.  If you want a full featured server see 
-/usr/ports/www/apache* or http://www.apache.org 
-
-Simple_httpd is released under a BSD style copyright that unlike
-GPL is embedded developer friendly.
-
-The server is designed to be run in one of two modes.  The standard
-mode is a httpd server running in the background serving up a directory
-of html,gif,cgi whatever.  Your traditional www server.
-
-The "fetch" mode supports file transfer over httpd.  This 
-is best thought of as mate for fetch(1).  This feature can be
-usefull to transfer a file from one host to another.
-
-Simple_httpd has the ability to run CGI scripts.  All CGI
-scripts must be located in ${DOCUMENT_ROOT}/cgi-bin.  The
-server currently only sets 3 enviroment variables before calling
-the script.
-
-CGI Enviroment variables are below:
-
-SERVER_SOFTWARE = FreeBSD/PicoBSD
-REMOTE_HOST = client.canada_lower_taxes.com
-REMOTE_ADDR = 200.122.13.108
-
-In most target applications for this server the extra DNS traffic from
-the remote_addr lookup will likely be on the local lan anyway and not
-on the other side of the internet.  You can turn it off yourself in
-the code if you want to speed the whole process up.  Be sure to turn
-it off for the logfile also.
-
-How to use it?
-==============
-
-Compile with make, run as follows
-
-usage: simple_httpd 	[-vD]
-			[-d directory]
-			[-g grpid]
-			[-l logfile]
-			[-p port]
-or
-usage: simple_httpd [-p port] -f filename
-
--v
-Run the server verbose.  Show the program options that will be used for this
-process.  Will only show information during startup, no messages will
-be displayed while serving requests.  In other words you can still 
-daemonize without fear of output on stdout.
-
--D
-Do not daemonize.  The server will not run in the background.  It will
-stay attached to the tty.  This is usefull for debugging.  In this
-mode no log file is created.  Logging info is to stdout.
-
-This option is automatically selected if fetch option is selected.
-
--d directory
-The html document directory, if nothing is provided the default is 
-/httphome if UID is root, otherwise document root is ${HOME}/public_html
-
--l logfile
-Set the logfile to use. Log messages will be written to /var/log/jhttpd.log
-if you are root and ${HOME}/jhttpd.log otherwise. If you don't want a 
-log file try "-l /dev/null"
-
--p port
-Set the port httpd server will listen to.  Default is port 80 if
-you are root and 1080 if you are not. 
-
--f filename
-This is the only option needed to use the "fetch" feature.  The file
-specified will be the ONLY file served to ANY GET request from a browser
-or fetch(1).
-
-Example
-=======
-
-Standard Mode:
---------------
-If you have the FreeBSD handbook installed on your machine and would 
-like to serve it up over http for a quick look you could do this
-
-simple_httpd -d /usr/share/doc/handbook -l /usr/tmp/jlog.txt -p 1088 -v
-
-Any browser would be able to look at the handbook with
-http://whatever_host/handbook.html:1088
-
-I'm using 1088 as the port since I already have apache running on port 80
-and port 1080 on my host.
-
-Please note, the handbook is not installed by default in FreeBSD 3.x
-It must be installed from the ports collection first if you want to
-try this.
-
-Another simple example is to browse your local ports collection:
-
-cd /usr/ports
-make readmes   #wait about 1 hour!
-simple_httpd -p 1080 -v -d /usr/ports
-
-Then point your browser at http://whatever_host/README.html
-
-Fetch Mode:
---------------
-This is designed to be used in conjunction with fetch(3).  It allows
-for easy transfer of files from one host to another without messy
-authentication or pathnames required with ftp.  The file to be
-served up must be readable by the user running simple_httpd.
-This is not a magic way to avoid permissions and read files.
-
-The daemon will only serve up ONE file.  The file specified will 
-be returned for every GET request regardless of what the browser
-asks for.  This allows for on the fly naming.
-
-sender# simple_httpd -f /usr/tmp/big_file.tgz
-receiver# fetch http://sender.com/Industrial_Secrets.tgz
-
-big_file.tgz was transferred from one machine to another and renamed
-Industrial_Secrets.tgz at the same time.
-
-Tunneling over other TCP ports.  Choose something that firewall
-will probably pass. See /etc/services.
-
-sender# simple_httpd -p 53 -f /usr/tmp/big_file.tgz
-receiver# fetch http://sender.com:53/Industrial_Secrets.tgz
-
-To Do
-=====
-
-Simple authentication would be very usefull[understatment].
-/etc/passwd or PAM would be nice.
-
-I think a netmask option would be good. Most internet appliances
-probably want to restrict traffic to local ethernet anyway.
-ie: Allow anything from my class C.
-
-The server always has 1 zombie process hanging around when it
-runs as a daemon.  Should fix so that it doesn't happen.
-
-Anything to make it faster!
-
-Man page
-
-If anyone has any improvements or ways to easily implement something
-please let me <wlloyd at slap.net> know.  If you make some neat embedded
-device with PicoBSD I want to know too!
-
-Credits
-=======
-
-This program was originally contributed by Marc Nicholas <marc at netstor.com>
-
-Major rewrite by William Lloyd <wlloyd at slap.net>
-
-$FreeBSD: src/release/picobsd/tinyware/simple_httpd/README,v 1.6 1999/08/28 01:33:59 peter Exp $
Binary files - and /dev/null differ
--- release/picobsd/tinyware/view/view.c
+++ /dev/null
@@ -1,619 +0,0 @@
-/*-
- * Copyright (c) 1998 Andrzej Bialecki
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD: src/release/picobsd/tinyware/view/view.c,v 1.7 2002/10/10 00:25:33 alfred Exp $
- */
-
-/*
- * Small PNG viewer with scripting abilities
- */
-
-#include <stdio.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <termios.h>
-#include <sys/types.h>
-#include <sys/fbio.h>
-#include <sys/consio.h>
-#include <sys/mouse.h>
-#include <vgl.h>
-#include <png.h>
-
-#define NUMBER	8
-
-extern char *optarg;
-extern int optind;
-
-/* Prototypes */
-int kbd_action(int x, int y, char hotkey);
-
-struct action {
-	int zoom;
-	int rotate;
-	int Xshift,Yshift;
-};
-
-struct menu_item {
-	char *descr;
-	char hotkey;
-	int (*func)(int x, int y, char hotkey);
-};
-
-struct menu_item std_menu[]= {
-	{"q  Quit",'q',kbd_action},
-	{"n  Next",'n',kbd_action},
-	{"p  Previous",'p',kbd_action},
-	{"Z  Zoom in",'Z',kbd_action},
-	{"z  Zoom out",'z',kbd_action},
-	{"r  Rotate",'r',kbd_action},
-	{"R  Refresh",'R',kbd_action},
-	{"l  Left",'l',kbd_action},
-	{"h  Right",'h',kbd_action},
-	{"j  Up",'j',kbd_action},
-	{"k  Down",'k',kbd_action},
-	{NULL,0,NULL}
-};
-
-char *progname;
-VGLBitmap pic,bkg;
-struct action a;
-byte pal_red[256];
-byte pal_green[256];
-byte pal_blue[256];
-byte pal_colors;
-double screen_gamma;
-int max_screen_colors=15;
-int quit,changed;
-char **pres;
-int nimg=0;
-int auto_chg=0;
-int cur_img=0;
-char act;
-FILE *log;
-
-void
-usage()
-{
-	fprintf(stderr,"\nVGL graphics viewer, 1.0 (c) Andrzej Bialecki.\n");
-	fprintf(stderr,"\nUsage:\n");
-	fprintf(stderr,"\t%s [-r n] [-g n.n] filename\n",progname);
-	fprintf(stderr,"\nwhere:\n");
-	fprintf(stderr,"\t-r n\tchoose resolution:\n");
-	fprintf(stderr,"\t\t0 - 640x480x16 (default)\n");
-	fprintf(stderr,"\t\t1 - 640x200x256\n");
-	fprintf(stderr,"\t\t2 - 320x240x256\n");
-	fprintf(stderr,"\t-g n.n\tset screen gamma (1.3 by default)\n");
-	fprintf(stderr,"\n");
-}
-
-int
-pop_up(char *title,int x, int y)
-{
-	VGLBitmap sav,clr;
-	int x1,y1,width,height,i,j;
-	int last_pos,cur_pos,max_item;
-	char buttons;
-	char *t;
-
-	sav.Type=VGLDisplay->Type;
-	clr.Type=VGLDisplay->Type;
-	width=0;
-	height=0;
-	max_item=0;
-	i=0;
-	while(std_menu[i].descr!=NULL) {
-		height++;
-		max_item++;
-		if(strlen(std_menu[i].descr)>width) width=strlen(std_menu[i].descr);
-		i++;
-	}
-	width=width*8+2;
-	height=height*9+4+8;
-	sav.Xsize=width;
-	sav.Ysize=height;
-	clr.Xsize=width;
-	clr.Ysize=height;
-	sav.Bitmap=(byte *)calloc(width*height,1);
-	clr.Bitmap=(byte *)calloc(width*height,1);
-	if(x>(VGLDisplay->Xsize-width)) x1=VGLDisplay->Xsize-width;
-	else x1=x;
-	if(y>(VGLDisplay->Ysize-height)) y1=VGLDisplay->Ysize-height;
-	else y1=y;
-	VGLMouseMode(VGL_MOUSEHIDE);
-	VGLBitmapCopy(VGLDisplay,x1,y1,&sav,0,0,width,height);
-	VGLFilledBox(VGLDisplay,x1,y1,x1+width-1,y1+height-1,pal_colors-1);
-	VGLBitmapString(VGLDisplay,x1+1,y1+1,title,0,pal_colors-1,0,0);
-	VGLLine(VGLDisplay,x1,y1+9,x1+width,y1+9,0);
-	i=0;
-	while(std_menu[i].descr!=NULL) {
-		VGLBitmapString(VGLDisplay,x1+1,y1+11+i*9,std_menu[i].descr,0,pal_colors-1,0,0);
-		i++;
-	}
-	last_pos=-1;
-	VGLMouseMode(VGL_MOUSESHOW);
-	do {
-		pause();
-		VGLMouseStatus(&x,&y,&buttons);
-		cur_pos=(y-y1-11)/9;
-		if((cur_pos<0)||(cur_pos>max_item-1)) {
-			if(last_pos==-1) last_pos=0;
-			VGLBitmapString(VGLDisplay,x1+1,y1+11+last_pos*9,std_menu[last_pos].descr,0,pal_colors-1,0,0);
-			last_pos=-1;
-		} else if(last_pos!=cur_pos) {
-			if(last_pos==-1) last_pos=0;
-			VGLBitmapString(VGLDisplay,x1+1,y1+11+last_pos*9,std_menu[last_pos].descr,0,pal_colors-1,0,0);
-			VGLBitmapString(VGLDisplay,x1+1,y1+11+cur_pos*9,std_menu[cur_pos].descr,pal_colors/2+1,pal_colors-1,0,0);
-			last_pos=cur_pos;
-		}
-	} while (buttons & MOUSE_BUTTON3DOWN);
-	VGLMouseMode(VGL_MOUSEHIDE);
-	/* XXX Screws up totally when r==3. Libvgl bug! */
-	VGLBitmapCopy(&clr,0,0,VGLDisplay,x1,y1,width,height);
-	VGLBitmapCopy(&sav,0,0,VGLDisplay,x1,y1,width,height);
-	VGLMouseMode(VGL_MOUSESHOW);
-	free(sav.Bitmap);
-	free(clr.Bitmap);
-	changed++;
-	if((cur_pos>=0) && (cur_pos<max_item)) {
-		std_menu[cur_pos].func(x,y,std_menu[cur_pos].hotkey);
-	}
-	changed++;
-	return(0);
-}
-
-void
-display(	VGLBitmap *pic,
-		byte *red,
-		byte *green,
-		byte *blue,
-		struct action *e)
-{
-	VGLBitmap target;
-	int x,y,i=0,j=0;
-
-	VGLMouseMode(VGL_MOUSEHIDE);
-	VGLRestorePalette();
-	/* XXX Broken in r!=2. Libvgl bug. */
-	//VGLClear(VGLDisplay,0);
-	VGLBitmapCopy(&bkg,0,0,VGLDisplay,0,0,bkg.Xsize,bkg.Ysize);
-
-	if(e!=NULL) {
-		if(e->zoom!=1 || e->rotate) {
-			target.Bitmap=(byte *)calloc(pic->Xsize*pic->Ysize*e->zoom*e->zoom,1);
-			if(e->rotate) {
-				target.Xsize=pic->Ysize*e->zoom;
-				target.Ysize=pic->Xsize*e->zoom;
-			} else {
-				target.Xsize=pic->Xsize*e->zoom;
-				target.Ysize=pic->Ysize*e->zoom;
-			}
-			target.Type=pic->Type;
-			for(x=0;x<pic->Xsize;x++) {
-				for(y=0;y<pic->Ysize;y++) {
-					for(i=0;i<e->zoom;i++) {
-						for(j=0;j<e->zoom;j++) {
-							if(e->rotate) {
-								VGLSetXY(&target,target.Xsize-(e->zoom*y+i),e->zoom*x+j,VGLGetXY(pic,x,y));
-							} else {
-								VGLSetXY(&target,e->zoom*x+i,e->zoom*y+j,VGLGetXY(pic,x,y));
-							}
-						}
-					}
-				}
-			}
-		} else {
-			target.Bitmap=(byte *)calloc(pic->Xsize*pic->Ysize,sizeof(byte));
-			target.Xsize=pic->Xsize;
-			target.Ysize=pic->Ysize;
-			target.Type=pic->Type;
-			VGLBitmapCopy(pic,0,0,&target,0,0,pic->Xsize,pic->Ysize);
-		}
-	} else {
-		target.Bitmap=(byte *)calloc(pic->Xsize*pic->Ysize,sizeof(byte));
-		target.Xsize=pic->Xsize;
-		target.Ysize=pic->Ysize;
-		target.Type=pic->Type;
-		VGLBitmapCopy(pic,0,0,&target,0,0,pic->Xsize,pic->Ysize);
-	}
-	VGLSetPalette(red, green, blue);
-	if(e!=NULL) {
-		VGLBitmapCopy(&target,0,0,VGLDisplay,e->Xshift,e->Yshift,target.Xsize,target.Ysize);
-	} else {
-		VGLBitmapCopy(&target,0,0,VGLDisplay,0,0,target.Xsize,target.Ysize);
-	}
-	VGLMouseMode(VGL_MOUSESHOW);
-	free(target.Bitmap);
-}
-
-int
-png_load(char *filename)
-{
-	int i,j,k;
-	FILE *fd;
-	u_char header[NUMBER];
-	png_structp png_ptr;
-	png_infop info_ptr,end_info;
-	png_uint_32 width,height;
-	int bit_depth,color_type,interlace_type;
-	int compression_type,filter_type;
-	int channels,rowbytes;
-	double gamma;
-	png_colorp palette;
-	int num_palette;
-	png_bytep *row_pointers;
-	char c;
-	int res=0;
-
-	fd=fopen(filename,"rb");
-	
-	if(fd==NULL) {
-		VGLEnd();
-		perror("fopen");
-		exit(1);
-	}
-	fread(header,1,NUMBER,fd);
-	if(!png_check_sig(header,NUMBER)) {
-		fprintf(stderr,"Not a PNG file.\n");
-		return(-1);
-	}
-	png_ptr=png_create_read_struct(PNG_LIBPNG_VER_STRING,(void *)NULL,
-		NULL,NULL);
-	info_ptr=png_create_info_struct(png_ptr);
-	end_info=png_create_info_struct(png_ptr);
-	if(!png_ptr || !info_ptr || !end_info) {
-		VGLEnd();
-		fprintf(stderr,"failed to allocate needed structs!\n");
-		png_destroy_read_struct(&png_ptr,&info_ptr,&end_info);
-		return(-1);
-	}
-	png_set_sig_bytes(png_ptr,NUMBER);
-	png_init_io(png_ptr,fd);
-	png_read_info(png_ptr,info_ptr);
-	png_get_IHDR(png_ptr,info_ptr,&width,&height,&bit_depth,
-		&color_type,&interlace_type,&compression_type,&filter_type);
-	png_get_PLTE(png_ptr,info_ptr,&palette,&num_palette);
-	channels=png_get_channels(png_ptr,info_ptr);
-	rowbytes=png_get_rowbytes(png_ptr,info_ptr);
-	if(bit_depth==16)
-		png_set_strip_16(png_ptr);
-	if(color_type & PNG_COLOR_MASK_ALPHA) 
-		png_set_strip_alpha(png_ptr);
-	if(png_get_gAMA(png_ptr,info_ptr,&gamma))
-		png_set_gamma(png_ptr,screen_gamma,gamma);
-	else
-	png_set_gamma(png_ptr,screen_gamma,0.45);
-	if(res==0) {
-		/* Dither */
-		if(color_type & PNG_COLOR_MASK_COLOR) {
-			if(png_get_valid(png_ptr,info_ptr,PNG_INFO_PLTE)) {
-				png_uint_16p histogram;
-				png_get_hIST(png_ptr,info_ptr,&histogram);
-				png_set_dither(png_ptr,palette,num_palette,max_screen_colors,histogram,0);
-			} else {
-				png_color std_color_cube[16]={
-					{0x00,0x00,0x00},
-					{0x02,0x02,0x02},
-					{0x04,0x04,0x04},
-					{0x06,0x06,0x06},
-					{0x08,0x08,0x08},
-					{0x0a,0x0a,0x0a},
-					{0x0c,0x0c,0x0c},
-					{0x0e,0x0e,0x0e},
-					{0x10,0x10,0x10},
-					{0x12,0x12,0x12},
-					{0x14,0x14,0x14},
-					{0x16,0x16,0x16},
-					{0x18,0x18,0x18},
-					{0x1a,0x1a,0x1a},
-					{0x1d,0x1d,0x1d},
-					{0xff,0xff,0xff},
-				};
-				png_set_dither(png_ptr,std_color_cube,max_screen_colors,max_screen_colors,NULL,0);
-			}
-		}
-	}
-	png_set_packing(png_ptr);
-	if(png_get_valid(png_ptr,info_ptr,PNG_INFO_sBIT)) {
-		png_color_8p sig_bit;
-
-		png_get_sBIT(png_ptr,info_ptr,&sig_bit);
-		png_set_shift(png_ptr,sig_bit);
-	}
-	png_read_update_info(png_ptr,info_ptr);
-	png_get_IHDR(png_ptr,info_ptr,&width,&height,&bit_depth,
-		&color_type,&interlace_type,&compression_type,&filter_type);
-	png_get_PLTE(png_ptr,info_ptr,&palette,&num_palette);
-	channels=png_get_channels(png_ptr,info_ptr);
-	rowbytes=png_get_rowbytes(png_ptr,info_ptr);
-	row_pointers=malloc(height*sizeof(png_bytep));
-	for(i=0;i<height;i++) {
-		row_pointers[i]=malloc(rowbytes);
-	}
-	png_read_image(png_ptr,row_pointers);
-	png_read_end(png_ptr,end_info);
-	png_destroy_read_struct(&png_ptr,&info_ptr,&end_info);
-	fclose(fd);
-	/* Set palette */
-	if(res) k=2;
-	else k=2;
-	for(i=0;i<256;i++) {
-	 	pal_red[i]=255;
-	 	pal_green[i]=255;
-	 	pal_blue[i]=255;
-	}
-	for(i=0;i<num_palette;i++) {
-	 	pal_red[i]=(palette+i)->red>>k;
-	 	pal_green[i]=(palette+i)->green>>k;
-	 	pal_blue[i]=(palette+i)->blue>>k;
-	}
-	pal_colors=num_palette;
-	if(pic.Bitmap!=NULL) free(pic.Bitmap);
-	pic.Bitmap=(byte *)calloc(rowbytes*height,sizeof(byte));
-	pic.Type=MEMBUF;
-	pic.Xsize=rowbytes;
-	pic.Ysize=height;
-	for(i=0;i<rowbytes;i++) {
-		for(j=0;j<height;j++) {
-			VGLSetXY(&pic,
-			i,j,row_pointers[j][i]);
-		}
-	}
-	a.zoom=1;
-	a.Xshift=(VGLDisplay->Xsize-pic.Xsize)/2;
-	a.Yshift=(VGLDisplay->Ysize-pic.Ysize)/2;
-	a.rotate=0;
-	return(0);
-}
-
-void
-kbd_handler(int sig)
-{
-	u_char buf[10];
-	int res;
-
-	res=read(0,&buf,10);
-	changed++;
-	act=buf[res-1];
-}
-
-int
-kbd_action(int x, int y, char key)
-{
-	changed=0;
-	if(key!='n') auto_chg=0;
-	switch(key) {
-	case 'q':
-		quit=1;
-		break;
-	case 'Z':
-		a.zoom++;
-		changed++;
-		break;
-	case 'z':
-		a.zoom--;
-		if(a.zoom<1) a.zoom=1;
-		changed++;
-		break;
-	case 'l':
-		a.Xshift+=VGLDisplay->Xsize/5;
-		changed++;
-		break;
-	case 'h':
-		a.Xshift-=VGLDisplay->Xsize/5;
-		changed++;
-		break;
-	case 'k':
-		a.Yshift+=VGLDisplay->Ysize/5;
-		changed++;
-		break;
-	case 'j':
-		a.Yshift-=VGLDisplay->Ysize/5;
-		changed++;
-		break;
-	case 'R':
-		changed++;
-		break;
-	case 'r':
-		if(a.rotate) a.rotate=0;
-		else a.rotate=1;
-		changed++;
-		break;
-	case '\n':
-	case 'n':
-		if(nimg>0) {
-			if(cur_img<nimg-1) {
-				cur_img++;
-			} else {
-				cur_img=0;
-			}
-			png_load(pres[cur_img]);
-			changed++;
-		}
-		break;
-	case 'p':
-		if(nimg>0) {
-			if(cur_img>0) {
-				cur_img--;
-			} else {
-				cur_img=nimg-1;
-			}
-			png_load(pres[cur_img]);
-			changed++;
-		}
-		break;
-	}
-	act=0;
-}
-
-int
-main(int argc, char *argv[])
-{
-	int i,j,k;
-	char c;
-	int res=0;
-	int x,y;
-	char buttons;
-	struct termios t_new,t_old;
-	FILE *fsc;
-
-	char buf[100];
-
-	progname=argv[0];
-	screen_gamma=1.5;
-#ifdef DEBUG
-	log=fopen("/png/view.log","w");
-#endif
-	while((c=getopt(argc,argv,"r:g:"))!=-1) {
-		switch(c) {
-		case 'r':
-			res=atoi(optarg);
-			if(res>0) max_screen_colors=256;
-			break;
-		case 'g':
-			screen_gamma=atof(optarg);
-			break;
-		case '?':
-		default:
-			usage();
-			exit(0);
-		}
-	}
-	switch(res) {
-	case 0:
-		VGLInit(SW_CG640x480);
-		break;
-	case 1:
-		VGLInit(SW_VGA_CG320);
-		break;
-	case 2:
-		VGLInit(SW_VGA_MODEX);
-		break;
-	default:
-		fprintf(stderr,"No such resolution!\n");
-		usage();
-		exit(-1);
-	}
-#ifdef DEBUG
-	fprintf(log,"VGL initialised\n");
-#endif
-	VGLSavePalette();
-	if(argc>optind) {
-		res=png_load(argv[optind]);
-	} else {
-		VGLEnd();
-		usage();
-		exit(0);
-	}
-	if(res) {
-		/* Hmm... Script? */
-		fsc=fopen(argv[optind],"r");
-#ifdef DEBUG
-		fprintf(log,"Trying script %s\n",argv[optind]);
-#endif
-		fgets(buf,99,fsc);
-		buf[strlen(buf)-1]='\0';
-		if(strncmp("VIEW SCRIPT",buf,11)!=NULL) {
-			VGLEnd();
-			usage();
-		}
-		if(strlen(buf)>12) {
-			auto_chg=atoi(buf+12);
-		}
-		fgets(buf,99,fsc);
-		buf[strlen(buf)-1]='\0';
-		nimg=atoi(buf);
-		if(nimg==0) {
-			VGLEnd();
-			usage();
-		}
-		pres=(char **)calloc(nimg,sizeof(char *));
-		for(i=0;i<nimg;i++) {
-			fgets(buf,99,fsc);
-			buf[strlen(buf)-1]='\0';
-			pres[i]=strdup(buf);
-		}
-		fclose(fsc);
-		cur_img=0;
-#ifdef DEBUG
-		fprintf(log,"Script with %d entries\n",nimg);
-#endif
-		png_load(pres[cur_img]);
-	}
-	VGLMouseInit(VGL_MOUSEHIDE);
-	/* Prepare the keyboard */
-	tcgetattr(0,&t_old);
-	memcpy(&t_new,&t_old,sizeof(struct termios));
-	cfmakeraw(&t_new);
-	tcsetattr(0,TCSAFLUSH,&t_new);
-	fcntl(0,F_SETFL,O_ASYNC);
-	/* XXX VGLClear doesn't work.. :-(( Prepare a blank background */
-	bkg.Bitmap=(byte *)calloc(VGLDisplay->Xsize*VGLDisplay->Ysize,1);
-	bkg.Xsize=VGLDisplay->Xsize;
-	bkg.Ysize=VGLDisplay->Ysize;
-	bkg.Type=VGLDisplay->Type;
-	signal(SIGIO,kbd_handler);
-	a.zoom=1;
-	a.Xshift=(VGLDisplay->Xsize-pic.Xsize)/2;
-	a.Yshift=(VGLDisplay->Ysize-pic.Ysize)/2;
-	a.rotate=0;
-	quit=0;
-	changed=0;
-	display(&pic,pal_red,pal_green,pal_blue,&a);
-	while(!quit) {
-		if(act) {
-#ifdef DEBUG
-			fprintf(log,"kbd_action(%c)\n",act);
-#endif
-			kbd_action(x,y,act);
-		}
-		if(quit) break;
-		if(changed) {
-#ifdef DEBUG
-			fprintf(log,"changed, redisplaying\n");
-#endif
-			display(&pic,pal_red,pal_green,pal_blue,&a);
-			changed=0;
-		}
-		if(auto_chg) {
-			sleep(auto_chg);
-			kbd_action(x,y,'n');
-		} else {
-			pause();
-		}
-		VGLMouseStatus(&x,&y,&buttons);
-		if(buttons & MOUSE_BUTTON3DOWN) {
-#ifdef DEBUG
-			fprintf(log,"pop_up called\n");
-#endif
-			pop_up("View",x,y);
-		}
-	}
-	VGLEnd();
-#ifdef DEBUG
-	fclose(log);
-#endif
-	exit(0);
-}
--- release/picobsd/tinyware/view/picobsd.vu
+++ /dev/null
@@ -1,9 +0,0 @@
-VIEW SCRIPT
-7
-/png/logo.png
-/png/1.png
-/png/2.png
-/png/p1.png
-/png/p2.png
-/png/p3.png
-/png/p4.png
--- release/picobsd/tinyware/view/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD: src/release/picobsd/tinyware/view/Makefile,v 1.5 2004/12/21 08:47:06 ru Exp $
-
-PROG=view
-SRCS=view.c
-CFLAGS+=-I/usr/local/include
-LDADD+=-L/usr/local/lib -lpng -lvgl -lz -lm
-NO_MAN=
-
-.include <bsd.prog.mk>
--- release/picobsd/tinyware/view/README
+++ /dev/null
@@ -1,86 +0,0 @@
-Warsaw, 1998.08.18
-
-			VIEW - small PNG viewer
-			-----------------------
-
-This program is intended to serve as a simple console viewer for PNG
-graphics. It also features some scripting abilities, which allow you to
-build simple presentation.
-
-In fact, using even this initial version I was able to build a nice
-presentation of PicoBSD abilities which I used in real-life situation (you
-can see for yourself one of the presentation's screens, fbsd.png).
-
-The audience was impressed :-), especially when I asked them politely what
-are requirements and cost to make that kind of presentation using M$
-products...
-
-Simple Viewing
---------------
-
-Usage is as follows:
-
-	view [-g nnn.nnn] [-r x] filename.png
-
-where
-	-g nnn.nnn	screen gamma (you can adjust how bright is the
-			picture)
-	-r x		resolution:
-			0 - 640x480x16
-			1 - 640x200x256
-			2 - 320x240x256
-
-Under right mouse button you can find a simple menu, which tells you also
-the hotkeys. You can shift, rotate and zoom the picture.
-
-Presentation
-------------
-
-Usage is as above, but the file you give as argument is a (unix) text file
-of the following format:
-
-	1	VIEW SCRIPT
-	2	5
-	3	welcome.png
-	4	/home/clipart/logo.png
-	5	/home/present/title.png
-	6	/home/present/outline.png
-	7	/home/present/end.png
-
-(of course without the line numbering or the leading space!). The line number
-1 is magic, and must be present in order to recognize the file properly.
-
-The second line tells how many pictures consist the presentation. The
-following lines tell the file names containing the images themselves.
-
-See the example in file picobsd.vu.
-
-Command line arguments (gamma and resolution) are as above. You can also use
-the pop-up menu to adjust image parameters, as well as go forward or
-backward in the presentation.
-
-Bugs, caveats, missing features
--------------------------------
-
-* there are some bugs in libvgl which require strange workarounds, and even
-  then it doesn't work quite right. See the source for the 'XXX' comments...
-
-* I didn't have time to add gamma adjustment to the pop-up menu. It's
-  simple, though, and I leave it as an exercise for the reader :-))
-
-* it would be great if someone would add GIF and jpeg support.
-
-* the error checking is probably weak. A bad PNG file or script file will
-  probably cause a coredump.
-
-* pop-up menu facilities need more abstraction to be usable in other cases.
-
-Anyway, as it is even now it's quite usable.
-
-Have fun!
-
-Andrzej Bialecki
-
-<abial at freebsd.org>
-
-$FreeBSD: src/release/picobsd/tinyware/view/README,v 1.3 1999/08/28 01:34:02 peter Exp $
--- release/powerpc/hfs.map
+++ /dev/null
@@ -1,4 +0,0 @@
-# $MidnightBSD: src/release/powerpc/hfs.map,v 1.2 2007/03/17 16:06:10 laffer1 Exp $
-# $FreeBSD: src/release/powerpc/hfs.map,v 1.1 2004/08/18 11:08:19 grehan Exp $
-.tbxi   -     'chrp'  'tbxi'  "bootstrap"
-*       -     'fbsd'  'TEXT'  "FreeBSD file"
--- release/powerpc/boot_crunch.conf
+++ /dev/null
@@ -1,48 +0,0 @@
-# $MidnightBSD: src/release/powerpc/boot_crunch.conf,v 1.2 2007/03/17 16:06:10 laffer1 Exp $
-# $FreeBSD: src/release/powerpc/boot_crunch.conf,v 1.3 2004/10/01 07:54:37 ru Exp $
-
-buildopts -DRELEASE_CRUNCH -Dlint
-
-srcdirs /usr/src/bin
-progs hostname
-progs pwd
-progs rm
-progs sh
-progs test
-ln sh -sh
-ln test [
-
-srcdirs /usr/src/gnu/usr.bin
-progs cpio
-
-srcdirs /usr/src/sbin
-progs camcontrol
-progs dhclient
-progs fsck_ffs
-progs ifconfig
-progs mount_msdosfs
-progs mount_nfs
-progs newfs
-progs newfs_msdos
-progs route
-progs rtsol
-progs slattach
-progs tunefs
-
-srcdirs /usr/src/usr.bin
-progs find
-progs minigzip
-progs sed
-ln minigzip gzip
-ln minigzip gunzip
-ln minigzip zcat
-
-srcdirs /usr/src/usr.sbin
-progs arp
-progs ppp
-progs sysinstall
-progs usbd
-progs usbdevs
-
-libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph
-libs -ldialog -lncurses -ldisk -lcam -lkiconv -lsbuf -lufs
--- release/powerpc/boot.tbxi
+++ /dev/null
@@ -1,15 +0,0 @@
-<CHRP-BOOT>
-<LICENSE>
-$MidnightBSD: src/release/powerpc/boot.tbxi,v 1.2 2007/03/17 16:06:10 laffer1 Exp $
-</LICENSE>
-<COMPATIBLE>
-MacRISC MacRISC3 MacRISC4
-</COMPATIBLE>
-<DESCRIPTION>
-MidnightBSD/PPC bootloader
-</DESCRIPTION>
-<BOOT-SCRIPT>
-" screen" output
-boot cd:,\boot\loader cd:0
-</BOOT-SCRIPT>
-</CHRP-BOOT>
--- release/powerpc/mkisoimages.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-#
-# Module: mkisoimages.sh
-# Author: Jordan K Hubbard
-# Date:   22 June 2001
-#
-# $MidnightBSD: src/release/powerpc/mkisoimages.sh,v 1.2 2007/03/17 16:06:10 laffer1 Exp $
-# $FreeBSD: src/release/powerpc/mkisoimages.sh,v 1.1 2004/08/18 11:08:19 grehan Exp $
-#
-# This script is used by release/Makefile to build the (optional) ISO images
-# for a MidnightBSD release.  It is considered architecture dependent since each
-# platform has a slightly unique way of making bootable CDs.  This script
-# is also allowed to generate any number of images since that is more of
-# publishing decision than anything else.
-#
-# Usage:
-#
-# mkisoimages.sh [-b] image-label image-name base-bits-dir [extra-bits-dir]
-#
-# Where -b is passed if the ISO image should be made "bootable" by
-# whatever standards this architecture supports (may be unsupported),
-# image-label is the ISO image label, image-name is the filename of the
-# resulting ISO image, base-bits-dir contains the image contents and
-# extra-bits-dir, if provided, contains additional files to be merged
-# into base-bits-dir as part of making the image.
-
-if [ "x$1" = "x-b" ]; then
-	cp /usr/src/release/powerpc/boot.tbxi ${4}/boot
-	bootable="-hfs-bless ${4}/boot -map /usr/src/release/powerpc/hfs.map"
-	shift
-else
-	bootable=""
-fi
-
-if [ $# -lt 3 ]; then
-	echo Usage: $0 '[-b] image-label image-name base-bits-dir [extra-bits-dir]'
-	rm -f ${IMG}
-	exit 1
-fi
-
-type mkisofs 2>&1 | grep " is " >/dev/null
-if [ $? -ne 0 ]; then
-	echo The cdrtools port is not installed.  Trying to get it now.
-	if [ -f /usr/mports/sysutils/cdrtools/Makefile ]; then
-		cd /usr/mports/sysutils/cdrtools && make install BATCH=yes && make clean
-	else
-		if ! pkg_add -r cdrtools; then
-			echo "Could not get it via pkg_add - please go install this"
-			echo "from the ports collection and run this script again."
-			exit 2
-		fi
-	fi
-fi
-
-LABEL=$1; shift
-NAME=$1; shift
-
-mkisofs $bootable -r -hfs -part -no-desktop -hfs-volid $LABEL -l -J -L -o $NAME $*


More information about the Midnightbsd-cvs mailing list