9838b7032e
This is strictly the application of the script 'x-indent-all.sh' from util/modular. Compared to the patch that Daniel posted in January, I've added a few indent flags: -bap -psl -T PrivatePtr -T pmWait -T _XFUNCPROTOBEGIN -T _XFUNCPROTOEND -T _X_EXPORT The typedefs were needed to make the output of sdksyms.sh match the previous output, otherwise, the code is formatted badly enough that sdksyms.sh generates incorrect output. The generated code was compared with the previous version and found to be essentially identical -- "assert" line numbers and BUILD_TIME were the only differences found. The comparison was done with this script: dir1=$1 dir2=$2 for dir in $dir1 $dir2; do (cd $dir && find . -name '*.o' | while read file; do dir=`dirname $file` base=`basename $file .o` dump=$dir/$base.dump objdump -d $file > $dump done) done find $dir1 -name '*.dump' | while read dump; do otherdump=`echo $dump | sed "s;$dir1;$dir2;"` diff -u $dump $otherdump done Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
65 lines
2.1 KiB
C
65 lines
2.1 KiB
C
/***********************************************************
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
******************************************************************/
|
|
|
|
#ifndef DIX_REGISTRY_H
|
|
#define DIX_REGISTRY_H
|
|
|
|
/*
|
|
* Result returned from any unsuccessful lookup
|
|
*/
|
|
#define XREGISTRY_UNKNOWN "<unknown>"
|
|
|
|
#ifdef XREGISTRY
|
|
|
|
#include "resource.h"
|
|
#include "extnsionst.h"
|
|
|
|
/* Internal string registry - for auditing, debugging, security, etc. */
|
|
|
|
/*
|
|
* Registration functions. The name string is not copied, so it must
|
|
* not be a stack variable.
|
|
*/
|
|
extern _X_EXPORT void RegisterResourceName(RESTYPE type, const char *name);
|
|
extern _X_EXPORT void RegisterExtensionNames(ExtensionEntry * ext);
|
|
|
|
/*
|
|
* Lookup functions. The returned string must not be modified or freed.
|
|
*/
|
|
extern _X_EXPORT const char *LookupMajorName(int major);
|
|
extern _X_EXPORT const char *LookupRequestName(int major, int minor);
|
|
extern _X_EXPORT const char *LookupEventName(int event);
|
|
extern _X_EXPORT const char *LookupErrorName(int error);
|
|
extern _X_EXPORT const char *LookupResourceName(RESTYPE rtype);
|
|
|
|
/*
|
|
* Setup and teardown
|
|
*/
|
|
extern _X_EXPORT void dixResetRegistry(void);
|
|
|
|
#else /* XREGISTRY */
|
|
|
|
/* Define calls away when the registry is not being built. */
|
|
|
|
#define RegisterResourceName(a, b) { ; }
|
|
#define RegisterExtensionNames(a) { ; }
|
|
|
|
#define LookupMajorName(a) XREGISTRY_UNKNOWN
|
|
#define LookupRequestName(a, b) XREGISTRY_UNKNOWN
|
|
#define LookupEventName(a) XREGISTRY_UNKNOWN
|
|
#define LookupErrorName(a) XREGISTRY_UNKNOWN
|
|
#define LookupResourceName(a) XREGISTRY_UNKNOWN
|
|
|
|
#define dixResetRegistry() { ; }
|
|
|
|
#endif /* XREGISTRY */
|
|
#endif /* DIX_REGISTRY_H */
|