• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ ENTRY函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ENTRY函数的典型用法代码示例。如果您正苦于以下问题:C++ ENTRY函数的具体用法?C++ ENTRY怎么用?C++ ENTRY使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ENTRY函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: sane_start

SANE_Status
sane_start (SANE_Handle h)
{
  return ENTRY(start) (h);
}
开发者ID:StKob,项目名称:debian_copyist_brother,代码行数:5,代码来源:stubs.c


示例2: ENTRY

SEG_OPTS *Seg_Default(char *argv[], int argc) 
{
   SEG_OPTS *Opt=NULL;
   
   ENTRY("Seg_Default");
   
   Opt = SegOpt_Struct();
   Opt->helpfunc = &Seg_usage;
   Opt->ps = SUMA_Parse_IO_Args(argc, argv, "-talk;");
   Opt->aset_name = NULL;
   Opt->mset_name = NULL;
   Opt->sig_name = NULL;
   Opt->gold_name=NULL;
   Opt->gold_bias_name=NULL;
   Opt->this_pset_name = NULL;
   Opt->this_cset_name = NULL;
   Opt->ndist_name = NULL;
   Opt->uid[0] = '\0';
   Opt->prefix = NULL;
   Opt->aset = NULL;
   Opt->mset = NULL;
   Opt->gset = NULL;
   Opt->sig = NULL;
   Opt->FDV = NULL;
   Opt->pset = NULL;
   Opt->cset = NULL;
   Opt->outl = NULL;
   Opt->gold = NULL;
   Opt->gold_bias = NULL;
   Opt->bias_meth = "Wells";
   Opt->bias_param = (float)strtod(
                    SUMA_OptList_get(SegOptList, "-bias_fwhm", "val"), NULL);
   Opt->debug = 0;
   Opt->idbg = Opt->kdbg = Opt->jdbg = -1;
   Opt->binwidth = 0.01; /* the R function area.gam was used to pick a decent 
                            binwidth. I picked a large one where discrepancy
                            between Reference and Approximation was good. 
                            0.1 is too coarse, 0.001 is overkill*/ 
   Opt->feats=NULL;
   Opt->clss=NI_strict_decode_string_list(
            SUMA_OptList_get(SegOptList, "-classes", "value"),";, ");
   Opt->Other = 0;
   Opt->keys = NULL;
   Opt->UseTmp = 1; 
   Opt->logp = 1;
   Opt->VoxDbg = -1;
   Opt->VoxDbg3[0] = Opt->VoxDbg3[1] = Opt->VoxDbg3[2] = -1;
   Opt->VoxDbgOut = stderr;
   Opt->rescale_p = 1;
   Opt->openmp = 0;
   Opt->labeltable_name = NULL;
   Opt->smode = STORAGE_BY_BRICK;
   Opt->pweight = 1;
   Opt->cmask = NULL;
   Opt->dimcmask = 0;
   Opt->cmask_count=0;
   Opt->mask_bot = 1.0;
   Opt->mask_top = -1.0;
   Opt->DO_p = TRUE;
   Opt->DO_c = TRUE;
   Opt->DO_o = FALSE;
   Opt->DO_r = FALSE;
   Opt->Writepcg_G_au = FALSE;
   Opt->group_classes = NULL;
   Opt->group_keys = NULL;
   Opt->fitmeth = SEG_LSQFIT;
   Opt->N_enhance_cset_init = 0;
   Opt->N_main = (int)strtod(
                  SUMA_OptList_get(SegOptList, "-main_N", "val"), NULL); 
                              /* defaulted to 4 before May 7 2012 */
   Opt->clust_cset_init=1;
   
   Opt->B = 0.0;  /* defaulted to 1.0 before March 7 2012 */
   Opt->T = 1.0;
   
   Opt->edge = 0.0;
   Opt->na = 8.0;
   
   Opt->priCgA=NULL;
   Opt->wA = -1.0;
   Opt->priCgL=NULL;
   Opt->wL = -1.0;
   Opt->priCgAname=NULL;
   Opt->priCgLname=NULL;
   Opt->priCgALL=NULL;
   Opt->priCgALLname=NULL;
   
   Opt->pstCgALL=NULL;
   Opt->Bset=NULL;
   Opt->pstCgALLname = NULL;
   Opt->Bsetname = NULL;
   
   Opt->proot = SUMA_OptList_get(SegOptList, "-prefix","val");
   SUMA_RETURN(Opt);
}
开发者ID:CesarCaballeroGaudes,项目名称:afni,代码行数:95,代码来源:SUMA_3dSeg.c


