您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DEF函数代码示例

51自学网 2021-06-01 20:20:34
  C++
这篇教程C++ DEF函数代码示例写得很实用,希望能帮到您。

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

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

示例1: rbffi_DynamicLibrary_Init

voidrbffi_DynamicLibrary_Init(VALUE moduleFFI){    LibraryClass = rb_define_class_under(moduleFFI, "DynamicLibrary", rb_cObject);    rb_global_variable(&LibraryClass);    SymbolClass = rb_define_class_under(LibraryClass, "Symbol", rbffi_PointerClass);    rb_global_variable(&SymbolClass);    rb_define_const(moduleFFI, "NativeLibrary", LibraryClass); // backwards compat library    rb_define_alloc_func(LibraryClass, library_allocate);    rb_define_singleton_method(LibraryClass, "open", library_open, 2);    rb_define_singleton_method(LibraryClass, "last_error", library_dlerror, 0);    rb_define_method(LibraryClass, "initialize", library_initialize, 2);    rb_define_method(LibraryClass, "find_symbol", library_dlsym, 1);    rb_define_method(LibraryClass, "find_function", library_dlsym, 1);    rb_define_method(LibraryClass, "find_variable", library_dlsym, 1);    rb_define_method(LibraryClass, "last_error", library_dlerror, 0);    rb_define_attr(LibraryClass, "name", 1, 0);    rb_define_alloc_func(SymbolClass, symbol_allocate);    rb_undef_method(SymbolClass, "new");    rb_define_method(SymbolClass, "inspect", symbol_inspect, 0);#define DEF(x) rb_define_const(LibraryClass, "RTLD_" #x, UINT2NUM(RTLD_##x))    DEF(LAZY);    DEF(NOW);    DEF(GLOBAL);    DEF(LOCAL);}
开发者ID:Flameeyes,项目名称:ffi,代码行数:30,


示例2: bootstrap_error

js_val *bootstrap_error(){  js_val *error = JSNFUNC(error_new, 1);  js_val *prototype = JSOBJ();  prototype->proto = fh->object_proto;  // Error  // -----  // Properties  DEF(error, "prototype", prototype);  // Error.prototype  // ---------------    // Properties  DEF(prototype, "constructor", JSNFUNC(error_new, 1));  DEF(prototype, "name", JSSTR("Error"));  DEF(prototype, "message", JSSTR(""));  // Methods  DEF(prototype, "toString", JSNFUNC(error_proto_to_string, 0));  fh_attach_prototype(prototype, fh->function_proto);  return error;}
开发者ID:pstef,项目名称:flathead,代码行数:28,


示例3: DEF

static void DEF(ff_put_no_rnd_pixels16_y2)(uint8_t *block,                                           const uint8_t *pixels,                                           ptrdiff_t line_size, int h){    DEF(ff_put_no_rnd_pixels8_y2)(block,     pixels,     line_size, h);    DEF(ff_put_no_rnd_pixels8_y2)(block + 8, pixels + 8, line_size, h);}
开发者ID:DonDiego,项目名称:libav,代码行数:7,


示例4: GenRSDataTypeEnums

// -gen-rs-data-type-enums//// ENUM_PRIMITIVE_DATA_TYPE(type, cname, bits)// ENUM_PRIMITIVE_DATA_TYPE_RANGE(begin_type, end_type)// ENUM_RS_MATRIX_DATA_TYPE(type, cname, bits)// ENUM_RS_MATRIX_DATA_TYPE_RANGE(begin_type, end_type)// ENUM_RS_OBJECT_DATA_TYPE(type, cname, bits)// ENUM_RS_OBJECT_DATA_TYPE_RANGE(begin_type, end_type)//// ENUM_RS_DATA_TYPE(type, cname, bits)// e.g., ENUM_RS_DATA_TYPE(Float32, "float", 256)static int GenRSDataTypeEnums(const RSDataTypeSpec *const DataTypes[],                              unsigned NumDataTypes) {  // Alias missing #define#define ALIAS_DEF(x, y) /  printf("#ifndef " #x "/n");  /  printf("#define " #x "(type, cname, bits) " #y "(type, cname, bits)/n");  /  printf("#endif/n/n")  ALIAS_DEF(ENUM_PRIMITIVE_DATA_TYPE, ENUM_RS_DATA_TYPE);  ALIAS_DEF(ENUM_RS_MATRIX_DATA_TYPE, ENUM_RS_DATA_TYPE);  ALIAS_DEF(ENUM_RS_OBJECT_DATA_TYPE, ENUM_RS_DATA_TYPE);#undef ALIAS_DEF#define ALIAS_DEF(x) /  printf("#ifndef " #x "/n");  /  printf("#define " #x "(begin_type, end_type)/n");  /  printf("#endif/n/n")  ALIAS_DEF(ENUM_PRIMITIVE_DATA_TYPE_RANGE);  ALIAS_DEF(ENUM_RS_MATRIX_DATA_TYPE_RANGE);  ALIAS_DEF(ENUM_RS_OBJECT_DATA_TYPE_RANGE);#undef ALIAS_DEF#define DEF(x) /  printf(#x "(%s, /"%s/", %lu)/n",  /         DataTypes[i]->getTypeName(), /         DataTypes[i]->getTypePragmaName(), /         (unsigned long) DataTypes[i]->getSizeInBit());  // NOLINT(runtime/int)#define DEF_RANGE(x, begin, end)  /  printf(#x "(%s, %s)/n/n", /         DataTypes[begin]->getTypeName(), /         DataTypes[end]->getTypeName())  for (unsigned i = FirstPrimitiveType; i <= LastPrimitiveType; i++)    DEF(ENUM_PRIMITIVE_DATA_TYPE);  DEF_RANGE(ENUM_PRIMITIVE_DATA_TYPE_RANGE,            FirstPrimitiveType, LastPrimitiveType);  for (unsigned i = FirstRSMatrixType; i <= LastRSMatrixType; i++)    DEF(ENUM_RS_MATRIX_DATA_TYPE)  DEF_RANGE(ENUM_RS_MATRIX_DATA_TYPE_RANGE,            FirstRSMatrixType, LastRSMatrixType);  for (unsigned i = FirstRSObjectType; i <= LastRSObjectType; i++)    DEF(ENUM_RS_OBJECT_DATA_TYPE)  DEF_RANGE(ENUM_RS_OBJECT_DATA_TYPE_RANGE,            FirstRSObjectType, LastRSObjectType);#undef DEF#undef DEF_RANGE#define UNDEF(x)  /  printf("#undef " #x "/n")  UNDEF(ENUM_PRIMITIVE_DATA_TYPE);  UNDEF(ENUM_RS_MATRIX_DATA_TYPE);  UNDEF(ENUM_RS_OBJECT_DATA_TYPE);  UNDEF(ENUM_PRIMITIVE_DATA_TYPE_RANGE);  UNDEF(ENUM_RS_MATRIX_DATA_TYPE_RANGE);  UNDEF(ENUM_RS_OBJECT_DATA_TYPE_RANGE);  UNDEF(ENUM_RS_DATA_TYPE);  return 0;}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_frameworks_compile_slang,代码行数:67,


示例5: alias_used_builtins

alias_used_builtins (){  int rule, one_builtin_used = false;  brother = laststdpred;  for (builtin = laststdpred; builtin != nil; builtin = BROTHER (builtin))    if ((builtin != cut) && (builtin != nestarset) &&        (!mystrcmp (REPR (builtin), "select")) &&        (builtin != tltraditionalterm) &&        (builtin != transformlatticeterm) &&        (builtin != tltraditional) &&        (builtin != transformlattice) &&        (builtin != skip) &&        (builtin != explintersect) &&        (builtin != getip) &&        (builtin != falseip) &&        (builtin != restoreip) &&        (builtin != evalmeta) &&        (builtin != initmeta) &&        (builtin != evalmeta) && (builtin != resetinputptr) && (builtin != nestaralt) && (builtin != where))    {      int mem, alt;      char *n, *m = REPR (builtin);      if (!builtin_used ())        continue;      one_builtin_used = true;      if (det_flag)        if ((builtin == tltraditional) || (builtin == tltraditionalterm)            || (mystrcmp (REPR (builtin), "select")) || (mystrcmp (REPR (builtin), "delete")))          continue;      make_new_rule (brother);      new_rule = brother;      n = (char *) malloc (strlen (m) + 7);      if (n == NULL)        fprintf (stderr, "glammar: Out of memory./n"), exit (-1);      strcpy (n, "built_"), strcpy (n + 6, m);      REPR (new_rule) = n;      SET (new_rule, external);      PART (new_rule) = PART (root);      for (rule = root; rule != laststdpred; rule = BROTHER (rule))        for (alt = SON (rule); alt != nil; alt = BROTHER (alt))          for (mem = SON (alt); mem != nil; mem = BROTHER (mem))            if ((builtin == DEF (mem)) && !(TERMINAL (mem)))            {              DEF (mem) = new_rule;              REPR (mem) = n;            }    }  if (!one_builtin_used)    return;  for (rule = root; BROTHER (rule) != laststdpred; rule = BROTHER (rule));  BROTHER (rule) = new_rule;}
开发者ID:glammar,项目名称:glammar,代码行数:53,


示例6: bootstrap_function

js_val *bootstrap_function(){  js_val *function = JSNFUNC(func_new, 1);  js_val *prototype = JSFUNC(NULL);  function->proto = prototype;  prototype->proto = fh->object_proto;  // Function  // --------  DEF(function, "prototype", prototype);  // Function.prototype  // ------------------  // Properties  DEF(prototype, "length", JSNUM(0));  DEF(prototype, "constructor", JSNFUNC(func_new, 1));  // Methods  DEF(prototype, "apply", JSNFUNC(func_proto_apply, 2));  DEF(prototype, "bind", JSNFUNC(func_proto_bind, 1));  DEF(prototype, "call", JSNFUNC(func_proto_call, 1));  DEF(prototype, "isGenerator", JSNFUNC(func_proto_is_generator, 0));  DEF(prototype, "toString", JSNFUNC(func_proto_to_string, 0));  fh->function_proto = prototype;  return function;}
开发者ID:ndreynolds,项目名称:flathead,代码行数:31,


示例7: tail_recursion_elimination

tail_recursion_elimination (){  int alt;  int tre = 0;  if (no_recursion_elm_flag)    return false;  for (alt = SON (ulhs); alt != nil; alt = BROTHER (alt))  {    int mem = SON (alt);    if (mem == nil)      continue;    if (FLAG_MARKED (alt, no_tail_recursion_opt_f))      continue;    mem = get_last_but_cut_mem (mem);    if (DEF (mem) == ulhs)    {      FLAG_SET (alt, tail_recursion_opt_f);      FLAG_SET (mem, tail_recursion_opt_f);      tre = 1;    }  }  return tre;}
开发者ID:glammar,项目名称:glammar,代码行数:25,


示例8: DEF

void Native::install_methods(Class *c){	DEF(c, "repr")		Native *n = static_cast<Native*>(self.obj);		std::stringstream ss;		ss << "<Native:" << (void*)self.obj << "/" << (void*)n->fn << ">";		return ctx->make_string(ss.str());	END}
开发者ID:gnar,项目名称:zombo,代码行数:9,


示例9: builtin_used

builtin_used (){  int rule, alt, mem;  for (rule = root; rule != laststdpred; rule = BROTHER (rule))    for (alt = SON (rule); alt != nil; alt = BROTHER (alt))      for (mem = SON (alt); mem != nil; mem = BROTHER (mem))        if ((builtin == DEF (mem)) && !(TERMINAL (mem)))          return true;  return false;}
开发者ID:glammar,项目名称:glammar,代码行数:10,


示例10: det_rule_head

det_rule_head (){  fprintf (output, "/n/n/*  %s   *//n", FREPR (ulhs));  if (MARKED (ulhs, external))    fprintf (output, "int D%s(", REPR (ulhs));  else    fprintf (output, "static int D_%d(", ulhs);  det_get_affixes (AFFIXDEF (SON (ulhs)));  if (fprintf (output, " {/n register AFFIX raf = af;/n") == EOF)  {    fprintf (stderr, "glammar: Write failed (try again later)/n");    exit (12);  }  if (BROTHER (SON (ulhs)) != nil)  {    fprintf (output, "  char *rc = c,  *rip = ip;/n");  }  if (lookahead_in_alt (SON (ulhs)))    fprintf (output, "  char *lkh;/n");  if (BROTHER (SON (ulhs)) != nil)    fprintf (output, "  int cut_set = 0;/n");  fprintf (output, "  int ltr=level++;/n");  if (trace_flag)    fprintf (output, " char *pntnamesv = pntname; char *ntname = /"%s/";/n", FREPR (ulhs));  else if (errormsg_flag)  {    int mem = SON (SON (ulhs));    if (mem != nil && DEF (mem) == equal)      fprintf (output, "  char *pntnamesv = pntname; char *ntname = /"%s/"; int lsave = level+10;/n", FREPR (ulhs));    else      fprintf (output, "  char *pntnamesv = pntname; char *ntname = /"%s/"; int lsave = level++;/n", FREPR (ulhs));  }  if (stat_flag)  {    fprintf (output, "  int s1 = stat_count++;/n");  }  save_lattice_afx ();  if (tail_recursion_elimination ())    fprintf (output, " label_%d:/n/n", ulhs);}
开发者ID:glammar,项目名称:glammar,代码行数:43,


示例11: mail_storage_settings_check

#include "mail-storage-private.h"#include "mail-storage-settings.h"#include <stddef.h>static bool mail_storage_settings_check(void *_set, pool_t pool, const char **error_r);static bool namespace_settings_check(void *_set, pool_t pool, const char **error_r);static bool mailbox_settings_check(void *_set, pool_t pool, const char **error_r);static bool mail_user_settings_check(void *_set, pool_t pool, const char **error_r);#undef DEF#define DEF(type, name) /	{ type, #name, offsetof(struct mail_storage_settings, name), NULL }static const struct setting_define mail_storage_setting_defines[] = {	DEF(SET_STR_VARS, mail_location),	{ SET_ALIAS, "mail", 0, NULL },	DEF(SET_STR_VARS, mail_attachment_fs),	DEF(SET_STR_VARS, mail_attachment_dir),	DEF(SET_STR, mail_attachment_hash),	DEF(SET_SIZE, mail_attachment_min_size),	DEF(SET_STR_VARS, mail_attribute_dict),	DEF(SET_UINT, mail_prefetch_count),	DEF(SET_STR, mail_cache_fields),	DEF(SET_STR, mail_never_cache_fields),	DEF(SET_UINT, mail_cache_min_mail_count),	DEF(SET_TIME, mailbox_idle_check_interval),	DEF(SET_UINT, mail_max_keyword_length),	DEF(SET_TIME, mail_max_lock_timeout),	DEF(SET_TIME, mail_temp_scan_interval),	DEF(SET_BOOL, mail_save_crlf),
开发者ID:bdraco,项目名称:dovecot,代码行数:31,


示例12: DEF

#include "lib.h"#include "settings-parser.h"#include "master-service-private.h"#include "master-service-ssl-settings.h"#include <stddef.h>#undef DEF#define DEF(type, name) /	{ type, #name, offsetof(struct master_service_ssl_settings, name), NULL }static boolmaster_service_ssl_settings_check(void *_set, pool_t pool, const char **error_r);static const struct setting_define master_service_ssl_setting_defines[] = {	DEF(SET_ENUM, ssl),	DEF(SET_STR, ssl_ca),	DEF(SET_STR, ssl_cert),	DEF(SET_STR, ssl_key),	DEF(SET_STR, ssl_key_password),	DEF(SET_STR, ssl_cipher_list),	DEF(SET_STR, ssl_protocols),	DEF(SET_STR, ssl_cert_username_field),		DEF(SET_STR, ssl_crypto_device),	DEF(SET_STR, ssl_cert_md_algorithm),	DEF(SET_UINT, ssl_verify_depth),	DEF(SET_BOOL, ssl_verify_client_cert),	DEF(SET_BOOL, ssl_require_crl),	DEF(SET_BOOL, verbose_ssl),	DEF(SET_BOOL, ssl_prefer_server_ciphers),	DEF(SET_BOOL, ssl_cert_info),
开发者ID:dhultin,项目名称:dovecot-pop-uidl-proxy,代码行数:31,


示例13: sizeof

	.service_count = 1,	.idle_kill = 0,	.vsz_limit = (uoff_t)-1,	.unix_listeners = ARRAY_INIT,	.fifo_listeners = ARRAY_INIT,	.inet_listeners = { { &managesieve_login_inet_listeners_buf,		sizeof(managesieve_login_inet_listeners[0]) } }};#undef DEF#define DEF(type, name) /	{ type, #name, offsetof(struct managesieve_login_settings, name), NULL }static const struct setting_define managesieve_login_setting_defines[] = {	DEF(SET_STR, managesieve_implementation_string),	DEF(SET_STR, managesieve_sieve_capability),	DEF(SET_STR, managesieve_notify_capability),	SETTING_DEFINE_LIST_END};static const struct managesieve_login_settings managesieve_login_default_settings = {	.managesieve_implementation_string = DOVECOT_NAME " " PIGEONHOLE_NAME,	.managesieve_sieve_capability = "",	.managesieve_notify_capability = NULL};static const struct setting_parser_info *managesieve_login_setting_dependencies[] = {	&login_setting_parser_info,	NULL
开发者ID:unofficial-opensource-apple,项目名称:dovecot,代码行数:31,


示例14: DEF

/* Copyright (c) 2005-2016 Dovecot authors, see the included COPYING file */#include "lib.h"#include "settings-parser.h"#include "mail-storage-settings.h"#include "mbox-settings.h"#include <stddef.h>#undef DEF#define DEF(type, name) /	{ type, #name, offsetof(struct mbox_settings, name), NULL }static const struct setting_define mbox_setting_defines[] = {	DEF(SET_STR, mbox_read_locks),	DEF(SET_STR, mbox_write_locks),	DEF(SET_TIME, mbox_lock_timeout),	DEF(SET_TIME, mbox_dotlock_change_timeout),	DEF(SET_SIZE, mbox_min_index_size),	DEF(SET_BOOL, mbox_dirty_syncs),	DEF(SET_BOOL, mbox_very_dirty_syncs),	DEF(SET_BOOL, mbox_lazy_writes),	DEF(SET_ENUM, mbox_md5),	SETTING_DEFINE_LIST_END};static const struct mbox_settings mbox_default_settings = {	.mbox_read_locks = "fcntl",	.mbox_write_locks = "dotlock fcntl",	.mbox_lock_timeout = 5*60,
开发者ID:IvanKharpalev,项目名称:core,代码行数:31,


示例15: x

void mt ## x(unsigned int data) /{ /	__asm volatile (STR(mt ## x %0) :: STR(r)(data)); /} /#define DEF(x) /	{ #x, mf ## x, mt ## x }FUNC(msr);struct {	char *op;	unsigned int (*mf)(void);	void (*mt)(unsigned int);} mreg [] = {	DEF(msr),	{ NULL, NULL, NULL },};voiddb_cmd_mf(int argc, char **argv){	int i = 0;	if (argc != 2) {		printf("mf register/nregister:");		while (mreg[i].op != NULL)			printf(" %s", mreg[i++].op);		printf("/n");		return;	}
开发者ID:ryo,项目名称:netbsd-src,代码行数:31,


示例16: DEF

/* Copyright (c) 2005-2015 Dovecot authors, see the included COPYING file */#include "lib.h"#include "settings-parser.h"#include "mail-storage-settings.h"#include "maildir-settings.h"#include <stddef.h>#undef DEF#define DEF(type, name) /	{ type, #name, offsetof(struct maildir_settings, name), NULL }static const struct setting_define maildir_setting_defines[] = {	DEF(SET_BOOL, maildir_copy_with_hardlinks),	DEF(SET_BOOL, maildir_very_dirty_syncs),	DEF(SET_BOOL, maildir_broken_filename_sizes),	DEF(SET_BOOL, maildir_empty_new),	SETTING_DEFINE_LIST_END};static const struct maildir_settings maildir_default_settings = {	.maildir_copy_with_hardlinks = TRUE,	.maildir_very_dirty_syncs = FALSE,	.maildir_broken_filename_sizes = FALSE,	.maildir_empty_new = FALSE};static const struct setting_parser_info maildir_setting_parser_info = {	.module_name = "maildir",
开发者ID:LTD-Beget,项目名称:dovecot,代码行数:31,


示例17: DEF

}/* * Public libvlc functions */#define DEF( a ) { libvlc_##a, #a, },typedef struct{    int type;    const char name[40];} event_name_t;static const event_name_t event_list[] = {    DEF(MediaMetaChanged)    DEF(MediaSubItemAdded)    DEF(MediaDurationChanged)    DEF(MediaParsedChanged)    DEF(MediaFreed)    DEF(MediaStateChanged)    DEF(MediaSubItemTreeAdded)    DEF(MediaPlayerMediaChanged)    DEF(MediaPlayerNothingSpecial)    DEF(MediaPlayerOpening)    DEF(MediaPlayerBuffering)    DEF(MediaPlayerPlaying)    DEF(MediaPlayerPaused)    DEF(MediaPlayerStopped)    DEF(MediaPlayerForward)
开发者ID:AsamQi,项目名称:vlc,代码行数:31,


示例18: login_settings_check

#include "master-service-settings.h"#include "master-service-ssl-settings.h"#include "master-service-settings-cache.h"#include "login-settings.h"#include <stddef.h>#include <unistd.h>static bool login_settings_check(void *_set, pool_t pool, const char **error_r);#undef DEF#define DEF(type, name) /	{ type, #name, offsetof(struct login_settings, name), NULL }static const struct setting_define login_setting_defines[] = {	DEF(SET_STR, login_trusted_networks),	DEF(SET_STR, login_source_ips),	DEF(SET_STR_VARS, login_greeting),	DEF(SET_STR, login_log_format_elements),	DEF(SET_STR, login_log_format),	DEF(SET_STR, login_access_sockets),	DEF(SET_STR, director_username_hash),	DEF(SET_STR, ssl_client_cert),	DEF(SET_STR, ssl_client_key),	DEF(SET_BOOL, ssl_require_crl),	DEF(SET_BOOL, auth_ssl_require_client_cert),	DEF(SET_BOOL, auth_ssl_username_from_cert),	DEF(SET_BOOL, disable_plaintext_auth),	DEF(SET_BOOL, auth_verbose),
开发者ID:jwm,项目名称:dovecot-notmuch,代码行数:31,


示例19: DEF

#include "hsa_linkloader.h"#include "hsa_fexcept.h"#define DEF(NAME, ADDR) /{NAME, sizeof(NAME) - 1, (void *)(&(ADDR))},typedef struct func_entry_t {    char const *name;    size_t name_len;    void *addr;} func_entry_t;static int isfailed;func_entry_t const helper_tab[] = {    DEF("hsa_printf_32", hsa_printf_32)    DEF("hsa_printf_64", hsa_printf_64)    DEF("_ins_count", hsa_ins_count)    DEF("hsa_load_8", hsa_load_8)    DEF("hsa_load_16", hsa_load_16)    DEF("hsa_load_32", hsa_load_32)    DEF("hsa_load_64", hsa_load_64)    DEF("hsa_store_8", hsa_store_8)    DEF("hsa_store_16", hsa_store_16)    DEF("hsa_store_32", hsa_store_32)    DEF("hsa_store_64", hsa_store_64)    DEF("Barrier", hsa_helper_barrier)
开发者ID:weichen8157,项目名称:hsaemu,代码行数:30,


示例20: sizeof

	.service_count = 1,	.idle_kill = 0,	.vsz_limit = (uoff_t)-1,	.unix_listeners = { { &imap_urlauth_worker_unix_listeners_buf,			      sizeof(imap_urlauth_worker_unix_listeners[0]) } },	.fifo_listeners = ARRAY_INIT,	.inet_listeners = ARRAY_INIT};#undef DEF#define DEF(type, name) /	{ type, #name, offsetof(struct imap_urlauth_worker_settings, name), NULL }static const struct setting_define imap_urlauth_worker_setting_defines[] = {	DEF(SET_BOOL, verbose_proctitle),	DEF(SET_STR, imap_urlauth_host),	DEF(SET_IN_PORT, imap_urlauth_port),	SETTING_DEFINE_LIST_END};const struct imap_urlauth_worker_settings imap_urlauth_worker_default_settings = {	.verbose_proctitle = FALSE,	.imap_urlauth_host = "",	.imap_urlauth_port = 143};static const struct setting_parser_info *imap_urlauth_worker_setting_dependencies[] = {
