本文整理汇总了C++中VERSION函数的典型用法代码示例。如果您正苦于以下问题:C++ VERSION函数的具体用法?C++ VERSION怎么用?C++ VERSION使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了VERSION函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: postDump
void postDump(IntX level, LongN start)
{
DL(1, (OUTPUTBUFF, "### [post] (%08lx)\n", start));
if (!loaded)
return;
DLV(2, "version =", post->version);
DLF(2, "italicAngle =", post->italicAngle);
DLs(2, "underlinePosition =", post->underlinePosition);
DLs(2, "underlineThickness=", post->underlineThickness);
DLU(2, "isFixedPitch =", post->isFixedPitch);
DLU(2, "minMemType42 =", post->minMemType42);
DLU(2, "maxMemType42 =", post->maxMemType42);
DLU(2, "minMemType1 =", post->minMemType1);
DLU(2, "maxMemType1 =", post->maxMemType1);
switch (post->version)
{
case VERSION(1,0):
break;
case VERSION(2,0):
dump2_0((Format2_0 *)post->format, level);
break;
case VERSION(2,5):
dump2_5((Format2_5 *)post->format, level);
break;
case VERSION(3,0):
break;
case VERSION(4,0):
dump4_0((Format4_0 *)post->format, level);
}
}
示例2: fatal
void GraphicsManager::showThumbnail(const Common::String &filename, int atX, int atY) {
Common::InSaveFile *fp = g_system->getSavefileManager()->openForLoading(filename);
if (fp == nullptr)
return;
bool headerBad = false;
if (fp->readByte() != 'S')
headerBad = true;
if (fp->readByte() != 'L')
headerBad = true;
if (fp->readByte() != 'U')
headerBad = true;
if (fp->readByte() != 'D')
headerBad = true;
if (fp->readByte() != 'S')
headerBad = true;
if (fp->readByte() != 'A')
headerBad = true;
if (headerBad) {
fatal(ERROR_GAME_LOAD_NO, filename);
return;
}
char c = fp->readByte();
while ((c = fp->readByte()))
;
int majVersion = fp->readByte();
int minVersion = fp->readByte();
int ssgVersion = VERSION(majVersion, minVersion);
if (ssgVersion >= VERSION(1, 4)) {
int fileWidth = fp->readUint32LE();
int fileHeight = fp->readUint32LE();
Graphics::TransparentSurface thumbnail;
if (!ImgLoader::loadPNGImage(fp, &thumbnail))
return;
delete fp;
fp = nullptr;
if (atX < 0) {
fileWidth += atX;
atX = 0;
}
if (atY < 0) {
fileHeight += atY;
atY = 0;
}
if (fileWidth + atX > (int)_sceneWidth)
fileWidth = _sceneWidth - atX;
if (fileHeight + atY > (int)_sceneHeight)
fileHeight = _sceneHeight - atY;
thumbnail.blit(_backdropSurface, atX, atY, Graphics::FLIP_NONE, nullptr, TS_ARGB(255, 255, 255, 255), fileWidth, fileHeight);
thumbnail.free();
}
}
示例3: allrdatasets
static void
allrdatasets(isc_assertioncallback_t callback) {
isc_result_t result;
dns_dbnode_t *node = NULL;
dns_rdatasetiter_t *iterator = NULL;
result = dns_test_begin(NULL, ISC_FALSE);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
setup_db();
result = dns_db_findnode(db1, dns_rootname, ISC_FALSE, &node);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
isc_assertion_setcallback(callback);
result = dns_db_allrdatasets(db1, node, VERSION(callback), 0,
&iterator);
if (callback != NULL)
atf_tc_fail("dns_db_allrdatasets did not assert");
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
dns_rdatasetiter_destroy(&iterator);
ATF_REQUIRE_EQ(iterator, NULL);
dns_db_detachnode(db1, &node);
ATF_REQUIRE_EQ(node, NULL);
close_db();
dns_test_end();
}
示例4: _metacd_load_url
static struct oio_url_s *
_metacd_load_url (struct req_args_s *args)
{
const gchar *s;
struct oio_url_s *url = oio_url_empty();
if (NULL != (s = NS()))
oio_url_set (url, OIOURL_NS, s);
if (NULL != (s = ACCOUNT()))
oio_url_set (url, OIOURL_ACCOUNT, s);
if (NULL != (s = REF()))
oio_url_set (url, OIOURL_USER, s);
if (NULL != (s = TYPE()))
oio_url_set (url, OIOURL_TYPE, s);
if (NULL != (s = PATH())) {
oio_url_set (url, OIOURL_PATH, s);
if (NULL != (s = VERSION()))
oio_url_set (url, OIOURL_VERSION, s);
}
if (NULL != (s = CID()))
oio_url_set (url, OIOURL_HEXID, s);
if (NULL != (s = CONTENT()))
oio_url_set (url, OIOURL_CONTENTID, s);
return url;
}
示例5: displayBanner
void NEAR
displayBanner()
{
#ifdef LEADING_ZEROES
char szRevisionNo[5]; /* For '.nnn\0' */
char szMinorVersion[3]; /* For 'nn\0' */
#endif
if (bannerDisplayed)
return;
bannerDisplayed = TRUE;
#ifdef LEADING_ZEROES
szMinorVersion[0] = '0';
szMinorVersion[1] = '0';
itoa(rmm, szMinorVersion + (rmm < 10 ? 1 : 0), 10);
szRevisionNo[0] = rup ? '.' : '\0'; /* if 0 Revision is not shown */
szRevisionNo[1] = '0';
szRevisionNo[2] = '0';
itoa(rup, szRevisionNo + (rup < 10 ? 3 : (rup < 100 ? 2 : 1)), 10);
makeMessage(COPYRIGHT_MESSAGE_1, rmj, szMinorVersion, szRevisionNo);
#endif
makeMessage(COPYRIGHT_MESSAGE_1, VERSION(rmj, rmm, rup));
makeMessage(COPYRIGHT_MESSAGE_2, CopyRightYrs);
fflush(stderr);
}
示例6: switch
/* Get glyph name for glyphId */
Byte8 *postGetName(GlyphId glyphId, IntX *length)
{
switch (post->version)
{
case VERSION(1,0):
return getName1_0(glyphId, length);
case VERSION(2,0):
return getName2_0((Format2_0 *)post->format, glyphId, length);
case VERSION(2,5):
return getName2_5((Format2_5 *)post->format, glyphId, length);
case VERSION(4,0):
return getNam4_0((Format4_0 *)post->format, glyphId, length);
}
*length = 0;
return NULL;
}
示例7: deleterdataset
static void
deleterdataset(isc_assertioncallback_t callback) {
isc_result_t result;
dns_rdataset_t rdataset;
dns_fixedname_t fixed;
dns_dbnode_t *node = NULL;
result = dns_test_begin(NULL, ISC_FALSE);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
setup_db();
dns_rdataset_init(&rdataset);
dns_fixedname_init(&fixed);
result = dns_db_findnode(db1, dns_rootname, ISC_FALSE, &node);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
isc_assertion_setcallback(callback);
result = dns_db_deleterdataset(db1, node, VERSION(callback),
dns_rdatatype_soa, 0);
if (callback != NULL)
atf_tc_fail("dns_db_deleterdataset did not assert");
ATF_REQUIRE_EQ(result, DNS_R_UNCHANGED);
dns_db_detachnode(db1, &node);
ATF_REQUIRE_EQ(node, NULL);
close_db();
dns_test_end();
}
示例8: dump
static void
dump(isc_assertioncallback_t callback) {
isc_result_t result;
FILE *f = NULL;
result = dns_test_begin(NULL, ISC_FALSE);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
setup_db();
result = isc_file_openunique(tempname, &f);
fclose(f);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
isc_assertion_setcallback(callback);
result = dns_db_dump(db1, VERSION(callback), tempname);
(void)unlink(tempname);
if (callback != NULL)
atf_tc_fail("dns_db_dump did not assert");
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
close_db();
dns_test_end();
}
示例9: getnsec3parameters
static void
getnsec3parameters(isc_assertioncallback_t callback) {
isc_result_t result;
dns_hash_t hash;
isc_uint8_t flags;
isc_uint16_t iterations;
unsigned char salt[DNS_NSEC3_SALTSIZE];
size_t salt_length = sizeof(salt);
result = dns_test_begin(NULL, ISC_FALSE);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
setup_db();
isc_assertion_setcallback(callback);
result = dns_db_getnsec3parameters(db1, VERSION(callback), &hash,
&flags, &iterations, salt,
&salt_length);
if (callback != NULL)
atf_tc_fail("dns_db_dump did not assert");
ATF_REQUIRE_EQ(result, ISC_R_NOTFOUND);
close_db();
dns_test_end();
}
示例10: readFile
static int readFile(char * filename)
{
Card32 value;
/* See if we can recognize the file type */
value = fileSniff();
switch (value)
{
case bits_:
case typ1_:
case true_:
case mor0_:
case OTTO_:
case VERSION(1,0):
sfntRead(0, -1); /* Read plain sfnt file */
sfntDump();
sfntFree(1);
break;
case ttcf_:
sfntTTCRead(0); /* Read TTC and dump file */
break;
case 256:
SEEK_ABS(0); /* Raw resource file as a data fork */
resRead(0); /* Read and dump Macintosh resource file */
break;
case sig_AppleSingle:
case sig_AppleDouble:
doASDFormats((ctlTag)value);
break;
default:
warning(SPOT_MSG_BADFILE, filename);
return 1;
}
return 0;
}
示例11: find
static void
find(isc_assertioncallback_t callback) {
isc_result_t result;
dns_rdataset_t rdataset;
dns_fixedname_t fixed;
result = dns_test_begin(NULL, ISC_FALSE);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
setup_db();
dns_rdataset_init(&rdataset);
dns_fixedname_init(&fixed);
isc_assertion_setcallback(callback);
result = dns_db_find(db1, dns_rootname, VERSION(callback),
dns_rdatatype_soa, 0, 0, NULL,
dns_fixedname_name(&fixed), &rdataset, NULL);
if (callback != NULL)
atf_tc_fail("dns_db_find did not assert");
ATF_REQUIRE_EQ(result, DNS_R_NXDOMAIN);
close_db();
dns_test_end();
}
示例12: USAGE
void USAGE()
{
printf("E8::Script ");
VERSION();
printf("\n");
printf(
"USAGE: e8script [PARAMS] filename [script-params]\n"
"Available params:\n"
"\t--profile out profile code\n"
"\t--no-run do not execute file, just compile (and profile)\n"
"\t--dl=<unit> attach unit before script compiling\n"
"\t--ext-path=<path> add path to search units\n"
"\t--input-encoding=<enc> set encoding of input files\n"
"\t--output-encoding=<enc> set encoding of standart output\n"
"Preprocessor params:\n"
"\t--server\n"
"\t--thin-client\n"
"\t--web-client\n"
"\t--thick-client-managed-application\n"
"\t\t--thick-managed\n"
"\t--thick-client-ordinary-application\n"
"\t\t--thick-ordinary\n"
"\t--no-script\n"
"\t--strict-syntax\n"
);
}
示例13: maxpFill
int maxpFill(hotCtx g) {
maxpCtx h = g->ctx.maxp;
h->tbl.version = VERSION(0, 5);
h->tbl.numGlyphs = (unsigned short)g->font.glyphs.cnt;
return 1;
}
示例14: main
int main(int argc, char **argv)
{
if (argc == 2 && strcmp(argv[1], "--version") == 0) {
VERSION();
return 0;
}
int r = exec_cli(argc, argv);
return r;
}
示例15: postFree
void postFree(void)
{
if (!loaded)
return;
switch (post->version)
{
case VERSION(2,0):
free2_0((Format2_0 *)post->format);
break;
case VERSION(2,5):
free2_5((Format2_5 *)post->format);
break;
case VERSION(4,0):
free4_0((Format4_0 *)post->format);
break;
}
memFree(post); post=NULL;
loaded = 0;
}