[0001]
[0002]
[0003]
[0004]
[0005]
[0006]
[0007]
[0008]
[0009]
[0010]
[0011]
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
[0050]
[0051]
[0052]
[0053]
[0054]
[0055]
[0056]
[0057]
[0058]
[0059]
[0060]
[0061]
[0062]
[0063]
[0064]
[0065]
[0066]
[0067]
[0068]
[0069]
[0070]
[0071]
[0072]
[0073]
[0074]
[0075]
[0076]
[0077]
[0078]
[0079]
[0080]
[0081]
[0082]
[0083]
[0084]
[0085]
[0086]
[0087]
[0088]
[0089]
[0090]
[0091]
[0092]
[0093]
[0094]
[0095]
[0096]
[0097]
[0098]
[0099]
[0100]
[0101]
[0102]
[0103]
[0104]
[0105]
[0106]
[0107]
[0108]
[0109]
[0110]
[0111]
[0112]
[0113]
[0114]
[0115]
[0116]
[0117]
[0118]
[0119]
[0120]
[0121]
[0122]
[0123]
[0124]
[0125]
[0126]
[0127]
[0128]
[0129]
[0130]
[0131]
[0132]
[0133]
[0134]
[0135]
[0136]
[0137]
[0138]
[0139]
/*****************************************************************************/
/*
                                  upd.h
*/
/*****************************************************************************/

#ifndef UPD_H_LOADED
#define UPD_H_LOADED 1

#include "wasd.h"

/**************/
/* structures */
/**************/

typedef struct UpdTreeStruct UPD_TREE;

struct UpdTreeStruct
{
   UPD_TREE  *PrevTreeNodePtr,
             *NextTreeNodePtr;

   int  /* */
        FileNameLength;

   char  /* */
         FileName [ODS_MAX_FILE_NAME_LENGTH+1];

   /* "on-disk structure" supporting both ODS-2 and ODS-5 */
   ODS_STRUCT  SearchOds;
};

typedef struct UpdTaskStruct UPD_TASK;

struct UpdTaskStruct
{
   BOOL  /* editing a server configuration file */
         ConfigurationEdit,
         /* upper-case, directories indicated [], etc. */
         FormatTreeLikeVms,
         /* edit file record format is FIX/UDF (don't add newlines) */
         RecordFormatFixed,
         /* */
         RuleCheckAvailable,
         /* generated tree is for "Update" facility */
         UpdateTree;

   int  /* numeric columns */
        Cols,
        /* for counting files in tree listings, etc. */
        FileCount,
        /* */
        NavigateSize,
        /* path info dir part */
        PathInfoDirLength,
        /* numeric rows */
        Rows,
        /* count of how many characters before beginning "|---", etc. */
        TreeIndent,
        /* directory nesting level */
        TreeLevel;

   unsigned long  /* when creating files and directories */
                  ProtectionMask;

   char  /* MUST be 512 bytes (one block) for file copy purposes */
         CopyBuffer [512],
         /* columns by rows, for edit file <TEXTAREA> window */
         CxR [16],
         /* used for reading record from files being edited */
         EditBuffer [2048],
         /* tree processing, contains any name, type, version */
         FileNamePart [ODS_MAX_FILE_NAME_LENGTH+1],
         /* holds <select> list */
         FileProtectionList [256],
         /* HTML-escaped title :^) */
         HtmlEscapedTitle [256],
         /* used to store language-specific strings while in use */
         MsgString [512],
         /* holds path directory part */
         PathInfoDir [ODS_MAX_FILE_NAME_LENGTH+1],
         /* holds <select> list */
         ProtectionList [256];

   char  /* pointer to MIME content-type */
         *ContentTypePtr,
         /* current position during use of language-specific string */
         *MsgStringPtr;

   /* "on-disk structure" supporting both ODS-2 and ODS-5 */
   ODS_STRUCT  FileOds,
               SearchOds;

   UPD_TREE  *TreeHeadPtr,
             *TreeNodePtr;

   /* pointer to function, used for specifying the next task */
   REQUEST_AST NextTaskFunction;
};

/***********************/
/* function prototypes */
/***********************/

BOOL UpdAccess (REQUEST_STRUCT*, char*, int);
void UpdBegin (REQUEST_STRUCT*, REQUEST_AST);
void UpdConfirmCreate (REQUEST_STRUCT*, char*);
void UpdConfirmMkdir (REQUEST_STRUCT*, char*);
void UpdConfirmDelete (REQUEST_STRUCT*, char*, char*);
void UpdConfirmProtect (REQUEST_STRUCT*, char*, char*);
void UpdConfirmRename (REQUEST_STRUCT*, char*, char*);
void UpdCopyFileBegin (REQUEST_STRUCT*, char*);
void UpdCopyFileEnd (REQUEST_STRUCT*);
void UpdCopyFileNextBlock (REQUEST_STRUCT*);
void UpdCopyFileNextBlockAst (struct RAB*); 
void UpdEditFileBegin (REQUEST_STRUCT*, REQUEST_AST, char*);
void UpdEditFileEnd (REQUEST_STRUCT*);
void UpdEditFileNextRecord (REQUEST_STRUCT*);
void UpdEditFileNextRecordAst (struct RAB*); 
void UpdFileRename (REQUEST_STRUCT*, char*, char*);
void UpdEnd (REQUEST_STRUCT*);
void UpdNavigateBegin (REQUEST_STRUCT*);
void UpdNavigateBeginFiles (REQUEST_STRUCT*);
void UpdNavigateDirs (REQUEST_STRUCT*); 
void UpdNavigateEnd (REQUEST_STRUCT*);
int UpdNavigateFiles (REQUEST_STRUCT*); 
int UpdNavigateSearchDirs (REQUEST_STRUCT*); 
void UpdNavigateSearchFiles (REQUEST_STRUCT*); 
void UpdProtection (REQUEST_STRUCT*);
void UpdRundown (REQUEST_STRUCT*);
void UpdTreeBegin (REQUEST_STRUCT*);
void UpdTreeListDirs (REQUEST_STRUCT*);
void UpdTreeDirs (REQUEST_STRUCT*); 
void UpdTreeEnd (REQUEST_STRUCT*);

#endif /* UPD_H_LOADED */

/*****************************************************************************/