开发者ID:bsmr-dovecot,项目名称:core,代码行数:31,


示例21: sizeof

	.service_count = 0,	.idle_kill = 0,	.vsz_limit = (uoff_t)-1,	.unix_listeners = { { &lmtp_unix_listeners_buf,			      sizeof(lmtp_unix_listeners[0]) } },	.fifo_listeners = ARRAY_INIT,	.inet_listeners = ARRAY_INIT};#undef DEF#define DEF(type, name) /	{ type, #name, offsetof(struct lmtp_settings, name), NULL }static const struct setting_define lmtp_setting_defines[] = {	DEF(SET_BOOL, lmtp_proxy),	DEF(SET_BOOL, lmtp_save_to_detail_mailbox),	SETTING_DEFINE_LIST_END};static const struct lmtp_settings lmtp_default_settings = {	.lmtp_proxy = FALSE,	.lmtp_save_to_detail_mailbox = FALSE};static const struct setting_parser_info *lmtp_setting_dependencies[] = {	&lda_setting_parser_info,	NULL};
开发者ID:aosm,项目名称:dovecot,代码行数:30,


示例22: DEF

#include "lib.h"#include "settings-parser.h"#include "mail-storage-settings.h"#include "pop3c-settings.h"#include <stddef.h>#undef DEF#define DEF(type, name) /	{ type, #name, offsetof(struct pop3c_settings, name), NULL }static bool pop3c_settings_check(void *_set, pool_t pool, const char **error_r);static const struct setting_define pop3c_setting_defines[] = {	DEF(SET_STR, pop3c_host),	DEF(SET_UINT, pop3c_port),	DEF(SET_STR_VARS, pop3c_user),	DEF(SET_STR_VARS, pop3c_master_user),	DEF(SET_STR, pop3c_password),	DEF(SET_ENUM, pop3c_ssl),	DEF(SET_BOOL, pop3c_ssl_verify),	DEF(SET_STR, pop3c_rawlog_dir),	DEF(SET_BOOL, pop3c_quick_received_date),	SETTING_DEFINE_LIST_END};
开发者ID:dhultin,项目名称:dovecot-pop-uidl-proxy,代码行数:29,