示例3: ENTRY

  const char *const name;	/* The equivalent symbolic value */
#ifndef HAVE_SYS_ERRLIST
  const char *const msg;	/* Short message about this value */
#endif
};

#ifndef HAVE_SYS_ERRLIST
#   define ENTRY(value, name, msg)	{value, name, msg}
#else
#   define ENTRY(value, name, msg)	{value, name}
#endif

static const struct error_info error_table[] =
{
#if defined (EPERM)
  ENTRY(EPERM, "EPERM", "Not owner"),
#endif
#if defined (ENOENT)
  ENTRY(ENOENT, "ENOENT", "No such file or directory"),
#endif
#if defined (ESRCH)
  ENTRY(ESRCH, "ESRCH", "No such process"),
#endif
#if defined (EINTR)
  ENTRY(EINTR, "EINTR", "Interrupted system call"),
#endif
#if defined (EIO)
  ENTRY(EIO, "EIO", "I/O error"),
#endif
#if defined (ENXIO)
  ENTRY(ENXIO, "ENXIO", "No such device or address"),
开发者ID:qiyao,项目名称:xcc,代码行数:31,代码来源:strerror.c


示例4: ENTRY

	unsigned int etype;	/* the libtasn1 ASN1_ETYPE or INVALID
				 * if cannot be simply parsed */
};

#define ENTRY(oid, ldap, asn, etype) {oid, sizeof(oid)-1, ldap, sizeof(ldap)-1, asn, etype}

/* when there is no ldap description */
#define ENTRY_ND(oid, asn, etype) {oid, sizeof(oid)-1, NULL, 0, asn, etype}

/* This list contains all the OIDs that may be
 * contained in a rdnSequence and are printable.
 */
