cvs commit: apache-apr/include apr_status.h

1999-02-23 Thread rbb
rbb 99/02/23 11:27:15

  Removed: include  apr_status.h
  Log:
  The consensus on new-httpd seems is to not use APRStatus as it was defined
  in this file, but to have each function return an error code, as appropriate,
  and use errno.  Because this is no longer needed, and to reduce confusion
  with people actually implementing APR, I am removing this file.


cvs commit: apache-apr/include apr_status.h

1999-01-21 Thread coar
coar99/01/21 12:57:30

  Modified:docs apr-function.txt
  Added:   include  apr_status.h
  Log:
Add a start to the status-parsing macros, and correct some
misteaks in the draft status definition.
  
  Obtained from:OpenVMS status code definition scheme
  
  Revision  ChangesPath
  1.2   +23 -6 apache-apr/docs/apr-function.txt
  
  Index: apr-function.txt
  ===
  RCS file: /home/cvs/apache-apr/docs/apr-function.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apr-function.txt  1999/01/21 20:02:10 1.1
  +++ apr-function.txt  1999/01/21 20:57:29 1.2
  @@ -42,10 +42,12 @@
   h1APRStatus Layout/h1
   
   This is based on how VMS lays out its error codes. We haven't decided at
  -all whether this is a good thing or not.
  +all whether this is a good thing or not.  However, I18N of VMS error
  +messages was made very easy by this arrangement, as was determining the
  +source of errors.
   
  -APRStatus is basically a 32-bit integer. We will use 16-bits to describe the
  -nature of the specific error, and the other 16-bits are layed out as follows:
  +APRStatus is basically a 32-bit integer. We will use 12 bits to describe the
  +nature of the specific error, and the other 18 bits are laid out as follows:
   
 the three low-order bits describe the type of error as:
 000 (0): Warning (things didn't quite go right, but the
  @@ -60,15 +62,30 @@
 101 (5): Undefined, no problems
 110 (6): Undefined, problems
 111 (7): Undefined, no problems
  -  The other 13 bits are an origin
  +
  +   This allows a 'it worked/need to check further' decision to be based
  +   on the low bit (odd or even).
  +
  +  The next 12 bits (3-14) are the actual error number (4095 possible).
  +
  +  Bit 15 indicates whether the error is specific to the raising subsystem
  +  (see the next field) or shared.
  +
  +  Bits 16-28 are an origin identifying the subsystem raising the error; e.g.,
 0  : File System
  -  2  : Shell
  +  1  : Shell
  +  2  : Thread system
 3  : Internal APR
  +  4   : OS syscalls
 etc.  NOTE: These are not set, just some beginning ideas.  Obviously, 
  this needs to be well-thought out, and we should refer to 
  the VMS docs for ideas.
  -  0xfff8 : Shared error code, these errors can come from any origin.
   
  +The origin and shared-error stuff allows a common condition (such
  +as 'permission denied') to be used by different subsystems.  You can
  +tell by disassembling the status code just which subsystem encountered
  +the problem.  The common/private bit allows subsystems to define
  +errors specific to them.
   
   h1Functions/h1
   
  
  
  
  1.1  apache-apr/include/apr_status.h
  
  Index: apr_status.h
  ===
  /* 
   * Copyright (c) 1999 The Apache Group.  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.
   *
   * 3. All advertising materials mentioning features or use of this
   *software must display the following acknowledgment:
   *This product includes software developed by the Apache Group
   *for use in the Apache HTTP server project (http://www.apache.org/).
   *
   * 4. The names Apache Server and Apache Group must not be used to
   *endorse or promote products derived from this software without
   *prior written permission. For written permission, please contact
   *[EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * 6. Redistributions of any form whatsoever must retain the following
   *acknowledgment:
   *This product includes software developed by the Apache Group
   *for use in the Apache HTTP server project (http://www.apache.org/).
   *
   * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
   * EXPRESSED 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 APACHE GROUP OR
   * ITS CONTRIBUTORS BE LIABLE