示例23: libx_stat

static int libx_stat(L) {	const char *name = kstr_of(l, ymd_argv(l, 0))->land;	struct stat x;	memset(&x, 0, sizeof(x));	if (lstat(name, &x) < 0)		return 0;	ymd_hmap(l, 16);#define DEF(mem) ymd_int(l, x. mem); ymd_def(l, #mem)	DEF(st_dev);	DEF(st_ino);	DEF(st_mode);	DEF(st_nlink);	DEF(st_uid);	DEF(st_gid);	DEF(st_rdev);	DEF(st_size);	DEF(st_atime);	DEF(st_mtime);	DEF(st_ctime);	DEF(st_blksize);	DEF(st_blocks);#undef DEF	return 1;}
开发者ID:dongh11,项目名称:ymd,代码行数:24,


示例24: sizeof

	.unix_listeners = { { &imap_unix_listeners_buf,			      sizeof(imap_unix_listeners[0]) } },	.fifo_listeners = ARRAY_INIT,	.inet_listeners = ARRAY_INIT};#undef DEF#undef DEFLIST#define DEF(type, name) /	{ type, #name, offsetof(struct imap_settings, name), NULL }#define DEFLIST(field, name, defines) /	{ SET_DEFLIST, name, offsetof(struct imap_settings, field), defines }static const struct setting_define imap_setting_defines[] = {	DEF(SET_BOOL, verbose_proctitle),	DEF(SET_SIZE, imap_max_line_length),	DEF(SET_TIME, imap_idle_notify_interval),	DEF(SET_STR, imap_capability),	DEF(SET_STR, imap_client_workarounds),	DEF(SET_STR, imap_logout_format),	DEF(SET_STR, imap_id_send),	DEF(SET_STR, imap_id_log),	DEF(SET_STR, imap_urlauth_host),	DEF(SET_UINT, imap_urlauth_port),	SETTING_DEFINE_LIST_END};