static const struct oid_to_string _oid2str[] = {
	/* PKIX
	 */
	ENTRY("1.3.6.1.5.5.7.9.2", "placeOfBirth", "PKIX1.DirectoryString",
	 ASN1_ETYPE_INVALID),
	ENTRY("1.3.6.1.5.5.7.9.3", "gender", NULL, ASN1_ETYPE_PRINTABLE_STRING),
	ENTRY("1.3.6.1.5.5.7.9.4", "countryOfCitizenship", NULL,
	 ASN1_ETYPE_PRINTABLE_STRING),
	ENTRY("1.3.6.1.5.5.7.9.5", "countryOfResidence", NULL,
	 ASN1_ETYPE_PRINTABLE_STRING),

	ENTRY("2.5.4.6", "C", NULL, ASN1_ETYPE_PRINTABLE_STRING),
	ENTRY("2.5.4.9", "street", "PKIX1.DirectoryString", ASN1_ETYPE_INVALID),
	ENTRY("2.5.4.12", "title", "PKIX1.DirectoryString", ASN1_ETYPE_INVALID),
	ENTRY("2.5.4.10", "O", "PKIX1.DirectoryString", ASN1_ETYPE_INVALID),
	ENTRY("2.5.4.11", "OU", "PKIX1.DirectoryString", ASN1_ETYPE_INVALID),
	ENTRY("2.5.4.3", "CN", "PKIX1.DirectoryString", ASN1_ETYPE_INVALID),
	ENTRY("2.5.4.7", "L", "PKIX1.DirectoryString", ASN1_ETYPE_INVALID),
	ENTRY("2.5.4.8", "ST", "PKIX1.DirectoryString", ASN1_ETYPE_INVALID),
	ENTRY("2.5.4.13", "description", "PKIX1.DirectoryString",
开发者ID:cchwann,项目名称:gnutls,代码行数:32,代码来源:common.c


示例5: manual_EEG_init

 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include "ManPagesM.h"

void manual_EEG_init (ManPages me);
void manual_EEG_init (ManPages me) {

MAN_BEGIN (L"EEG", L"ppgb", 20120511)
INTRO (L"EEG means electro-encephalography: brain potentials recorded via e.g. 32 or 64 electrodes on the scalp. "
	"In Praat, an EEG object looks like a combination of a Sound object with e.g. 32 or 64 channels "
	"and a TextGrid object that marks the events.")
ENTRY (L"1. How to get an EEG object in Praat")
NORMAL (L"You typically create an EEG object in Praat by opening a BDF/EDF file with @@Read from [email protected] "
	"Praat tries to read the whole file into memory, so you may want to work with a 64-bit edition of Praat "
	"if you want to avoid \"out of memory\" messages.")
NORMAL (L"After you do ##Read from file...#, an EEG object will appear in the list of objects.")
ENTRY (L"2. How to look into an EEG object")
NORMAL (L"Once you have an EEG object in the list, you can click ##View & Edit# to look into it. "
	"You will typically see the first 8 channels, but you scroll to the other channels by clicking on the up and down arrows. "
	"You can scroll and zoom in the same way as in a Sound window.")
NORMAL (L"The channel names that you see are often A1, A2, ... A32, B1, B2, ... B32, C1, C2, ... C32, and so on. These represent the cap electrodes. "
	"If the number of cap electrodes is 32, though, the channel names are Fp1, AF3, ... Cz, "
	"and if it is 64, the channel names are Fp1, AF7, ... O2. You can change these names with "
	"##Set channel name...# from the #Modify menu.")
NORMAL (L"Below the cap electrodes you may see a number of channels for the external electrodes. "
	"These are typically named EXG1, EXG2, ... EXG8, but you can change these names with ##Edit external electrode names...# "
	"from the #Modify menu.")
开发者ID:Crisil,项目名称:praat,代码行数:31,代码来源:manual_EEG.cpp


示例6: ENTRY

// -----------------------------------------------------------------------------
// CSkinningModule::Case
// Returns a test case by number.
//
// This function contains an array of all available test cases
// i.e pair of case name and test function. If case specified by parameter
// aCaseNumber is found from array, then that item is returned.
//
// The reason for this rather complicated function is to specify all the
// test cases only in one place. It is not necessary to understand how
// function pointers to class member functions works when adding new test
// cases. See function body for instructions how to add new test case.
// -----------------------------------------------------------------------------
//
const TCaseInfo CSkinningModule::Case (
    const TInt aCaseNumber ) const
     {

    /**
    * To add new test cases, implement new test case function and add new
    * line to KCases array specify the name of the case and the function
    * doing the test case
    * In practice, do following
    * 1) Make copy of existing test case function and change its name
    *    and functionality. Note that the function must be added to
    *    SkinningModule.cpp file and to SkinningModule.h
    *    header file.
    *
    * 2) Add entry to following KCases array either by using:
    *
    * 2.1: FUNCENTRY or ENTRY macro
    * ENTRY macro takes two parameters: test case name and test case
    * function name.
    *
    * FUNCENTRY macro takes only test case function name as a parameter and
    * uses that as a test case name and test case function name.
    *
    * Or
    *
    * 2.2: OOM_FUNCENTRY or OOM_ENTRY macro. Note that these macros are used
    * only with OOM (Out-Of-Memory) testing!
    *
    * OOM_ENTRY macro takes five parameters: test case name, test case
    * function name, TBool which specifies is method supposed to be run using
    * OOM conditions, TInt value for first heap memory allocation failure and
    * TInt value for last heap memory allocation failure.
    *
    * OOM_FUNCENTRY macro takes test case function name as a parameter and uses
    * that as a test case name, TBool which specifies is method supposed to be
    * run using OOM conditions, TInt value for first heap memory allocation
    * failure and TInt value for last heap memory allocation failure.
    */

    static TCaseInfoInternal const KCases[] =
        {
        ENTRY( "Skins: Start server",                     CSkinningModule::TestCaseStartServer ),
//===========================================================================================================
        ENTRY( "Skins - Rendering: Master layout ops",    CSkinningModule::TestCaseMasterLayoutOpsL ),
        ENTRY( "Skins - Animation Factory cases",         CSkinningModule::TestCaseAnimationFactoryOpsL ),
        ENTRY( "Skins - Render Utils cases",              CSkinningModule::TestCaseRenderUtilsOps ),
//===========================================================================================================
        ENTRY( "Skins - Basic Background Context cases",  CSkinningModule::TestCaseBasicBackgroundControlContextOpsL ),
        ENTRY( "Skins - Listbox Background Context cases",CSkinningModule::TestCaseListBoxBackgroundControlContextOpsL ),
        ENTRY( "Skins - Layered Background Context cases",CSkinningModule::TestCaseLayeredBackgroundControlContextOpsL ),
        // No cases for Framed Background Context since they need CoeEnv.
        ENTRY( "Skins - Masked Background Context cases", CSkinningModule::TestCaseMaskedBackgroundControlContextOpsL ),
        ENTRY( "Skins - Combined Background Context cases", CSkinningModule::TestCaseCombinedBackgroundControlContextOpsL ),
        //OOM_ENTRY( "Loop test with OOM", CSkinningModule::LoopTest, ETrue, 2, 3),
        //OOM_FUNCENTRY( CSkinningModule::PrintTest, ETrue, 1, 3 ),
        };

    // Verify that case number is valid
    if( (TUint) aCaseNumber >= sizeof( KCases ) /
                               sizeof( TCaseInfoInternal ) )
        {
        // Invalid case, construct empty object
        TCaseInfo null( (const TText*) L"" );
        null.iMethod = NULL;
        null.iIsOOMTest = EFalse;
        null.iFirstMemoryAllocation = 0;
        null.iLastMemoryAllocation = 0;
        return null;
        }

    // Construct TCaseInfo object and return it
    TCaseInfo tmp ( KCases[ aCaseNumber ].iCaseName );
    tmp.iMethod = KCases[ aCaseNumber ].iMethod;
    tmp.iIsOOMTest = KCases[ aCaseNumber ].iIsOOMTest;
    tmp.iFirstMemoryAllocation = KCases[ aCaseNumber ].iFirstMemoryAllocation;
    tmp.iLastMemoryAllocation = KCases[ aCaseNumber ].iLastMemoryAllocation;
    return tmp;
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:92,代码来源:skinningmodulecases.cpp


示例7: main

int main(void)
{
#define ENTRY(entry) DEFINE(tsk_ ## entry, offsetof(struct task_struct, entry))
	ENTRY(state);
	ENTRY(flags); 
	ENTRY(thread); 
	ENTRY(pid);
	BLANK();
#undef ENTRY
#define ENTRY(entry) DEFINE(threadinfo_ ## entry, offsetof(struct thread_info, entry))
	ENTRY(flags);
	ENTRY(addr_limit);
	ENTRY(preempt_count);
	BLANK();
#undef ENTRY
#define ENTRY(entry) DEFINE(pda_ ## entry, offsetof(struct x8664_pda, entry))
	ENTRY(kernelstack); 
	ENTRY(oldrsp); 
	ENTRY(pcurrent); 
	ENTRY(irqrsp);
	ENTRY(irqcount);
	ENTRY(cpunumber);
	ENTRY(irqstackptr);
	BLANK();
#undef ENTRY
#ifdef CONFIG_IA32_EMULATION
#define ENTRY(entry) DEFINE(IA32_SIGCONTEXT_ ## entry, offsetof(struct sigcontext_ia32, entry))
	ENTRY(eax);
	ENTRY(ebx);
	ENTRY(ecx);
	ENTRY(edx);
	ENTRY(esi);
	ENTRY(edi);
	ENTRY(ebp);
	ENTRY(esp);
	ENTRY(eip);
	BLANK();
#undef ENTRY
	DEFINE(IA32_RT_SIGFRAME_sigcontext,
	       offsetof (struct rt_sigframe32, uc.uc_mcontext));
	BLANK();
#endif
	DEFINE(SIZEOF_PBE, sizeof(struct pbe));
	DEFINE(pbe_address, offsetof(struct pbe, address));
	DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address));
	return 0;
}
开发者ID:Antonio-Zhou,项目名称:Linux-2.6.11,代码行数:47,代码来源:asm-offsets.c


示例8: sane_close

void
sane_close (SANE_Handle h)
{
  ENTRY(close) (h);
}
开发者ID:StKob,项目名称:debian_copyist_brother,代码行数:5,代码来源:stubs.c


示例9: sane_exit

void
sane_exit (void)
{
  ENTRY(exit) ();
}
开发者ID:StKob,项目名称:debian_copyist_brother,代码行数:5,代码来源:stubs.c


示例10: sane_get_select_fd

SANE_Status
sane_get_select_fd (SANE_Handle h, SANE_Int *fdp)
{
  return ENTRY(get_select_fd) (h, fdp);
}
开发者ID:StKob,项目名称:debian_copyist_brother,代码行数:5,代码来源:stubs.c


示例11: sane_cancel

void
sane_cancel (SANE_Handle h)
{
  ENTRY(cancel) (h);
}
开发者ID:StKob,项目名称:debian_copyist_brother,代码行数:5,代码来源:stubs.c


示例12: sane_set_io_mode

SANE_Status
sane_set_io_mode (SANE_Handle h, SANE_Bool non_blocking)
{
  return ENTRY(set_io_mode) (h, non_blocking);
}
开发者ID:StKob,项目名称:debian_copyist_brother,代码行数:5,代码来源:stubs.c


示例13: sane_init

SANE_Status
sane_init (SANE_Int *vc, SANE_Auth_Callback cb)
{
  return ENTRY(init) (vc, cb);
}
开发者ID:StKob,项目名称:debian_copyist_brother,代码行数:5,代码来源:stubs.c


示例14: sane_read

SANE_Status
sane_read (SANE_Handle h, SANE_Byte *buf, SANE_Int maxlen, SANE_Int *lenp)
{
  return ENTRY(read) (h, buf, maxlen, lenp);
}
开发者ID:StKob,项目名称:debian_copyist_brother,代码行数:5,代码来源:stubs.c


示例15: draw_TimeDomain_Sound

#include "manual_exampleSound.h"

static void draw_TimeDomain_Sound (Graphics g) {
	Sound_draw (manual_exampleSound (), g, 0, 0, 0, 0, TRUE, L"curve");
}
static void draw_TimeDomain_Pitch (Graphics g) {
	Pitch_draw (manual_examplePitch (), g, 0, 0, 200.0, 500.0, TRUE, Pitch_speckle_NO, kPitch_unit_HERTZ);
}

void manual_glossary_init (ManPages me);
void manual_glossary_init (ManPages me) {

MAN_BEGIN (L"aliasing", L"ppgb", 20040331)
INTRO (L"Aliasing (Du. %vouwvervorming) is the phenomenon of the ambiguity "
	"of a sampled signal.")
ENTRY (L"Example")
NORMAL (L"With a sampling frequency of 10 kHz, a sine wave with a frequency of 3 kHz "
	"receives the same representation as a sine wave with a frequency of 7 kHz, "
	"13 kHz, or 17 kHz, and so on. If the sampled signal is meant to represent a "
	"continuous spectral range starting at 0 Hz "
	"(which is the most common case for speech recordings), "
	"all these tones are likely to be interpreted as 3 kHz tones after sampling.")
NORMAL (L"To remedy this unwanted situation, the signal is usually low-pass filtered "
	"with a cut-off frequency just below 5 kHz, prior to sampling.")
MAN_END

MAN_BEGIN (L"Click", L"ppgb", 19960913)
INTRO (L"One of the ways to control @Editors.")
ENTRY (L"How to click")
LIST_ITEM (L"1. Position the mouse above the object that you want to click.")
LIST_ITEM (L"2. Press and release the (left) mouse button.")
开发者ID:Crisil,项目名称:praat,代码行数:31,代码来源:manual_glossary.cpp


示例16: GetSystemInfo

/*++
Function:
  GetSystemInfo

GetSystemInfo

The GetSystemInfo function returns information about the current system.

Parameters

lpSystemInfo
       [out] Pointer to a SYSTEM_INFO structure that receives the information.

Return Values

This function does not return a value.

Note:
  fields returned by this function are:
    dwNumberOfProcessors
    dwPageSize
Others are set to zero.

--*/
VOID
PALAPI
GetSystemInfo(
          OUT LPSYSTEM_INFO lpSystemInfo)
{
    int nrcpus = 0;
    long pagesize;

    PERF_ENTRY(GetSystemInfo);
    ENTRY("GetSystemInfo (lpSystemInfo=%p)\n", lpSystemInfo);

    pagesize = getpagesize();

    lpSystemInfo->wProcessorArchitecture_PAL_Undefined = 0;
    lpSystemInfo->wReserved_PAL_Undefined = 0;
    lpSystemInfo->dwPageSize = pagesize;
    lpSystemInfo->dwActiveProcessorMask_PAL_Undefined = 0;

#if HAVE_SYSCONF
#if defined(__hppa__) || ( defined (_IA64_) && defined (_HPUX_) )
    struct pst_dynamic psd;
    if (pstat_getdynamic(&psd, sizeof(psd), (size_t)1, 0) != -1) {
        nrcpus = psd.psd_proc_cnt;
    }
    else {
        ASSERT("pstat_getdynamic failed (%d)\n", errno);
    }

#else // !__hppa__
    nrcpus = sysconf(_SC_NPROCESSORS_ONLN);
    if (nrcpus < 1)
    {
        ASSERT("sysconf failed for _SC_NPROCESSORS_ONLN (%d)\n", errno);
    }
#endif // __hppa__
#elif HAVE_SYSCTL
    int rc;
    size_t sz;
    int mib[2];

    sz = sizeof(nrcpus);
    mib[0] = CTL_HW;
    mib[1] = HW_NCPU;
    rc = sysctl(mib, 2, &nrcpus, &sz, NULL, 0);
    if (rc != 0)
    {
        ASSERT("sysctl failed for HW_NCPU (%d)\n", errno);
    }
#endif // HAVE_SYSCONF

    TRACE("dwNumberOfProcessors=%d\n", nrcpus);
    lpSystemInfo->dwNumberOfProcessors = nrcpus;

#ifdef VM_MAXUSER_ADDRESS
    lpSystemInfo->lpMaximumApplicationAddress = (PVOID) VM_MAXUSER_ADDRESS;
#elif defined(__sun__) || defined(_AIX) || defined(__hppa__) || ( defined (_IA64_) && defined (_HPUX_) ) || defined(__LINUX__)
    lpSystemInfo->lpMaximumApplicationAddress = (PVOID) -1;
#elif defined(USERLIMIT)
    lpSystemInfo->lpMaximumApplicationAddress = (PVOID) USERLIMIT;
#elif defined(_WIN64)
#if defined(USRSTACK64)
    lpSystemInfo->lpMaximumApplicationAddress = (PVOID) USRSTACK64;
#else // !USRSTACK64
#error How come USRSTACK64 is not defined for 64bit?
#endif // USRSTACK64
#elif defined(USRSTACK)
    lpSystemInfo->lpMaximumApplicationAddress = (PVOID) USRSTACK;
#else
#error The maximum application address is not known on this platform.
#endif

    lpSystemInfo->lpMinimumApplicationAddress = (PVOID) pagesize;

    lpSystemInfo->dwProcessorType_PAL_Undefined = 0;

    lpSystemInfo->dwAllocationGranularity = pagesize;
//.........这里部分代码省略.........
开发者ID:blackdwarf,项目名称:coreclr,代码行数:101,代码来源:sysinfo.cpp


示例17: CIPHER_SUITES_COUNT

/* ECC with PSK */
#define GNUTLS_ECDHE_PSK_3DES_EDE_CBC_SHA1 { 0xC0, 0x34 }
#define GNUTLS_ECDHE_PSK_AES_128_CBC_SHA1 { 0xC0, 0x35 }
#define GNUTLS_ECDHE_PSK_AES_256_CBC_SHA1 { 0xC0, 0x36 }
#define GNUTLS_ECDHE_PSK_AES_128_CBC_SHA256 { 0xC0, 0x37 }
#define GNUTLS_ECDHE_PSK_AES_256_CBC_SHA384 { 0xC0, 0x38 }
#define GNUTLS_ECDHE_PSK_NULL_SHA256 { 0xC0, 0x3A }
#define GNUTLS_ECDHE_PSK_NULL_SHA384 { 0xC0, 0x3B }

#define CIPHER_SUITES_COUNT (sizeof(cs_algorithms)/sizeof(gnutls_cipher_suite_entry)-1)

static const gnutls_cipher_suite_entry cs_algorithms[] = {
  /* DH_ANON */
  ENTRY (GNUTLS_DH_ANON_ARCFOUR_MD5,
                             GNUTLS_CIPHER_ARCFOUR_128,
                             GNUTLS_KX_ANON_DH, GNUTLS_MAC_MD5,
                             GNUTLS_SSL3, GNUTLS_VERSION_MAX, 0),
  ENTRY (GNUTLS_DH_ANON_3DES_EDE_CBC_SHA1,
                             GNUTLS_CIPHER_3DES_CBC, GNUTLS_KX_ANON_DH,
                             GNUTLS_MAC_SHA1, GNUTLS_SSL3,
                             GNUTLS_VERSION_MAX, 1),
  ENTRY (GNUTLS_DH_ANON_AES_128_CBC_SHA1,
                             GNUTLS_CIPHER_AES_128_CBC, GNUTLS_KX_ANON_DH,
                             GNUTLS_MAC_SHA1, GNUTLS_SSL3,
                             GNUTLS_VERSION_MAX, 1),
  ENTRY (GNUTLS_DH_ANON_AES_256_CBC_SHA1,
                             GNUTLS_CIPHER_AES_256_CBC, GNUTLS_KX_ANON_DH,
                             GNUTLS_MAC_SHA1, GNUTLS_SSL3,
                             GNUTLS_VERSION_MAX, 1),
  ENTRY (GNUTLS_DH_ANON_CAMELLIA_128_CBC_SHA1,
                             GNUTLS_CIPHER_CAMELLIA_128_CBC,
开发者ID:philippe-goetz,项目名称:gnutls,代码行数:31,代码来源:ciphersuites.c


示例18: GlobalMemoryStatusEx

/*++
Function:
  GlobalMemoryStatusEx

GlobalMemoryStatusEx

Retrieves information about the system's current usage of both physical and virtual memory.

Return Values

This function returns a BOOL to indicate its success status.

--*/
BOOL
PALAPI
GlobalMemoryStatusEx(
            IN OUT LPMEMORYSTATUSEX lpBuffer)
{

    PERF_ENTRY(GlobalMemoryStatusEx);
    ENTRY("GlobalMemoryStatusEx (lpBuffer=%p)\n", lpBuffer);

    lpBuffer->dwMemoryLoad = 0;
    lpBuffer->ullTotalPhys = 0;
    lpBuffer->ullAvailPhys = 0;
    lpBuffer->ullTotalPageFile = 0;
    lpBuffer->ullAvailPageFile = 0;
    lpBuffer->ullTotalVirtual = 0;
    lpBuffer->ullAvailVirtual = 0;
    lpBuffer->ullAvailExtendedVirtual = 0;

    BOOL fRetVal = FALSE;

    // Get the physical memory size
#if HAVE_SYSCONF && HAVE__SC_PHYS_PAGES
    int64_t physical_memory;

    // Get the Physical memory size
    physical_memory = sysconf( _SC_PHYS_PAGES ) * sysconf( _SC_PAGE_SIZE );
    lpBuffer->ullTotalPhys = (DWORDLONG)physical_memory;
    fRetVal = TRUE;
#elif HAVE_SYSCTL
    int mib[2];
    int64_t physical_memory;
    size_t length;

    // Get the Physical memory size
    mib[0] = CTL_HW;
    mib[1] = HW_MEMSIZE;
    length = sizeof(INT64);
    int rc = sysctl(mib, 2, &physical_memory, &length, NULL, 0);
    if (rc != 0)
    {
        ASSERT("sysctl failed for HW_MEMSIZE (%d)\n", errno);
    }
    else
    {
        lpBuffer->ullTotalPhys = (DWORDLONG)physical_memory;
        fRetVal = TRUE;
    }
#elif // HAVE_SYSINFO
    // TODO: implement getting memory details via sysinfo. On Linux, it provides swap file details that
    // we can use to fill in the xxxPageFile members.

#endif // HAVE_SYSCONF

    // Get the physical memory in use - from it, we can get the physical memory available.
    // We do this only when we have the total physical memory available.
    if (lpBuffer->ullTotalPhys > 0)
    {
#ifndef __APPLE__
        lpBuffer->ullAvailPhys = sysconf(SYSCONF_PAGES) * sysconf(_SC_PAGE_SIZE);
        INT64 used_memory = lpBuffer->ullTotalPhys - lpBuffer->ullAvailPhys;
        lpBuffer->dwMemoryLoad = (DWORD)((used_memory * 100) / lpBuffer->ullTotalPhys);
#else
        vm_size_t page_size;
        mach_port_t mach_port;
        mach_msg_type_number_t count;
        vm_statistics_data_t vm_stats;
        mach_port = mach_host_self();
        count = sizeof(vm_stats) / sizeof(natural_t);
        if (KERN_SUCCESS == host_page_size(mach_port, &page_size))
        {
            if (KERN_SUCCESS == host_statistics(mach_port, HOST_VM_INFO, (host_info_t)&vm_stats, &count))
            {
                lpBuffer->ullAvailPhys = (int64_t)vm_stats.free_count * (int64_t)page_size;
                INT64 used_memory = ((INT64)vm_stats.active_count + (INT64)vm_stats.inactive_count + (INT64)vm_stats.wire_count) *  (INT64)page_size;
                lpBuffer->dwMemoryLoad = (DWORD)((used_memory * 100) / lpBuffer->ullTotalPhys);
            }
        }
        mach_port_deallocate(mach_task_self(), mach_port);
#endif // __APPLE__
    }

    // There is no API to get the total virtual address space size on 
    // Unix, so we use a constant value representing 128TB, which is 
    // the approximate size of total user virtual address space on
    // the currently supported Unix systems.
    static const UINT64 _128TB = (1ull << 47); 
    lpBuffer->ullTotalVirtual = _128TB;
//.........这里部分代码省略.........
开发者ID:blackdwarf,项目名称:coreclr,代码行数:101,代码来源:sysinfo.cpp


示例19: manual_Permutation_init

 */

/*
  20050709 djmw
*/

#include "ManPagesM.h"

void manual_Permutation_init (ManPages me);
void manual_Permutation_init (ManPages me)
{

MAN_BEGIN (L"Permutation", L"djmw", 20050721)
INTRO (L"One of the @@types of [email protected] in Praat. A Permutation object with %n elements consists of some ordering of "
	"the numbers 1,2...%n.")
ENTRY (L"Interpretation")
NORMAL (L"A permutation like for example (2,3,5,4,1) is an %arrangement of the five objects 1, 2, 3, 4, and 5. "
	"It tells us that the second object is in the first position, the third object is in the second position, "
	"the fifth object in the third position and so on.")
NORMAL (L"If we combine a Permutation together with an other object, like a Strings for example, we may force a  "
	"new arrangement of the strings, according to the specification in the Permutation (see @@Strings & Permutation: Permute [email protected])." )
ENTRY (L"Commands")
NORMAL (L"Creation:")
LIST_ITEM (L"\\bu @@Create [email protected]")
NORMAL (L"Query:")
LIST_ITEM (L"\\bu ##Get number of elements#")
LIST_ITEM (L"\\bu @@Permutation: Get value...|Get [email protected]")
LIST_ITEM (L"\\bu @@Permutation: Get index...|Get [email protected]")
NORMAL (L"Modification:")
LIST_ITEM (L"\\bu @@Permutation: Sort|[email protected]")
LIST_ITEM (L"\\bu @@Permutation: Swap blocks...|Swap [email protected]")
开发者ID:arizona-phonological-imaging-lab,项目名称:ultrapraat,代码行数:31,代码来源:manual_Permutation.cpp


示例20: EDIT_cluster_array

void EDIT_cluster_array (MCW_cluster_array * clar, int edit_clust,
                         float dxyz, float vmul)
{
   int iclu;       /* cluster index */
   int nclu;       /* non-empty cluster index */
   int ii;         /* voxel index */
   float
      mag,         /* voxel intensity */
      sum,         /* sum of voxel intensities */
      max,         /* maximum of voxel intensities */
      amax,        /* maximum of absolute voxel intensities */
      smax,        /* signed maximum of absolute voxel intensities */
      mean=0.0,        /* mean of voxel intensities */
      size=0.0;        /* size of cluster (multiples of vmul) */

ENTRY("EDIT_cluster_array") ;

   if( edit_clust == ECFLAG_ORDER){
      SORT_CLARR(clar) ;
   }

   nclu = 0;
   for (iclu = 0; iclu < clar->num_clu; iclu++)
   {
      if ((clar->clar[iclu] != NULL) && (clar->clar[iclu]->num_pt > 0))
      {
         nclu++;

         /* initialization of basic statistics for this cluster */
         sum = max = smax = clar->clar[iclu]->mag[0];
         amax = fabs(smax);

         /* calculate basic statistics for this cluster */
         for (ii = 1; ii < clar->clar[iclu]->num_pt; ii++)
         {
            mag = clar->clar[iclu]->mag[ii];
            switch (edit_clust)
            {
               case ECFLAG_MEAN :
                  sum += mag;  break;
               case ECFLAG_MAX  :
                  if (mag > max)  max = mag;   break;
               case ECFLAG_AMAX :
                  if (fabs(mag) > amax)  amax = fabs(mag);  break;
               case ECFLAG_SMAX :
                  if (fabs(mag) > fabs(smax))  smax = mag;  break;
               case ECFLAG_SIZE : break;
               case ECFLAG_DEPTH : break; /* handled outside of this function*/
               default          : break;
            }

         }

         /* additional calculations */
         if (edit_clust == ECFLAG_MEAN)
            mean = sum / clar->clar[iclu]->num_pt;
         if (edit_clust == ECFLAG_SIZE)
            size = clar->clar[iclu]->num_pt * dxyz / vmul;

         /* set all voxel intensities in this cluster to the same value */
         for (ii = 0; ii < clar->clar[iclu]->num_pt; ii++)
         {
            switch (edit_clust)
            {
               case ECFLAG_MEAN :  clar->clar[iclu]->mag[ii] = mean;  break;
               case ECFLAG_MAX  :  clar->clar[iclu]->mag[ii] = max;   break;
               case ECFLAG_AMAX :  clar->clar[iclu]->mag[ii] = amax;  break;
               case ECFLAG_SMAX :  clar->clar[iclu]->mag[ii] = smax;  break;
               case ECFLAG_SIZE :  clar->clar[iclu]->mag[ii] = size;  break;
               case ECFLAG_ORDER:  clar->clar[iclu]->mag[ii] = nclu;  break;
               case ECFLAG_DEPTH:  break; /* Done outside, ZSS March 02 2010 */
               default          :                                     break;
            }
         }
         
      }
   }  /* iclu */

   EXRETURN ;
}
开发者ID:Gilles86,项目名称:afni,代码行数:80,代码来源:edt_clustarr.c



注:本文中的ENTRY函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ENTRY_BLOCK_PTR_FOR_FN函数代码示例发布时间:2022-05-30
下一篇:
C++ ENTNUM函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap