;----------------------------------------------------------------------------
; MODULE NAME: FTPLIKEI.IH
;
; $Author: Dennis_Bareis $
; $Revision: 1.1 $
; $Date: 19 Feb 2000 15:05:50 $
; $Logfile: E:/DB/PVCS.IT/OS2/PPWIZARD/FTPLIKEI.IHV $
;
; DESCRIPTION: DO NOT INCLUDE THIS FILE YOURSELF!!!! USE FTPLIKE.IH!
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; Further comments at the end of this file!
;
;----------------------------------------------------------------------------
;--- First time through? ----------------------------------------------------
#ifndef _FTPLIKE_INITIALIZED
;--- Try to ensure that header called correctly! -------------------------
#ifndef FTPLIKE_CALLED_CORRECTLY
#error ^Please include "FTPLIKE.IH" not "FTPLIKEI.IH"!^
#endif
;--- Define the version number of this header file -----------------------
#define+ VERSION_FTPLIKE_IH 00.045
#require 00.030
;--- Check prerequisites -------------------------------------------------
#ifndef FTPLIKE_DIRECTORY
#error ^You must define the "FTPLIKE_DIRECTORY" value (local directory)!^
#endif
#ifndef FTPLIKE_DIRECTORY_WEB
#error ^You must define the "FTPLIKE_DIRECTORY_WEB" value (web location)!^
#endif
;--- Include macro push/pop support --------------------------------------
#ifndef VERSION_PUSHPOPM_H
#include "PushPopM.H"
#endif
;--- Include Better Sort Header ------------------------------------------
#ifndef VERSION_PPWSORT_H
#include "PPWSORT.H"
#endif
;--- Use same date time on all generated pages ---------------------------
#ifndef FTPLIKE_DATETIME
#evaluate FTPLIKE_DATETIME @date('WeekDay') || ' ' || date('Month') || ' ' || substr(date('Sorted'), 7, 2) || ' ' || left(date('Sorted'), 4) || ' at ' || time('Civil')@
#endif
;--- Total numbers accross FTP pages -------------------------------------
#RexxVar FtpTotalDirCnt = 0 ;;Number of directories
#RexxVar FtpTotalFileCnt = 0 ;;Number of files
;--- Remember the output level where it all began! -----------------------
#Rexxvar FtpStartLevel =
;--- We start processing "non virtual" directories -----------------------
#RexxVar RealDirTree = 'Y'
;--- Work out what filemasks users wants ---------------------------------
#ifndef FTPLIKE_FILE_MASKS
;--- Default is to process all files -----------------------------
#if ['' = 'UNIX']
#define FTPLIKE_FILE_MASKS
#else
#define FTPLIKE_FILE_MASKS *.*
#endif
#endif
#ifndef FTPLIKE_DIR_MASKS
;--- Default is to process all directories -----------------------
#if ['' = 'UNIX']
#define FTPLIKE_DIR_MASKS
#else
#define FTPLIKE_DIR_MASKS *.*
#endif
#endif
;--- Do best we can for input dependancies -------------------------------
#ifdef FTPLIKE_FOLLOW_SUBDIRECTORIES
#DependsOn INPUT ^*FILES=+<$FTPLIKE_DIRECTORY><$FTPLIKE_DIR_MASKS>^
#elseif
#DependsOn INPUT ^*FILES=<$FTPLIKE_DIRECTORY><$FTPLIKE_DIR_MASKS>^
#endif
;--- Allow user to easily support frames etc -----------------------------
#ifndef FTPLIKE_LINK2DIR
#define FTPLIKE_LINK2DIR
#endif
#ifndef FTPLIKE_LINK2FILE
#define FTPLIKE_LINK2FILE ;;Probably would not want to override this
#endif
;--- Prepare for generating HTML page names ------------------------------
#ifdef FTPLIKE_FOLLOW_SUBDIRECTORIES
;--- Prepare for generating html page names (unique names!) ------
#evaluate '' ^call GetIdPrepare 'FTPLIKE', 'Y'^
;--- Don't generate filename same as current "base" file! --------
#evaluate '' ^call SetId 'FTPLIKE', '', EnsureFileHasCorrectCase(_filespec('W', _filespec('Name', '')))^
#endif
;--- Now work out the output directory -----------------------------------
#evaluate+ 'FtpGenDir' ^_filespec('location', '')^
;--- Work out the full name of this header file --------------------------
#RexxVar FtpLikeFile = ''
;--- Work out what user wants to call the "root" dir ---------------------
#ifndef FTPLIKE_DISPLAY_DIR
#define FTPLIKE_DISPLAY_DIR /
#endif
;--- Work out extension to use -------------------------------------------
#ifndef FTPLIKE_HTML_EXTN
#define FTPLIKE_HTML_EXTN htm
#endif
;--- Define command file extension ---------------------------------------
#ifndef FTPLIKE_CMD_FILE_DIR
#define FTPLIKE_CMD_FILE_DIR dirattr.$$$
#endif
;--- User want specific prefix for generated filenames -------------------
#ifndef FTPLIKE_NEWHTML_PREFIX
#ifdef FTPLIKE_USE_LONG_FILENAMES
#define FTPLIKE_NEWHTML_PREFIX FtpLike_
#elseif
#define FTPLIKE_NEWHTML_PREFIX ;;No prefix
#endif
#endif
;--- Define Simple HEADERS & FOOTERS -------------------------------------
#ifndef FTPLIKE_HEADER
#define FTPLIKE_HEADER {$Title}
#endif
#ifndef FTPLIKE_FOOTER
#define FTPLIKE_FOOTER \
%\
%\
%\
<$FTPLIKE_DATETIME> %\
%\
%\