开发者ID:Distrotech,项目名称:dovecot,代码行数:29,


示例25: DEF

//FIXME the following could be optimized too ...static void DEF(put_no_rnd_pixels16_x2)(uint8_t *block, const uint8_t *pixels, int line_size, int h){    DEF(put_no_rnd_pixels8_x2)(block  , pixels  , line_size, h);    DEF(put_no_rnd_pixels8_x2)(block+8, pixels+8, line_size, h);}
开发者ID:AndyA,项目名称:ffmbc,代码行数:5,


示例26: sizeof

	.service_count = 0,	.idle_kill = 0,	.vsz_limit = (uoff_t)-1,	.unix_listeners = { { &ssl_params_unix_listeners_buf,			      sizeof(ssl_params_unix_listeners[0]) } },	.fifo_listeners = ARRAY_INIT,	.inet_listeners = ARRAY_INIT};#undef DEF#define DEF(type, name) /	{ type, #name, offsetof(struct ssl_params_settings, name), NULL }static const struct setting_define ssl_params_setting_defines[] = {	DEF(SET_TIME, ssl_parameters_regenerate),	SETTING_DEFINE_LIST_END};static const struct ssl_params_settings ssl_params_default_settings = {	.ssl_parameters_regenerate = 3600*24*7};const struct setting_parser_info ssl_params_setting_parser_info = {	.module_name = "ssl-params",	.defines = ssl_params_setting_defines,	.defaults = &ssl_params_default_settings,	.type_offset = (size_t)-1,	.struct_size = sizeof(struct ssl_params_settings),
