本文整理汇总了C++中put_long函数的典型用法代码示例。如果您正苦于以下问题:C++ put_long函数的具体用法?C++ put_long怎么用?C++ put_long使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了put_long函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: sizeof
//sdRef returned by DNSServiceRegister()
DNSServiceErrorType DNSSD_API DNSServiceAddRecord
(
DNSServiceRef sdRef,
DNSRecordRef *RecordRef,
DNSServiceFlags flags,
uint16_t rrtype,
uint16_t rdlen,
const void *rdata,
uint32_t ttl
)
{
ipc_msg_hdr *hdr;
size_t len = 0;
char *ptr;
DNSRecordRef rref;
if (!sdRef || (sdRef->op != reg_service_request) || !RecordRef)
return kDNSServiceErr_BadReference;
*RecordRef = NULL;
len += 2 * sizeof(uint16_t); //rrtype, rdlen
len += rdlen;
len += sizeof(uint32_t);
len += sizeof(DNSServiceFlags);
hdr = create_hdr(add_record_request, &len, &ptr, 0);
if (!hdr) return kDNSServiceErr_Unknown;
put_flags(flags, &ptr);
put_short(rrtype, &ptr);
put_short(rdlen, &ptr);
put_rdata(rdlen, rdata, &ptr);
put_long(ttl, &ptr);
rref = malloc(sizeof(_DNSRecordRef_t));
if (!rref) goto error;
rref->app_context = NULL;
rref->app_callback = NULL;
rref->record_index = sdRef->max_index++;
rref->sdr = sdRef;
*RecordRef = rref;
hdr->client_context.context = rref;
hdr->reg_index = rref->record_index;
return deliver_request((char *)hdr, sdRef, 0);
error:
if (hdr) free(hdr);
if (rref) free(rref);
if (*RecordRef) *RecordRef = NULL;
return kDNSServiceErr_Unknown;
}
开发者ID:apprisi,项目名称:illumos-gate,代码行数:51,代码来源:dnssd_clientstub.c
示例2: uae_ppc_io_mem_write
bool UAECALL uae_ppc_io_mem_write(uint32_t addr, uint32_t data, int size)
{
bool locked = false;
while (ppc_thread_running && ppc_cpu_lock_state < 0 && ppc_state);
#if PPC_ACCESS_LOG > 0 && PPC_ACCESS_LOG < 2
if (!valid_address(addr, size)) {
if (addr >= PPC_DEBUG_ADDR_FROM && addr < PPC_DEBUG_ADDR_TO)
write_log(_T("PPC io write %08x = %08x %d\n"), addr, data, size);
}
#endif
locked = spinlock_pre(addr);
switch (size)
{
case 4:
put_long(addr, data);
break;
case 2:
put_word(addr, data);
break;
case 1:
put_byte(addr, data);
break;
}
if (addr >= 0xdff000 && addr < 0xe00000) {
int reg = addr & 0x1fe;
switch (reg) {
case 0x09c: // INTREQ
case 0x09a: // INTENA
if (data & 0x8000) {
// possible interrupt change:
// make sure M68K thread reacts to it ASAP.
uae_int_requested |= 0x010000;
}
break;
}
}
spinlock_post(locked);
#if PPC_ACCESS_LOG >= 2
write_log(_T("PPC write %08x = %08x %d\n"), addr, data, size);
#endif
return true;
}
开发者ID:nekoniaow,项目名称:WinUAE,代码行数:49,代码来源:ppc.cpp
示例3: process_loader
//----------------------------------------------------------------------
static void process_loader(char *ptr, pef_section_t *sec, int nsec) {
int i;
pef_loader_t &pl = *(pef_loader_t *)ptr;
pef_library_t *pil = (pef_library_t *)(&pl + 1);
swap_pef_loader(pl);
uint32 *impsym = (uint32 *)(pil + pl.importLibraryCount);
pef_reloc_header_t *prh =
(pef_reloc_header_t *)(impsym + pl.totalImportedSymbolCount);
uint16 *relptr = (uint16 *)(ptr + pl.relocInstrOffset);
uint32 *hash = (uint32 *)(ptr + pl.exportHashOffset);
uint32 hashsize = (1 << pl.exportHashTablePower);
uint32 *keytable = hash + hashsize;
pef_export_t *pe = (pef_export_t *)(keytable + pl.exportedSymbolCount);
#if !__MF__
for ( i=0; i < pl.importLibraryCount; i++ )
swap_pef_library(pil[i]);
for ( i=0; i < pl.relocSectionCount; i++ )
swap_pef_reloc_header(prh[i]);
for ( i=0; i < pl.exportedSymbolCount; i++ )
swap_pef_export(pe[i]);
#endif
char *stable = ptr + pl.loaderStringsOffset;
if ( pl.totalImportedSymbolCount != 0 ) {
uint32 size = pl.totalImportedSymbolCount*4;
ea_t undef = freechunk(inf.maxEA, size, -0xF);
ea_t end = undef + size;
set_selector(nsec+1, 0);
if(!add_segm(nsec+1, undef, end, "IMPORT", "XTRN")) loader_failure();
for ( i=0; i < pl.importLibraryCount; i++ ) {
ea_t ea = undef + 4*pil[i].firstImportedSymbol;
add_long_cmt(ea, 1, "Imports from library %s", stable+pil[i].nameOffset);
if ( pil[i].options & PEF_LIB_WEAK )
add_long_cmt(ea, 1, "Library is weak");
}
inf.specsegs = 1;
for ( i=0; i < pl.totalImportedSymbolCount; i++ ) {
uint32 sym = mflong(impsym[i]);
uchar sclass = uchar(sym >> 24);
ea_t ea = undef+4*i;
set_name(ea, get_impsym_name(stable,impsym,i));
if ( (sclass & kPEFWeak) != 0 ) make_name_weak(ea);
doDwrd(ea,4);
put_long(ea, 0);
impsym[i] = (uint32)ea;
}
}
开发者ID:awesome-security,项目名称:vera,代码行数:50,代码来源:pef.cpp
示例4: scsidev_open
static uae_u32 scsidev_open (void)
{
uaecptr tmp1 = m68k_areg (regs, 1); /* IOReq */
uae_u32 unit = m68k_dreg (regs, 0);
struct scsidevdata *sdd;
#ifdef DEBUGME
printf("scsidev_open(0x%x, %d)\n", tmp1, unit);
#endif
/* Check unit number */
if ((sdd = get_scsidev_data (unit)) && start_thread (sdd)) {
opencount++;
put_word (m68k_areg (regs, 6)+32, get_word (m68k_areg (regs, 6)+32) + 1);
put_long (tmp1 + 24, unit); /* io_Unit */
put_byte (tmp1 + 31, 0); /* io_Error */
put_byte (tmp1 + 8, 7); /* ln_type = NT_REPLYMSG */
return 0;
}
put_long (tmp1 + 20, (uae_u32)-1);
put_byte (tmp1 + 31, (uae_u8)-1);
return (uae_u32)-1;
}
开发者ID:Pa0l0ne,项目名称:Amiga360,代码行数:24,代码来源:scsidev.c
示例5: dev_close
static uint32_t REGPARAM2 dev_close (TrapContext *context)
{
uint32_t request = m68k_areg (regs, 1);
struct devstruct *dev;
dev = getdevstruct (get_long (request + 24));
if (!dev)
return 0;
if (log_uaeserial)
write_log (_T("%s:%d close, req=%x\n"), getdevname(), dev->unit, request);
dev_close_3 (dev);
put_long (request + 24, 0);
put_word (m68k_areg (regs, 6) + 32, get_word (m68k_areg (regs, 6) + 32) - 1);
return 0;
}
开发者ID:Yamakuzure,项目名称:PUAE,代码行数:15,代码来源:uaeserial.c
示例6: dev_open
static uint32_t REGPARAM2 dev_open (TrapContext *context)
{
uaecptr ioreq = m68k_areg (regs, 1);
uint32_t unit = m68k_dreg (regs, 0);
uint32_t flags = m68k_dreg (regs, 1);
struct devstruct *dev;
int32_t i, err;
if (get_word (ioreq + 0x12) < IOSTDREQ_SIZE)
return openfail (ioreq, IOERR_BADLENGTH);
for (i = 0; i < MAX_TOTAL_DEVICES; i++) {
if (devst[i].open && devst[i].unit == (int32_t)unit && devst[i].exclusive)
return openfail (ioreq, IOERR_UNITBUSY);
}
for (i = 0; i < MAX_TOTAL_DEVICES; i++) {
if (!devst[i].open)
break;
}
if (i == MAX_TOTAL_DEVICES)
return openfail (ioreq, IOERR_OPENFAIL);
dev = &devst[i];
dev->sysdata = xcalloc (uint8_t, uaeser_getdatalength ());
if (!uaeser_open (dev->sysdata, dev, unit)) {
xfree (dev->sysdata);
return openfail (ioreq, IOERR_OPENFAIL);
}
dev->unit = unit;
dev->open = 1;
dev->uniq = ++uniq;
dev->exclusive = (get_word (ioreq + io_SerFlags) & SERF_SHARED) ? 0 : 1;
put_long (ioreq + 24, dev->uniq);
resetparams (dev, ioreq);
err = setparams (dev, ioreq);
if (err) {
uaeser_close (dev->sysdata);
dev->open = 0;
xfree (dev->sysdata);
return openfail (ioreq, err);
}
if (log_uaeserial)
write_log (_T("%s:%d open ioreq=%08X\n"), getdevname(), unit, ioreq);
start_thread (dev);
put_word (m68k_areg (regs, 6) + 32, get_word (m68k_areg (regs, 6) + 32) + 1);
put_byte (ioreq + 31, 0);
put_byte (ioreq + 8, 7);
return 0;
}
开发者ID:Yamakuzure,项目名称:PUAE,代码行数:48,代码来源:uaeserial.c
示例7: ScuLoadState
void ScuLoadState (linput_t *li, ea_t *pc, int size)
{
scuregs_struct Scu;
scudspregs_struct ScuDsp;
qlread(li, (void *)&Scu, sizeof(Scu));
qlread(li, (void *)&ScuDsp, sizeof(ScuDsp));
if (pc)
{
*pc = ScuDsp.PC;
ea_t start=0, end=0x100;
add_segm(0, start, end, "RAM", "");
for (ea_t i = 0; i < end-start; i++)
put_long(start+i, ScuDsp.ProgramRam[i]);
}
}
开发者ID:cyberwarriorx,项目名称:yssloader,代码行数:17,代码来源:yssloader.cpp
示例8: resetparams
static void resetparams (struct devstruct *dev, uaecptr req)
{
put_long (req + io_CtlChar, 0x00001311);
put_long (req + io_RBufLen, 1024);
put_long (req + io_ExtFlags, 0);
put_long (req + io_Baud, 9600);
put_long (req + io_BrkTime, 250000);
put_long (req + io_TermArray0, 0);
put_long (req + io_TermArray1, 0);
put_byte (req + io_ReadLen, 8);
put_byte (req + io_WriteLen, 8);
put_byte (req + io_StopBits, 1);
put_byte (req + io_SerFlags, get_byte (req + io_SerFlags) & (SERF_XDISABLED | SERF_SHARED | SERF_7WIRE));
put_word (req + io_Status, 0);
}
开发者ID:Yamakuzure,项目名称:PUAE,代码行数:15,代码来源:uaeserial.c
示例9: uae_ppc_io_mem_write64
bool UAECALL uae_ppc_io_mem_write64(uint32_t addr, uint64_t data)
{
bool locked = false;
while (ppc_thread_running && ppc_cpu_lock_state < 0 && ppc_state);
locked = spinlock_pre(addr);
put_long(addr + 0, data >> 32);
put_long(addr + 4, data & 0xffffffff);
spinlock_post(locked);
#if PPC_ACCESS_LOG >= 2
write_log(_T("PPC mem write64 %08x = %08llx\n"), addr, data);
#endif
return true;
}
开发者ID:adurdin,项目名称:fs-uae,代码行数:17,代码来源:ppc.cpp
示例10: put_hack
static void put_hack( void )
/*
** Outputs the long values making up the new hunk to the destination file.
*/
{
long i, hack[HACKLEN+2] =
{
1009, /* HUNK_DEBUG */
HACKLEN, /* size in longwords */
0x00245645, 0x523a2042, /* '\0$VER: Bio v?.? (1990,1992)\0' */
0x696f2076, 0x3f2e3f20,
0x28313939, 0x302c3139,
0x39322900
};
for( i = 0; i < HACKLEN + 2; i++ )
put_long( hack[i] );
}
开发者ID:pheinrich,项目名称:amigatools,代码行数:18,代码来源:hunkhack.c
示例11: dev_close_2
static uae_u32 REGPARAM2 dev_close_2 (TrapContext *context)
{
uae_u32 request = m68k_areg (&context->regs, 1);
struct priv_devstruct *pdev = getpdevstruct (request);
struct devstruct *dev;
if (!pdev)
return 0;
dev = getdevstruct (pdev->unit);
if (log_scsi)
write_log ("%s:%d close, req=%08.8X\n", getdevname (pdev->type), pdev->unit, request);
if (!dev)
return 0;
dev_close_3 (dev, pdev);
put_long (request + 24, 0);
put_word (m68k_areg (&context->regs, 6) + 32, get_word (m68k_areg (&context->regs, 6) + 32) - 1);
return 0;
}
开发者ID:BackupTheBerlios,项目名称:arp2-svn,代码行数:18,代码来源:scsiemul.c
示例12: do_stack_magic
static void do_stack_magic (TrapFunction f, void *s, int has_retval)
{
#ifdef CAN_DO_STACK_MAGIC
uaecptr a7;
jmp_buf *j = (jmp_buf *)s;
switch (setjmp (j[0])) {
case 0:
/* Returning directly */
current_extra_stack = s;
if (has_retval == -1) {
/*write_log ("finishing m68k mode return\n");*/
longjmp (j[1], 1);
}
/*write_log ("calling native function\n");*/
transfer_control (s, EXTRA_STACK_SIZE, stack_stub, f, has_retval);
/* not reached */
return;
case 1:
/*write_log ("native function complete\n");*/
/* Returning normally. */
if (stack_has_retval (s, EXTRA_STACK_SIZE))
_68k_dreg (0) = get_retval_from_stack (s, EXTRA_STACK_SIZE);
free_extra_stack (s);
break;
case 2:
/* Returning to do a m68k call. We're now back on the main stack. */
a7 = _68k_areg(7) -= (sizeof (void *) + 7) & ~3;
/* Save stack to restore */
*((void **)get_real_address (a7 + 4)) = s;
/* Save special return address: this address contains a
* calltrap that will longjmp to the right stack. */
put_long (_68k_areg (7), RTAREA_BASE + 0xFF00);
_68k_setpc (m68k_calladdr);
fill_prefetch_0 ();
/*write_log ("native function calls m68k\n");*/
break;
}
current_extra_stack = 0;
#endif
}
开发者ID:CypherXG,项目名称:UAE4Droid,代码行数:42,代码来源:autoconf.cpp
示例13: addextrachip
/* Ugly hack for >2M chip RAM in single pool
* We can't add it any later or early boot menu
* stops working because it sets kicktag at the end
* of chip ram...
*/
static void addextrachip (uae_u32 sysbase)
{
if (currprefs.chipmem_size <= 0x00200000)
return;
if (sysbase & 0x80000001)
return;
if (!valid_address (sysbase, 1000))
return;
uae_u32 ml = get_long (sysbase + 322);
if (!valid_address (ml, 32))
return;
uae_u32 next;
while ((next = get_long (ml))) {
if (!valid_address (ml, 32))
return;
uae_u32 upper = get_long (ml + 24);
uae_u32 lower = get_long (ml + 20);
if (lower & ~0xffff) {
ml = next;
continue;
}
uae_u16 attr = get_word (ml + 14);
if ((attr & 0x8002) != 2) {
ml = next;
continue;
}
if (upper >= currprefs.chipmem_size)
return;
uae_u32 added = currprefs.chipmem_size - upper;
uae_u32 first = get_long (ml + 16);
put_long (ml + 24, currprefs.chipmem_size); // mh_Upper
put_long (ml + 28, get_long (ml + 28) + added); // mh_Free
uae_u32 next;
while (first) {
next = first;
first = get_long (next);
}
uae_u32 bytes = get_long (next + 4);
if (next + bytes == 0x00200000) {
put_long (next + 4, currprefs.chipmem_size - next);
} else {
put_long (0x00200000 + 0, 0);
put_long (0x00200000 + 4, added);
put_long (next, 0x00200000);
}
return;
}
}
开发者ID:engur,项目名称:PUAE,代码行数:53,代码来源:expansion.c
示例14: emulib_GetUaeConfig
/*
* Gets UAE Configuration
*/
static uae_u32 emulib_GetUaeConfig (uaecptr place)
{
int i;
put_long (place, UAEVERSION);
put_long (place + 4, allocated_chipmem);
put_long (place + 8, allocated_bogomem);
put_long (place + 12, allocated_fastmem);
put_long (place + 16, currprefs.gfx_framerate);
put_long (place + 20, currprefs.produce_sound);
put_long (place + 24, currprefs.jport0 | (currprefs.jport1 << 8));
put_long (place + 28, currprefs.keyboard_lang);
if (disk_empty (0))
put_byte (place + 32, 0);
else
put_byte (place + 32, 1);
if (disk_empty (1))
put_byte (place + 33, 0);
else
put_byte (place + 33, 1);
if (disk_empty(2))
put_byte (place + 34, 0);
else
put_byte (place + 34, 1);
if (disk_empty(3))
put_byte (place + 35, 0);
else
put_byte (place + 35, 1);
for (i = 0; i < 256; i++) {
put_byte ((place + 36 + i), currprefs.df[0][i]);
put_byte ((place + 36 + i + 256), currprefs.df[1][i]);
put_byte ((place + 36 + i + 512), currprefs.df[2][i]);
put_byte ((place + 36 + i + 768), currprefs.df[3][i]);
}
return 1;
}
开发者ID:amigrave,项目名称:PUAE,代码行数:40,代码来源:uaelib.c
示例15: trap_put_longs
void trap_put_longs(TrapContext *ctx, uae_u32 *haddr, uaecptr addr, int cnt)
{
if (cnt <= 0)
return;
if (trap_is_indirect_null(ctx)) {
while (cnt > 0) {
int max = cnt > RTAREA_TRAP_DATA_EXTRA_SIZE / sizeof(uae_u32) ? RTAREA_TRAP_DATA_EXTRA_SIZE / sizeof(uae_u32) : cnt;
for (int i = 0; i < max; i++) {
put_long_host(ctx->host_trap_data + RTAREA_TRAP_DATA_EXTRA + i * sizeof(uae_u32), *haddr++);
}
call_hardware_trap_back(ctx, TRAPCMD_PUT_LONGS, ctx->amiga_trap_data + RTAREA_TRAP_DATA_EXTRA, addr, max, 0);
addr += max * sizeof(uae_u32);
cnt -= max;
}
} else {
uae_u32 *p = (uae_u32*)haddr;
for (int i = 0; i < cnt; i++) {
put_long(addr, *p++);
addr += 4;
}
}
}
开发者ID:Blonder,项目名称:WinUAE,代码行数:22,代码来源:traps.cpp
示例16: sizeof
DNSServiceErrorType DNSSD_API DNSServiceReconfirmRecord
(
DNSServiceFlags flags,
uint32_t interfaceIndex,
const char *fullname,
uint16_t rrtype,
uint16_t rrclass,
uint16_t rdlen,
const void *rdata
)
{
char *ptr;
size_t len;
ipc_msg_hdr *hdr;
DNSServiceRef tmp;
len = sizeof(DNSServiceFlags);
len += sizeof(uint32_t);
len += strlen(fullname) + 1;
len += 3 * sizeof(uint16_t);
len += rdlen;
tmp = connect_to_server();
if (!tmp) return(kDNSServiceErr_Unknown);
hdr = create_hdr(reconfirm_record_request, &len, &ptr, 1);
if (!hdr) return(kDNSServiceErr_Unknown);
put_flags(flags, &ptr);
put_long(interfaceIndex, &ptr);
put_string(fullname, &ptr);
put_short(rrtype, &ptr);
put_short(rrclass, &ptr);
put_short(rdlen, &ptr);
put_rdata(rdlen, rdata, &ptr);
ConvertHeaderBytes(hdr);
write_all(tmp->sockfd, (char *)hdr, (int) len);
free(hdr);
DNSServiceRefDeallocate(tmp);
return(kDNSServiceErr_NoError);
}
开发者ID:KrisChaplin,项目名称:LRT2x4_v1.0.2.06_GPL_source,代码行数:39,代码来源:dnssd_clientstub.c
示例17: do_stack_magic
static void do_stack_magic (TrapFunction f, struct extra_stack *s, int has_retval)
{
switch (setjmp (s->stackswap_env)) {
case 0:
/* Returning directly */
current_extra_stack = s;
if (has_retval == -1) {
/*write_log ("finishing m68k mode return\n");*/
longjmp (s->m68kcall_env, 1);
}
/*write_log ("calling native function\n");*/
transfer_control (s, EXTRA_STACK_SIZE, stack_stub, f, has_retval);
/* not reached */
abort ();
case 1:
/*write_log ("native function complete\n");*/
/* Returning normally. */
if (stack_has_retval (s, EXTRA_STACK_SIZE))
m68k_dreg (regs, 0) = get_retval_from_stack (s, EXTRA_STACK_SIZE);
free_extra_stack (s);
break;
case 2: {
/* Returning to do a m68k call. We're now back on the main stack. */
uaecptr a7 = m68k_areg (regs, 7) -= (sizeof (void *) + 7) & ~3;
/* Save stack to restore */
*((void **)get_real_address (a7 + 4)) = s;
/* Save special return address: this address contains a
* calltrap that will longjmp to the right stack. */
put_long (m68k_areg (regs, 7), RTAREA_BASE + 0xFF00);
m68k_setpc (s->m68kcall_addr);
fill_prefetch_slow ();
/*write_log ("native function calls m68k\n");*/
break;
}
}
current_extra_stack = 0;
}
开发者ID:BackupTheBerlios,项目名称:arp2-svn,代码行数:39,代码来源:autoconf.c
示例18: dev_close_2
static uae_u32 REGPARAM2 dev_close_2 (TrapContext *context)
{
uae_u32 request = m68k_areg (regs, 1);
struct priv_s2devstruct *pdev = getps2devstruct (request);
struct s2devstruct *dev;
if (!pdev) {
write_log (_T("%s close with unknown request %08X!?\n"), SANA2NAME, request);
return 0;
}
dev = gets2devstruct (pdev->unit);
if (!dev) {
write_log (_T("%s:%d close with unknown request %08X!?\n"), SANA2NAME, pdev->unit, request);
return 0;
}
if (log_net)
write_log (_T("%s:%d close, open=%d req=%08X\n"), SANA2NAME, pdev->unit, dev->opencnt, request);
put_long (request + 24, 0);
dev->opencnt--;
pdev->inuse = 0;
if (!dev->opencnt) {
dev->exclusive = 0;
if (pdev->tempbuf) {
m68k_areg (regs, 1) = pdev->tempbuf;
m68k_dreg (regs, 0) = pdev->td->mtu + ETH_HEADER_SIZE + 2;
CallLib (context, get_long (4), -0xD2); /* FreeMem */
pdev->tempbuf = 0;
}
ethernet_close (pdev->td, dev->sysdata);
xfree (dev->sysdata);
dev->sysdata = NULL;
write_comm_pipe_u32 (&dev->requests, 0, 1);
write_log (_T("%s: opencnt == 0, all instances closed\n"), SANA2NAME);
}
put_word (m68k_areg (regs, 6) + 32, get_word (m68k_areg (regs, 6) + 32) - 1);
return 0;
}
开发者ID:sunfirefox,项目名称:WinUAE,代码行数:37,代码来源:sana2.cpp
示例19: main
void main( int argc, char *argv[] )
{
/* Make sure we were called correctly */
if( argc != 3 )
{
printf( "Usage: %s <in> <out>\n", argv[0] );
exit( 5 );
}
/* Try to open the input file */
if( in = fopen( argv[1], "rb" ) )
{
/* Try to open the output file */
if( out = fopen( argv[2], "wb" ) )
{
long val, i;
/* Output the HUNK_HEADER hunk found at the start of the file */
put_long( get_long() ); /* HUNK_HEADER */
put_long( get_long() ); /* # of res libs (0) */
put_long( val = get_long() ); /* # of hunks in file */
put_long( get_long() ); /* first slot */
put_long( get_long() ); /* last slot */
/* Now output the sizes of all the hunks, in order */
put_long( get_long() + 1 ); /* new size of 1st hunk */
for( i = 0; i < val-1; i++ )
put_long( get_long() );
/* Finally, output the rest of the file */
put_rest();
fclose( out );
}
fclose( in );
}
}
开发者ID:pheinrich,项目名称:amigatools,代码行数:37,代码来源:hunkhack.c
示例20: long_div
void long_div(value *sp) {
put_long(sp+2, longint_divop(get_long(sp+2), get_long(sp), 1));
}
开发者ID:CRogers,项目名称:obc,代码行数:3,代码来源:support.c
注:本文中的put_long函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论