本文整理汇总了C++中copy_info函数的典型用法代码示例。如果您正苦于以下问题:C++ copy_info函数的具体用法?C++ copy_info怎么用?C++ copy_info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了copy_info函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ahd_dump_target_state
static void
ahd_dump_target_state(struct ahd_softc *ahd, struct info_str *info,
u_int our_id, char channel, u_int target_id)
{
struct scsi_target *starget;
struct ahd_initiator_tinfo *tinfo;
struct ahd_tmode_tstate *tstate;
int lun;
tinfo = ahd_fetch_transinfo(ahd, channel, our_id,
target_id, &tstate);
copy_info(info, "Target %d Negotiation Settings\n", target_id);
copy_info(info, "\tUser: ");
ahd_format_transinfo(info, &tinfo->user);
starget = ahd->platform_data->starget[target_id];
if (starget == NULL)
return;
copy_info(info, "\tGoal: ");
ahd_format_transinfo(info, &tinfo->goal);
copy_info(info, "\tCurr: ");
ahd_format_transinfo(info, &tinfo->curr);
for (lun = 0; lun < AHD_NUM_LUNS; lun++) {
struct scsi_device *dev;
dev = scsi_device_lookup_by_target(starget, lun);
if (dev == NULL)
continue;
ahd_dump_device_state(info, dev);
}
}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:34,代码来源:aic79xx_proc.c
示例2: copy_meta
void file_info::copy(const file_info & p_source)
{
if (&p_source != this) {
copy_meta(p_source);
copy_info(p_source);
set_length(p_source.get_length());
set_replaygain(p_source.get_replaygain());
}
}
开发者ID:kazukioishi,项目名称:foo_nowplayingtunes,代码行数:9,代码来源:file_info.cpp
示例3: input0
void OCIOColorSpace::_validate(bool for_real)
{
input0().validate(for_real);
if(!m_hasColorSpaces)
{
error("No colorspaces available for input and/or output.");
return;
}
int inputColorSpaceCount = static_cast<int>(m_inputColorSpaceCstrNames.size()) - 1;
if(m_inputColorSpaceIndex < 0 || m_inputColorSpaceIndex >= inputColorSpaceCount)
{
std::ostringstream err;
err << "Input colorspace index (" << m_inputColorSpaceIndex << ") out of range.";
error(err.str().c_str());
return;
}
int outputColorSpaceCount = static_cast<int>(m_outputColorSpaceCstrNames.size()) - 1;
if(m_outputColorSpaceIndex < 0 || m_outputColorSpaceIndex >= outputColorSpaceCount)
{
std::ostringstream err;
err << "Output colorspace index (" << m_outputColorSpaceIndex << ") out of range.";
error(err.str().c_str());
return;
}
try
{
const char * inputName = m_inputColorSpaceCstrNames[m_inputColorSpaceIndex];
const char * outputName = m_outputColorSpaceCstrNames[m_outputColorSpaceIndex];
OCIO::ConstConfigRcPtr config = OCIO::GetCurrentConfig();
config->sanityCheck();
OCIO::ConstContextRcPtr context = getLocalContext();
m_processor = config->getProcessor(context, inputName, outputName);
}
catch(OCIO::Exception &e)
{
error(e.what());
return;
}
if(m_processor->isNoOp())
{
// TODO or call disable() ?
set_out_channels(DD::Image::Mask_None); // prevents engine() from being called
copy_info();
return;
}
set_out_channels(DD::Image::Mask_All);
DD::Image::PixelIop::_validate(for_real);
}
开发者ID:Br3nda,项目名称:OpenColorIO,代码行数:57,代码来源:OCIOColorSpace.cpp
示例4: gwy_surface_new_alike
/**
* gwy_surface_new_alike:
* @model: A surface to use as the template.
*
* Creates a new empty surface similar to another surface.
*
* The units of the new surface will be identical to those of @model but the
* new surface will not contain any points. Use gwy_surface_duplicate() to
* completely duplicate a surface including data.
*
* Returns: A new empty surface.
*
* Since: 2.45
**/
GwySurface*
gwy_surface_new_alike(GwySurface *model)
{
GwySurface *surface;
g_return_val_if_fail(GWY_IS_SURFACE(model), NULL);
surface = g_object_newv(GWY_TYPE_SURFACE, 0, NULL);
copy_info(surface, model);
gwy_surface_invalidate(surface);
return surface;
}
开发者ID:cbuehler,项目名称:gwyddion,代码行数:26,代码来源:surface.c
示例5: gwy_surface_duplicate_real
static GObject*
gwy_surface_duplicate_real(GObject *object)
{
GwySurface *surface, *duplicate;
g_return_val_if_fail(GWY_IS_SURFACE(object), NULL);
surface = GWY_SURFACE(object);
duplicate = gwy_surface_new_from_data(surface->data, surface->n);
copy_info(duplicate, surface);
return (GObject*)duplicate;
}
开发者ID:cbuehler,项目名称:gwyddion,代码行数:12,代码来源:surface.c
示例6: ahc_dump_target_state
static void
ahc_dump_target_state(struct ahc_softc *ahc, struct info_str *info,
u_int our_id, char channel, u_int target_id,
u_int target_offset)
{
struct ahc_linux_target *targ;
struct scsi_target *starget;
struct ahc_initiator_tinfo *tinfo;
struct ahc_tmode_tstate *tstate;
int lun;
tinfo = ahc_fetch_transinfo(ahc, channel, our_id,
target_id, &tstate);
if ((ahc->features & AHC_TWIN) != 0)
copy_info(info, "Channel %c ", channel);
copy_info(info, "Target %d Negotiation Settings\n", target_id);
copy_info(info, "\tUser: ");
ahc_format_transinfo(info, &tinfo->user);
starget = ahc->platform_data->starget[target_offset];
if (!starget)
return;
targ = scsi_transport_target_data(starget);
copy_info(info, "\tGoal: ");
ahc_format_transinfo(info, &tinfo->goal);
copy_info(info, "\tCurr: ");
ahc_format_transinfo(info, &tinfo->curr);
for (lun = 0; lun < AHC_NUM_LUNS; lun++) {
struct scsi_device *sdev;
sdev = targ->sdev[lun];
if (sdev == NULL)
continue;
ahc_dump_device_state(info, sdev);
}
}
开发者ID:KrisChaplin,项目名称:LRT2x4_v1.0.2.06_GPL_source,代码行数:39,代码来源:aic7xxx_proc.c
示例7: input0
void OCIOFileTransform::_validate(bool for_real)
{
input0().validate(for_real);
if(!src)
{
error("The source file must be specified.");
return;
}
try
{
OCIO::ConstConfigRcPtr config = OCIO::GetCurrentConfig();
config->sanityCheck();
OCIO::FileTransformRcPtr transform = OCIO::FileTransform::Create();
transform->setSrc(src);
// TODO: For some reason, cccid is NOT incorporated in this node's hash.
// Until then, cccid is considered broken. Figure out why.
transform->setCCCId(cccid.c_str());
if(dirindex == 0) transform->setDirection(OCIO::TRANSFORM_DIR_FORWARD);
else transform->setDirection(OCIO::TRANSFORM_DIR_INVERSE);
if(interpindex == 0) transform->setInterpolation(OCIO::INTERP_NEAREST);
else transform->setInterpolation(OCIO::INTERP_LINEAR);
processor = config->getProcessor(transform, OCIO::TRANSFORM_DIR_FORWARD);
}
catch(OCIO::Exception &e)
{
error(e.what());
return;
}
if(processor->isNoOp())
{
// TODO or call disable() ?
set_out_channels(DD::Image::Mask_None); // prevents engine() from being called
copy_info();
return;
}
set_out_channels(DD::Image::Mask_All);
DD::Image::PixelIop::_validate(for_real);
}
开发者ID:Br3nda,项目名称:OpenColorIO,代码行数:48,代码来源:OCIOFileTransform.cpp
示例8: gwy_surface_clone_real
static void
gwy_surface_clone_real(GObject *source, GObject *copy)
{
GwySurface *surface, *clone;
g_return_if_fail(GWY_IS_SURFACE(source));
g_return_if_fail(GWY_IS_SURFACE(copy));
surface = GWY_SURFACE(source);
clone = GWY_SURFACE(copy);
if (clone->n != surface->n) {
clone->n = surface->n;
alloc_data(clone);
}
gwy_assign(clone->data, surface->data, surface->n);
copy_info(clone, surface);
}
开发者ID:cbuehler,项目名称:gwyddion,代码行数:18,代码来源:surface.c
示例9: ahc_format_transinfo
void
ahc_format_transinfo(struct info_str *info, struct ahc_transinfo *tinfo)
{
u_int speed;
u_int freq;
u_int mb;
speed = 3300;
freq = 0;
if (tinfo->offset != 0) {
freq = ahc_calc_syncsrate(tinfo->period);
speed = freq;
}
speed *= (0x01 << tinfo->width);
mb = speed / 1000;
if (mb > 0)
copy_info(info, "%d.%03dMB/s transfers", mb, speed % 1000);
else
copy_info(info, "%dKB/s transfers", speed);
if (freq != 0) {
copy_info(info, " (%d.%03dMHz%s, offset %d",
freq / 1000, freq % 1000,
(tinfo->ppr_options & MSG_EXT_PPR_DT_REQ) != 0
? " DT" : "", tinfo->offset);
}
if (tinfo->width > 0) {
if (freq != 0) {
copy_info(info, ", ");
} else {
copy_info(info, " (");
}
copy_info(info, "%dbit)", 8 * (0x01 << tinfo->width));
} else if (freq != 0) {
copy_info(info, ")");
}
copy_info(info, "\n");
}
开发者ID:b3rnik,项目名称:dsl-n55u-bender,代码行数:39,代码来源:aic7xxx_proc.c
示例10: ahd_dump_device_state
static void
ahd_dump_device_state(struct info_str *info, struct scsi_device *sdev)
{
struct ahd_linux_device *dev = scsi_transport_device_data(sdev);
copy_info(info, "\tChannel %c Target %d Lun %d Settings\n",
sdev->sdev_target->channel + 'A',
sdev->sdev_target->id, sdev->lun);
copy_info(info, "\t\tCommands Queued %ld\n", dev->commands_issued);
copy_info(info, "\t\tCommands Active %d\n", dev->active);
copy_info(info, "\t\tCommand Openings %d\n", dev->openings);
copy_info(info, "\t\tMax Tagged Openings %d\n", dev->maxtags);
copy_info(info, "\t\tDevice Queue Frozen Count %d\n", dev->qfrozen);
}
开发者ID:mahyarmd,项目名称:unifi-gpl,代码行数:15,代码来源:aic79xx_proc.c
示例11: input0
void OCIOCDLTransform::_validate(bool for_real)
{
input0().validate(for_real);
try
{
OCIO::ConstConfigRcPtr config = OCIO::GetCurrentConfig();
config->sanityCheck();
OCIO::CDLTransformRcPtr cc = OCIO::CDLTransform::Create();
cc->setSlope(m_slope);
cc->setOffset(m_offset);
cc->setPower(m_power);
cc->setSat(m_saturation);
if(m_dirindex == 0) cc->setDirection(OCIO::TRANSFORM_DIR_FORWARD);
else cc->setDirection(OCIO::TRANSFORM_DIR_INVERSE);
m_processor = config->getProcessor(cc);
}
catch(OCIO::Exception &e)
{
error(e.what());
return;
}
if(m_processor->isNoOp())
{
// TODO or call disable() ?
set_out_channels(DD::Image::Mask_None); // prevents engine() from being called
copy_info();
return;
}
set_out_channels(DD::Image::Mask_All);
DD::Image::PixelIop::_validate(for_real);
}
开发者ID:Br3nda,项目名称:OpenColorIO,代码行数:38,代码来源:OCIOCDLTransform.cpp
示例12: ahd_format_transinfo
void
ahd_format_transinfo(struct info_str *info, struct ahd_transinfo *tinfo)
{
u_int speed;
u_int freq;
u_int mb;
if (tinfo->period == AHD_PERIOD_UNKNOWN) {
copy_info(info, "Renegotiation Pending\n");
return;
}
speed = 3300;
freq = 0;
if (tinfo->offset != 0) {
freq = ahd_calc_syncsrate(tinfo->period);
speed = freq;
}
speed *= (0x01 << tinfo->width);
mb = speed / 1000;
if (mb > 0)
copy_info(info, "%d.%03dMB/s transfers", mb, speed % 1000);
else
copy_info(info, "%dKB/s transfers", speed);
if (freq != 0) {
int printed_options;
printed_options = 0;
copy_info(info, " (%d.%03dMHz", freq / 1000, freq % 1000);
if ((tinfo->ppr_options & MSG_EXT_PPR_RD_STRM) != 0) {
copy_info(info, " RDSTRM");
printed_options++;
}
if ((tinfo->ppr_options & MSG_EXT_PPR_DT_REQ) != 0) {
copy_info(info, "%s", printed_options ? "|DT" : " DT");
printed_options++;
}
if ((tinfo->ppr_options & MSG_EXT_PPR_IU_REQ) != 0) {
copy_info(info, "%s", printed_options ? "|IU" : " IU");
printed_options++;
}
if ((tinfo->ppr_options & MSG_EXT_PPR_RTI) != 0) {
copy_info(info, "%s",
printed_options ? "|RTI" : " RTI");
printed_options++;
}
if ((tinfo->ppr_options & MSG_EXT_PPR_QAS_REQ) != 0) {
copy_info(info, "%s",
printed_options ? "|QAS" : " QAS");
printed_options++;
}
}
if (tinfo->width > 0) {
if (freq != 0) {
copy_info(info, ", ");
} else {
copy_info(info, " (");
}
copy_info(info, "%dbit)", 8 * (0x01 << tinfo->width));
} else if (freq != 0) {
copy_info(info, ")");
}
copy_info(info, "\n");
}
开发者ID:mahyarmd,项目名称:unifi-gpl,代码行数:65,代码来源:aic79xx_proc.c
示例13: ahc_linux_proc_info
/*
* Return information to handle /proc support for the driver.
*/
int
ahc_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start,
off_t offset, int length, int inout)
{
struct ahc_softc *ahc = *(struct ahc_softc **)shost->hostdata;
struct info_str info;
char ahc_info[256];
u_int max_targ;
u_int i;
int retval;
/* Has data been written to the file? */
if (inout == TRUE) {
retval = ahc_proc_write_seeprom(ahc, buffer, length);
goto done;
}
if (start)
*start = buffer;
info.buffer = buffer;
info.length = length;
info.offset = offset;
info.pos = 0;
copy_info(&info, "Adaptec AIC7xxx driver version: %s\n",
AIC7XXX_DRIVER_VERSION);
copy_info(&info, "%s\n", ahc->description);
ahc_controller_info(ahc, ahc_info);
copy_info(&info, "%s\n", ahc_info);
copy_info(&info, "Allocated SCBs: %d, SG List Length: %d\n\n",
ahc->scb_data->numscbs, AHC_NSEG);
if (ahc->seep_config == NULL)
copy_info(&info, "No Serial EEPROM\n");
else {
copy_info(&info, "Serial EEPROM:\n");
for (i = 0; i < sizeof(*ahc->seep_config)/2; i++) {
if (((i % 8) == 0) && (i != 0)) {
copy_info(&info, "\n");
}
copy_info(&info, "0x%.4x ",
((uint16_t*)ahc->seep_config)[i]);
}
copy_info(&info, "\n");
}
copy_info(&info, "\n");
max_targ = 16;
if ((ahc->features & (AHC_WIDE|AHC_TWIN)) == 0)
max_targ = 8;
for (i = 0; i < max_targ; i++) {
u_int our_id;
u_int target_id;
char channel;
channel = 'A';
our_id = ahc->our_id;
target_id = i;
if (i > 7 && (ahc->features & AHC_TWIN) != 0) {
channel = 'B';
our_id = ahc->our_id_b;
target_id = i % 8;
}
ahc_dump_target_state(ahc, &info, our_id,
channel, target_id, i);
}
retval = info.pos > info.offset ? info.pos - info.offset : 0;
done:
return (retval);
}
开发者ID:b3rnik,项目名称:dsl-n55u-bender,代码行数:77,代码来源:aic7xxx_proc.c
示例14: input0
void OCIOLookTransform::_validate(bool for_real)
{
input0().validate(for_real);
if(!m_hasColorSpaces)
{
error("No colorspaces available for input and/or output.");
return;
}
int inputColorSpaceCount = static_cast<int>(m_inputColorSpaceCstrNames.size()) - 1;
if(m_inputColorSpaceIndex < 0 || m_inputColorSpaceIndex >= inputColorSpaceCount)
{
std::ostringstream err;
err << "Input colorspace index (" << m_inputColorSpaceIndex << ") out of range.";
error(err.str().c_str());
return;
}
int outputColorSpaceCount = static_cast<int>(m_outputColorSpaceCstrNames.size()) - 1;
if(m_outputColorSpaceIndex < 0 || m_outputColorSpaceIndex >= outputColorSpaceCount)
{
std::ostringstream err;
err << "Output colorspace index (" << m_outputColorSpaceIndex << ") out of range.";
error(err.str().c_str());
return;
}
try
{
const char * inputName = m_inputColorSpaceCstrNames[m_inputColorSpaceIndex];
const char * outputName = m_outputColorSpaceCstrNames[m_outputColorSpaceIndex];
OCIO::ConstConfigRcPtr config = OCIO::GetCurrentConfig();
config->sanityCheck();
OCIO::LookTransformRcPtr transform = OCIO::LookTransform::Create();
const char * look = m_lookCstrNames[m_lookIndex];
if(look != NULL)
{
transform->setLooks(look);
}
OCIO::ConstContextRcPtr context = getLocalContext();
OCIO::TransformDirection direction = OCIO::TRANSFORM_DIR_UNKNOWN;
bool invertTransform = (m_dirIndex == 0) ? false : true;
// Forward
if(!invertTransform)
{
transform->setSrc(inputName);
transform->setDst(outputName);
direction = OCIO::TRANSFORM_DIR_FORWARD;
}
else
{
// The TRANSFORM_DIR_INVERSE applies an inverse for the end-to-end transform,
// which would otherwise do dst->inv look -> src.
// This is an unintuitive result for the artist (who would expect in, out to
// remain unchanged), so we account for that here by flipping src/dst
transform->setSrc(outputName);
transform->setDst(inputName);
direction = OCIO::TRANSFORM_DIR_INVERSE;
}
try
{
m_processor = config->getProcessor(context, transform, direction);
}
// We only catch the exceptions for missing files, and try to succeed
// in this case. All other errors represent more serious problems and
// should fail through.
catch(const OCIO::ExceptionMissingFile &e)
{
if(!m_ignoreErrors) throw;
m_processor = config->getProcessor(context, inputName, outputName);
}
}
catch(const OCIO::Exception &e)
{
error(e.what());
return;
}
catch (...)
{
error("OCIOLookTransform: Unknown exception during _validate.");
return;
}
if(m_processor->isNoOp())
{
// TODO or call disable() ?
set_out_channels(DD::Image::Mask_None); // prevents engine() from being called
copy_info();
return;
}
set_out_channels(DD::Image::Mask_All);
//.........这里部分代码省略.........
开发者ID:Br3nda,项目名称:OpenColorIO,代码行数:101,代码来源:OCIOLookTransform.cpp
示例15: Sys_ListFiles_r
//.........这里部分代码省略.........
if (len >= sizeof(fullpath)) {
return;
}
// format path to windows style
// done on the first run only
if (!depth) {
FS_ReplaceSeparators(fullpath, '\\');
}
handle = FindFirstFileA(fullpath, &data);
if (handle == INVALID_HANDLE_VALUE) {
return;
}
// make it point right after the slash
pathlen = strlen(path) + 1;
do {
if (!strcmp(data.cFileName, ".") ||
!strcmp(data.cFileName, "..")) {
continue; // ignore special entries
}
// construct full path
len = strlen(data.cFileName);
if (pathlen + len >= sizeof(fullpath)) {
continue;
}
memcpy(fullpath + pathlen, data.cFileName, len + 1);
if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
mask = FS_SEARCH_DIRSONLY;
} else {
mask = 0;
}
// pattern search implies recursive search
if ((flags & FS_SEARCH_BYFILTER) && mask &&
depth < MAX_LISTED_DEPTH) {
Sys_ListFiles_r(fullpath, filter, flags, baselen,
count_p, files, depth + 1);
// re-check count
if (*count_p >= MAX_LISTED_FILES) {
break;
}
}
// check type
if ((flags & FS_SEARCH_DIRSONLY) != mask) {
continue;
}
// check filter
if (filter) {
if (flags & FS_SEARCH_BYFILTER) {
if (!FS_WildCmp(filter, fullpath + baselen)) {
continue;
}
} else {
if (!FS_ExtCmp(filter, data.cFileName)) {
continue;
}
}
}
// strip path
if (flags & FS_SEARCH_SAVEPATH) {
name = fullpath + baselen;
} else {
name = data.cFileName;
}
// reformat it back to quake filesystem style
FS_ReplaceSeparators(name, '/');
// strip extension
if (flags & FS_SEARCH_STRIPEXT) {
*COM_FileExtension(name) = 0;
if (!*name) {
continue;
}
}
// copy info off
if (flags & FS_SEARCH_EXTRAINFO) {
info = copy_info(name, &data);
} else {
info = FS_CopyString(name);
}
files[(*count_p)++] = info;
} while (*count_p < MAX_LISTED_FILES &&
FindNextFileA(handle, &data) != FALSE);
FindClose(handle);
}
开发者ID:richard-allen,项目名称:q2pro,代码行数:101,代码来源:system.c
示例16: ahd_linux_proc_info
/*
* Return information to handle /proc support for the driver.
*/
int
ahd_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start,
off_t offset, int length, int inout)
{
struct ahd_softc *ahd = *(struct ahd_softc **)shost->hostdata;
struct info_str info;
char ahd_info[256];
u_int max_targ;
u_int i;
int retval;
/* Has data been written to the file? */
if (inout == TRUE) {
retval = ahd_proc_write_seeprom(ahd, buffer, length);
goto done;
}
if (start)
*start = buffer;
info.buffer = buffer;
info.length = length;
info.offset = offset;
info.pos = 0;
copy_info(&info, "Adaptec AIC79xx driver version: %s\n",
AIC79XX_DRIVER_VERSION);
copy_info(&info, "%s\n", ahd->description);
ahd_controller_info(ahd, ahd_info);
copy_info(&info, "%s\n", ahd_info);
copy_info(&info, "Allocated SCBs: %d, SG List Length: %d\n\n",
ahd->scb_data.numscbs, AHD_NSEG);
max_targ = 15;
if (ahd->seep_config == NULL)
copy_info(&info, "No Serial EEPROM\n");
else {
copy_info(&info, "Serial EEPROM:\n");
for (i = 0; i < sizeof(*ahd->seep_config)/2; i++) {
if (((i % 8) == 0) && (i != 0)) {
copy_info(&info, "\n");
}
copy_info(&info, "0x%.4x ",
((uint16_t*)ahd->seep_config)[i]);
}
copy_info(&info, "\n");
}
copy_info(&info, "\n");
if ((ahd->features & AHD_WIDE) == 0)
max_targ = 7;
for (i = 0; i <= max_targ; i++) {
ahd_dump_target_state(ahd, &info, ahd->our_id, 'A',
/*target_id*/i, /*target_offset*/i);
}
retval = info.pos > info.offset ? info.pos - info.offset : 0;
done:
return (retval);
}
开发者ID:mahyarmd,项目名称:unifi-gpl,代码行数:65,代码来源:aic79xx_proc.c
示例17: retag_set_info
void retag_set_info(t_uint32 p_subsong, const file_info &p_info, abort_callback &p_abort)
{
copy_info(module_info.author, p_info, "composer");
copy_info(module_info.name, p_info, "title");
copy_info(module_info.date, p_info, "date");
}
开发者ID:070499,项目名称:xbmc,代码行数:6,代码来源:foo_asap.cpp
注:本文中的copy_info函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论