开发者ID:Distrotech,项目名称:dovecot,代码行数:31,


示例27: sizeof

	.service_count = 1,	.idle_kill = 0,	.vsz_limit = (uoff_t)-1,	.unix_listeners = { { &imap_urlauth_unix_listeners_buf,			      sizeof(imap_urlauth_unix_listeners[0]) } },	.fifo_listeners = ARRAY_INIT,	.inet_listeners = ARRAY_INIT};#undef DEF#define DEF(type, name) /	{ type, #name, offsetof(struct imap_urlauth_settings, name), NULL }static const struct setting_define imap_urlauth_setting_defines[] = {	DEF(SET_STR, base_dir),	DEF(SET_BOOL, mail_debug),	DEF(SET_BOOL, verbose_proctitle),	DEF(SET_STR, imap_urlauth_logout_format),	DEF(SET_STR, imap_urlauth_submit_user),	DEF(SET_STR, imap_urlauth_stream_user),	SETTING_DEFINE_LIST_END};const struct imap_urlauth_settings imap_urlauth_default_settings = {	.base_dir = PKG_RUNDIR,  .mail_debug = FALSE,
开发者ID:IvanKharpalev,项目名称:core,代码行数:31,


示例28: init_defs

void init_defs(void) {  DEF("dent_set", 8, "DEF_FN DENT_TYPE ! DENT_NAME ! DENT_PARAM !", 43);  DEF("dent+", 5, "W+ W+ W+ W+ W+", 14);  DEF("dent_next", 9, "DICT_HEAD @ PENT_PREV ! HEAP_NEXT @ DICT_HEAD ! HEAP_NEXT @ dent+ HEAP_NEXT !", 77);  DEF("def", 3, "dent_set dent_next", 18);}
开发者ID:raspberry-alpha-omega,项目名称:e13,代码行数:6,



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


C++ DEFAULT_STACK_INIT函数代码示例
C++ DECREF函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。