Changeset 68861 in vbox for trunk/include/iprt/refentry.h
- Timestamp:
- Sep 25, 2017 8:04:20 PM (7 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/refentry.h
r68830 r68861 1 /** @file2 * VirtualBox - manpage/refentry C extracts for built-in help.3 */4 1 5 /*6 * Copyright (C) 2015-2016 Oracle Corporation7 *8 * This file is part of VirtualBox Open Source Edition (OSE), as9 * available from http://www.virtualbox.org. This file is free software;10 * you can redistribute it and/or modify it under the terms of the GNU11 * General Public License (GPL) as published by the Free Software12 * Foundation, in version 2 as it comes in the "COPYING" file of the13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.15 *16 * The contents of this file may alternatively be used under the terms17 * of the Common Development and Distribution License Version 1.018 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the19 * VirtualBox OSE distribution, in which case the provisions of the20 * CDDL are applicable instead of those of the GPL.21 *22 * You may elect to license modified versions of this file under the23 * terms and conditions of either the GPL or the CDDL or both.24 */25 26 #ifndef ___VBox_refentry_h27 #define ___VBox_refentry_h28 29 #include <iprt/types.h>30 31 /** @defgroup grp_refentry Help generated from refentry/manpage.32 *33 * The refentry/manpage docbook source in doc/manual/en_US/man_* is processed by34 * doc/manual/docbook-refentry-to-C-help.xsl and turned a set of the structures35 * defined here.36 *37 * @{38 */39 40 /** The non-breaking space character.41 * @remarks We could've used U+00A0, but it is easier both to encode and to42 * search and replace a single ASCII character. */43 #define REFENTRY_NBSP '\b'44 45 /** @name REFENTRYSTR_SCOPE_XXX - Common string scoping and flags.46 * @{ */47 /** Same scope as previous string table entry, flags are reset and can be48 * ORed in. */49 #define REFENTRYSTR_SCOPE_SAME UINT64_C(0)50 /** Global scope. */51 #define REFENTRYSTR_SCOPE_GLOBAL UINT64_C(0x00ffffffffffffff)52 /** Scope mask. */53 #define REFENTRYSTR_SCOPE_MASK UINT64_C(0x00ffffffffffffff)54 /** Flags mask. */55 #define REFENTRYSTR_FLAGS_MASK UINT64_C(0xff00000000000000)56 /** Command synopsis, special hanging indent rules applies. */57 #define REFENTRYSTR_FLAGS_SYNOPSIS RT_BIT_64(63)58 /** @} */59 60 /** String table entry for a re. */61 typedef struct REFENTRYSTR62 {63 /** The scope of the string. There are two predefined scopes,64 * REFENTRYSTR_SCOPE_SAME and REFENTRYSTR_SCOPE_GLOBAL. The rest are65 * reference entry specific. */66 uint64_t fScope;67 /** The string. Non-breaking space is represented by the char68 * REFENTRY_NBSP defines, just in case the string needs wrapping. There is69 * no trailing newline, that's implicit. */70 const char *psz;71 } REFENTRYSTR;72 /** Pointer to a read-only string table entry. */73 typedef const REFENTRYSTR *PCREFENTRYSTR;74 75 typedef struct REFENTRYSTRTAB76 {77 /** Number of strings. */78 uint16_t cStrings;79 /** Reserved for future use. */80 uint16_t fReserved;81 /** Pointer to the string table. */82 PCREFENTRYSTR paStrings;83 } REFENTRYSTRTAB;84 /** Pointer to a read-only string table. */85 typedef REFENTRYSTRTAB const *PCREFENTRYSTRTAB;86 87 /**88 * Help extracted from a docbook refentry document.89 */90 typedef struct REFENTRY91 {92 /** Internal reference entry identifier. */93 int64_t idInternal;94 /** Usage synopsis. */95 REFENTRYSTRTAB Synopsis;96 /** Full help. */97 REFENTRYSTRTAB Help;98 /** Brief command description. */99 const char *pszBrief;100 } REFENTRY;101 /** Pointer to a read-only refentry help extract structure. */102 typedef REFENTRY const *PCREFENTRY;103 104 /** @} */105 106 #endif107
Note:
See TracChangeset
for help on using the changeset viewer.