本文整理汇总了C++中cupsArrayDelete函数的典型用法代码示例。如果您正苦于以下问题:C++ cupsArrayDelete函数的具体用法?C++ cupsArrayDelete怎么用?C++ cupsArrayDelete使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cupsArrayDelete函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: cups_globals_free
static void
cups_globals_free(_cups_globals_t *cg) /* I - Pointer to global data */
{
_cups_buffer_t *buffer, /* Current read/write buffer */
*next; /* Next buffer */
if (cg->last_status_message)
_cupsStrFree(cg->last_status_message);
for (buffer = cg->cups_buffers; buffer; buffer = next)
{
next = buffer->next;
free(buffer);
}
cupsArrayDelete(cg->leg_size_lut);
cupsArrayDelete(cg->ppd_size_lut);
cupsArrayDelete(cg->pwg_size_lut);
httpClose(cg->http);
_httpFreeCredentials(cg->tls_credentials);
cupsFileClose(cg->stdio_files[0]);
cupsFileClose(cg->stdio_files[1]);
cupsFileClose(cg->stdio_files[2]);
cupsFreeOptions(cg->cupsd_num_settings, cg->cupsd_settings);
free(cg);
}
开发者ID:computersforpeace,项目名称:ghostpdl,代码行数:32,代码来源:globals.c
示例2: free_policy
static void
free_policy(cupsd_policy_t *p) /* I - Policy to free */
{
cupsArrayDelete(p->job_access);
cupsArrayDelete(p->job_attrs);
cupsArrayDelete(p->sub_access);
cupsArrayDelete(p->sub_attrs);
cupsArrayDelete(p->ops);
cupsdClearString(&p->name);
free(p);
}
开发者ID:alfintatorkace,项目名称:osx-10.9-opensource,代码行数:11,代码来源:policy.c
示例3: cupsGetConflicts
int /* O - Number of conflicting options */
cupsGetConflicts(
ppd_file_t *ppd, /* I - PPD file */
const char *option, /* I - Option to test */
const char *choice, /* I - Choice to test */
cups_option_t **options) /* O - Conflicting options */
{
int i, /* Looping var */
num_options; /* Number of conflicting options */
cups_array_t *active; /* Active conflicts */
_ppd_cups_uiconsts_t *c; /* Current constraints */
_ppd_cups_uiconst_t *cptr; /* Current constraint */
ppd_choice_t *marked; /* Marked choice */
/*
* Range check input...
*/
if (options)
*options = NULL;
if (!ppd || !option || !choice || !options)
return (0);
/*
* Test for conflicts...
*/
active = ppd_test_constraints(ppd, option, choice, 0, NULL,
_PPD_ALL_CONSTRAINTS);
/*
* Loop through all of the UI constraints and add any options that conflict...
*/
for (num_options = 0, c = (_ppd_cups_uiconsts_t *)cupsArrayFirst(active);
c;
c = (_ppd_cups_uiconsts_t *)cupsArrayNext(active))
{
for (i = c->num_constraints, cptr = c->constraints;
i > 0;
i --, cptr ++)
if (_cups_strcasecmp(cptr->option->keyword, option))
{
if (cptr->choice)
num_options = cupsAddOption(cptr->option->keyword,
cptr->choice->choice, num_options,
options);
else if ((marked = ppdFindMarkedChoice(ppd,
cptr->option->keyword)) != NULL)
num_options = cupsAddOption(cptr->option->keyword, marked->choice,
num_options, options);
}
}
cupsArrayDelete(active);
return (num_options);
}
开发者ID:Cacauu,项目名称:cups,代码行数:60,代码来源:ppd-conflicts.c
示例4: free_cache
static void
free_cache(void)
{
snmp_cache_t *cache; /* Cached device */
for (cache = (snmp_cache_t *)cupsArrayFirst(Devices);
cache;
cache = (snmp_cache_t *)cupsArrayNext(Devices))
{
free(cache->addrname);
if (cache->uri)
free(cache->uri);
if (cache->id)
free(cache->id);
if (cache->make_and_model)
free(cache->make_and_model);
free(cache);
}
cupsArrayDelete(Devices);
Devices = NULL;
}
开发者ID:jianglei12138,项目名称:cups,代码行数:27,代码来源:snmp.c
示例5: help_delete_node
static void
help_delete_node(help_node_t *n) /* I - Node */
{
help_word_t *w; /* Current word */
DEBUG_printf(("2help_delete_node(n=%p)", n));
if (!n)
return;
if (n->filename)
free(n->filename);
if (n->anchor)
free(n->anchor);
if (n->section)
free(n->section);
if (n->text)
free(n->text);
for (w = (help_word_t *)cupsArrayFirst(n->words);
w;
w = (help_word_t *)cupsArrayNext(n->words))
help_delete_word(w);
cupsArrayDelete(n->words);
free(n);
}
开发者ID:josephgbr,项目名称:cups-pt_BR,代码行数:32,代码来源:help-index.c
示例6: cupsdDeleteAllPolicies
void
cupsdDeleteAllPolicies(void)
{
cupsd_printer_t *printer; /* Current printer */
if (!Policies)
return;
/*
* First clear the policy pointers for all printers...
*/
for (printer = (cupsd_printer_t *)cupsArrayFirst(Printers);
printer;
printer = (cupsd_printer_t *)cupsArrayNext(Printers))
printer->op_policy_ptr = NULL;
DefaultPolicyPtr = NULL;
/*
* Then free all of the policies...
*/
cupsArrayDelete(Policies);
Policies = NULL;
}
开发者ID:alfintatorkace,项目名称:osx-10.9-opensource,代码行数:28,代码来源:policy.c
示例7: _cupsStrFlush
void
_cupsStrFlush(void)
{
_cups_sp_item_t *item; /* Current item */
// DEBUG_printf(("_cupsStrFlush(cg=%p)\n", cg));
DEBUG_printf((" %d strings in array\n", cupsArrayCount(stringpool)));
#ifdef HAVE_PTHREAD_H
pthread_mutex_lock(&sp_mutex);
#endif /* HAVE_PTHREAD_H */
for (item = (_cups_sp_item_t *)cupsArrayFirst(stringpool);
item;
item = (_cups_sp_item_t *)cupsArrayNext(stringpool))
{
free(item->str);
free(item);
}
cupsArrayDelete(stringpool);
stringpool = NULL;
#ifdef HAVE_PTHREAD_H
pthread_mutex_unlock(&sp_mutex);
#endif /* HAVE_PTHREAD_H */
}
开发者ID:syedaunnraza,项目名称:work,代码行数:28,代码来源:string.c
示例8: ppdInstallableConflict
int /* O - 1 if conflicting, 0 if not conflicting */
ppdInstallableConflict(
ppd_file_t *ppd, /* I - PPD file */
const char *option, /* I - Option */
const char *choice) /* I - Choice */
{
cups_array_t *active; /* Active conflicts */
DEBUG_printf(("2ppdInstallableConflict(ppd=%p, option=\"%s\", choice=\"%s\")",
ppd, option, choice));
/*
* Range check input...
*/
if (!ppd || !option || !choice)
return (0);
/*
* Test constraints using the new option...
*/
active = ppd_test_constraints(ppd, option, choice, 0, NULL,
_PPD_INSTALLABLE_CONSTRAINTS);
cupsArrayDelete(active);
return (active != NULL);
}
开发者ID:Cacauu,项目名称:cups,代码行数:30,代码来源:ppd-conflicts.c
示例9: cupsdFreeStrings
void
cupsdFreeStrings(cups_array_t **a) /* IO - String array */
{
if (*a)
{
cupsArrayDelete(*a);
*a = NULL;
}
}
开发者ID:ChErePOdaViLka,项目名称:cups,代码行数:9,代码来源:main.c
示例10: ppdConflicts
int /* O - Number of conflicts found */
ppdConflicts(ppd_file_t *ppd) /* I - PPD to check */
{
int i, /* Looping variable */
conflicts; /* Number of conflicts */
cups_array_t *active; /* Active conflicts */
_ppd_cups_uiconsts_t *c; /* Current constraints */
_ppd_cups_uiconst_t *cptr; /* Current constraint */
ppd_option_t *o; /* Current option */
if (!ppd)
return (0);
/*
* Clear all conflicts...
*/
cupsArraySave(ppd->options);
for (o = ppdFirstOption(ppd); o; o = ppdNextOption(ppd))
o->conflicted = 0;
cupsArrayRestore(ppd->options);
/*
* Test for conflicts...
*/
active = ppd_test_constraints(ppd, NULL, NULL, 0, NULL,
_PPD_ALL_CONSTRAINTS);
conflicts = cupsArrayCount(active);
/*
* Loop through all of the UI constraints and flag any options
* that conflict...
*/
for (c = (_ppd_cups_uiconsts_t *)cupsArrayFirst(active);
c;
c = (_ppd_cups_uiconsts_t *)cupsArrayNext(active))
{
for (i = c->num_constraints, cptr = c->constraints;
i > 0;
i --, cptr ++)
cptr->option->conflicted = 1;
}
cupsArrayDelete(active);
/*
* Return the number of conflicts found...
*/
return (conflicts);
}
开发者ID:Cacauu,项目名称:cups,代码行数:56,代码来源:ppd-conflicts.c
示例11: free_formats
static void
free_formats(cups_array_t *fmts) /* I - Array of format strings */
{
char *s; /* Current string */
for (s = (char *)cupsArrayFirst(fmts); s; s = (char *)cupsArrayNext(fmts))
free(s);
cupsArrayDelete(fmts);
}
开发者ID:alfintatorkace,项目名称:osx-10.9-opensource,代码行数:11,代码来源:checkpo.c
示例12: free_array
static void
free_array(cups_array_t *a) /* I - Array */
{
char *s; /* Current string */
for (s = (char *)cupsArrayFirst(a); s; s = (char *)cupsArrayNext(a))
free(s);
cupsArrayDelete(a);
}
开发者ID:jianglei12138,项目名称:cups,代码行数:11,代码来源:snmp.c
示例13: mimeDelete
void
mimeDelete(mime_t *mime) /* I - MIME database */
{
mime_type_t *type; /* Current type */
mime_filter_t *filter; /* Current filter */
DEBUG_printf(("mimeDelete(mime=%p)", mime));
if (!mime)
return;
/*
* Loop through filters and free them...
*/
for (filter = (mime_filter_t *)cupsArrayFirst(mime->filters);
filter;
filter = (mime_filter_t *)cupsArrayNext(mime->filters))
mimeDeleteFilter(mime, filter);
/*
* Loop through the file types and delete any rules...
*/
for (type = (mime_type_t *)cupsArrayFirst(mime->types);
type;
type = (mime_type_t *)cupsArrayNext(mime->types))
mimeDeleteType(mime, type);
/*
* Free the types and filters arrays, and then the MIME database structure.
*/
cupsArrayDelete(mime->types);
cupsArrayDelete(mime->filters);
cupsArrayDelete(mime->srcs);
free(mime);
}
开发者ID:alfintatorkace,项目名称:osx-10.9-opensource,代码行数:39,代码来源:mime.c
示例14: cupsdDeleteAllListeners
void
cupsdDeleteAllListeners(void)
{
cupsd_listener_t *lis; /* Current listening socket */
for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners);
lis;
lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
free(lis);
cupsArrayDelete(Listeners);
Listeners = NULL;
}
开发者ID:jelmer,项目名称:cups,代码行数:14,代码来源:listen.c
示例15: _ppdFreeLanguages
void
_ppdFreeLanguages(
cups_array_t *languages) /* I - Languages array */
{
char *language; /* Current language */
for (language = (char *)cupsArrayFirst(languages);
language;
language = (char *)cupsArrayNext(languages))
free(language);
cupsArrayDelete(languages);
}
开发者ID:CODECOMMUNITY,项目名称:cups,代码行数:14,代码来源:ppd-localize.c
示例16: dnssdStop
static void
dnssdStop(void)
{
cupsd_printer_t *p; /* Current printer */
/*
* De-register the individual printers
*/
for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
p;
p = (cupsd_printer_t *)cupsArrayNext(Printers))
dnssdDeregisterPrinter(p, 1, 0);
/*
* Shutdown the rest of the service refs...
*/
dnssdDeregisterInstance(&WebIFSrv, 0);
# ifdef HAVE_DNSSD
cupsdRemoveSelect(DNSServiceRefSockFD(DNSSDMaster));
DNSServiceRefDeallocate(DNSSDMaster);
DNSSDMaster = NULL;
# else /* HAVE_AVAHI */
if (DNSSDMaster)
avahi_threaded_poll_stop(DNSSDMaster);
if (DNSSDClient)
{
avahi_client_free(DNSSDClient);
DNSSDClient = NULL;
}
if (DNSSDMaster)
{
avahi_threaded_poll_free(DNSSDMaster);
DNSSDMaster = NULL;
}
# endif /* HAVE_DNSSD */
cupsArrayDelete(DNSSDPrinters);
DNSSDPrinters = NULL;
DNSSDPort = 0;
}
开发者ID:AndychenCL,项目名称:cups,代码行数:49,代码来源:dirsvc.c
示例17: helpDeleteIndex
void
helpDeleteIndex(help_index_t *hi) /* I - Help index */
{
help_node_t *node; /* Current node */
DEBUG_printf(("helpDeleteIndex(hi=%p)", hi));
if (!hi)
return;
for (node = (help_node_t *)cupsArrayFirst(hi->nodes);
node;
node = (help_node_t *)cupsArrayNext(hi->nodes))
{
if (!hi->search)
help_delete_node(node);
}
cupsArrayDelete(hi->nodes);
cupsArrayDelete(hi->sorted);
free(hi);
}
开发者ID:josephgbr,项目名称:cups-pt_BR,代码行数:24,代码来源:help-index.c
示例18: cupsdDeleteAllSubscriptions
void
cupsdDeleteAllSubscriptions(void)
{
cupsd_subscription_t *sub; /* Subscription */
if (!Subscriptions)
return;
for (sub = (cupsd_subscription_t *)cupsArrayFirst(Subscriptions);
sub;
sub = (cupsd_subscription_t *)cupsArrayNext(Subscriptions))
cupsdDeleteSubscription(sub, 0);
cupsArrayDelete(Subscriptions);
Subscriptions = NULL;
}
开发者ID:aosm,项目名称:cups,代码行数:17,代码来源:subscriptions.c
示例19: cupsdFreeQuotas
void
cupsdFreeQuotas(cupsd_printer_t *p) /* I - Printer */
{
cupsd_quota_t *q; /* Current quota record */
if (!p)
return;
for (q = (cupsd_quota_t *)cupsArrayFirst(p->quotas);
q;
q = (cupsd_quota_t *)cupsArrayNext(p->quotas))
free(q);
cupsArrayDelete(p->quotas);
p->quotas = NULL;
}
开发者ID:ystk,项目名称:debian-cups,代码行数:18,代码来源:quotas.c
示例20: _cupsMessageFree
void
_cupsMessageFree(cups_array_t *a) /* I - Message array */
{
#if defined(__APPLE__) && defined(CUPS_BUNDLEDIR)
/*
* Release the cups.strings dictionary as needed...
*/
if (cupsArrayUserData(a))
CFRelease((CFDictionaryRef)cupsArrayUserData(a));
#endif /* __APPLE__ && CUPS_BUNDLEDIR */
/*
* Free the array...
*/
cupsArrayDelete(a);
}
开发者ID:jianglei12138,项目名称:cups,代码行数:18,代码来源:language.c
注:本文中的cupsArrayDelete函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论