username
stringlengths
1
36
repo
stringlengths
1
82
path
stringlengths
4
161
function
stringlengths
0
328
code
stringlengths
15
240k
func_defs
stringlengths
0
313k
llvm
stringclasses
1 value
hash
stringlengths
64
64
memory
int64
15
240k
chriskmanx
qmole
QMOLEDEV/vnc-4_1_3-unixsrc/unix/xc/lib/GL/mesa/src/drv/mga/mgatris.c
mga_draw_quad
static void __inline__ mga_draw_quad( mgaContextPtr mmesa, mgaVertexPtr v0, mgaVertexPtr v1, mgaVertexPtr v2, mgaVertexPtr v3 ) { GLuint vertex_size = mmesa->vertex_size; GLuint *vb = mgaAllocDmaLow( mmesa, 6 * 4 * vertex_size ); int j; EMIT_VERT( j, vb, vertex_size, v0 ); EMIT_VERT( j, vb, vertex_size, v1 ); EMIT_VERT( j, vb, vertex_size, v3 ); EMIT_VERT( j, vb, vertex_size, v1 ); EMIT_VERT( j, vb, vertex_size, v2 ); EMIT_VERT( j, vb, vertex_size, v3 ); }
static void init_rast_tab( void ); static void mgaRenderClippedPoly( GLcontext *ctx, const GLuint *elts, GLuint n ); static void mgaRenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj ); static void mgaChooseRenderState(GLcontext *ctx); static void mgaRunPipeline( GLcontext *ctx ); void mgaRasterPrimitive( GLcontext *ctx, GLenum prim, GLuint hwprim ); static void mgaRenderPrimitive( GLcontext *ctx, GLenum prim ); static void mgaRenderFinish( GLcontext *ctx ); void mgaFallback( GLcontext *ctx, GLuint bit, GLboolean mode ); void mgaDDInitTriFuncs( GLcontext *ctx );
7e6b1dc08c7ef836c483ab960a9c8536da12027fc2e2e9498495320acb0994d2
533
alistairking
wandio
lib/ior-peek.c
peek_peek
static int64_t peek_peek(io_t *io, void *buffer, int64_t len) { int64_t ret = 0; int res = 0; if (DATA(io)->length - DATA(io)->offset < len) { int64_t read_amount = len - (DATA(io)->length - DATA(io)->offset); read_amount += PEEK_SIZE - ((DATA(io)->length + read_amount) % PEEK_SIZE); DATA(io)->buffer = alignedrealloc(DATA(io)->buffer, DATA(io)->length, DATA(io)->length + read_amount, &res); if (DATA(io)->buffer == NULL) { return res; } read_amount = wandio_read(DATA(io)->child, DATA(io)->buffer + DATA(io)->length, read_amount); if (read_amount < 0) { return read_amount; } DATA(io)->length += read_amount; } ret = MIN(len, DATA(io)->length - DATA(io)->offset); memcpy(buffer, DATA(io)->buffer + DATA(io)->offset, ret); return ret; }
DLLEXPORT io_t *peek_open(io_t *child); static int64_t refill_buffer(io_t *io, int64_t len); static int64_t peek_read(io_t *io, void *buffer, int64_t len); static void *alignedrealloc(void *old, size_t oldsize, size_t size, int *res); static int64_t peek_tell(io_t *io); static int64_t peek_seek(io_t *io, int64_t offset, int whence); static void peek_close(io_t *io);
dadab1821fca6a485e217f69180fe96d6fe254ea601a2aaa32862ba28aceab52
1,264
garbear
v4l-utils
lib/libdvbv5/dvb-file.c
parse_delsys
int parse_delsys(const char *name) { int i, cnt = 0; for (i = 0; i < ARRAY_SIZE(delivery_system_name); i++) if (delivery_system_name[i] && !strcasecmp(name, delivery_system_name[i])) break; if (i < ARRAY_SIZE(delivery_system_name)) return i; for (i = 0; i < ARRAY_SIZE(alt_names); i++) if (!strcasecmp(name, alt_names[i].name)) break; if (i < ARRAY_SIZE(alt_names)) return alt_names[i].delsys; fprintf(stderr, "ERROR: Delivery system %s is not known. Valid values are:\n", name); for (i = 0; i < ARRAY_SIZE(alt_names) - 1; i++) { if (!(cnt % 5)) fprintf(stderr, "\n"); fprintf(stderr, "%-15s", alt_names[i].name); cnt++; } for (i = 1; i < ARRAY_SIZE(delivery_system_name) - 1; i++) { if (!(cnt % 5)) fprintf(stderr, "\n"); fprintf(stderr, "%-15s", delivery_system_name[i]); cnt++; } if (cnt % 5) fprintf(stderr, "\n"); fprintf(stderr, "\n"); return -1; }
static void adjust_delsys(struct dvb_entry *entry); static uint32_t get_compat_format(uint32_t delivery_system); static int fill_entry(struct dvb_entry *entry, char *key, char *value); struct dvb_file *read_dvb_file(const char *fname); int write_dvb_file(const char *fname, struct dvb_file *dvb_file); static char *dvb_vchannel(struct dvb_v5_fe_parms *parms, struct dvb_table_nit *nit, uint16_t service_id); static int sort_other_el_pid(const void *a_arg, const void *b_arg); enum file_formats parse_format(const char *name);
496ebfdcb652d2352fd4d5f14e998c1e25e20a2cf9e89b666ae73e9388183a76
921
jmahler
EECE344-Digital_System_Design
empty_project/Libraries/STM32_TouchSensing_Driver/src/stm32_tsl_services.c
TSL_DeltaCalculation
void TSL_DeltaCalculation(void) { Delta = (int16_t)(pKeyStruct->Channel.Reference - pKeyStruct->Channel.LastMeas); }
void TSL_SetStructPointer(void); void TSL_SCKey_SetIdleState(void); void TSL_SCKey_BackToIdleState(void); void TSL_SCKey_SetPreDetectState(void); void TSL_SCKey_SetDetectedState(void); void TSL_SCKey_SetPostDetectState(void); void TSL_SCKey_BackToDetectedState(void); void TSL_SCKey_SetPreRecalibrationState(void); void TSL_SCKey_SetCalibrationState(void); void TSL_SCKey_SetErrorState(void); void TSL_SCKey_SetDisabledState(void); void TSL_SCKey_DxS(void); void TSL_SCKey_DetectionTimeout(void); void TSL_ECS(void); uint16_t TSL_MCKey_InitAcq(uint8_t channel); void TSL_MCKey_SetStructPointer(void); void TSL_MCKey_DeltaCalculation(uint8_t ChIdx); void TSL_MCKey_SetIdleState(void); void TSL_MCKey_BackToIdleState(void); void TSL_MCKey_SetPreDetectState(void); void TSL_MCKey_SetDetectedState(void); void TSL_MCKey_SetPostDetectState(void); void TSL_MCKey_BackToDetectedState(void); void TSL_MCKey_SetPreRecalibrationState(void); void TSL_MCKey_SetCalibrationState(void); void TSL_MCKey_SetErrorState(void); void TSL_MCKey_SetDisabledState(void); void TSL_MCKey_DxS(void); void TSL_MCKey_DetectionTimeout(void);
df8f52db3784c97363960c19c2a2f7b144760543eb261295cd17c0d2e82ee988
123
odit
rv042
linux/kernel_2.6/linux/fs/openpromfs/inode.c
check_space
static int __init check_space (u16 n) { unsigned long pages; if ((1 << alloced) * PAGE_SIZE < (n + 2) * sizeof(openpromfs_node)) { pages = __get_free_pages (GFP_KERNEL, alloced + 1); if (!pages) return -1; if (nodes) { memcpy ((char *)pages, (char *)nodes, (1 << alloced) * PAGE_SIZE); free_pages ((unsigned long)nodes, alloced); } alloced++; nodes = (openpromfs_node *)pages; } return 0; }
int property_release (struct inode *inode, struct file *filp); static int lookup_children(u16 n, const char * name, int len); static struct dentry *openpromfs_lookup(struct inode * dir, struct dentry *dentry, struct nameidata *nd); static int openpromfs_readdir(struct file * filp, void * dirent, filldir_t filldir); static int openpromfs_unlink (struct inode *dir, struct dentry *dentry); static u16 __init get_nodes (u16 parent, u32 node); static void openprom_read_inode(struct inode * inode); static int openprom_remount(struct super_block *sb, int *flags, char *data); static int openprom_fill_super(struct super_block *s, void *data, int silent); static int __init init_openprom_fs(void); static void __exit exit_openprom_fs(void);
ae08c29502a531e0a2063e35f62dde35f5fa2d2b62efbfbb5bc69cf580e9c6e4
422
sdudley
maximus
install/cvt202.c
CvtParse
static void CvtParse(void) { char szTemp[MAX_CTL_LINE]; char szLine[MAX_CTL_LINE]; char szStrippedLine[MAX_CTL_LINE]; char szKeyword[MAX_CTL_LINE]; int iWord; CVTPARM cp; CVTSTATE csOld; while (fgets(szLine, MAX_CTL_LINE, pfsCur->fpIn)) { pfsCur->iLine++; strcpy(szStrippedLine, szLine); StripComment(szStrippedLine); getword(szStrippedLine, szKeyword, szCtlDelim, 1); memset(cp.szWords, 0, sizeof cp.szWords); iWord = 0; do { getword(szStrippedLine, szTemp, szCtlDelim, iWord+1); if (*szTemp) cp.szWords[iWord++] = sstrdup(szTemp); else cp.szWords[iWord++] = NULL; } while (*szTemp); cp.szLine = szLine; cp.szStrippedLine = szStrippedLine; cp.szKeyword = szKeyword; do_xlat(&cp, xtTop); if (ptsTables[csState].pxt) do_xlat(&cp, ptsTables[csState].pxt); csOld = csState; handle_keyword(&cp, ptsTables[csState].ptt); for (iWord=0; cp.szWords[iWord]; iWord++) free(cp.szWords[iWord]); if (!ptsTables[csOld].fHaltOutput || csState != csOld) fprintf(pfsCur->fpOut, "%s", szLine); } }
CVTSTATE HandleEventEvent(CVTPARM *pcp); CVTSTATE HandleSystemEnd(CVTPARM *pcp); CVTSTATE HandleSystemFile(CVTPARM *pcp); CVTSTATE HandleMatrixEnd(CVTPARM *pcp); CVTSTATE HandleMenuHeader(CVTPARM *pcp); CVTSTATE HandleHeaderFile(CVTPARM *pcp); CVTSTATE HandleMenuDefault(CVTPARM *pcp); CVTSTATE HandleMenuEnd(CVTPARM *pcp); CVTSTATE HandleColourStrip(CVTPARM *pcp); CVTSTATE HandleColourEnd(CVTPARM *pcp); CVTSTATE HandleLanguageStrip(CVTPARM *pcp); CVTSTATE HandleLanguageEnd(CVTPARM *pcp); CVTSTATE HandleSessionUpload(CVTPARM *pcp); CVTSTATE HandleSessionNo(CVTPARM *pcp); CVTSTATE HandleSessionStrip(CVTPARM *pcp); CVTSTATE HandleSessionFormat(CVTPARM *pcp); CVTSTATE HandleSessionArea(CVTPARM *pcp); CVTSTATE HandleSessionBegin(CVTPARM *pcp); CVTSTATE HandleSessionEnd(CVTPARM *pcp); CVTSTATE HandleAreaEnd(CVTPARM *pcp); CVTSTATE HandleAreaMsgInfo(CVTPARM *pcp); CVTSTATE HandleAreaMsgAccess(CVTPARM *pcp); CVTSTATE HandleAreaType(CVTPARM *pcp); CVTSTATE HandleAreaRenum(CVTPARM *pcp); CVTSTATE HandleAreaMsgMenuName(CVTPARM *pcp); CVTSTATE HandleAreaMsgName(CVTPARM *pcp); CVTSTATE HandleAreaMatrix(CVTPARM *pcp); CVTSTATE HandleAreaEcho(CVTPARM *pcp); CVTSTATE HandleAreaConf(CVTPARM *pcp); CVTSTATE HandleAreaLocal(CVTPARM *pcp); CVTSTATE HandleAreaPublic(CVTPARM *pcp); CVTSTATE HandleAreaPrivate(CVTPARM *pcp); CVTSTATE HandleAreaAlias(CVTPARM *pcp); CVTSTATE HandleAreaReadOnly(CVTPARM *pcp); CVTSTATE HandleAreaAnonymous(CVTPARM *pcp); CVTSTATE HandleAreaHigh(CVTPARM *pcp); CVTSTATE HandleAreaNoNameKludge(CVTPARM *pcp); CVTSTATE HandleAreaUseRealname(CVTPARM *pcp); CVTSTATE HandleAreaOrigin(CVTPARM *pcp); CVTSTATE HandleAreaMsgOverride(CVTPARM *pcp); CVTSTATE HandleAreaMsgBarricade(CVTPARM *pcp); CVTSTATE HandleAreaDownload(CVTPARM *pcp); CVTSTATE HandleAreaUpload(CVTPARM *pcp); CVTSTATE HandleAreaFileInfo(CVTPARM *pcp); CVTSTATE HandleAreaFileAccess(CVTPARM *pcp); CVTSTATE HandleAreaFileMenuName(CVTPARM *pcp); CVTSTATE HandleAreaFileList(CVTPARM *pcp); CVTSTATE HandleAreaFileOverride(CVTPARM *pcp); CVTSTATE HandleAreaFileBarricade(CVTPARM *pcp); CVTSTATE HandleAreaObsolete(CVTPARM *pcp); CVTSTATE HandleAreaApp(CVTPARM *pcp); CVTSTATE HandleAreaPrivRelated(CVTPARM *pcp); CVTSTATE HandleTopSystem(CVTPARM *pcp); CVTSTATE HandleTopMatrix(CVTPARM *pcp); CVTSTATE HandleTopColour(CVTPARM *pcp); CVTSTATE HandleTopLanguage(CVTPARM *pcp); CVTSTATE HandleTopSession(CVTPARM *pcp); CVTSTATE HandleTopMenu(CVTPARM *pcp); CVTSTATE HandleTopArea(CVTPARM *pcp); CVTSTATE HandleTopInclude(CVTPARM *pcp); dword SqHash(byte *f); static void set_status(char *pszName); void Unknown(char *szWhat, char *szValue); char *fchar(char *str,char *delim,int wordno); static void CvtInit(void); static void near set_extension(char *szName, char *szNewExt); static int query_overwrite(char *szName); static void fatal_file_err(char *szErrFmt, char *szName); void StripComment(char *szLine); static void do_xlat(CVTPARM *pcp, XLATTABLE *pxt); static void handle_keyword(CVTPARM *pcp, TRANSLATOR *pttTable); static void CvtFile(char *pszName); void CvtConfig(char *szCfg, char *szPrm); static void CvtTag(char *szTag); static void CvtEvents(char *szFilespec); void set_files_base(char *szBase); MenuFunction(ValFile);
4e67c5b0e4f883a4ec32b3cc5a6b9ca431e1e14cb829e47a54928372359a2923
1,178
RDemers
org.rd.qtx.toolboxlib
QtxToolboxLib/DecNumber/decBasic.c
decFloatRemainder
decFloat * decFloatRemainder(decFloat *result, const decFloat *dfl, const decFloat *dfr, decContext *set) { return decDivide(result, dfl, dfr, set, REMAINDER); }
static decFloat * decCanonical(decFloat *result, const decFloat *df); decFloat * decFloatCanonical(decFloat *result, const decFloat *df); enum decClass decFloatClass(const decFloat *df); const char *decFloatClassString(const decFloat *df); decFloat * decFloatCopy(decFloat *result, const decFloat *dfl); decFloat * decFloatCopyAbs(decFloat *result, const decFloat *dfl); decFloat * decFloatCopyNegate(decFloat *result, const decFloat *dfl); uInt decFloatDigits(const decFloat *df); decFloat * decFloatFromInt32(decFloat *result, Int n); decFloat * decFloatFromUInt32(decFloat *result, uInt u); uInt decFloatIsCanonical(const decFloat *df); uInt decFloatIsFinite(const decFloat *df); uInt decFloatIsInfinite(const decFloat *df); uInt decFloatIsInteger(const decFloat *df); uInt decFloatIsLogical(const decFloat *df); uInt decFloatIsNaN(const decFloat *df); uInt decFloatIsNegative(const decFloat *df); uInt decFloatIsNormal(const decFloat *df); uInt decFloatIsPositive(const decFloat *df); uInt decFloatIsSignaling(const decFloat *df); uInt decFloatIsSignalling(const decFloat *df); uInt decFloatIsSigned(const decFloat *df); uInt decFloatIsSubnormal(const decFloat *df); uInt decFloatIsZero(const decFloat *df); uInt decFloatSameQuantum(const decFloat *dfl, const decFloat *dfr); static decFloat *decInvalid(decFloat *result, decContext *set); static decFloat *decInfinity(decFloat *result, const decFloat *df); static Int decNumCompare(const decFloat *dfl, const decFloat *dfr, Flag tot);
f4a4054fc6acb5b78c3c180ff427437e10a44ce732813730b2ad8b5ef92263c4
228
cranes-bill
cedit
plugins/spell/cedit-spell-checker.c
void cedit_spell_checker_get_property
static void cedit_spell_checker_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { switch (prop_id) { case PROP_LANGUAGE: default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); } }
4a814fefe4f9256addcbc70ee8b8d21e382f499e295c2af2fb879e12cb4f7947
263
0xD34D
kernel_omap_bowser-common
arch/arm/mach-omap2/omap_hwmod.c
omap_hwmod_disable_wakeup
int omap_hwmod_disable_wakeup(struct omap_hwmod *oh) { unsigned long flags; u32 v; if (!oh->class->sysc || !(oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)) return -EINVAL; spin_lock_irqsave(&oh->_lock, flags); v = oh->_sysc_cache; _disable_wakeup(oh, &v); _write_sysconfig(v, oh); omap_hwmod_disable_ioring_wakeup(oh); spin_unlock_irqrestore(&oh->_lock, flags); return 0; }
static int _update_sysc_cache(struct omap_hwmod *oh); static void _write_sysconfig_raw(u32 v, struct omap_hwmod *oh); static void _write_sysconfig(u32 v, struct omap_hwmod *oh); static int _set_master_standbymode(struct omap_hwmod *oh, u8 standbymode, u32 *v); static int _set_slave_idlemode(struct omap_hwmod *oh, u8 idlemode, u32 *v); static int _set_clockactivity(struct omap_hwmod *oh, u8 clockact, u32 *v); static int _set_softreset(struct omap_hwmod *oh, u32 *v); static int _set_module_autoidle(struct omap_hwmod *oh, u8 autoidle, u32 *v); static int _enable_wakeup(struct omap_hwmod *oh, u32 *v); static int _disable_wakeup(struct omap_hwmod *oh, u32 *v); static int _add_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh); static int _del_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh); static int _init_main_clk(struct omap_hwmod *oh); static int _init_interface_clks(struct omap_hwmod *oh); static int _init_opt_clks(struct omap_hwmod *oh); static int _enable_clocks(struct omap_hwmod *oh); static int _disable_clocks(struct omap_hwmod *oh); static void _enable_optional_clocks(struct omap_hwmod *oh); static void _disable_optional_clocks(struct omap_hwmod *oh); static int __init _find_mpu_port_index(struct omap_hwmod *oh); static void __iomem * __init _find_mpu_rt_base(struct omap_hwmod *oh, u8 index); static void _enable_sysc(struct omap_hwmod *oh); static void _idle_sysc(struct omap_hwmod *oh); static void _shutdown_sysc(struct omap_hwmod *oh); static struct omap_hwmod *_lookup(const char *name); static int _init_clocks(struct omap_hwmod *oh, void *data); static int _wait_target_ready(struct omap_hwmod *oh); static u8 _lookup_hardreset(struct omap_hwmod *oh, const char *name, struct omap_hwmod_rst_info *ohri); static int _assert_hardreset(struct omap_hwmod *oh, const char *name); static int _deassert_hardreset(struct omap_hwmod *oh, const char *name); static int _read_hardreset(struct omap_hwmod *oh, const char *name); static int _ocp_softreset(struct omap_hwmod *oh); static int _reset(struct omap_hwmod *oh); static int _enable(struct omap_hwmod *oh); static int _idle(struct omap_hwmod *oh); int omap_hwmod_set_ocp_autoidle(struct omap_hwmod *oh, u8 autoidle); static int _shutdown(struct omap_hwmod *oh); static int _setup(struct omap_hwmod *oh, void *data); static int __init _register(struct omap_hwmod *oh); u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs); void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs); int omap_hwmod_softreset(struct omap_hwmod *oh); int omap_hwmod_set_slave_idlemode(struct omap_hwmod *oh, u8 idlemode); struct omap_hwmod *omap_hwmod_lookup(const char *name); int omap_hwmod_for_each(int (*fn); int __init omap_hwmod_register(struct omap_hwmod **ohs); static int __init _populate_mpu_rt_base(struct omap_hwmod *oh, void *data); int __init omap_hwmod_setup_one(const char *oh_name); static int __init omap_hwmod_setup_all(void); static int omap_hwmod_set_ioring_wakeup(struct omap_hwmod *oh, bool set_wake); static bool omap_hwmod_get_ioring_wakeup_status(struct omap_hwmod *oh); int omap_hwmod_enable(struct omap_hwmod *oh); int omap_hwmod_idle(struct omap_hwmod *oh); int omap_hwmod_shutdown(struct omap_hwmod *oh); int omap_hwmod_enable_clocks(struct omap_hwmod *oh); int omap_hwmod_disable_clocks(struct omap_hwmod *oh); void omap_hwmod_ocp_barrier(struct omap_hwmod *oh); int omap_hwmod_reset(struct omap_hwmod *oh); int omap_hwmod_count_resources(struct omap_hwmod *oh); int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res); struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh); void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh); int omap_hwmod_add_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh); int omap_hwmod_del_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh); int omap_hwmod_enable_ioring_wakeup(struct omap_hwmod *oh); int omap_hwmod_disable_ioring_wakeup(struct omap_hwmod *oh); int omap_hwmod_enable_wakeup(struct omap_hwmod *oh); int omap_hwmod_assert_hardreset(struct omap_hwmod *oh, const char *name); int omap_hwmod_deassert_hardreset(struct omap_hwmod *oh, const char *name); int omap_hwmod_read_hardreset(struct omap_hwmod *oh, const char *name); int omap_hwmod_for_each_by_class(const char *classname, int (*fn); int omap_hwmod_set_postsetup_state(struct omap_hwmod *oh, u8 state); int omap_hwmod_get_context_loss_count(struct omap_hwmod *oh); int omap_hwmod_no_setup_reset(struct omap_hwmod *oh); int omap_hwmod_pad_get_wakeup_status(struct omap_hwmod *oh); bool omap_hwmod_pad_is_ioring_enabled(struct omap_hwmod *oh); struct device *omap_hwmod_name_get_dev(const char *oh_name);
b60090da6f01cd5737e5df62cb3a7a888668a0302d37f26bd6ccb67fefa0681a
398
SAOImageDS9
SAOImageDS9
ast/src/selectormap.c
Delete
static void Delete( AstObject *obj, int *status ) { AstSelectorMap *this; int i; this = (AstSelectorMap *) obj; for( i = 0; i < this->nreg; i++ ) { this->reg[ i ] = astAnnul( this->reg[ i ] ); } this->reg = astFree( this->reg ); this->nreg = 0; }
static int Equal( AstObject *this_object, AstObject *that_object, int *status ); static size_t GetObjSize( AstObject *this_object, int *status ); void astInitSelectorMapVtab_( AstSelectorMapVtab *vtab, const char *name, int *status ); static void Copy( const AstObject *objin, AstObject *objout, int *status ); static void Dump( AstObject *this_object, AstChannel *channel, int *status ); astMAKE_CHECK(SelectorMap);
65e3b02b3d03e60b5fe3151740a9d7565960753561809e2ba176f5c0b9d7cf76
303
ntfreak
openocd
src/target/riscv/riscv-013.c
dmi_read
static int dmi_read(struct target *target, uint32_t *value, uint32_t address) { return dmi_op(target, value, NULL, DMI_OP_READ, address, 0, false, true); }
static riscv013_info_t *get_info(const struct target *target); dm013_info_t *get_dm(struct target *target); static uint32_t set_hartsel(uint32_t initial, uint32_t index); static void decode_dmi(char *text, unsigned address, unsigned data); static void dump_field(int idle, const struct scan_field *field); static void select_dmi(struct target *target); static uint32_t dtmcontrol_scan(struct target *target, uint32_t out); static void increase_dmi_busy_delay(struct target *target); static int dmi_read_exec(struct target *target, uint32_t *value, uint32_t address); static int dmi_write(struct target *target, uint32_t address, uint32_t value); static void increase_ac_busy_delay(struct target *target); uint32_t abstract_register_size(unsigned width); static int wait_for_idle(struct target *target, uint32_t *abstractcs); static int execute_abstract_command(struct target *target, uint32_t command); static uint32_t abstract_memory_size(unsigned width); static int examine_progbuf(struct target *target); static int is_fpu_reg(uint32_t gdb_regno); static int is_vector_reg(uint32_t gdb_regno); static unsigned register_size(struct target *target, unsigned number); static bool has_sufficient_progbuf(struct target *target, unsigned size); static int register_read(struct target *target, uint64_t *value, uint32_t number); static int register_read_direct(struct target *target, uint64_t *value, uint32_t number); int wait_for_authbusy(struct target *target, uint32_t *dmstatus); static void deinit_target(struct target *target); static int set_haltgroup(struct target *target, bool *supported); static int discover_vlenb(struct target *target, int hartid); static int examine(struct target *target); int riscv013_authdata_read(struct target *target, uint32_t *value); int riscv013_authdata_write(struct target *target, uint32_t value); static int riscv013_hart_count(struct target *target); static unsigned riscv013_data_bits(struct target *target); static int assert_reset(struct target *target); static int deassert_reset(struct target *target); static int execute_fence(struct target *target); static uint32_t sb_sbaccess(unsigned size_bytes); static target_addr_t sb_read_address(struct target *target); static int sb_write_address(struct target *target, target_addr_t address); static int read_sbcs_nonbusy(struct target *target, uint32_t *sbcs); static int modify_privilege(struct target *target, uint64_t *mstatus, uint64_t *mstatus_old); static int batch_run(const struct target *target, struct riscv_batch *batch); static int arch_state(struct target *target); static int riscv013_set_register(struct target *target, int hid, int rid, uint64_t value); static int riscv013_select_current_hart(struct target *target); static int select_prepped_harts(struct target *target, bool *use_hasel); static int riscv013_halt_prep(struct target *target); static int riscv013_halt_go(struct target *target); static int riscv013_resume_go(struct target *target); static int riscv013_step_current_hart(struct target *target); static int riscv013_resume_prep(struct target *target); static int riscv013_on_step(struct target *target); static int riscv013_on_halt(struct target *target); static bool riscv013_is_halted(struct target *target); static enum riscv_halt_reason riscv013_halt_reason(struct target *target); int riscv013_write_debug_buffer(struct target *target, unsigned index, riscv_insn_t data); riscv_insn_t riscv013_read_debug_buffer(struct target *target, unsigned index); int riscv013_execute_debug_buffer(struct target *target); void riscv013_fill_dmi_write_u64(struct target *target, char *buf, int a, uint64_t d); void riscv013_fill_dmi_read_u64(struct target *target, char *buf, int a); void riscv013_fill_dmi_nop_u64(struct target *target, char *buf); static int get_max_sbaccess(struct target *target); static uint32_t get_num_sbdata_regs(struct target *target); int riscv013_dmi_write_u64_bits(struct target *target); static int maybe_execute_fence_i(struct target *target); static int riscv013_on_step_or_resume(struct target *target, bool step); void riscv013_clear_abstract_error(struct target *target); int riscv013_test_compliance(struct target *target);
a27314d950d52cef581f6a6b4a34ebb344f339d18eb4c40837ca405dbcf8bf4b
157
osvx
pmacct
src/sql_handlers.c
count_dst_host_country_handler
void count_dst_host_country_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where) { snprintf(*ptr_where, SPACELEFT(where_clause), where[num].string, GeoIP_code_by_id(cache_elem->primitives.dst_ip_country)); snprintf(*ptr_values, SPACELEFT(values_clause), values[num].string, GeoIP_code_by_id(cache_elem->primitives.dst_ip_country)); *ptr_where += strlen(*ptr_where); *ptr_values += strlen(*ptr_values); }
void count_src_mac_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_dst_mac_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_vlan_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_cos_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_etype_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_src_host_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_src_as_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_dst_host_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_dst_as_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_in_iface_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_out_iface_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_src_nmask_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_dst_nmask_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_src_host_country_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_sampling_rate_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_pkt_len_distrib_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_post_nat_src_ip_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_post_nat_dst_ip_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_post_nat_src_port_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_post_nat_dst_port_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_nat_event_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void PG_copy_count_timestamp_start_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_timestamp_start_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_timestamp_start_residual_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void PG_copy_count_timestamp_end_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_timestamp_end_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_timestamp_end_residual_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_std_comm_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_ext_comm_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_as_path_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_src_std_comm_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_src_ext_comm_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_src_as_path_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_local_pref_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_src_local_pref_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_med_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_src_med_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_mpls_vpn_rd_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_peer_src_as_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_peer_dst_as_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_peer_src_ip_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_peer_dst_ip_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_src_port_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_dst_port_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_tcpflags_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_ip_tos_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void MY_count_ip_proto_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void PG_count_ip_proto_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_copy_timestamp_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_timestamp_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_id_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_id2_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_class_id_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void count_counters_setclause_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_set, char **ptr_none); void count_flows_setclause_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_set, char **ptr_none); void count_tcpflags_setclause_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_set, char **ptr_none); void count_noop_setclause_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_set, char **ptr_none); void count_noop_setclause_event_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_set, char **ptr_none); void fake_mac_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void fake_host_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void fake_as_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void fake_comms_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where); void fake_as_path_handler(const struct db_cache *cache_elem, const struct insert_data *idata, int num, char **ptr_values, char **ptr_where);
ffc048aae33cee4d6345299ad92cf6ea7b8e813f3c798f1aeb97c9a84934a252
481
MattDevo
coreboot
src/lib/ramtest.c
write_phys
static void write_phys(unsigned long addr, u32 value) { #if IS_ENABLED(CONFIG_SSE2) asm volatile( "movnti %1, (%0)" : : "r" (addr), "r" (value) #ifndef __GNUC__ : #endif ); #else volatile unsigned long *ptr; ptr = (void *)addr; *ptr = value; #endif }
static u32 read_phys(unsigned long addr); static void phys_memory_barrier(void); static int ram_bitset_nodie(unsigned long start); void ram_check(unsigned long start, unsigned long stop); int ram_check_nodie(unsigned long start, unsigned long stop); int ram_check_noprint_nodie(unsigned long start, unsigned long stop); static void __quick_ram_check(uintptr_t dst); void quick_ram_check(void);
9274c8ad3d6e8441fb8ffcfe3a88c40e2452b5ff220c650461faf754bd86c1bc
279
emacs-mirror
emacs
src/keyboard.c
AVOID user_error
static AVOID user_error (const char *msg) { xsignal1 (Quser_error, build_string (msg)); }
FOR_EACH_TAIL_SAFE (event_desc); void init_raw_keybuf_count (void);
fd4814738aed49f5b526ff201f355606604527540ab92b8391da090ad53dd156
92
Angor00
linux-aura-hd-android-2.6.35.3
drivers/mxc/pmic/mc13892/pmic_adc.c
pmic_adc_convert_8x
PMIC_STATUS pmic_adc_convert_8x(t_channel channel, unsigned short *result) { t_adc_param adc_param; int i; PMIC_STATUS ret; if (suspend_flag == 1) return -EBUSY; channel = channel_num[channel]; if (channel == -1) { pr_debug("Wrong channel ID\n"); return PMIC_PARAMETER_ERROR; } mc13892_adc_init_param(&adc_param); pr_debug("pmic_adc_convert_8x\n"); adc_param.read_ts = false; adc_param.single_channel = true; adc_param.read_mode = mc13892_set_read_mode(channel); if (channel <= 7) { adc_param.channel_0 = channel; adc_param.channel_1 = channel; } else return PMIC_PARAMETER_ERROR; ret = mc13892_adc_convert(&adc_param); for (i = 0; i <= 7; i++) result[i] = adc_param.value[i]; return ret; }
int is_pmic_adc_ready(); static int pmic_adc_suspend(struct platform_device *pdev, pm_message_t state); static int pmic_adc_resume(struct platform_device *pdev); static void callback_tsi(void *unused); static void callback_adcdone(void *unused); static void callback_adcbisdone(void *unused); static int pmic_adc_filter(t_touch_screen *ts_curr); int pmic_adc_init(void); PMIC_STATUS pmic_adc_deinit(void); int mc13892_adc_init_param(t_adc_param *adc_param); PMIC_STATUS mc13892_adc_convert(t_adc_param *adc_param); t_reading_mode mc13892_set_read_mode(t_channel channel); PMIC_STATUS pmic_adc_convert(t_channel channel, unsigned short *result); PMIC_STATUS pmic_adc_set_touch_mode(t_touch_mode touch_mode); PMIC_STATUS pmic_adc_get_touch_mode(t_touch_mode *touch_mode); PMIC_STATUS pmic_adc_get_touch_sample(t_touch_screen *touch_sample, int wait); PMIC_STATUS mc13892_adc_read_ts(t_touch_screen *ts_value, int wait_tsi); int mc13892_adc_request(bool read_ts); int mc13892_adc_release(int adc_index); static int cmd(unsigned int index, int value); static int pmic_adc_module_probe(struct platform_device *pdev); static int pmic_adc_module_remove(struct platform_device *pdev); static int __init pmic_adc_module_init(void); static void __exit pmic_adc_module_exit(void);
52c7e99c643d98a68e9d7c2a380d8735afd0bb755baf47b0dc8cc45810012e4c
727
ArcticVanguard
navalcombat
navalcombat.c
int genrand
int genrand(int a) { int r = rand(); return r % a; }
float calcforce(float m, float a); void main();
4756f4c4307480b1f10b630917b716946396c53fcb3e1f6df0be9c47d1f3d90a
55
Sidnioulz
Planner
libplanner/mrp-task.c
* mrp_task_set_unit_ivals
GList * mrp_task_set_unit_ivals (MrpTask *task, GList *ivals) { g_return_val_if_fail (MRP_IS_TASK (task), 0); if (task->priv->unit_ivals) { g_list_foreach (task->priv->unit_ivals, (GFunc) g_free, NULL); g_list_free (task->priv->unit_ivals); task->priv->unit_ivals = NULL; } task->priv->unit_ivals = ivals; return task->priv->unit_ivals; }
void mrp_task_set_name (MrpTask *task, const gchar *name); gint mrp_task_get_nres (MrpTask *task);
6bc7a3335a6b4e41df9e2bd4ba157bb9ef8b8ee0ea0ccd3b5c0ee9795af04ab7
352
muggenhor
GNUnet
src/gns/plugin_block_gns.c
* libgnunet_plugin_block_gns_done
void * libgnunet_plugin_block_gns_done (void *cls) { struct GNUNET_TRANSPORT_PluginFunctions *api = cls; GNUNET_free (api); return NULL; }
2eaa960d46cb5b0d18401692cfa1f1d62d8a8efaa50a9ecdd6c76736261542f0
146
hyller
CodeLibrary
ZigBee/Z-Stack 3.0.0/Components/stack/zcl/zcl_green_power.c
gp_CreateNotificationMsgList
void gp_CreateNotificationMsgList( gpNotificationMsg_t **pHead ) { if ( *pHead == NULL ) { *pHead = ( gpNotificationMsg_t* )osal_mem_alloc( sizeof( gpNotificationMsg_t ) ); if ( *pHead != NULL ) { (*pHead)->pNext = NULL; } } return; }
ZStatus_t zclGp_RegisterCmdCallbacks( uint8 endpoint, zclGp_AppCallbacks_t *callbacks ); static zclGp_AppCallbacks_t *zclGp_FindCallbacks( uint8 endpoint ); static ZStatus_t zclGp_HdlIncoming( zclIncoming_t *pInMsg ); static ZStatus_t zclGp_HdlInSpecificCommands( zclIncoming_t *pInMsg ); ZStatus_t zclGp_SendGpNotificationCommand( gpNotificationCmd_t *pCmd ); ZStatus_t zclGp_SendGpCommissioningNotificationCommand( gpCommissioningNotificationCmd_t *pCmd ); static uint8 gp_addPairedSinksToMsgQueue( uint8 appId, uint8 *pId, gpCmdPayloadMsg_t* pMsg ); void gp_CreateCmdPayloadMsgList( gpCmdPayloadMsg_t **pHead ); gpNotificationMsg_t* gp_AddNotificationMsgNode( gpNotificationMsg_t **pHead, gpCmdPayloadMsg_t *pMsg ); gpCmdPayloadMsg_t* gp_AddCmdPayloadMsgNode( gpCmdPayloadMsg_t **pHead, uint8* pBuf, uint8 len ); gpNotificationMsg_t* gp_GetHeadNotificationMsg(void); gpNotificationMsg_t** gp_GetPHeadNotification(void); gpCmdPayloadMsg_t* gp_GetHeadCmdPayloadMsg(void); gpCmdPayloadMsg_t** gp_GetPHeadCmdPayload(void); void gp_NotificationMsgClean( gpNotificationMsg_t **pHead ); void gp_CmdPayloadMsgClean( gpCmdPayloadMsg_t **pHead );
2c24d58efbfdb8c47f6250c1de31c3950019322378571a3c6a01b1e2f46f12c0
288
371816210
kk44
drivers/usb/dwc_otg/usbdev_rk3026.c
usbdev_init_devices
static int __init usbdev_init_devices(void) { int ret = 0; #ifdef CONFIG_USB20_OTG ret = platform_device_register(&device_usb20_otg); if(ret < 0){ printk("%s: platform_device_register(usb20_otg) failed\n", __func__); return ret; } #endif #ifdef CONFIG_USB20_HOST ret = platform_device_register(&device_usb20_host); #endif return ret; }
int dwc_otg_check_dpdm(void); void usb20otg_hw_init(void); void usb20otg_phy_suspend(void* pdata, int suspend); void usb20otg_soft_reset(void); void usb20otg_clock_init(void* pdata); void usb20otg_clock_enable(void* pdata, int enable); int usb20otg_get_status(int id); void dwc_otg_uart_mode(void* pdata, int enter_usb_uart_mode); void usb20otg_power_enable(int enable); void usb20host_hw_init(void); void usb20host_phy_suspend(void* pdata, int suspend); void usb20host_soft_reset(void); void usb20host_clock_init(void* pdata); void usb20host_clock_enable(void* pdata, int enable); int usb20host_get_status(int id); void usb20host_power_enable(int enable); inline void do_wakeup(void); static irqreturn_t bvalid_irq_handler(int irq, void *dev_id); static irqreturn_t id_irq_handler(int irq, void *dev_id); static irqreturn_t line_irq_handler(int irq, void *dev_id); static int __init otg_irq_detect_init(void);
7efcd89401016d47fadfc2b862de1be382ac9efe436a73a5cef46b4e3e142ecd
402
ORNL-TechInt
lustre
lustre/utils/loadgen.c
loadgen_start_echosrv
static int loadgen_start_echosrv(int argc, char **argv) { char *args[5]; int rc; pthread_mutex_lock(&m_config); args[0] = cmdname; args[1] = "obdecho"; args[2] = args[3] = ecsname; rc = jt_lcfg_attach(4, args); if (rc) { fprintf(stderr, "%s: can't attach echo server (%d)\n", cmdname, rc); goto clean; } my_ecs = 1; rc = jt_lcfg_setup(1, args); if (rc) { fprintf(stderr, "%s: can't setup echo server (%d)\n", cmdname, rc); goto clean; } args[1] = "ost"; args[2] = args[3] = "OSS"; rc = jt_lcfg_attach(4, args); if (rc == EEXIST) { printf("OSS already set up, no problem.\n"); pthread_mutex_unlock(&m_config); return 0; } if (rc) { fprintf(stderr, "%s: can't attach OSS (%d)\n", cmdname, rc); goto clean; } my_oss = 1; rc = jt_lcfg_setup(1, args); if (rc) { fprintf(stderr, "%s: can't setup OSS (%d)\n", cmdname, rc); goto clean; } pthread_mutex_unlock(&m_config); return rc; clean: pthread_mutex_unlock(&m_config); loadgen_stop_echosrv(9, argv); return rc; }
static int jt_quit(int argc, char **argv); static int loadgen_usage(int argc, char **argv); static struct kid_t *push_kid(int tnum); static void trigger(int command, int threads, int repeat, int delay); static __inline__ void stop_all(int unused); static void kill_kids(void); static void sig_master(int unused); static int wait_for_threads(); static int write_proc(char *proc_path, char *value); static int read_proc(char *proc_path, unsigned long long *value); static int grant_estimate(int thread); static int cleanup(char *obdname, int quiet); static int echocli_setup(char *oname, char *ename, int *dev); static int obj_ioctl(int cmd, struct obd_ioctl_data *data, int unpack); static int obj_create(struct kid_t *kid); static int obj_delete(struct kid_t *kid); static int obj_write(struct kid_t *kid); static int do_work(struct kid_t *kid); static void report_perf(); static void *run_one_child(void *threadvp); static int loadgen_start_clients(int argc, char **argv); static int loadgen_target(int argc, char **argv); static int loadgen_verbose(int argc, char **argv); static int loadgen_write(int argc, char **argv); static int loadgen_stop_echosrv(int argc, char **argv); static int loadgen_wait(int argc, char **argv); static int loadgen_init(int argc, char **argv); static int loadgen_exit(); static int loadgen_main(int argc, char **argv); int main (int argc, char **argv);
4816a1fbe94f9168fb55947bad703d633bb4e2e0721fe9d731822b40e58adffa
1,558
alan-mushi
connman-json-client
engine.c
react_to_sig_technology
static void react_to_sig_technology(struct json_object *interface, struct json_object *path, struct json_object *data, const char *sig_name) { char tech_dbus_name[256]; struct json_object *tech, *tech_dict, *val; const char *key; snprintf(tech_dbus_name, 256, "/net/connman/technology/%s", json_object_get_string(path)); tech_dbus_name[255] = '\0'; tech = search_technology_or_service(technologies, tech_dbus_name); if (!tech) return; key = json_object_get_string(json_object_array_get_idx(data, 0)); val = json_object_array_get_idx(data, 1); tech_dict = json_object_array_get_idx(tech, 1); if (tech_dict && json_object_object_get_ex(tech_dict, key, NULL)) { json_object_object_del(tech_dict, key); json_object_object_add(tech_dict, key, json_object_get(val)); } }
static void engine_commands_cb(struct json_object *data, json_bool is_error); static void engine_agent_cb(struct json_object *data, struct agent_data *request); static void engine_agent_error_cb(struct json_object *data); static int agent_response(struct json_object *data); static int agent_error_response(struct json_object *data); static struct json_object* get_technology(const char *dbus_name); static bool has_technology(const char *dbus_name); static struct json_object* get_service(const char *dbus_name); static bool has_service(const char *dbus_name); static int init_get_state(void); static int init_get_technologies(void); static int init_get_services(void); static int get_state(struct json_object *jobj); static int get_services(struct json_object *jobj); static int get_technologies(struct json_object *jobj); static int get_home_page(struct json_object *jobj); static int get_services_from_tech(struct json_object *jobj); static int connect_to_service(struct json_object *jobj); static int disconnect_technology(struct json_object *jobj); static int scan_technology(struct json_object *jobj); static int config_service(struct json_object *jobj); static int toggle_power_technology(struct json_object *jobj); static int toggle_offline_mode(struct json_object *jobj); static int remove_service(struct json_object *jobj); static int engine_get_service(struct json_object *jobj); static void init_cmd_table(void); static int command_exist(const char *cmd); static bool command_data_is_clean(struct json_object *jobj, int cmd_pos); static void engine_commands_sig(struct json_object *jobj); int engine_query(struct json_object *jobj); int engine_init(void); void engine_terminate(void);
5bb1c09b02bb22932889c7677ac7a051c7c2a7eff4c5ddf1e543b3063cd7eb79
793
vipshop
redis-migrate-tool
src/rmt_redis.c
*sendReplSyncCommand
static char *sendReplSyncCommand(int flags, redis_node *srnode, ...) { tcp_context *tc = srnode->tc; redis_repl *rr = srnode->rr; thread_data *rdata = srnode->read_data; if (flags & SYNC_CMD_WRITE) { char *arg; va_list ap; sds cmd = sdsempty(); va_start(ap,srnode); while(1) { arg = va_arg(ap, char*); if (arg == NULL) break; if (sdslen(cmd) != 0) cmd = sdscatlen(cmd," ",1); cmd = sdscat(cmd,arg); } cmd = sdscatlen(cmd,"\r\n",2); if (rmt_sync_write(tc->sd,cmd,sdslen(cmd),1000) == -1) { sdsfree(cmd); return sdscatprintf(sdsempty(),"-Writing to master: %s", strerror(errno)); } sdsfree(cmd); va_end(ap); } if (flags & SYNC_CMD_READ) { ssize_t nread; char buf[256]; nread = rmt_sync_readline(tc->sd,buf,sizeof(buf),1000); if (nread == -1) { return sdscatprintf(sdsempty(),"-Reading from master: %s", strerror(errno)); } rr->repl_lastio = rdata->unixtime; return sdsnew(buf); } return NULL; }
int redis_replication_init(redis_repl *rr); void redis_replication_deinit(redis_repl *rr); int redis_node_init(redis_node *rnode, const char *addr, redis_group *rgroup); void redis_node_deinit(redis_node *rnode); void redis_group_deinit(redis_group *rgroup); int redis_rdb_init(redis_rdb *rdb, const char *addr, int type); void redis_rdb_deinit(redis_rdb *rdb); char *rmt_send_sync_cmd_read_line(int fd, ...); static int rmt_redis_send_cmd(int fd, ...); static int redisRplicationReset(redis_node *srnode); static int rmtSlaveIsInHandshakeState(redis_node *srnode); static int rmtTryPartialResynchronization(redis_node *srnode, int read_reply); static void rmtRedisSlaveReadQueryFromMaster(aeEventLoop *el, int fd, void *privdata, int mask); static void rmtRedisRdbDataPost(redis_node *srnode); static int rmtRedisSlavePrepareOnline(redis_node *srnode); void rmtRedisSlaveOffline(redis_node *srnode); static int rmtRedisSlaveAgainOnline(redis_node *srnode); void rmtReceiveRdbAbort(redis_node *srnode); static void rmtReceiveRdb(aeEventLoop *el, int fd, void *privdata, int mask); static void rmtSyncRedisMaster(aeEventLoop *el, int fd, void *privdata, int mask); int rmtConnectRedisMaster(redis_node *srnode); void redisSlaveReplCorn(redis_node *srnode); int redis_response_check(redis_node *rnode, struct msg *r); static int redis_copy_bulk(struct msg *dst, struct msg *src); void redis_pre_coalesce(struct msg *r); static int redis_append_key(struct msg *r, uint8_t *key, uint32_t keylen); int redis_append_bulk(struct msg *r, uint8_t *str, uint32_t str_len); static void redis_erase_one_head_bulk(struct msg *msg); int redis_reply(struct msg *r); static void redis_post_coalesce_mset(struct msg *request); static void redis_post_coalesce_del(struct msg *request); static void redis_post_coalesce_mget(struct msg *request); void redis_post_coalesce(struct msg *r); sds redis_msg_response_get_bulk_string(struct msg *msg); int redis_msg_append_multi_bulk_len_full(struct msg *msg, uint32_t integer); int redis_msg_append_bulk_full(struct msg *msg, const char *str, uint32_t len); int redis_msg_append_command_full(struct msg * msg, ...); int redis_msg_append_command_full_safe(struct msg * msg, struct array *args); struct array *redis_value_create(uint32_t nelem); void redis_value_destroy(struct array *value); static int redis_rdb_file_read(redis_rdb *rdb, void *buf, size_t len); static uint32_t redis_rdb_file_load_len(redis_rdb *rdb, int *isencoded); static long long redis_rdb_file_load_int(redis_rdb *rdb, int enctype); static sds redis_rdb_file_load_double_str(redis_rdb *rdb); static sds redis_rdb_file_load_lzf_str(redis_rdb *rdb); static sds redis_rdb_file_load_str(redis_rdb *rdb); static struct array *redis_rdb_file_load_value(redis_rdb *rdb, int rdbtype); static int redis_object_type_get_by_rdbtype(int dbtype); void redis_delete_rdb_file(redis_rdb *rdb, int always); int redis_parse_rdb_file(redis_node *srnode, int mbuf_count_one_time); int redis_parse_rdb_time(aeEventLoop *el, long long id, void *privdata); void redis_parse_rdb(aeEventLoop *el, int fd, void *privdata, int mask); int redis_load_aof_file(redis_node *srnode, char *aof_file); static unsigned int clusterKeyHashSlot(char *key, int keylen); static void cluster_nodes_swap_tc(dict *nodes_f, dict *nodes_t); static ssize_t rmt_redis_sync_read_string(int fd, char *ptr, long long timeout); static int cluster_update_route(redis_group *rgroup); int redis_cluster_init_from_addrs(redis_group *rgroup, const char *addrs); int redis_cluster_init_from_conf(redis_group *rgroup, conf_pool *cp); int redis_rdb_file_init_from_conf(redis_group *rgroup, conf_pool *cp); int redis_aof_file_init_from_conf(redis_group *rgroup, conf_pool *cp);
2d4b52dc5392f4aaec4a4dffcee12f4ed95d94ca7aebf645fd8573655f0922ba
1,245
thenickreynolds
pebblesnake
snake.c
pbl_main
void pbl_main(void *params) { PebbleAppHandlers handlers = { .init_handler = &handle_init, .timer_handler = &handle_timer }; app_event_loop(params, &handlers); }
void draw_rect(GContext *ctx, GPoint topLeft, unsigned short width, unsigned short height); GPoint get_point_from_position(Position *pos); void draw_fruit(GContext *ctx); void draw_snake(GContext *ctx); void draw_border(GContext *ctx); void draw(GContext *ctx); unsigned short random(); void gen_fruit_position(); void copy_position(unsigned short to, unsigned short from); unsigned short is_same_position(Position *a, Position *b); unsigned short is_out_of_bounds(Position *pos); unsigned short is_game_over(); void tick_game(); void init_snake(); void schedule_timer(AppContextRef ctx); void reset_game(); void init_game(AppContextRef ctx); void update_snake_callback(Layer *me, GContext *ctx); void handle_timer(AppContextRef ctx, AppTimerHandle handle, uint32_t cookie); void change_snake_direction(short direction); void handle_up_button_press(ClickRecognizerRef recognizer, Window *window); void handle_down_button_press(ClickRecognizerRef recognizer, Window *window); void handle_select_button_press(ClickRecognizerRef recognizer, Window *window); void click_config_provider(ClickConfig **config, Window *window); void handle_init(AppContextRef ctx);
0f5a1a2d32f213b77bae2d4fbfa51698361322de3a4ac49a8134a3360738971e
176
Rover-Yu
ali_kernel
drivers/ata/ahci.c
*ahci_port_base
static inline void __iomem *ahci_port_base(struct ata_port *ap) { return __ahci_port_base(ap->host, ap->port_no); }
static void ahci_enable_ahci(void __iomem *mmio); static void ahci_restore_initial_config(struct ata_host *host); static unsigned ahci_scr_offset(struct ata_port *ap, unsigned int sc_reg); static int ahci_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val); static int ahci_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val); static int ahci_stop_engine(struct ata_port *ap); static void ahci_start_engine(struct ata_port *ap); static void ahci_start_fis_rx(struct ata_port *ap); static int ahci_stop_fis_rx(struct ata_port *ap); static void ahci_power_up(struct ata_port *ap); static void ahci_disable_alpm(struct ata_port *ap); static void ahci_power_down(struct ata_port *ap); static void ahci_start_port(struct ata_port *ap); static int ahci_deinit_port(struct ata_port *ap, const char **emsg); static int ahci_reset_controller(struct ata_host *host); static void ahci_sw_activity(struct ata_link *link); static void ahci_sw_activity_blink(unsigned long arg); static void ahci_init_sw_activity(struct ata_link *link); static int ahci_reset_em(struct ata_host *host); static ssize_t ahci_led_show(struct ata_port *ap, char *buf); static ssize_t ahci_activity_store(struct ata_device *dev, enum sw_activity val); static ssize_t ahci_activity_show(struct ata_device *dev, char *buf); static void ahci_init_controller(struct ata_host *host); static void ahci_dev_config(struct ata_device *dev); static unsigned int ahci_dev_classify(struct ata_port *ap); static int ahci_kick_engine(struct ata_port *ap); static int ahci_check_ready(struct ata_link *link); static int ahci_sb600_check_ready(struct ata_link *link); static void ahci_postreset(struct ata_link *link, unsigned int *class); static unsigned int ahci_fill_sg(struct ata_queued_cmd *qc, void *cmd_tbl); static int ahci_pmp_qc_defer(struct ata_queued_cmd *qc); static void ahci_qc_prep(struct ata_queued_cmd *qc); static void ahci_fbs_dec_intr(struct ata_port *ap); static void ahci_error_intr(struct ata_port *ap, u32 irq_stat); static void ahci_port_intr(struct ata_port *ap); static irqreturn_t ahci_interrupt(int irq, void *dev_instance); static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc); static bool ahci_qc_fill_rtf(struct ata_queued_cmd *qc); static void ahci_freeze(struct ata_port *ap); static void ahci_thaw(struct ata_port *ap); static void ahci_error_handler(struct ata_port *ap); static void ahci_post_internal_cmd(struct ata_queued_cmd *qc); static void ahci_enable_fbs(struct ata_port *ap); static void ahci_disable_fbs(struct ata_port *ap); static void ahci_pmp_attach(struct ata_port *ap); static void ahci_pmp_detach(struct ata_port *ap); static int ahci_port_resume(struct ata_port *ap); static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg); static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); static int ahci_pci_device_resume(struct pci_dev *pdev); static int ahci_port_start(struct ata_port *ap); static void ahci_port_stop(struct ata_port *ap); static int ahci_configure_dma_masks(struct pci_dev *pdev, int using_dac); static void ahci_print_info(struct ata_host *host); static void ahci_p5wdh_workaround(struct ata_host *host); static bool ahci_sb600_enable_64bit(struct pci_dev *pdev); static bool ahci_broken_system_poweroff(struct pci_dev *pdev); static bool ahci_broken_suspend(struct pci_dev *pdev); static bool ahci_broken_online(struct pci_dev *pdev); static void ahci_gtf_filter_workaround(struct ata_host *host); static inline void ahci_gtf_filter_workaround(struct ata_host *host); static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); static int __init ahci_init(void); static void __exit ahci_exit(void);
120e50f2711a957be8cfa7e2d8a0ef2f223b7b3f3f03901cbbd13d4648be2646
117
Mustaavalkosta
toolchain_gcc-4.8
gcc/config/sh/sh.c
rtx gen_block_redirect
static rtx gen_block_redirect (rtx jump, int addr, int need_block) { int dead = 0; rtx prev = prev_nonnote_insn (jump); rtx dest; if (prev && NONJUMP_INSN_P (prev) && ! INSN_DELETED_P (prev)) { if (INSN_CODE (prev) == CODE_FOR_indirect_jump_scratch) return prev; if (GET_CODE (PATTERN (prev)) == USE || GET_CODE (PATTERN (prev)) == CLOBBER || get_attr_in_delay_slot (prev) == IN_DELAY_SLOT_YES) prev = jump; else if ((need_block &= ~1) < 0) return prev; else if (recog_memoized (prev) == CODE_FOR_block_branch_redirect) need_block = 0; } if (GET_CODE (PATTERN (jump)) == RETURN) { if (! need_block) return prev; return emit_insn_before (gen_block_branch_redirect (const0_rtx) , jump); } dest = XEXP (SET_SRC (PATTERN (jump)), 0); if (optimize && (INSN_ADDRESSES (INSN_UID (dest)) - addr + (unsigned) 4092 > 4092 + 4098)) { rtx scan; unsigned attempt = 0x7fff, used; int jump_left = flag_expensive_optimizations + 1; for (scan = jump; (scan = PREV_INSN (scan)); ) { enum rtx_code code; if (INSN_DELETED_P (scan)) continue; code = GET_CODE (scan); if (code == CODE_LABEL || code == JUMP_INSN) break; if (code == INSN && GET_CODE (PATTERN (scan)) != USE && GET_CODE (PATTERN (scan)) != CLOBBER && get_attr_in_delay_slot (scan) == IN_DELAY_SLOT_YES) { attempt &= ~regs_used (PATTERN (scan), 0); break; } } for (used = dead = 0, scan = JUMP_LABEL (jump); (scan = NEXT_INSN (scan)); ) { enum rtx_code code; if (INSN_DELETED_P (scan)) continue; code = GET_CODE (scan); if (INSN_P (scan)) { used |= regs_used (PATTERN (scan), 0); if (code == CALL_INSN) used |= regs_used (CALL_INSN_FUNCTION_USAGE (scan), 0); dead |= (used >> 16) & ~used; if (dead & attempt) { dead &= attempt; break; } if (code == JUMP_INSN) { if (jump_left-- && simplejump_p (scan)) scan = JUMP_LABEL (scan); else break; } } } dead &= 0x7fff; } else if (optimize && need_block >= 0) { rtx next = next_active_insn (next_active_insn (dest)); if (next && JUMP_P (next) && GET_CODE (PATTERN (next)) == SET && recog_memoized (next) == CODE_FOR_jump_compact) { dest = JUMP_LABEL (next); if (dest && (INSN_ADDRESSES (INSN_UID (dest)) - addr + (unsigned) 4092 > 4092 + 4098)) gen_block_redirect (next, INSN_ADDRESSES (INSN_UID (next)), -1); } } if (dead) { rtx reg = gen_rtx_REG (SImode, exact_log2 (dead & -dead)); rtx insn = emit_insn_before (gen_indirect_jump_scratch (reg, GEN_INT (unspec_bbr_uid++)), jump); INSN_LOCATION (insn) = INSN_LOCATION (jump); INSN_CODE (insn) = CODE_FOR_indirect_jump_scratch; return insn; } else if (need_block) return emit_insn_before (gen_block_branch_redirect (GEN_INT (unspec_bbr_uid++)), jump); return prev; }
56e7d04e1d5a0e828c5df2b25e74bc519dc77687c5b4b4bd971e40cee7ebd945
3,118
Qihoo360
huststore
hustdb/ha/nginx/src/core/cjson_serialization_base.c
cjson_serialize_double
json_t * cjson_serialize_double(const double * obj_val) { return obj_val ? cJSON_CreateNumber(*obj_val) : NULL; }
void json_init_hooks(json_hooks_t* hooks); void * json_malloc(size_t size); void json_free(void * obj); static char * __load_from_file(const char * path); static json_bool_t __save_to_file(const char * data, const char * path); json_bool_t json_is_array(const json_t * json_val); json_bool_t json_is_object(const json_t * json_val); json_t * json_object(); json_t * json_array(); size_t json_array_size(const json_t * json_val); json_t * json_array_get_item(const json_t * json_val, size_t index); json_bool_t json_array_append_item(json_t * json_val, json_t * item); json_t * json_object_get_field(const json_t * json_val, const char * key); json_bool_t json_object_set_field(json_t * json_val, const char * key, json_t * child); json_t * json_load_from_str(const char * json_val); char * json_dump_to_str(const json_t * json_val); json_t * json_load_from_file(const char * path); json_bool_t json_dump_to_file(const json_t * json_val, const char * path); json_bool_t cjson_copy_to_string(const char * src, json_str_t * des); json_bool_t cjson_set_integer(const json_int_t * src, json_int_t * des); json_bool_t cjson_set_double(const double * src, double * des); json_bool_t cjson_set_string(const json_str_t * src, json_str_t * des); json_bool_t cjson_eq_integer(const json_int_t * src, json_int_t * des); json_bool_t cjson_eq_double(const double * src, double * des); json_bool_t cjson_eq_string(const json_str_t * src, json_str_t * des); void cjson_dispose_integer(json_int_t * obj_val); void cjson_dispose_double(double * obj_val); void cjson_dispose_string(json_str_t * obj_val); json_t * cjson_serialize_integer(const json_int_t * obj_val); json_t * cjson_serialize_string(const json_str_t * obj_val); json_bool_t cjson_deserialize_integer(const json_t * json_val, json_int_t * obj_val); json_bool_t cjson_deserialize_double(const json_t * json_val, double * obj_val); json_bool_t cjson_deserialize_string(const json_t * json_val, json_str_t * obj_val); void cjson_dispose_json_value(json_t * json_val);
6e9751a84bcb28b64a877f05d422b101e1d768ab4ce50951fa95d67b0daa3912
115
MobileCloudNetworking
icnaas
csrc/sync/SyncUtil.c
void SyncNoteErr
extern void SyncNoteErr(const char *msg) { char *s = getenv("CCNS_NOTE_ERR"); int useStdErr = 0; if (s != NULL && s[0] != 0) useStdErr = strtol(s, NULL, 10); if (useStdErr > 0) { fprintf(stderr, "**** error in %s\n", msg); fflush(stderr); } }
ea3878f7f268aba08533414843bb0f4fe295f94b14d6928a3196941092ad4421
287
ChibiOS
ChibiOS
test/mfs/source/test/mfs_test_sequence_001.c
mfs_test_001_005_teardown
static void mfs_test_001_005_teardown(void) { mfsStop(&mfs1); }
static void mfs_test_001_001_setup(void); static void mfs_test_001_001_teardown(void); static void mfs_test_001_001_execute(void); static void mfs_test_001_002_setup(void); static void mfs_test_001_002_teardown(void); static void mfs_test_001_002_execute(void); static void mfs_test_001_003_setup(void); static void mfs_test_001_003_teardown(void); static void mfs_test_001_003_execute(void); static void mfs_test_001_004_setup(void); static void mfs_test_001_004_teardown(void); static void mfs_test_001_004_execute(void); static void mfs_test_001_005_setup(void); static void mfs_test_001_005_execute(void); static void mfs_test_001_006_setup(void); static void mfs_test_001_006_teardown(void); static void mfs_test_001_006_execute(void); static void mfs_test_001_007_setup(void); static void mfs_test_001_007_teardown(void); static void mfs_test_001_007_execute(void);
eebd5ec646ee7ce229136ccce1e95472055d00afee86f36876b85da4ce0316dd
66
GenaSG
ET
src/client/cl_ui.c
LAN_GetPing
tatic void LAN_GetPing( int n, char *buf, int buflen, int *pingtime ) { CL_GetPing( n, buf, buflen, pingtime ); }
tatic void GetClientState( uiClientState_t *state ); oid LAN_LoadCachedServers(); oid LAN_SaveServersToCache(); tatic void LAN_ResetPings( int source ); tatic int LAN_AddServer( int source, const char *name, const char *address ); tatic void LAN_RemoveServer( int source, const char *addr ); tatic int LAN_GetServerCount( int source ); tatic void LAN_GetServerAddressString( int source, int n, char *buf, int buflen ); tatic void LAN_GetServerInfo( int source, int n, char *buf, int buflen ); tatic int LAN_GetServerPing( int source, int n ); tatic serverInfo_t *LAN_GetServerPtr( int source, int n ); tatic int LAN_CompareServers( int source, int sortKey, int sortDir, int s1, int s2 ); tatic int LAN_GetPingQueueCount( void ); tatic void LAN_ClearPing( int n ); tatic void LAN_GetPingInfo( int n, char *buf, int buflen ); tatic void LAN_MarkServerVisible( int source, int n, qboolean visible ); tatic int LAN_ServerIsVisible( int source, int n ); boolean LAN_UpdateVisiblePings( int source ); nt LAN_GetServerStatus( char *serverAddress, char *serverStatus, int maxLen ); boolean LAN_ServerIsInFavoriteList( int source, int n ); tatic void CL_GetGlconfig( glconfig_t *config ); tatic void GetClipboardData( char *buf, int buflen ); oid Key_KeynumToStringBuf( int keynum, char *buf, int buflen ); oid Key_GetBindingBuf( int keynum, char *buf, int buflen ); nt Key_GetCatcher( void ); oid Key_SetCatcher( int catcher ); tatic void CLUI_GetCDKey( char *buf, int buflen ); tatic void CLUI_SetCDKey( char *buf ); tatic int GetConfigString( int index, char *buf, int size ); tatic int FloatAsInt( float f ); nt CL_UISystemCalls( int *args ); oid CL_ShutdownUI( void ); oid CL_InitUI( void ); boolean UI_usesUniqueCDKey(); boolean UI_checkKeyExec( int key ); boolean UI_GameCommand( void );
60e669b883d65d84788bd3e962f7713656acc1f9f81d72b4227d3c2a33d3c36a
116
polaco1782
quake2
src/game/p_hud.c
DeathmatchScoreboardMessage
void DeathmatchScoreboardMessage (edict_t *ent, edict_t *killer) { char entry[1024]; char string[1400]; int stringlength; int i, j, k; int sorted[MAX_CLIENTS]; int sortedscores[MAX_CLIENTS]; int score, total; int picnum; int x, y; gclient_t *cl; edict_t *cl_ent; char *tag; if (ent->is_bot) return; total = 0; for (i=0 ; i<game.maxclients ; i++) { cl_ent = g_edicts + 1 + i; if (!cl_ent->inuse || game.clients[i].resp.spectator) continue; score = game.clients[i].resp.score; for (j=0 ; j<total ; j++) { if (score > sortedscores[j]) break; } for (k=total ; k>j ; k--) { sorted[k] = sorted[k-1]; sortedscores[k] = sortedscores[k-1]; } sorted[j] = i; sortedscores[j] = score; total++; } string[0] = 0; stringlength = strlen(string); if (total > 12) total = 12; for (i=0 ; i<total ; i++) { cl = &game.clients[sorted[i]]; cl_ent = g_edicts + 1 + sorted[i]; picnum = gi.imageindex ("i_fixme"); x = (i>=6) ? 160 : 0; y = 32 + 32 * (i%6); if (cl_ent == ent) tag = "tag1"; else if (cl_ent == killer) tag = "tag2"; else tag = NULL; if (tag) { Com_sprintf (entry, sizeof(entry), "xv %i yv %i picn %s ",x+32, y, tag); j = strlen(entry); if (stringlength + j > 1024) break; strcpy (string + stringlength, entry); stringlength += j; } Com_sprintf (entry, sizeof(entry), "client %i %i %i %i %i %i ", x, y, sorted[i], cl->resp.score, cl->ping, (level.framenum - cl->resp.enterframe)/600); j = strlen(entry); if (stringlength + j > 1024) break; strcpy (string + stringlength, entry); stringlength += j; } gi.WriteByte (svc_layout); gi.WriteString (string); }
void MoveClientToIntermission (edict_t *ent); void BeginIntermission (edict_t *targ); void DeathmatchScoreboard (edict_t *ent); void Cmd_Score_f (edict_t *ent); void HelpComputer (edict_t *ent); void Cmd_Help_f (edict_t *ent); void G_SetStats (edict_t *ent); void G_CheckChaseStats (edict_t *ent); void G_SetSpectatorStats (edict_t *ent);
fce2ee870ae0e76d1ca4539d898ab7962ea309be2d58b4b99be1cc7bbc3dedac
1,723
aceofall
zephyr-iotos
ext/hal/silabs/gecko/emlib/src/em_cmu.c
CMU_HFRCOStartupDelaySet
void CMU_HFRCOStartupDelaySet(uint32_t delay) { EFM_ASSERT(delay <= 31); delay &= _CMU_HFRCOCTRL_SUDELAY_MASK >> _CMU_HFRCOCTRL_SUDELAY_SHIFT; CMU->HFRCOCTRL = (CMU->HFRCOCTRL & ~(_CMU_HFRCOCTRL_SUDELAY_MASK)) | (delay << _CMU_HFRCOCTRL_SUDELAY_SHIFT); }
static uint32_t maxFreqHfle(void); static void setHfLeConfig(uint32_t hfFreq, uint32_t maxLeFreq); static uint32_t getHfLeConfig(void); static uint32_t auxClkGet(void); static uint32_t dbgClkGet(void); static void flashWaitStateControl(uint32_t coreFreq); static void flashWaitStateMax(void); static uint32_t getRegIshUpperVal(uint32_t steadyStateRegIsh); static uint32_t lfClkGet(CMU_Clock_TypeDef lfClkBranch); __STATIC_INLINE void syncReg(uint32_t mask); static uint32_t usbCClkGet(void); CMU_AUXHFRCOBand_TypeDef CMU_AUXHFRCOBandGet(void); void CMU_AUXHFRCOBandSet(CMU_AUXHFRCOBand_TypeDef band); static uint32_t CMU_AUXHFRCODevinfoGet(CMU_AUXHFRCOFreq_TypeDef freq); CMU_AUXHFRCOFreq_TypeDef CMU_AUXHFRCOBandGet(void); void CMU_AUXHFRCOBandSet(CMU_AUXHFRCOFreq_TypeDef setFreq); uint32_t CMU_Calibrate(uint32_t HFCycles, CMU_Osc_TypeDef ref); uint32_t CMU_CalibrateCountGet(void); CMU_ClkDiv_TypeDef CMU_ClockDivGet(CMU_Clock_TypeDef clock); void CMU_ClockDivSet(CMU_Clock_TypeDef clock, CMU_ClkDiv_TypeDef div); void CMU_ClockEnable(CMU_Clock_TypeDef clock, bool enable); uint32_t CMU_ClockFreqGet(CMU_Clock_TypeDef clock); uint32_t CMU_ClockPrescGet(CMU_Clock_TypeDef clock); void CMU_ClockPrescSet(CMU_Clock_TypeDef clock, CMU_ClkPresc_TypeDef presc); CMU_Select_TypeDef CMU_ClockSelectGet(CMU_Clock_TypeDef clock); void CMU_ClockSelectSet(CMU_Clock_TypeDef clock, CMU_Select_TypeDef ref); void CMU_FreezeEnable(bool enable); CMU_HFRCOBand_TypeDef CMU_HFRCOBandGet(void); void CMU_HFRCOBandSet(CMU_HFRCOBand_TypeDef band); static uint32_t CMU_HFRCODevinfoGet(CMU_HFRCOFreq_TypeDef freq); CMU_HFRCOFreq_TypeDef CMU_HFRCOBandGet(void); void CMU_HFRCOBandSet(CMU_HFRCOFreq_TypeDef setFreq); uint32_t CMU_HFRCOStartupDelayGet(void); void CMU_HFXOInit(const CMU_HFXOInit_TypeDef *hfxoInit); uint32_t CMU_LCDClkFDIVGet(void); void CMU_LCDClkFDIVSet(uint32_t div); void CMU_LFXOInit(const CMU_LFXOInit_TypeDef *lfxoInit); void CMU_OscillatorEnable(CMU_Osc_TypeDef osc, bool enable, bool wait); uint32_t CMU_OscillatorTuningGet(CMU_Osc_TypeDef osc); void CMU_OscillatorTuningSet(CMU_Osc_TypeDef osc, uint32_t val); bool CMU_PCNTClockExternalGet(unsigned int instance); void CMU_PCNTClockExternalSet(unsigned int instance, bool external); CMU_USHFRCOBand_TypeDef CMU_USHFRCOBandGet(void); void CMU_USHFRCOBandSet(CMU_USHFRCOBand_TypeDef band);
a8f03adb7476d3e86c555f8dd7f962b11d4ae79b9cdda33038f0649f6c2ce90e
288
jrobhoward
SCADAbase
usr.sbin/newsyslog/newsyslog.c
void expand_globs
static void expand_globs(struct cflist *work_p, struct cflist *glob_p) { int gmatch, gres; size_t i; char *mfname; struct conf_entry *dupent, *ent, *globent; glob_t pglob; struct stat st_fm; STAILQ_FOREACH(globent, glob_p, cf_nextp) { gres = glob(globent->log, GLOB_NOCHECK, NULL, &pglob); if (gres != 0) { warn("cannot expand pattern (%d): %s", gres, globent->log); continue; } if (verbose > 2) printf("\t+ Expanding pattern %s\n", globent->log); for (i = 0; i < pglob.gl_matchc; i++) { mfname = pglob.gl_pathv[i]; gmatch = 0; STAILQ_FOREACH(ent, work_p, cf_nextp) { if (strcmp(mfname, ent->log) == 0) { gmatch++; break; } } if (gmatch) continue; gres = lstat(mfname, &st_fm); if (gres != 0) { warn("Skipping %s - lstat() error", mfname); continue; } if (!S_ISREG(st_fm.st_mode)) { if (verbose > 2) printf("\t+ . skipping %s (!file)\n", mfname); continue; } if (verbose > 2) printf("\t+ . add file %s\n", mfname); dupent = init_entry(mfname, globent); dupent->flags &= ~CE_GLOB; STAILQ_INSERT_TAIL(work_p, dupent, cf_nextp); } globfree(&pglob); if (verbose > 2) printf("\t+ Done with pattern %s\n", globent->log); } }
a816e913f2c017ca208b636aaf34f4688b531148967221a218e57d0c7e895057
1,303
GabrielGanne
vpp-flowtable
src/vnet/bfd/bfd_udp.c
bfd_udp_add_session
vnet_api_error_t bfd_udp_add_session (u32 sw_if_index, u32 desired_min_tx_us, u32 required_min_rx_us, u8 detect_mult, const ip46_address_t *local_addr, const ip46_address_t *peer_addr) { vnet_api_error_t rv = bfd_udp_validate_api_input (sw_if_index, local_addr, peer_addr); if (rv) { return rv; } if (detect_mult < 1) { BFD_ERR ("detect_mult < 1"); return VNET_API_ERROR_INVALID_ARGUMENT; } if (desired_min_tx_us < 1) { BFD_ERR ("desired_min_tx_us < 1"); return VNET_API_ERROR_INVALID_ARGUMENT; } return bfd_udp_add_session_internal (&bfd_udp_main, sw_if_index, desired_min_tx_us, required_min_rx_us, detect_mult, local_addr, peer_addr); }
static void bfd_rpc_update_session_cb (const bfd_rpc_update_t *a); static void bfd_rpc_update_session (u32 bs_idx, const bfd_pkt_t *pkt); static bfd_udp_error_t bfd_udp6_scan (vlib_main_t *vm, vlib_buffer_t *b); static clib_error_t *bfd_udp_init (vlib_main_t *vm);
b48a53d2176393179e209e2dd1b0bbbe6bca1ee5b8fd213029f25f724404eca9
902
juddy
edcde
programs/dtsr/dtsrkdump.c
main
int main (int argc, char *argv[]) { int i; int oops; int dotcount; long keycount; long total; char *ptr; int do_objkeys = FALSE; int do_wordkeys = FALSE; char dbpath[2048]; char rcs_revision [8]; char dbname[12]; time_t now; double percent = 0.0; int listing_most_words = FALSE; static char *word_labels[6] = { "Short Stems = %8ld\n", "Short Words = %8ld\n", "Long Stems = %8ld\n", "Long Words = %8ld\n", "Huge Stems = %8ld\n", "Huge Words = %8ld\n" }; aa_argv0 = argv[0]; time (&now); sscanf ("$Revision: /main/3 $", "%*s %s", rcs_revision); setlocale (LC_ALL, ""); dtsearch_catd = catopen (FNAME_DTSRCAT, 0); strftime (buf, sizeof (buf), "%m/%d/%Y, %I:%M %p", localtime (&now)); printf (catgets(dtsearch_catd, MS_dtsrkdump, 3, "%s %s, engine %s. %s.\n"), aa_argv0, rcs_revision, AUSAPI_VERSION, buf); if (argc <= 1) { PRINT_USAGE: printf (catgets(dtsearch_catd, MS_dtsrkdump, 4, "\nUSAGE: %s -o|w|ow [-v] [-t<N> | -p<N>] dbname\n" " Reads DtSearch key files and prints summary report.\n" " -o Keys examined are OBJECT record keys.\n" " -w Keys examined are inverted index WORDS.\n" " -v VERBOSE mode, lists every key.\n" " -t<N> Threshold. Sets w and v options, and lists only words\n" " with >= <N> addresses. All words will be listed if <N> = 1.\n" " -p<N> Another threshold. Same as -t except <N> is percent\n" " of the entire database (<N> may include a decimal point).\n" " For example -p99.9 prints out every word that occurs\n" " in 99.9%% or more of the records--an excellent way to find\n" " candidates for the stop list.\n" " If w and v are set without threshold, default is -t%d.\n" " <dbname> 1 - 8 character database name with optional path prefix.\n") ,aa_argv0 ,MIN_THRESHOLD ); DtSearchExit (2); } else { for (;;) { --argc; ++argv; if (argc <= 0) break; ptr = argv[0]; if (*ptr != '-') break; while (*(++ptr) != 0) { switch (*ptr) { case 'o': do_objkeys = TRUE; break; case 'w': do_wordkeys = TRUE; break; case 'v': do_verbose = TRUE; break; case 'p': do_verbose = TRUE; do_wordkeys = TRUE; percent = atof (ptr + 1); if (percent <= 0.0 || percent > 100.0) { fprintf (stderr, catgets (dtsearch_catd, MS_dtsrkdump, 5, "%s Invalid percent value %lf.\a\n"), PROGNAME"195", percent); goto PRINT_USAGE; } ptr[1] = 0; break; case 't': do_verbose = TRUE; do_wordkeys = TRUE; if ((min_threshold = atol (ptr + 1)) <= 0L) { fprintf (stderr, catgets (dtsearch_catd, MS_dtsrkdump, 53, "%s Invalid threshold value.\a\n"), PROGNAME"198"); goto PRINT_USAGE; } ptr[1] = 0; break; default: fprintf (stderr, catgets (dtsearch_catd, MS_dtsrkdump, 55, "%s Unknown command line argument '%c'.\a\n"), PROGNAME"278", *ptr); goto PRINT_USAGE; } } } } oops = FALSE; if (argc <= 0) { printf (catgets (dtsearch_catd, MS_dtsrkdump, 56, "%s Missing required database name.\a\n"), PROGNAME"267"); oops = TRUE; } if (!do_wordkeys && !do_objkeys) { printf (catgets (dtsearch_catd, MS_dtsrkdump, 57, "%s Either -o or -w must be specified.\a\n"), PROGNAME"271"); oops = TRUE; } if (oops) goto PRINT_USAGE; strncpy (dbpath, argv[0], sizeof (dbpath)); dbpath[sizeof (dbpath) - 1] = 0; for (ptr = dbpath + strlen (dbpath) - 1; ptr >= dbpath; ptr--) if (!isalnum (*ptr)) { ptr++; break; } if (ptr < dbpath) ptr = dbpath; i = strlen (ptr); if (i < 1 || i > 8) { fprintf (stderr, catgets (dtsearch_catd, MS_dtsrkdump, 58, "%s Invalid database name '%s'.\a\n"), PROGNAME"297", ptr); goto PRINT_USAGE; } strcpy (dbname, ptr); *ptr = 0; db_oflag = O_RDONLY; if (!austext_dopen (dbname, dbpath, NULL, 0, &dbrec)) { fprintf (stderr, "%s\n", DtSearchGetMessages()); DtSearchExit (3); } maxdba = dbrec.or_maxdba; printf (catgets(dtsearch_catd, MS_dtsrkdump, 60, "%s: '%s' reccount=%ld maxdba=%ld recslots=%hd minw=%hd maxw=%hd\n"), aa_argv0, dbname, dbrec.or_reccount, dbrec.or_maxdba, dbrec.or_recslots, dbrec.or_minwordsz, dbrec.or_maxwordsz); if (percent > 0.0) min_threshold = (long) ((float) percent * (float) dbrec.or_reccount / 100.0); if (min_threshold > dbrec.or_reccount) min_threshold = dbrec.or_reccount; if (do_wordkeys && do_verbose) { if (min_threshold > 1 && min_threshold < dbrec.or_reccount) { printf (catgets(dtsearch_catd, MS_dtsrkdump, 70, "%s Will only list words occurring " "in %ld or more records.\n"), aa_argv0, min_threshold); listing_most_words = (float) min_threshold / (float) dbrec.or_reccount > .90; } else { printf (catgets(dtsearch_catd, MS_dtsrkdump, 80, "%s: Listing all words in database.\n"), aa_argv0); listing_most_words = TRUE; } } if (do_objkeys) { counters = austext_malloc (258 * sizeof(long), PROGNAME"113", NULL); memset (counters, 0, 258 * sizeof(long)); dotcount = 0; keycount = 0; KEYFRST (PROGNAME"111", OR_OBJKEY, 0); while (db_status == S_OKAY) { KEYREAD (PROGNAME"288", buf); (counters[buf[0]])++; CRGET (PROGNAME"251", &dba, 0); if (maxdba < (dba & 0xffffff)) maxdba = dba; if (do_verbose) { i = 0; putchar ('\"'); for (ptr = buf; *ptr != 0; ptr++) { if (*ptr < 32 | *ptr >= 127) { putchar ('.'); i++; } else { putchar (*ptr); i++; } } printf ("\" "); while (i++ < DtSrMAX_DB_KEYSIZE) putchar (' '); printf (catgets(dtsearch_catd, MS_dtsrkdump, 100, "dba x%08lx, %6ld\n"), dba, dba); } else { if (++keycount % KEYS_PER_DOT == 0) { putchar ('.'); if (++dotcount % 10 == 0) putchar (' '); if (dotcount % 50 == 0) { putchar ('\n'); dotcount = 0; } fflush (stdout); } } KEYNEXT (PROGNAME"291", OR_OBJKEY, 0); } if (dotcount) putchar ('\n'); if (dbpath[0] == 0) buf[0] = 0; else sprintf (buf, catgets(dtsearch_catd, MS_dtsrkdump, 110, " in %s"), dbpath); printf (catgets(dtsearch_catd, MS_dtsrkdump, 120, "Object Summary for '%s'%s:\n"), dbname, buf); puts (catgets(dtsearch_catd, MS_dtsrkdump, 130, "Object Count by Keytypes:")); total = 0L; for (i = 0; i < 256; i++) { if (counters[i] > 0L) { total += counters[i]; if (i > 32 && i < 127) printf (" '%c' %6ld\n", i, counters[i]); else printf (" x%02x %6ld\n", i, counters[i]); } } printf (catgets(dtsearch_catd, MS_dtsrkdump, 160, "TOTAL Objects Count = %ld\n"), total); printf (catgets(dtsearch_catd, MS_dtsrkdump, 170, "Largest Object DBA = %ld\n"), maxdba); free (counters); } if (do_wordkeys) { if (listing_most_words) printf (catgets(dtsearch_catd, MS_dtsrkdump, 180, "%s: * Words marked with asterisk occur in every record.\n"), aa_argv0); counters = austext_malloc (8 * sizeof (long), PROGNAME"113", NULL); memset (counters, 0, 6 * sizeof(long)); count_words (0); count_words (2); count_words (4); if (do_objkeys) putchar ('\n'); if (dbpath[0] == 0) buf[0] = 0; else sprintf (buf, catgets(dtsearch_catd, MS_dtsrkdump, 110, " in %s"), dbpath); printf (catgets(dtsearch_catd, MS_dtsrkdump, 200, "Words Summary for '%s'%s:\n"), dbname, buf); total = 0L; for (i = 0; i < 6; i++) { printf (word_labels[i], counters[i]); total += counters[i]; } printf (catgets(dtsearch_catd, MS_dtsrkdump, 210, "TOTAL Words Count = %ld\n"), total); free (counters); } DtSearchExit (0); }
void count_words (int index);
3cd91d9c1cd7bb7e13c8f544dd470f2777d06c49cf1dec4cbd0ac4a2adc60949
8,052
durandj
devkitadv
insight-5.3/gdb/dwarf2read.c
void parse_macro_definition
static void parse_macro_definition (struct macro_source_file *file, int line, const char *body) { const char *p; for (p = body; *p; p++) if (*p == ' ' || *p == '(') break; if (*p == ' ' || *p == '\0') { int name_len = p - body; char *name = copy_string (body, name_len); const char *replacement; if (*p == ' ') replacement = body + name_len + 1; else { complain (&dwarf2_macro_malformed_definition, body); replacement = body + name_len; } macro_define_object (file, line, name, replacement); xfree (name); } else if (*p == '(') { char *name = copy_string (body, p - body); int argc = 0; int argv_size = 1; char **argv = xmalloc (argv_size * sizeof (*argv)); p++; p = consume_improper_spaces (p, body); while (*p && *p != ')') { const char *arg_start = p; while (*p && *p != ',' && *p != ')' && *p != ' ') p++; if (! *p || p == arg_start) complain (&dwarf2_macro_malformed_definition, body); else { if (argc >= argv_size) { argv_size *= 2; argv = xrealloc (argv, argv_size * sizeof (*argv)); } argv[argc++] = copy_string (arg_start, p - arg_start); } p = consume_improper_spaces (p, body); if (*p == ',') { p++; p = consume_improper_spaces (p, body); } } if (*p == ')') { p++; if (*p == ' ') macro_define_function (file, line, name, argc, (const char **) argv, p + 1); else if (*p == '\0') { complain (&dwarf2_macro_malformed_definition, body); macro_define_function (file, line, name, argc, (const char **) argv, p); } else complain (&dwarf2_macro_malformed_definition, body); } else complain (&dwarf2_macro_malformed_definition, body); xfree (name); { int i; for (i = 0; i < argc; i++) xfree (argv[i]); } xfree (argv); } else complain (&dwarf2_macro_malformed_definition, body); }
bf4138cf96e5c380fc92a4fa6a0e6b4bd11385fb80290ea16683c4bba93d6b8d
2,668
easion
os_sdk
jwm-2.0.1/src/border.c
DestroyBorders
void DestroyBorders() { }
void InitializeBorders(); void StartupBorders(); void ShutdownBorders(); int GetBorderIconSize(); BorderActionType GetBorderActionType(const ClientNode *np, int x, int y); void DrawBorder(const ClientNode *np, const XExposeEvent *expose); void DrawBorderHelper(const ClientNode *np, int drawIcon); int GetButtonCount(const ClientNode *np); void DrawBorderButtons(const ClientNode *np, Pixmap canvas, GC gc); void ExposeCurrentDesktop(); void SetBorderWidth(const char *str); void SetTitleHeight(const char *str);
f6cd21b8c940d49b8445e4a2578e6b2ef8775fc2dc1ff054870753f4f58fd7cb
26
retrodeluxe
FUZIX
Kernel/platform-rc2014/devtty.c
quart_intr
static uint8_t quart_intr(uint8_t minor) { uint8_t r = in16(QUARTPORT + QUARTREG(ISR1)); if (r & 0x02) { r = in16(QUARTPORT + QUARTREG(RHRA)); tty_inproc(minor, r); } if (r & 0x20) { r = in16(QUARTPORT + QUARTREG(RHRB)); if (minor + 1 <= NUM_DEV_TTY) tty_inproc(minor + 1 , r); } r = in16(QUARTPORT + QUARTREG(ISR2)); if (r & 0x02) { r = in16(QUARTPORT + QUARTREG(RHRC)); if (minor + 2 <= NUM_DEV_TTY) tty_inproc(minor + 2 , r); } if (r & 0x20) { r = in16(QUARTPORT + QUARTREG(RHRD)); if (minor + 3 <= NUM_DEV_TTY) tty_inproc(minor + 3, r); } if (quart_timer && (r & 0x10)) { in16(QUARTPORT + QUARTREG(STC2)); timer_interrupt(); } return 4; }
void tty_setup(uint_fast8_t minor, uint_fast8_t flags); int tty_carrier(uint_fast8_t minor); void tty_pollirq(void); void tty_putc(uint_fast8_t minor, uint_fast8_t c); void tty_sleeping(uint_fast8_t minor); ttyready_t tty_writeready(uint_fast8_t minor); void tty_data_consumed(uint_fast8_t minor); void kputchar(char c); int rctty_open(uint_fast8_t minor, uint16_t flag); static uint8_t acia_intr(uint8_t minor); static void acia_setup(uint8_t minor); static uint8_t acia_writeready(uint_fast8_t minor); static void acia_putc(uint_fast8_t minor, uint_fast8_t c); static uint8_t carrier_unwired(uint_fast8_t minor); static uint8_t sio_intrb(uint_fast8_t minor); static uint8_t sio_intr(uint_fast8_t minor); static ttyready_t sio_writeready(uint_fast8_t minor); static void sio_putc(uint_fast8_t minor, uint_fast8_t c); static void sio_setup(uint_fast8_t minor); static uint8_t sio_carrier(uint_fast8_t minor); static uint8_t ns16x50_intr(uint_fast8_t minor); static ttyready_t ns16x50_writeready(uint_fast8_t minor); static void ns16x50_putc(uint_fast8_t minor, uint_fast8_t c); static void ns16x50_setup(uint_fast8_t minor); static uint8_t ns16x50_carrier(uint_fast8_t minor); static uint8_t asci_intr0(uint_fast8_t minor); static uint8_t asci_intr1(uint_fast8_t minor); ttyready_t asci_writeready0(uint_fast8_t minor); ttyready_t asci_writeready1(uint_fast8_t minor); static void asci_putc0(uint_fast8_t minor, uint_fast8_t c); static void asci_putc1(uint_fast8_t minor, uint_fast8_t c); static void asci_setup(uint_fast8_t minor); static void quart_setup(uint8_t minor); static uint8_t quart_writeready(uint_fast8_t minor); static void quart_putc(uint_fast8_t minor, uint_fast8_t c); static uint8_t tms_intr(uint8_t minor); static void tms_setup(uint8_t minor); static uint8_t tms_writeready(uint_fast8_t minor); static void tms_setoutput(uint_fast8_t minor); static void tms_putc(uint_fast8_t minor, uint_fast8_t c); void do_conswitch(uint8_t c); void ps2kbd_conswitch(uint8_t console); uint8_t register_uart(uint16_t port, struct uart *ops); void insert_uart(uint16_t port, struct uart *ops); void display_uarts(void); int rctty_ioctl(uint8_t minor, uarg_t arg, char *ptr);
b7611fba6020a2935c98fabd0614b9c6c1daea60351757061ddda5a6a1000497
747
gatieme
LDD-LinuxDeviceDrivers
books/fengguojin/src/2synchronous/2-1spinlock/spin/spinlock.c
*×¢ÏúÉ豸Çý¶¯*/ unregister_chrdev
*×¢ÏúÉ豸Çý¶¯*/ unregister_chrdev(MAJOR_NUM, "chardev"); } module_init(simple_init); module_exit(simple_exit);
static int simple_open(struct inode *inode, struct file *filp); t inode *inode, struct file *filp); ct file *filp, char *buf, size_t len, loff_t*off); uct file *filp, const char *buf, size_t len,loff_t *off); oid);
7c6057cb1b902f775443fe77e30664f1975da0ef1d405fb42115e661bc2dd9be
129
alishakiba
libflame
src/lapack/inv/tri/un/flamec/FLA_Trinv_un_opt_var1.c
FLA_Trinv_un_ops_var1
FLA_Error FLA_Trinv_un_ops_var1( int mn_A, float* buff_A, int rs_A, int cs_A ) { float alpha11_m1; int i; for ( i = 0; i < mn_A; ++i ) { float* A00 = buff_A + (0 )*cs_A + (0 )*rs_A; float* a01 = buff_A + (i )*cs_A + (0 )*rs_A; float* alpha11 = buff_A + (i )*cs_A + (i )*rs_A; int mn_behind = i; bl1_strmv( BLIS1_UPPER_TRIANGULAR, BLIS1_NO_TRANSPOSE, BLIS1_NONUNIT_DIAG, mn_behind, A00, rs_A, cs_A, a01, rs_A ); bl1_sneg2( alpha11, &alpha11_m1 ); bl1_sinvscalv( BLIS1_NO_CONJUGATE, mn_behind, &alpha11_m1, a01, rs_A ); bl1_sinverts( BLIS1_NO_CONJUGATE, alpha11 ); } return FLA_SUCCESS; }
FLA_Error FLA_Trinv_un_opt_var1( FLA_Obj A );
230fbcaa3609c8f86e5b04bd63333238caa24a8c68d319873e6a9984bdae72ce
904
Drusyc
shell
src/readcmd.c
read_word
atic void read_word(char ** cur, char ** cur_buf) { while(1) { char c = **cur; switch (c) { case '\0': case ' ': case '\t': case '<': case '>': case '|': **cur_buf = '\0'; return; case '\'': read_single_quote(cur, cur_buf); break; case '"': read_double_quote(cur, cur_buf); break; case '\\': SKIP_CHAR; READ_CHAR; break; default: READ_CHAR; break; } } } /
atic void memory_error(void); atic void *xmalloc(size_t size); atic void *xrealloc(void *ptr, size_t size); atic char *readline(char *prompt); atic void read_single_quote(char ** cur, char ** cur_buf); atic void read_double_quote(char ** cur, char ** cur_buf); atic char **split_in_words(char *line); atic void freeseq(char ***seq); atic void freecmd(struct cmdline *s); ruct cmdline *readcmd(char *prompt);
b4cab62913d141d969e0b87d0daaf453add4b8cc862077aa8453e948539a279f
417
ApisSys
linux-analogdevicesinc-ap6
ECE695-Spring17/t3-scheduler/linux-4.10.6/drivers/rtc/rtc-tegra.c
tegra_rtc_probe
static int __init tegra_rtc_probe(struct platform_device *pdev) { struct tegra_rtc_info *info; struct resource *res; int ret; info = devm_kzalloc(&pdev->dev, sizeof(struct tegra_rtc_info), GFP_KERNEL); if (!info) return -ENOMEM; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); info->rtc_base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(info->rtc_base)) return PTR_ERR(info->rtc_base); info->tegra_rtc_irq = platform_get_irq(pdev, 0); if (info->tegra_rtc_irq <= 0) return -EBUSY; info->pdev = pdev; spin_lock_init(&info->tegra_rtc_lock); platform_set_drvdata(pdev, info); writel(0, info->rtc_base + TEGRA_RTC_REG_SECONDS_ALARM0); writel(0xffffffff, info->rtc_base + TEGRA_RTC_REG_INTR_STATUS); writel(0, info->rtc_base + TEGRA_RTC_REG_INTR_MASK); device_init_wakeup(&pdev->dev, 1); info->rtc_dev = devm_rtc_device_register(&pdev->dev, dev_name(&pdev->dev), &tegra_rtc_ops, THIS_MODULE); if (IS_ERR(info->rtc_dev)) { ret = PTR_ERR(info->rtc_dev); dev_err(&pdev->dev, "Unable to register device (err=%d).\n", ret); return ret; } ret = devm_request_irq(&pdev->dev, info->tegra_rtc_irq, tegra_rtc_irq_handler, IRQF_TRIGGER_HIGH, dev_name(&pdev->dev), &pdev->dev); if (ret) { dev_err(&pdev->dev, "Unable to request interrupt for device (err=%d).\n", ret); return ret; } dev_notice(&pdev->dev, "Tegra internal Real Time Clock\n"); return 0; }
static inline u32 tegra_rtc_check_busy(struct tegra_rtc_info *info); static int tegra_rtc_wait_while_busy(struct device *dev); static int tegra_rtc_read_time(struct device *dev, struct rtc_time *tm); static int tegra_rtc_set_time(struct device *dev, struct rtc_time *tm); static int tegra_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm); static int tegra_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled); static int tegra_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm); static int tegra_rtc_proc(struct device *dev, struct seq_file *seq); static irqreturn_t tegra_rtc_irq_handler(int irq, void *data); static int tegra_rtc_suspend(struct device *dev); static int tegra_rtc_resume(struct device *dev); static void tegra_rtc_shutdown(struct platform_device *pdev);
b34820ee006332a1c6e20e50b415be458488699fd402f61d95a88169dd3143ac
1,434
pedia
moosefs
mfsmaster/filesystem.c
fs_loadnode
int fs_loadnode(FILE *fd) { uint8_t unodebuff[4+1+2+4+4+4+4+4+4+8+4+2+8*MAX_CHUNKS_PER_FILE+4*65536+4]; const uint8_t *ptr; uint8_t type; uint32_t indx,pleng,ch,sessionids,sessionid; fsnode *p; sessionidrec *sessionidptr; uint32_t nodepos; #ifndef METARESTORE statsrecord *sr; #endif type = fgetc(fd); if (type==0) { return 1; } p = malloc(sizeof(fsnode)); passert(p); p->type = type; switch (type) { case TYPE_DIRECTORY: case TYPE_FIFO: case TYPE_SOCKET: if (fread(unodebuff,1,4+1+2+4+4+4+4+4+4,fd)!=4+1+2+4+4+4+4+4+4) { mfs_errlog(LOG_ERR,"loading node: read error"); free(p); return -1; } break; case TYPE_BLOCKDEV: case TYPE_CHARDEV: case TYPE_SYMLINK: if (fread(unodebuff,1,4+1+2+4+4+4+4+4+4+4,fd)!=4+1+2+4+4+4+4+4+4+4) { mfs_errlog(LOG_ERR,"loading node: read error"); free(p); return -1; } break; case TYPE_FILE: case TYPE_TRASH: case TYPE_RESERVED: if (fread(unodebuff,1,4+1+2+4+4+4+4+4+4+8+4+2,fd)!=4+1+2+4+4+4+4+4+4+8+4+2) { mfs_errlog(LOG_ERR,"loading node: read error"); free(p); return -1; } break; default: mfs_arg_syslog(LOG_ERR,"loading node: unrecognized node type: %c",type); free(p); return -1; } ptr = unodebuff; p->id = get32bit(&ptr); p->goal = get8bit(&ptr); p->mode = get16bit(&ptr); p->uid = get32bit(&ptr); p->gid = get32bit(&ptr); p->atime = get32bit(&ptr); p->mtime = get32bit(&ptr); p->ctime = get32bit(&ptr); p->trashtime = get32bit(&ptr); switch (type) { case TYPE_DIRECTORY: #ifndef METARESTORE sr = malloc(sizeof(statsrecord)); passert(sr); memset(sr,0,sizeof(statsrecord)); p->data.ddata.stats = sr; p->data.ddata.quota = NULL; #endif p->data.ddata.children = NULL; p->data.ddata.nlink = 2; p->data.ddata.elements = 0; case TYPE_SOCKET: case TYPE_FIFO: break; case TYPE_BLOCKDEV: case TYPE_CHARDEV: p->data.rdev = get32bit(&ptr); break; case TYPE_SYMLINK: pleng = get32bit(&ptr); p->data.sdata.pleng = pleng; if (pleng>0) { p->data.sdata.path = malloc(pleng); passert(p->data.sdata.path); if (fread(p->data.sdata.path,1,pleng,fd)!=pleng) { mfs_errlog(LOG_ERR,"loading node: read error"); free(p->data.sdata.path); free(p); return -1; } } else { p->data.sdata.path = NULL; } break; case TYPE_FILE: case TYPE_TRASH: case TYPE_RESERVED: p->data.fdata.length = get64bit(&ptr); ch = get32bit(&ptr); p->data.fdata.chunks = ch; sessionids = get16bit(&ptr); if (ch>0) { p->data.fdata.chunktab = malloc(sizeof(uint64_t)*ch); passert(p->data.fdata.chunktab); } else { p->data.fdata.chunktab = NULL; } if (fread((uint8_t*)ptr,1,8*ch+4*sessionids,fd)!=8*ch+4*sessionids) { mfs_errlog(LOG_ERR,"loading node: read error"); if (p->data.fdata.chunktab) { free(p->data.fdata.chunktab); } free(p); return -1; } for (indx=0 ; indx<ch ; indx++) { p->data.fdata.chunktab[indx] = get64bit(&ptr);; } p->data.fdata.sessionids=NULL; while (sessionids) { sessionid = get32bit(&ptr); sessionidptr = sessionidrec_malloc(); sessionidptr->sessionid = sessionid; sessionidptr->next = p->data.fdata.sessionids; p->data.fdata.sessionids = sessionidptr; #ifndef METARESTORE matocuserv_init_sessions(sessionid,p->id); #endif sessionids--; } } p->parents = NULL; nodepos = NODEHASHPOS(p->id); p->next = nodehash[nodepos]; nodehash[nodepos] = p; fsnodes_used_inode(p->id); nodes++; if (type==TYPE_DIRECTORY) { dirnodes++; } if (type==TYPE_FILE || type==TYPE_TRASH || type==TYPE_RESERVED) { filenodes++; } return 0; }
void fs_stats(uint32_t stats[16]); static inline freenode* freenode_malloc(); static inline void freenode_free(freenode *p); static inline freenode* freenode_malloc(); static inline void freenode_free(freenode* p); static inline sessionidrec* sessionidrec_malloc(); static inline void sessionidrec_free(sessionidrec *p); static inline sessionidrec* sessionidrec_malloc(); static inline void sessionidrec_free(sessionidrec* p); uint32_t fsnodes_get_next_id(); void fsnodes_free_id(uint32_t id,uint32_t ts); uint8_t fs_freeinodes(uint32_t ts,uint32_t freeinodes); void fsnodes_init_freebitmask (void); void fsnodes_used_inode (uint32_t id); static char* fsnodes_escape_name(uint16_t nleng,const uint8_t *name); static inline uint32_t fsnodes_hash(uint32_t parentid,uint16_t nleng,const uint8_t *name); static inline int fsnodes_nameisused(fsnode *node,uint16_t nleng,const uint8_t *name); static inline fsedge* fsnodes_lookup(fsnode *node,uint16_t nleng,const uint8_t *name); static inline fsnode* fsnodes_id_to_node(uint32_t id); static inline int fsnodes_isancestor(fsnode *f,fsnode *p); static inline quotanode* fsnodes_new_quotanode(); static inline void fsnodes_delete_quotanode(quotanode *qn); static inline void fsnodes_check_quotanode(quotanode *qn,uint32_t ts); void fsnodes_check_all_quotas(void); static inline uint8_t fsnodes_test_quota(fsnode *node); static inline void fsnodes_get_stats(fsnode *node,statsrecord *sr); static inline void fsnodes_sub_stats(fsnode *parent,statsrecord *sr); static inline void fsnodes_add_stats(fsnode *parent,statsrecord *sr); static inline void fsnodes_add_sub_stats(fsnode *parent,statsrecord *newsr,statsrecord *prevsr); static inline void fsnodes_remove_edge(uint32_t ts,fsedge *e); static inline void fsnodes_link(uint32_t ts,fsnode *parent,fsnode *child,uint16_t nleng,const uint8_t *name); static inline fsnode* fsnodes_create_node(uint32_t ts,fsnode* node,uint16_t nleng,const uint8_t *name,uint8_t type,uint16_t mode,uint32_t uid,uint32_t gid); static inline uint32_t fsnodes_getpath_size(fsedge *e); static inline void fsnodes_getpath_data(fsedge *e,uint8_t *path,uint32_t size); static inline void fsnodes_getpath(fsedge *e,uint16_t *pleng,uint8_t **path); static inline void fsnodes_fill_attr(fsnode *node,fsnode *parent,uint32_t uid,uint32_t gid,uint32_t auid,uint32_t agid,uint8_t sesflags,uint8_t attr[35]); static inline uint32_t fsnodes_getdetachedsize(fsedge *start); static inline void fsnodes_getdetacheddata(fsedge *start,uint8_t *dbuff); static inline uint32_t fsnodes_getdirsize(fsnode *p,uint8_t withattr); static inline void fsnodes_getdirdata(uint32_t ts,uint32_t rootinode,uint32_t uid,uint32_t gid,uint32_t auid,uint32_t agid,uint8_t sesflags,fsnode *p,uint8_t *dbuff,uint8_t withattr); static inline void fsnodes_checkfile(fsnode *p,uint16_t chunkcount[256]); static inline uint8_t fsnodes_appendchunks(uint32_t ts,fsnode *dstobj,fsnode *srcobj); static inline void fsnodes_changefilegoal(fsnode *obj,uint8_t goal); static inline void fsnodes_change_levelgoal(fsnode *obj,uint8_t level, uint8_t goal); static inline void fsnodes_setlength(fsnode *obj,uint64_t length); static inline void fsnodes_remove_node(uint32_t ts,fsnode *toremove); static inline void fsnodes_unlink(uint32_t ts,fsedge *e); static inline int fsnodes_purge(uint32_t ts,fsnode *p); static inline uint8_t fsnodes_undel(uint32_t ts,fsnode *node); static inline void fsnodes_getgoal_recursive(fsnode *node,uint8_t gmode,uint32_t fgtab[10],uint32_t dgtab[10]); static inline void fsnodes_getlevelgoal_recursive(fsnode *node,uint8_t gmode,uint32_t fgtab[40],uint32_t dgtab[40]); static inline void fsnodes_bst_add(bstnode **n,uint32_t val); static inline uint32_t fsnodes_bst_nodes(bstnode *n); static inline void fsnodes_bst_storedata(bstnode *n,uint8_t **ptr); static inline void fsnodes_bst_free(bstnode *n); static inline void fsnodes_gettrashtime_recursive(fsnode *node,uint8_t gmode,bstnode **bstrootfiles,bstnode **bstrootdirs); static inline void fsnodes_geteattr_recursive(fsnode *node,uint8_t gmode,uint32_t feattrtab[16],uint32_t deattrtab[16]); static inline void fsnodes_setgoal_recursive(fsnode *node,uint32_t ts,uint32_t uid/*,uint8_t quota*/,uint8_t goal,uint8_t smode,uint32_t *sinodes,uint32_t *ncinodes,uint32_t *nsinodes/*,uint32_t *qeinodes*/); static inline void fsnodes_setlevelgoal_recursive(fsnode *node,uint32_t ts,uint32_t uid/*,uint8_t quota*/,uint8_t level,uint8_t goal,uint8_t smode,uint32_t *sinodes,uint32_t *ncinodes,uint32_t *nsinodes/*,uint32_t *qeinodes*/); static inline void fsnodes_settrashtime_recursive(fsnode *node,uint32_t ts,uint32_t uid,uint32_t trashtime,uint8_t smode,uint32_t *sinodes,uint32_t *ncinodes,uint32_t *nsinodes); static inline void fsnodes_seteattr_recursive(fsnode *node,uint32_t ts,uint32_t uid,uint8_t eattr,uint8_t smode,uint32_t *sinodes,uint32_t *ncinodes,uint32_t *nsinodes); static inline void fsnodes_snapshot(uint32_t ts,fsnode *srcnode,fsnode *parentnode,uint32_t nleng,const uint8_t *name); static inline uint8_t fsnodes_snapshot_test(fsnode *origsrcnode,fsnode *srcnode,fsnode *parentnode,uint32_t nleng,const uint8_t *name,uint8_t canoverwrite); static inline int fsnodes_namecheck(uint32_t nleng,const uint8_t *name); static inline int fsnodes_access(fsnode *node,uint32_t uid,uint32_t gid,uint8_t modemask,uint8_t sesflags); static inline int fsnodes_sticky_access(fsnode *parent,fsnode *node,uint32_t uid); uint8_t fs_access(uint32_t ts,uint32_t inode); uint8_t fs_readreserved_size(uint32_t rootinode,uint8_t sesflags,uint32_t *dbuffsize); void fs_readreserved_data(uint32_t rootinode,uint8_t sesflags,uint8_t *dbuff); uint8_t fs_readtrash_size(uint32_t rootinode,uint8_t sesflags,uint32_t *dbuffsize); void fs_readtrash_data(uint32_t rootinode,uint8_t sesflags,uint8_t *dbuff); uint8_t fs_getdetachedattr(uint32_t rootinode,uint8_t sesflags,uint32_t inode,uint8_t attr[35],uint8_t dtype); uint8_t fs_gettrashpath(uint32_t rootinode,uint8_t sesflags,uint32_t inode,uint32_t *pleng,uint8_t **path); uint8_t fs_setpath(uint32_t inode,const uint8_t *path); uint8_t fs_undel(uint32_t ts,uint32_t inode); uint8_t fs_purge(uint32_t ts,uint32_t inode); void fs_info(uint64_t *totalspace,uint64_t *availspace,uint64_t *trspace,uint32_t *trnodes,uint64_t *respace,uint32_t *renodes,uint32_t *inodes,uint32_t *dnodes,uint32_t *fnodes); uint8_t fs_getrootinode(uint32_t *rootinode,const uint8_t *path); void fs_statfs(uint32_t rootinode,uint8_t sesflags,uint64_t *totalspace,uint64_t *availspace,uint64_t *trspace,uint64_t *respace,uint32_t *inodes); uint8_t fs_access(uint32_t rootinode,uint8_t sesflags,uint32_t inode,uint32_t uid,uint32_t gid,int modemask); uint8_t fs_lookup(uint32_t rootinode,uint8_t sesflags,uint32_t parent,uint16_t nleng,const uint8_t *name,uint32_t uid,uint32_t gid,uint32_t auid,uint32_t agid,uint32_t *inode,uint8_t attr[35]); uint8_t fs_getattr(uint32_t rootinode,uint8_t sesflags,uint32_t inode,uint32_t uid,uint32_t gid,uint32_t auid,uint32_t agid,uint8_t attr[35]); uint8_t fs_try_setlength(uint32_t rootinode,uint8_t sesflags,uint32_t inode,uint8_t opened,uint32_t uid,uint32_t gid,uint32_t auid,uint32_t agid,uint64_t length,uint8_t attr[35],uint64_t *chunkid); uint8_t fs_trunc(uint32_t ts,uint32_t inode,uint32_t indx,uint64_t chunkid); uint8_t fs_end_setlength(uint64_t chunkid); uint8_t fs_unlock(uint64_t chunkid); uint8_t fs_do_setlength(uint32_t rootinode,uint8_t sesflags,uint32_t inode,uint32_t uid,uint32_t gid,uint32_t auid,uint32_t agid,uint64_t length,uint8_t attr[35]); uint8_t fs_setattr(uint32_t rootinode,uint8_t sesflags,uint32_t inode,uint32_t uid,uint32_t gid,uint32_t auid,uint32_t agid,uint8_t setmask,uint16_t attrmode,uint32_t attruid,uint32_t attrgid,uint32_t attratime,uint32_t attrmtime,uint8_t attr[35]); uint8_t fs_attr(uint32_t ts,uint32_t inode,uint32_t mode,uint32_t uid,uint32_t gid,uint32_t atime,uint32_t mtime); uint8_t fs_length(uint32_t ts,uint32_t inode,uint64_t length); uint8_t fs_readlink(uint32_t rootinode,uint8_t sesflags,uint32_t inode,uint32_t *pleng,uint8_t **path); uint8_t fs_symlink(uint32_t ts,uint32_t parent,uint32_t nleng,const uint8_t *name,const uint8_t *path,uint32_t uid,uint32_t gid,uint32_t inode); uint8_t fs_mknod(uint32_t rootinode,uint8_t sesflags,uint32_t parent,uint16_t nleng,const uint8_t *name,uint8_t type,uint16_t mode,uint32_t uid,uint32_t gid,uint32_t auid,uint32_t agid,uint32_t rdev,uint32_t *inode,uint8_t attr[35]); uint8_t fs_mkdir(uint32_t rootinode,uint8_t sesflags,uint32_t parent,uint16_t nleng,const uint8_t *name,uint16_t mode,uint32_t uid,uint32_t gid,uint32_t auid,uint32_t agid,uint32_t *inode,uint8_t attr[35]); uint8_t fs_create(uint32_t ts,uint32_t parent,uint32_t nleng,const uint8_t *name,uint8_t type,uint32_t mode,uint32_t uid,uint32_t gid,uint32_t rdev,uint32_t inode); uint8_t fs_unlink(uint32_t rootinode,uint8_t sesflags,uint32_t parent,uint16_t nleng,const uint8_t *name,uint32_t uid,uint32_t gid); uint8_t fs_rmdir(uint32_t rootinode,uint8_t sesflags,uint32_t parent,uint16_t nleng,const uint8_t *name,uint32_t uid,uint32_t gid); uint8_t fs_unlink(uint32_t ts,uint32_t parent,uint32_t nleng,const uint8_t *name,uint32_t inode); uint8_t fs_move(uint32_t ts,uint32_t parent_src,uint32_t nleng_src,const uint8_t *name_src,uint32_t parent_dst,uint32_t nleng_dst,const uint8_t *name_dst,uint32_t inode); uint8_t fs_link(uint32_t ts,uint32_t inode_src,uint32_t parent_dst,uint32_t nleng_dst,uint8_t *name_dst); uint8_t fs_snapshot(uint32_t ts,uint32_t inode_src,uint32_t parent_dst,uint16_t nleng_dst,uint8_t *name_dst,uint8_t canoverwrite); uint8_t fs_append(uint32_t ts,uint32_t inode,uint32_t inode_src); uint8_t fs_readdir_size(uint32_t rootinode,uint8_t sesflags,uint32_t inode,uint32_t uid,uint32_t gid,uint8_t flags,void **dnode,uint32_t *dbuffsize); void fs_readdir_data(uint32_t rootinode,uint8_t sesflags,uint32_t uid,uint32_t gid,uint32_t auid,uint32_t agid,uint8_t flags,void *dnode,uint8_t *dbuff); uint8_t fs_checkfile(uint32_t rootinode,uint8_t sesflags,uint32_t inode,uint16_t chunkcount[256]); uint8_t fs_opencheck(uint32_t rootinode,uint8_t sesflags,uint32_t inode,uint32_t uid,uint32_t gid,uint32_t auid,uint32_t agid,uint8_t flags,uint8_t attr[35]); uint8_t fs_aquire(uint32_t inode,uint32_t sessionid); uint8_t fs_release(uint32_t inode,uint32_t sessionid); uint32_t fs_newsessionid(void); uint8_t fs_session(uint32_t sessionid); uint8_t fs_readchunk(uint32_t inode,uint32_t indx,uint64_t *chunkid,uint64_t *length); uint8_t fs_writechunk(uint32_t inode,uint32_t indx,uint64_t *chunkid,uint64_t *length,uint8_t *opflag); uint8_t fs_write(uint32_t ts,uint32_t inode,uint32_t indx,uint8_t opflag,uint64_t chunkid); uint8_t fs_writeend(uint32_t inode,uint64_t length,uint64_t chunkid); void fs_incversion(uint64_t chunkid); uint8_t fs_incversion(uint64_t chunkid); uint8_t fs_repair(uint32_t rootinode,uint8_t sesflags,uint32_t inode,uint32_t uid,uint32_t gid,uint32_t *notchanged,uint32_t *erased,uint32_t *repaired); uint8_t fs_repair(uint32_t ts,uint32_t inode,uint32_t indx,uint32_t nversion); uint8_t fs_getgoal(uint32_t rootinode,uint8_t sesflags,uint32_t inode,uint8_t gmode,uint32_t fgtab[10],uint32_t dgtab[10]); uint8_t fs_getlevelgoal(uint32_t rootinode,uint8_t sesflags,uint32_t inode,uint8_t gmode,uint32_t fgtab[40],uint32_t dgtab[40]); uint8_t fs_gettrashtime_prepare(uint32_t rootinode,uint8_t sesflags,uint32_t inode,uint8_t gmode,void **fptr,void **dptr,uint32_t *fnodes,uint32_t *dnodes); void fs_gettrashtime_store(void *fptr,void *dptr,uint8_t *buff); uint8_t fs_geteattr(uint32_t rootinode,uint8_t sesflags,uint32_t inode,uint8_t gmode,uint32_t feattrtab[16],uint32_t deattrtab[16]); uint8_t fs_setgoal(uint32_t ts,uint32_t inode,uint32_t uid,uint8_t goal,uint8_t smode,uint32_t sinodes,uint32_t ncinodes,uint32_t nsinodes/*,uint32_t qeinodes*/); uint8_t fs_setlevelgoal(uint32_t ts,uint32_t inode,uint32_t uid,uint8_t level,uint8_t goal,uint8_t smode,uint32_t sinodes,uint32_t ncinodes,uint32_t nsinodes/*,uint32_t qeinodes*/); uint8_t fs_settrashtime(uint32_t ts,uint32_t inode,uint32_t uid,uint32_t trashtime,uint8_t smode,uint32_t sinodes,uint32_t ncinodes,uint32_t nsinodes); uint8_t fs_seteattr(uint32_t ts,uint32_t inode,uint32_t uid,uint8_t eattr,uint8_t smode,uint32_t sinodes,uint32_t ncinodes,uint32_t nsinodes); uint8_t fs_quotacontrol(uint32_t rootinode,uint8_t sesflags,uint32_t inode,uint8_t delflag,uint8_t *flags,uint32_t *sinodes,uint64_t *slength,uint64_t *ssize,uint64_t *srealsize,uint32_t *hinodes,uint64_t *hlength,uint64_t *hsize,uint64_t *hrealsize,uint32_t *curinodes,uint64_t *curlength,uint64_t *cursize,uint64_t *currealsize); uint32_t fs_getquotainfo_size(); void fs_getquotainfo_data(uint8_t * buff); uint32_t fs_getdirpath_size(uint32_t inode); void fs_getdirpath_data(uint32_t inode,uint8_t *buff,uint32_t size); uint8_t fs_get_dir_stats(uint32_t rootinode,uint8_t sesflags,uint32_t inode,uint32_t *inodes,uint32_t *dirs,uint32_t *files,uint32_t *chunks,uint64_t *length,uint64_t *size,uint64_t *rsize); void fs_add_files_to_chunks(); void fs_test_getdata(uint32_t *loopstart,uint32_t *loopend,uint32_t *files,uint32_t *ugfiles,uint32_t *mfiles,uint32_t *chunks,uint32_t *ugchunks,uint32_t *mchunks,char **msgbuff,uint32_t *msgbuffleng); uint32_t fs_test_log_inconsistency(fsedge *e,const char *iname,char *buff,uint32_t size); uint8_t fs_emptytrash(uint32_t ts,uint32_t freeinodes,uint32_t reservedinodes); uint8_t fs_emptyreserved(uint32_t ts,uint32_t freeinodes); uint64_t fs_getversion(); void fs_dumpedge(fsedge *e); void fs_dumpnode(fsnode *f); void fs_dumpnodes(); void fs_dumpedgelist(fsedge *e); void fs_dumpedges(fsnode *f); void fs_dumpfree(); void fs_dump(void); void fs_storeedge(fsedge *e,FILE *fd); int fs_loadedge(FILE *fd); void fs_storenode(fsnode *f,FILE *fd); void fs_storenodes(FILE *fd); void fs_storeedgelist(fsedge *e,FILE *fd); void fs_storeedges_rec(fsnode *f,FILE *fd); void fs_storeedges(FILE *fd); int fs_lostnode(fsnode *p); int fs_checknodes(); int fs_loadnodes(FILE *fd); int fs_loadedges(FILE *fd); void fs_storefree(FILE *fd); int fs_loadfree(FILE *fd); void fs_store(FILE *fd); int fs_loadnode_with_levelgoal(FILE *fd); int fs_loadnodes_with_levelgoal(FILE *fd); int fs_load_with_levelgoal(FILE *fd); void fs_storenode_with_levelgoal(fsnode *f,FILE *fd); void fs_storenodes_with_levelgoal(FILE *fd); void fs_store_with_levelgoal(FILE *fd); uint64_t fs_loadversion(FILE *fd); int fs_load(FILE *fd); void fs_new(void); int fs_emergency_storeall(const char *fname); int fs_emergency_saves(); void fs_dostoreall(void); void fs_term(void); void fs_storeall(const char *fname); void fs_term(const char *fname); int fs_loadall(void); void fs_strinit(void); void fs_cs_disconnected(void); int fs_init(void); int fs_init(const char *fname);
41ffb56c3e6daf46c18d6284c0b789b667842615f628aba9ec00b0204ffdc702
3,577
ialexyi
ATE
DRIVERs__PowerSupply__Lambda_Gen/GenPSie.c
GenPSie_selfTest
ViStatus _VI_FUNC GenPSie_selfTest (ViSession instrSession, ViPInt16 testResult, ViChar _VI_FAR testMessage[]) { ViStatus GenPSie_status = VI_SUCCESS; ViChar retStr [BUFFER_SIZE]; ViUInt32 retCnt; GenPSie_status = GenPSie_readQry (instrSession, "*TST?", retStr, &retCnt); if (GenPSie_status != VI_SUCCESS) return (GenPSie_status); if ( 0 == strcmp ("0", retStr)) { strcpy (testMessage, "Self-test passed"); *testResult = 0; } else { strcpy (testMessage, "Self-test failed"); *testResult = -1; } return (GenPSie_status); }
ViStatus _VI_FUNC GenPSie_sendCmd (ViSession instrSession, ViString cmdString); ViStatus _VI_FUNC GenPSie_close (ViSession instrSession); ViStatus _VI_FUNC GenPSie_setOvpMaxLevel (ViSession instrSession); ViStatus _VI_FUNC GenPSie_reset (ViSession instrSession); ViStatus _VI_FUNC GenPSie_saveSettings (ViSession instrSession); ViStatus _VI_FUNC GenPSie_recallSettings (ViSession instrSession); ViStatus GenPSie_convertErrNumb (ViInt32 systErr); ViBoolean GenPSie_invalidViBooleanRange (ViBoolean val); ViBoolean GenPSie_invalidViInt16Range (ViInt16 val, ViInt16 min, ViInt16 max); ViBoolean GenPSie_invalidViInt32Range (ViInt32 val, ViInt32 min, ViInt32 max); ViBoolean GenPSie_invalidViUInt8Range (ViUInt8 val, ViUInt8 min, ViUInt8 max); ViBoolean GenPSie_invalidViUInt16Range (ViUInt16 val, ViUInt16 min, ViUInt16 max); ViBoolean GenPSie_invalidViUInt32Range (ViUInt32 val, ViUInt32 min, ViUInt32 max); ViBoolean GenPSie_invalidViReal32Range (ViReal32 val, ViReal32 min, ViReal32 max); ViBoolean GenPSie_invalidViReal64Range (ViReal64 val, ViReal64 min, ViReal64 max); ViStatus _VI_FUNC GenPSie_STB (ViSession instrSession, ViUInt16* spollByte); void GenPSie_waitMS (ViUInt16 mSecWait); ViStatus GenPSie_defaultInstrSetup (ViSession instrSession);
1296c6f6351d80ea37a61baacfff2b7b96b9a3c444b771febf44c848e41aa362
721
Rajesh-Sec-Project
simon
hard.d/leds_board/soft/drivers/src_peripherals/stm32f10x_tim.c
TIM_SetIC1Prescaler
void TIM_SetIC1Prescaler(TIM_TypeDef* TIMx, uint16_t TIM_ICPSC) { assert_param(IS_TIM_LIST8_PERIPH(TIMx)); assert_param(IS_TIM_IC_PRESCALER(TIM_ICPSC)); TIMx->CCMR1 &= (uint16_t) ~((uint16_t)TIM_CCMR1_IC1PSC); TIMx->CCMR1 |= TIM_ICPSC; }
void TIM_DeInit(TIM_TypeDef* TIMx); void TIM_TimeBaseInit(TIM_TypeDef* TIMx, TIM_TimeBaseInitTypeDef* TIM_TimeBaseInitStruct); void TIM_OC1Init(TIM_TypeDef* TIMx, TIM_OCInitTypeDef* TIM_OCInitStruct); void TIM_OC2Init(TIM_TypeDef* TIMx, TIM_OCInitTypeDef* TIM_OCInitStruct); void TIM_OC3Init(TIM_TypeDef* TIMx, TIM_OCInitTypeDef* TIM_OCInitStruct); void TIM_OC4Init(TIM_TypeDef* TIMx, TIM_OCInitTypeDef* TIM_OCInitStruct); void TIM_ICInit(TIM_TypeDef* TIMx, TIM_ICInitTypeDef* TIM_ICInitStruct); void TIM_PWMIConfig(TIM_TypeDef* TIMx, TIM_ICInitTypeDef* TIM_ICInitStruct); void TIM_BDTRConfig(TIM_TypeDef* TIMx, TIM_BDTRInitTypeDef* TIM_BDTRInitStruct); void TIM_TimeBaseStructInit(TIM_TimeBaseInitTypeDef* TIM_TimeBaseInitStruct); void TIM_OCStructInit(TIM_OCInitTypeDef* TIM_OCInitStruct); void TIM_ICStructInit(TIM_ICInitTypeDef* TIM_ICInitStruct); void TIM_BDTRStructInit(TIM_BDTRInitTypeDef* TIM_BDTRInitStruct); void TIM_Cmd(TIM_TypeDef* TIMx, FunctionalState NewState); void TIM_CtrlPWMOutputs(TIM_TypeDef* TIMx, FunctionalState NewState); void TIM_ITConfig(TIM_TypeDef* TIMx, uint16_t TIM_IT, FunctionalState NewState); void TIM_GenerateEvent(TIM_TypeDef* TIMx, uint16_t TIM_EventSource); void TIM_DMAConfig(TIM_TypeDef* TIMx, uint16_t TIM_DMABase, uint16_t TIM_DMABurstLength); void TIM_DMACmd(TIM_TypeDef* TIMx, uint16_t TIM_DMASource, FunctionalState NewState); void TIM_InternalClockConfig(TIM_TypeDef* TIMx); void TIM_ITRxExternalClockConfig(TIM_TypeDef* TIMx, uint16_t TIM_InputTriggerSource); void TIM_TIxExternalClockConfig(TIM_TypeDef* TIMx, uint16_t TIM_TIxExternalCLKSource, uint16_t TIM_ICPolarity, uint16_t ICFilter); void TIM_ETRClockMode1Config(TIM_TypeDef* TIMx, uint16_t TIM_ExtTRGPrescaler, uint16_t TIM_ExtTRGPolarity, uint16_t ExtTRGFilter); void TIM_ETRClockMode2Config(TIM_TypeDef* TIMx, uint16_t TIM_ExtTRGPrescaler, uint16_t TIM_ExtTRGPolarity, uint16_t ExtTRGFilter); void TIM_ETRConfig(TIM_TypeDef* TIMx, uint16_t TIM_ExtTRGPrescaler, uint16_t TIM_ExtTRGPolarity, uint16_t ExtTRGFilter); void TIM_PrescalerConfig(TIM_TypeDef* TIMx, uint16_t Prescaler, uint16_t TIM_PSCReloadMode); void TIM_CounterModeConfig(TIM_TypeDef* TIMx, uint16_t TIM_CounterMode); void TIM_SelectInputTrigger(TIM_TypeDef* TIMx, uint16_t TIM_InputTriggerSource); void TIM_EncoderInterfaceConfig(TIM_TypeDef* TIMx, uint16_t TIM_EncoderMode, uint16_t TIM_IC1Polarity, uint16_t TIM_IC2Polarity); void TIM_ForcedOC1Config(TIM_TypeDef* TIMx, uint16_t TIM_ForcedAction); void TIM_ForcedOC2Config(TIM_TypeDef* TIMx, uint16_t TIM_ForcedAction); void TIM_ForcedOC3Config(TIM_TypeDef* TIMx, uint16_t TIM_ForcedAction); void TIM_ForcedOC4Config(TIM_TypeDef* TIMx, uint16_t TIM_ForcedAction); void TIM_ARRPreloadConfig(TIM_TypeDef* TIMx, FunctionalState NewState); void TIM_SelectCOM(TIM_TypeDef* TIMx, FunctionalState NewState); void TIM_SelectCCDMA(TIM_TypeDef* TIMx, FunctionalState NewState); void TIM_CCPreloadControl(TIM_TypeDef* TIMx, FunctionalState NewState); void TIM_OC1PreloadConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCPreload); void TIM_OC2PreloadConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCPreload); void TIM_OC3PreloadConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCPreload); void TIM_OC4PreloadConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCPreload); void TIM_OC1FastConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCFast); void TIM_OC2FastConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCFast); void TIM_OC3FastConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCFast); void TIM_OC4FastConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCFast); void TIM_ClearOC1Ref(TIM_TypeDef* TIMx, uint16_t TIM_OCClear); void TIM_ClearOC2Ref(TIM_TypeDef* TIMx, uint16_t TIM_OCClear); void TIM_ClearOC3Ref(TIM_TypeDef* TIMx, uint16_t TIM_OCClear); void TIM_ClearOC4Ref(TIM_TypeDef* TIMx, uint16_t TIM_OCClear); void TIM_OC1PolarityConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCPolarity); void TIM_OC1NPolarityConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCNPolarity); void TIM_OC2PolarityConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCPolarity); void TIM_OC2NPolarityConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCNPolarity); void TIM_OC3PolarityConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCPolarity); void TIM_OC3NPolarityConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCNPolarity); void TIM_OC4PolarityConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCPolarity); void TIM_CCxCmd(TIM_TypeDef* TIMx, uint16_t TIM_Channel, uint16_t TIM_CCx); void TIM_CCxNCmd(TIM_TypeDef* TIMx, uint16_t TIM_Channel, uint16_t TIM_CCxN); void TIM_SelectOCxM(TIM_TypeDef* TIMx, uint16_t TIM_Channel, uint16_t TIM_OCMode); void TIM_UpdateDisableConfig(TIM_TypeDef* TIMx, FunctionalState NewState); void TIM_UpdateRequestConfig(TIM_TypeDef* TIMx, uint16_t TIM_UpdateSource); void TIM_SelectHallSensor(TIM_TypeDef* TIMx, FunctionalState NewState); void TIM_SelectOnePulseMode(TIM_TypeDef* TIMx, uint16_t TIM_OPMode); void TIM_SelectOutputTrigger(TIM_TypeDef* TIMx, uint16_t TIM_TRGOSource); void TIM_SelectSlaveMode(TIM_TypeDef* TIMx, uint16_t TIM_SlaveMode); void TIM_SelectMasterSlaveMode(TIM_TypeDef* TIMx, uint16_t TIM_MasterSlaveMode); void TIM_SetCounter(TIM_TypeDef* TIMx, uint16_t Counter); void TIM_SetAutoreload(TIM_TypeDef* TIMx, uint16_t Autoreload); void TIM_SetCompare1(TIM_TypeDef* TIMx, uint16_t Compare1); void TIM_SetCompare2(TIM_TypeDef* TIMx, uint16_t Compare2); void TIM_SetCompare3(TIM_TypeDef* TIMx, uint16_t Compare3); void TIM_SetCompare4(TIM_TypeDef* TIMx, uint16_t Compare4); void TIM_SetIC2Prescaler(TIM_TypeDef* TIMx, uint16_t TIM_ICPSC); void TIM_SetIC3Prescaler(TIM_TypeDef* TIMx, uint16_t TIM_ICPSC); void TIM_SetIC4Prescaler(TIM_TypeDef* TIMx, uint16_t TIM_ICPSC); void TIM_SetClockDivision(TIM_TypeDef* TIMx, uint16_t TIM_CKD); uint16_t TIM_GetCapture1(TIM_TypeDef* TIMx); uint16_t TIM_GetCapture2(TIM_TypeDef* TIMx); uint16_t TIM_GetCapture3(TIM_TypeDef* TIMx); uint16_t TIM_GetCapture4(TIM_TypeDef* TIMx); uint16_t TIM_GetCounter(TIM_TypeDef* TIMx); uint16_t TIM_GetPrescaler(TIM_TypeDef* TIMx); FlagStatus TIM_GetFlagStatus(TIM_TypeDef* TIMx, uint16_t TIM_FLAG); void TIM_ClearFlag(TIM_TypeDef* TIMx, uint16_t TIM_FLAG); ITStatus TIM_GetITStatus(TIM_TypeDef* TIMx, uint16_t TIM_IT); void TIM_ClearITPendingBit(TIM_TypeDef* TIMx, uint16_t TIM_IT); static void TI1_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint16_t TIM_ICSelection, uint16_t TIM_ICFilter); static void TI2_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint16_t TIM_ICSelection, uint16_t TIM_ICFilter); static void TI3_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint16_t TIM_ICSelection, uint16_t TIM_ICFilter); static void TI4_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint16_t TIM_ICSelection, uint16_t TIM_ICFilter);
0ed82c58a9a510bf4a3f5c49d1e90cb56779aba96e047a0f5b9ebb119e0a0d81
272
wayling
xboot-clone
src/arch/arm/mach-mid560/driver/s3c6410-mmc.c
ClearCommandCompleteStatus
static void ClearCommandCompleteStatus(void) { writew(S3C6410_HM_NORINTSTS1, 1 << 0); while (readw(S3C6410_HM_NORINTSTS1) & 0x1) { writew(S3C6410_HM_NORINTSTS1, 1 << 0); } }
static void set_cmd_register (u16_t cmd, u32_t data, u32_t flags); static int wait_for_cmd_done (void); static void ClearErrInterruptStatus(void); static void InterruptEnable(u16_t NormalIntEn, u16_t ErrorIntEn); static void set_hostctl_speed (u8_t mode); static void hsmmc_clock_onoff(bool_t on); static void set_clock (u32_t clksrc, u32_t div); static int issue_command (u16_t cmd, u32_t arg, u32_t data, u32_t flags); static int set_mmc_ocr (void); static int set_sd_ocr (void); static void display_card_info (void); static void mmc_init(void); static __init void s3c6410_mmc_init(void); static __exit void s3c6410_mmc_exit(void);
53583daeff6b093b0ed9bc3cefe4db9a8130578e115bcbef5a066332c4c9630e
179
Cabalist
Mycodo
2.0/mycodo/source/mycodo-1.7.c
CheckTemp
int CheckTemp (void) { if ( temp < minTemp ) { tempState = 1; printf("< minTemp. Heat On."); } else if ( temp >= minTemp && temp < maxTemp) { tempState = 2; printf(">= minTemp. Heat off until < minTemp."); } else if ( temp >= highTemp ) { tempState = 3; printf("> highTemp. Heat Off, All fans On."); } else { if ( tempState == 2 ) printf("Heat off until < minTemp."); else printf("Heat on until > minTemp."); return; } writeCfg(); return 0; }
int main( int argc, char *argv[] ); int readCfg (void); int writeCfg (void); int CheckHum (void); int ChangeRelays (double tdiff, double hdiff);
8b3001cdcb5f48ed486f17d70b7ad2bb2e546a98b833f352f9aedcdde10241bd
477
dduval
kernel-rhel4
drivers/xen/xenbus/xenbus_probe.c
exists_disconnected_device
static int exists_disconnected_device(struct device_driver *drv) { if (xenbus_frontend.error) return xenbus_frontend.error; return bus_for_each_dev(&xenbus_frontend.bus, NULL, drv, is_disconnected_device); }
static int xenbus_match(struct device *_dev, struct device_driver *_drv); static int frontend_bus_id(char bus_id[BUS_ID_SIZE], const char *nodename); static void free_otherend_details(struct xenbus_device *dev); static void free_otherend_watch(struct xenbus_device *dev); static int read_backend_details(struct xenbus_device *xendev); static int read_frontend_details(struct xenbus_device *xendev); static int backend_bus_id(char bus_id[BUS_ID_SIZE], const char *nodename); static int talk_to_otherend(struct xenbus_device *dev); static int watch_otherend(struct xenbus_device *dev); static int xenbus_dev_probe(struct device *_dev); static int xenbus_dev_remove(struct device *_dev); static void xenbus_dev_shutdown(struct device *_dev); int xenbus_register_frontend(struct xenbus_driver *drv); int xenbus_register_backend(struct xenbus_driver *drv); void xenbus_unregister_driver(struct xenbus_driver *drv); static int cmp_dev(struct device *dev, void *data); static int cleanup_dev(struct device *dev, void *data); static void xenbus_cleanup_devices(const char *path, struct bus_type *bus); static void xenbus_dev_release(struct device *dev); char *kasprintf(gfp_t gfp, const char *fmt, ...); static ssize_t xendev_show_nodename(struct device *dev, char *buf); static ssize_t xendev_show_devtype(struct device *dev, char *buf); static int xenbus_probe_frontend(const char *type, const char *name); static int xenbus_probe_backend(const char *type, const char *domid); static int xenbus_probe_device_type(struct xen_bus_type *bus, const char *type); static int xenbus_probe_devices(struct xen_bus_type *bus); static unsigned int char_count(const char *str, char c); static int strsep_len(const char *str, char c, unsigned int len); static void dev_changed(const char *node, struct xen_bus_type *bus); static int suspend_dev(struct device *dev, void *data); static int suspend_cancel_dev(struct device *dev, void *data); static int resume_dev(struct device *dev, void *data); void xenbus_suspend(void); void xenbus_resume(void); void xenbus_suspend_cancel(void); int register_xenstore_notifier(struct notifier_block *nb); void unregister_xenstore_notifier(struct notifier_block *nb); static int all_devices_ready_(struct device *dev, void *data); static int all_devices_ready(void); void xenbus_probe(void *unused); static int xsd_kva_mmap(struct file *file, struct vm_area_struct *vma); static int __init xenbus_probe_init(void); int xenbus_init(void); static int is_disconnected_device(struct device *dev, void *data); static int print_device_status(struct device *dev, void *data); static void wait_for_devices(struct xenbus_driver *xendrv); static int __init boot_wait_for_devices(void);
a9d477ab392f8d1bd3586ea11e83c3b689c7706f7079d7533a48e69f9d8a5973
237
jcmcclurg
serverpower
unused/transcoders/libav-11.4/libavcodec/libgsmenc.c
libgsm_encode_init
static av_cold int libgsm_encode_init(AVCodecContext *avctx) { if (avctx->channels > 1) { av_log(avctx, AV_LOG_ERROR, "Mono required for GSM, got %d channels\n", avctx->channels); return -1; } if (avctx->sample_rate != 8000) { av_log(avctx, AV_LOG_ERROR, "Sample rate 8000Hz required for GSM, got %dHz\n", avctx->sample_rate); if (avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) return -1; } if (avctx->bit_rate != 13000 && avctx->bit_rate != 13200 && avctx->bit_rate != 0 ) { av_log(avctx, AV_LOG_ERROR, "Bitrate 13000bps required for GSM, got %dbps\n", avctx->bit_rate); if (avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) return -1; } avctx->priv_data = gsm_create(); switch(avctx->codec_id) { case AV_CODEC_ID_GSM: avctx->frame_size = GSM_FRAME_SIZE; avctx->block_align = GSM_BLOCK_SIZE; break; case AV_CODEC_ID_GSM_MS: { int one = 1; gsm_option(avctx->priv_data, GSM_OPT_WAV49, &one); avctx->frame_size = 2*GSM_FRAME_SIZE; avctx->block_align = GSM_MS_BLOCK_SIZE; } } return 0; }
static av_cold int libgsm_encode_close(AVCodecContext *avctx);
4280c5bd0493b2b452c9609a1f589132f4488b48773014755ac124966d6b0fc3
1,257
Denshikobo-Life
bcmlib_for_java
common/bi_common.c
dump_buff
void dump_buff(void) { int i; printf("pid=%d ",pid); printf("w_buff=%08x wp=%d rp=%d \n",w_buff,w_buff->wp,w_buff->rp); printf("r_buff=%08x wp=%d rp=%d \n",r_buff,r_buff->wp,r_buff->rp); for( i=0;i<wp;i++) { printf("%02x ",buff[i]); } printf(" \n"); }
int calc_data_size( struct ring_buff *rb); int calc_rest_size( struct ring_buff *rb); int put_ring_buff(struct ring_buff *rb, char *str, int len ); int get_ring_buff(struct ring_buff *rb, char *buff, int max_len); void init_ring_buff(struct ring_buff *rb, int init_type); void set_ope_code( unsigned char ope_code); void set_byte_code( unsigned char code); void set_short_code( short int code ); void set_int_code( int code); void set_long_code( long code); void get_ope_code( void ); void get_byte_code( void ); void get_short_code( void ); void get_int_code( void ); void get_long_code( void ); void copy_str( char *dest, char* src, int len); int context_switch( int max_count);
4325995241b02a6400c685184af2d677efbf547f8ce2868fd7d60ca92e5b2c82
291
scs
uclinux
user/blkfin-apps/vlc/vlc-0.8.6b/src/playlist/playlist.c
playlist_PreparseEnqueueItem
int playlist_PreparseEnqueueItem( playlist_t *p_playlist, playlist_item_t *p_item ) { vlc_mutex_lock( &p_playlist->object_lock ); vlc_mutex_lock( &p_playlist->p_preparse->object_lock ); playlist_PreparseEnqueueItemSub( p_playlist, p_item ); vlc_mutex_unlock( &p_playlist->p_preparse->object_lock ); vlc_mutex_unlock( &p_playlist->object_lock ); return VLC_SUCCESS; }
playlist_item_t *playlist_RecursiveFindLast(playlist_t *p_playlist, playlist_item_t *p_node ); playlist_t * __playlist_Create ( vlc_object_t *p_parent ); int playlist_Destroy( playlist_t * p_playlist ); int playlist_LockControl( playlist_t * p_playlist, int i_query, ... ); int playlist_Control( playlist_t * p_playlist, int i_query, ... ); int playlist_vaControl( playlist_t * p_playlist, int i_query, va_list args ); int playlist_PreparseEnqueue( playlist_t *p_playlist, input_item_t *p_item ); void playlist_PreparseEnqueueItemSub( playlist_t *p_playlist, playlist_item_t *p_item ); static mtime_t ObjectGarbageCollector( playlist_t *p_playlist, int i_type, mtime_t destroy_date ); static void RunThread ( playlist_t *p_playlist ); static void RunPreparse ( playlist_preparse_t *p_obj ); static playlist_item_t * NextItem( playlist_t *p_playlist ); static int PlayItem( playlist_t *p_playlist, playlist_item_t *p_item );
3ceb705c71b926b097fbe56e6c3d9f13b1ea60ccd4029afccde7c217c990b94c
425
sisuani
iaxclient
lib/libiax2/src/iax.c
iax_enable_jitterbuffer
void iax_enable_jitterbuffer(void) { iax_use_jitterbuffer = 1; }
void iax_enable_debug(void); void iax_disable_debug(void); void iax_disable_jitterbuffer(void); void iax_set_private(struct iax_session *s, void *ptr); void *iax_get_private(struct iax_session *s); void iax_set_sendto(struct iax_session *s, iax_sendto_t ptr); static int __debug(const char *file, int lineno, const char *fmt, ...); static int __debug(const char *file, int lineno, const char *func, const char *fmt, ...); void iax_seed_random(); int iax_random(); unsigned int iax_session_get_capability(struct iax_session *s); static int inaddrcmp(struct sockaddr_in *sin1, struct sockaddr_in *sin2); static int iax_sched_add(struct iax_event *event, struct iax_frame *frame, sched_func func, void *arg, int ms); static int iax_sched_del(struct iax_event *event, struct iax_frame *frame, sched_func func, void *arg, int all); int iax_time_to_next_event(void); struct iax_session *iax_session_new(void); static int iax_session_valid(struct iax_session *session); int iax_get_netstats(struct iax_session *session, int *rtt, struct iax_netstat *local, struct iax_netstat *remote); static void add_ms(struct timeval *tv, int ms); static int calc_timestamp(struct iax_session *session, unsigned int ts, struct ast_frame *f); static unsigned char get_n_bits_at(unsigned char *data, int n, int bit); static int speex_get_wb_sz_at(unsigned char *data, int len, int bit); static int speex_get_samples(unsigned char *data, int len); static inline int get_interp_len(int format); static int get_sample_cnt(struct iax_event *e); static int iax_xmit_frame(struct iax_frame *f); static int iax_reliable_xmit(struct iax_frame *f); void iax_set_networking(iax_sendto_t st, iax_recvfrom_t rf); void iax_set_jb_target_extra( long value ); int iax_init(int preferredportno);
e1572771bbda6c49fdb68524da23c6bcde97e66275a14b7918cbeb6b9227691d
66
danielgpalmer
linux-picosam9g45
sound/usb/pcm.c
snd_usb_pcm_pointer
static snd_pcm_uframes_t snd_usb_pcm_pointer(struct snd_pcm_substream *substream) { struct snd_usb_substream *subs; unsigned int hwptr_done; subs = (struct snd_usb_substream *)substream->runtime->private_data; spin_lock(&subs->lock); hwptr_done = subs->hwptr_done; substream->runtime->delay = snd_usb_pcm_delay(subs, substream->runtime->rate); spin_unlock(&subs->lock); return hwptr_done / (substream->runtime->frame_bits >> 3); }
static int start_endpoints(struct snd_usb_substream *subs); static int activate_endpoints(struct snd_usb_substream *subs); static int deactivate_endpoints(struct snd_usb_substream *subs); static int set_format(struct snd_usb_substream *subs, struct audioformat *fmt); static int snd_usb_hw_free(struct snd_pcm_substream *substream); static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream); static int setup_hw_info(struct snd_pcm_runtime *runtime, struct snd_usb_substream *subs); static int snd_usb_pcm_open(struct snd_pcm_substream *substream, int direction); static int snd_usb_pcm_close(struct snd_pcm_substream *substream, int direction); static int snd_usb_playback_open(struct snd_pcm_substream *substream); static int snd_usb_playback_close(struct snd_pcm_substream *substream); static int snd_usb_capture_open(struct snd_pcm_substream *substream); static int snd_usb_capture_close(struct snd_pcm_substream *substream); int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substream, int cmd); void snd_usb_set_pcm_ops(struct snd_pcm *pcm, int stream);
d0d80838d7dd0be7f246633816aa1af2fc9776908f2e95cd30ccb651e2503b3c
446
bogus
mydlp-host-win32
libclamav/scanners.c
cli_scanmschm
static int cli_scanmschm(int desc, cli_ctx *ctx) { int ret = CL_CLEAN, rc; chm_metadata_t metadata; char *dir; cli_dbgmsg("in cli_scanmschm()\n"); if(!(dir = cli_gentemp(ctx->engine->tmpdir))) return CL_EMEM; if(mkdir(dir, 0700)) { cli_dbgmsg("CHM: Can't create temporary directory %s\n", dir); free(dir); return CL_ETMPDIR; } ret = cli_chm_open(desc, dir, &metadata, ctx); if (ret != CL_SUCCESS) { if(!ctx->engine->keeptmp) cli_rmdirs(dir); free(dir); cli_dbgmsg("CHM: Error: %s\n", cl_strerror(ret)); return ret; } do { ret = cli_chm_prepare_file(&metadata); if (ret != CL_SUCCESS) { break; } ret = cli_chm_extract_file(dir, &metadata, ctx); if (ret == CL_SUCCESS) { lseek(metadata.ofd, 0, SEEK_SET); rc = cli_magic_scandesc(metadata.ofd, ctx); close(metadata.ofd); if (rc == CL_VIRUS) { cli_dbgmsg("CHM: infected with %s\n",*ctx->virname); ret = CL_VIRUS; break; } } } while(ret == CL_SUCCESS); cli_chm_close(&metadata); if(!ctx->engine->keeptmp) cli_rmdirs(dir); free(dir); cli_dbgmsg("CHM: Exit code: %d\n", ret); if (ret == CL_BREAK) ret = CL_CLEAN; return ret; }
static int cli_unrar_scanmetadata(int desc, unrar_metadata_t *metadata, cli_ctx *ctx, unsigned int files, uint32_t* sfx_check); static int cli_scanrar(int desc, cli_ctx *ctx, off_t sfx_offset, uint32_t *sfx_check); static int cli_scanarj(int desc, cli_ctx *ctx, off_t sfx_offset, uint32_t *sfx_check); static int cli_scangzip_with_zib_from_the_80s(cli_ctx *ctx, unsigned char *buff); static int cli_scangzip(cli_ctx *ctx); static int cli_scanbzip(int desc, cli_ctx *ctx); static int cli_scanbzip(int desc, cli_ctx *ctx); static int cli_scanszdd(int desc, cli_ctx *ctx); static int cli_scanmscab(int desc, cli_ctx *ctx, off_t sfx_offset); static int cli_scanhtml(cli_ctx *ctx); static int cli_scanscript(cli_ctx *ctx); static int cli_scanhtml_utf16(cli_ctx *ctx); static int cli_scanole2(cli_ctx *ctx); static int cli_scanole2_structured(cli_ctx *ctx); static int cli_scanpdf_structured(cli_ctx *ctx); static int cli_scanps_structured(cli_ctx *ctx); static int cli_scantar(int desc, cli_ctx *ctx, unsigned int posix); static int cli_scanscrenc(int desc, cli_ctx *ctx); static int cli_scanriff(int desc, cli_ctx *ctx); static int cli_scanjpeg(int desc, cli_ctx *ctx); static int cli_scancryptff(int desc, cli_ctx *ctx); static int cli_scanpdf(cli_ctx *ctx, off_t offset); static int cli_scantnef(int desc, cli_ctx *ctx); static int cli_scanuuencoded(cli_ctx *ctx); static int cli_scanmail(int desc, cli_ctx *ctx); static int cli_scan_structured(int desc, cli_ctx *ctx); static int cli_scanembpe(int desc, cli_ctx *ctx); static int cli_scanraw(cli_ctx *ctx, cli_file_t type, uint8_t typercg, cli_file_t *dettype, unsigned char *refhash); static void emax_reached(cli_ctx *ctx); int cli_magic_scandesc(int desc, cli_ctx *ctx); int cl_scandesc(int desc, const char **virname, unsigned long int *scanned, const struct cl_engine *engine, unsigned int scanoptions); int cli_found_possibly_unwanted(cli_ctx* ctx); static int cli_scanfile(const char *filename, cli_ctx *ctx); int cl_scanfile(const char *filename, const char **virname, unsigned long int *scanned, const struct cl_engine *engine, unsigned int scanoptions);
8991e47ed1d6d67c38b212f6570940197b51f710ab0dfede1453024dc06cf404
1,209
execunix
vinos
gnu/dist/diffutils/src/context.c
void print_context_header
void print_context_header (struct file_data inf[], bool unidiff) { if (unidiff) { print_context_label ("---", &inf[0], file_label[0]); print_context_label ("+++", &inf[1], file_label[1]); } else { print_context_label ("***", &inf[0], file_label[0]); print_context_label ("---", &inf[1], file_label[1]); } }
55e2ab3ec5a26df9c8e325374fc390d63b81a7a129c349c0a29f9db5d5d5e4db
351
Alex-V2
One_M8_4.4.3_kernel
drivers/media/platform/msm/camera_v2/sensor/actuator/LC898111/OisCmd.c
; if
UnDwdVal StTneVal, unsigned char UcTneAxs ) { long SlSetBia ; unsigned short UsSetBia ; unsigned char UcChkFst ; static unsigned short UsTneVax ; UcChkFst = 1 ; if ( UsStpSiz == 1) { UsTneVax = 2 ; if ( ( StTneVal.StDwdVal.UsHigVal + StTneVal.StDwdVal.UsLowVal ) / 2 < BIAS_ADJ_BORDER ) { UcChkFst = 0 ; } if( ( UcTneAxs & 0xF0 ) && UcChkFst ) { ; }else{ if ( !UcTneAxs ) { RamWriteA( DAHLXB, 0x8001 ) ; RamWriteA( DAHLXO, 0x0000 ) ; UsStpSiz = BIAS_LIMIT / UsTneVax ; } else { RamWriteA( DAHLYB, 0x8001 ) ; RamWriteA( DAHLYO, 0x0000 ) ; UsStpSiz = BIAS_LIMIT / UsTneVax ; } } } if ( !( UcTneAxs & 0x0F ) ) { RamReadA( DAHLXB, &UsSetBia ) ; SlSetBia = ( long )UsSetBia ; } else { RamReadA( DAHLYB, &UsSetBia ) ; SlSetBia = ( long )UsSetBia ; } if( SlSetBia > 0x00008000 ) { SlSetBia |= 0xFFFF0000 ; } if( UcChkFst ) { if( UcTneAxs & 0xF0 ) { if ( ( StTneVal.StDwdVal.UsHigVal + StTneVal.StDwdVal.UsLowVal ) / 2 > BIAS_ADJ_BORDER ) { SlSetBia += 0x0100 ; } else { SlSetBia -= 0x0100 ; } UsStpSiz = 0x0200 ; }else{ if ( ( StTneVal.StDwdVal.UsHigVal + StTneVal.StDwdVal.UsLowVal ) / 2 > BIAS_ADJ_BORDER ) { SlSetBia += UsStpSiz ; } else { SlSetBia -= UsStpSiz ; } UsTneVax = UsTneVax * 2 ; UsStpSiz = BIAS_LIMIT / UsTneVax ; } } if( SlSetBia > ( long )0x00007FFF ) { SlSetBia = 0x00007FFF ; } else if( SlSetBia < ( long )0xFFFF8001 ) { SlSetBia = 0xFFFF8001 ; } if ( !( UcTneAxs & 0x0F ) ) { RamWriteA( DAHLXB, SlSetBia ) ; } else { RamWriteA( DAHLYB, SlSetBia ) ; } StTneVal.UlDwdVal = TnePtp( UcTneAxs & 0x0F , PTP_AFTER ) ; return( StTneVal.UlDwdVal ) ; }
unsigned short TneRun( void ); unsigned long TnePtp ( unsigned char UcDirSel, unsigned char UcBfrAft ); unsigned char UcTneAxs, UnDwdVal StTneVal ); UnDwdVal StTneVal, unsigned char UcTneAxs ); char UcMesMod ); char UcDirSel, unsigned char UcSwcCon ); unsigned char UcDirSel ); char UcDirSel ); char UcDirSel ); char UcDirSel, unsigned char UcSonOff ); unsigned char UcDirSel ); BsyWit( DLYCLR2, 0xC0 ); unsigned char UcXg1Xg2 ); void ); riteA( GSHTON, 0x00 ); DIR, ON ); STR ); H1COEF_CHANGER SetH1cMod( S2MODE ); ); p,X-amp,DAC,ADC Standby */ RegWriteA( PWMA, 0x00 ); oomStepDat > (ZOOMTBL - 1); iteA( HXINOD , UsOptXval ); Ý’肵‚Ä‚­‚¾‚³‚¢@ // - RAM:1290h`12A8h (ƒTƒCƒ“”gƒe[ƒuƒ‹); 0E3 [ SINXADD(7:0); //============================================================================== // Function : StopMeasFil(); /============================================================================== // Function : LoopGainAdj(); ( GYRO_GAIN_X, 4, ( unsigned char * ); 0x0083 Linear•â³OFF RegWriteA( LYEQFC2 , 0x00 ); Filter1 Equalizer ON RegWriteA( MSF2EN, 0x01 ); gyl2b_2, MAXLMT );
7c8b50bb0ec6df1d1e22b183b68eb8d1a36b6eb27d4efa34bd02deb6bcee31e3
1,809
ryo-on
vmkdrivers-gpl
vmkdrivers/src_9/drivers/net/nx_nic/unm_nic_main.c
vlan_accel_setup
static void vlan_accel_setup(struct unm_adapter_s *adapter, struct net_device *netdev) { if (adapter->ahw.fw_capabilities_1 & NX_FW_CAPABILITY_FVLANTX) { netdev->features |= NETIF_F_HW_VLAN_RX; netdev->vlan_rx_register = nx_vlan_rx_register; netdev->vlan_rx_kill_vid = nx_rx_kill_vid; netdev->features |= NETIF_F_HW_VLAN_TX; NX_NIC_TRC_FN(adapter, vlan_accel_setup, NX_FW_CAPABILITY_FVLANTX); } }
U32 nx_os_free_mem(nx_dev_handle_t handle, void *addr, U32 len, U32 flags); void nx_os_nic_reg_read_w0(nx_dev_handle_t handle, U32 index, U32 * value); void nx_os_nic_reg_write_w0(nx_dev_handle_t handle, U32 index, U32 value); void nx_os_nic_reg_read_w1(nx_dev_handle_t handle, U64 off, U32 * value); void nx_os_nic_reg_write_w1(nx_dev_handle_t handle, U64 off, U32 val); void nx_init_napi (struct unm_adapter_s *adapter); void nx_napi_enable(struct unm_adapter_s *adapter); void nx_napi_disable(struct unm_adapter_s *adapter); static int nx_alloc_adapter_sds_rings(struct unm_adapter_s *adapter); static void nx_verify_module_params(void); static void unm_check_options(unm_adapter *adapter); static int get_flash_mac_addr(struct unm_adapter_s *adapter, uint64_t mac[]); static int initialize_dummy_dma(unm_adapter *adapter); static void destroy_dummy_dma(unm_adapter *adapter); static void nx_reset_msix_bit(struct pci_dev *pdev); static int nx_nic_setup_minidump(struct unm_adapter_s *adapter); static void nx_nic_cleanup_minidump(struct unm_adapter_s *adapter); static void nx_nic_logs_free (struct unm_adapter_s *adapter); static void cleanup_adapter(struct unm_adapter_s *adapter); static int nx_set_dma_mask(struct unm_adapter_s *adapter, uint8_t revision_id); static void nx_set_num_rx_queues(unm_adapter *adapter); static void init_msix_entries(struct unm_adapter_s *adapter); static inline int unm_pci_region_offset(struct pci_dev *pdev, int region); static inline int unm_pci_region_len(struct pci_dev *pdev, int region); static void nx_hwbug_8_workaround(struct pci_dev *pdev); static int nx_enable_msi_x(struct unm_adapter_s *adapter); static int nx_enable_msi(struct unm_adapter_s *adapter); static int nx_read_flashed_versions(struct unm_adapter_s *adapter); static int nx_start_firmware(struct unm_adapter_s *adapter); static int __devinit get_adapter_attr(struct unm_adapter_s *adapter); static void nx_rx_kill_vid(struct net_device *netdev, unsigned short vid); static int initialize_adapter_hw(struct unm_adapter_s *adapter); static int init_firmware(struct unm_adapter_s *adapter); static void unm_nic_free_ring_context(struct unm_adapter_s *adapter); static void unm_nic_free_ring_context_in_fw(struct unm_adapter_s *adapter, int ctx_destroy); void unm_nic_free_hw_resources(struct unm_adapter_s *adapter); static void inline unm_nic_clear_stats(struct unm_adapter_s *adapter); static int unm_nic_attach(struct unm_adapter_s *adapter); static void nx_nic_p3_free_mac_list(struct unm_adapter_s *adapter); static void unm_nic_detach(struct unm_adapter_s *adapter, int ctx_destroy); static void __devexit unm_nic_remove(struct pci_dev *pdev); static int nx_config_rss(struct unm_adapter_s *adapter, int enable); int nx_nic_multictx_get_filter_count(struct net_device *netdev, int queue_type); struct napi_struct * nx_nic_multictx_get_napi(struct net_device *netdev , int queue_id); int nx_nic_multictx_get_ctx_count(struct net_device *netdev, int queue_type); int nx_nic_multictx_get_queue_vector(struct net_device *netdev, int qid); int nx_nic_multictx_get_default_rx_queue(struct net_device *netdev); int nx_nic_multictx_alloc_tx_ctx(struct net_device *netdev); int nx_nic_multictx_alloc_rx_ctx(struct net_device *netdev); int nx_nic_create_rx_ctx(struct net_device *netdev); int nx_nic_multictx_free_tx_ctx(struct net_device *netdev, int ctx_id); int nx_nic_multictx_free_rx_ctx(struct net_device *netdev, int ctx_id); int nx_nic_multictx_set_rx_rule(struct net_device *netdev, int ctx_id, char* mac_addr); int nx_nic_multictx_remove_rx_rule(struct net_device *netdev, int ctx_id, int rule_id); int nx_pqm_queuelen (struct unm_adapter_s *adapter, int qnum); int nx_testmux_lock(struct unm_adapter_s *adapter); int nx_testmux_unlock(struct unm_adapter_s *adapter); static void nx_clear_all_tm(struct unm_adapter_s *adapter); static void nx_sre_status (struct unm_adapter_s *adapter); static void nx_epg_status (struct unm_adapter_s *adapter); static void nx_peg_status(struct unm_adapter_s *adapter); static void nx_phanstat(struct unm_adapter_s *adapter); static void nx_pegconsole(struct unm_adapter_s *adapter); static void nx_sre_statistics (struct unm_adapter_s *adapter); static void nx_epg_statistics (struct unm_adapter_s *adapter); static void nx_nic_regs (struct unm_adapter_s *adapter); static void nx_mac_statistics (struct unm_adapter_s *adapter); int nx_nic_minidump(struct unm_adapter_s *adapter); static void nx_nic_collect_fw_logs (struct unm_adapter_s *adapter); static int unm_nic_open(struct net_device *netdev); static int receive_peg_ready(struct unm_adapter_s *adapter); static int unm_nic_hw_resources(struct unm_adapter_s *adapter); static int unm_nic_new_rx_context_destroy(struct unm_adapter_s *adapter, int ctx_destroy); static int unm_nic_new_tx_context_prepare(struct unm_adapter_s *adapter); static int unm_nic_new_tx_context_destroy(struct unm_adapter_s *adapter, int ctx_destroy); void nx_free_tx_resources(struct unm_adapter_s *adapter); static void unm_nic_down(struct net_device *netdev); static int unm_nic_close(struct net_device *netdev); static int unm_nic_set_mac(struct net_device *netdev, void *p); static void nx_nic_p3_set_multi(struct net_device *netdev); static inline int is_packet_tagged(struct sk_buff *skb); int unm_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev); static void unm_watchdog_fw_reset(unsigned long v); static void unm_watchdog(unsigned long v); static int unm_nic_check_temp(struct unm_adapter_s *adapter); int nx_p3_set_vport_miss_mode(struct unm_adapter_s *adapter, int mode); static void unm_nic_handle_phy_intr(struct unm_adapter_s *adapter); int nx_reset_netq_rx_queues( struct net_device *netdev); int netxen_nic_attach_all_ports(struct unm_adapter_s *adapter); int check_fw_reset_failure(struct unm_adapter_s *adapter); int netxen_nic_restart_fw(struct unm_adapter_s *adapter); int netxen_nic_reset_tx_timeout(struct unm_adapter_s *adapter); int netxen_nic_detach_all_ports(struct unm_adapter_s *adapter, int fw_health); void nx_nic_halt_firmware(struct unm_adapter_s *adapter); static void unm_watchdog_task_fw_reset(TASK_PARAM adapid); static void unm_watchdog_task(TASK_PARAM adapid); static void unm_tx_timeout(struct net_device *netdev); static void unm_tx_timeout_task(TASK_PARAM adapid); static struct net_device_stats *unm_nic_get_stats(struct net_device *netdev); static int nx_nic_fw40_change_mtu(struct net_device *netdev, int new_mtu); irqreturn_t nx_nic_legacy_intr(int irq, void *data); irqreturn_t nx_nic_msi_intr(int irq, void *data); irqreturn_t nx_nic_msix_intr(int irq, void *data); static int nx_nic_poll_sts(struct napi_struct *napi, int work_to_do); static void unm_nic_poll_controller(struct net_device *netdev); static inline void lro2_adjust_skb(struct sk_buff *skb, statusDesc_t *desc); int nx_nic_is_netxen_device(struct net_device *netdev); int nx_nic_get_device_port(struct net_device *netdev); static int unm_process_cmd_ring(unsigned long data); static inline int nx_pci_choose_state(struct pci_dev *pdev, PM_MESSAGE_T state); static int unm_nic_suspend(struct pci_dev *pdev, PM_MESSAGE_T state); static int unm_nic_resume(struct pci_dev *pdev); static int __init unm_init_module(void); static void __exit unm_exit_module(void); int nx_nic_get_linkevent_cap(struct unm_adapter_s *adapter);
4b8a64253163608e08eb3e5406dfb0da0c65850fa762913e6e98a9ae22598411
413
DmitryADP
diff_qc750
vendor/nvidia/tegra/multimedia-partner/nvmm/nvmm/blocks/super_parser/parser_core/ogg/nvmm_oggframing.c
NvOggSyncPageseek
NvS32 NvOggSyncPageseek(ogg_sync_state *oy,ogg_page *og){ NvOggByteBuffer page; NvS32 bytes,ret=0; NvOggPageRelease(og); bytes=oy->fifo_fill; NvOggbyteInit(&page,oy->fifo_tail); if(oy->headerbytes==0){ if(bytes<27)goto sync_out; if(NvOggbyteRead1(&page,0)!=(NvS32)'O' || NvOggbyteRead1(&page,1)!=(NvS32)'g' || NvOggbyteRead1(&page,2)!=(NvS32)'g' || NvOggbyteRead1(&page,3)!=(NvS32)'S' ) goto sync_fail; oy->headerbytes=NvOggbyteRead1(&page,26)+27; } if(bytes<oy->headerbytes)goto sync_out; if(oy->bodybytes==0){ NvS32 i; for(i=0;i<oy->headerbytes-27;i++) oy->bodybytes+=NvOggbyteRead1(&page,27+i); } if(oy->bodybytes+oy->headerbytes>bytes)goto sync_out; { ogg_uint32_t chksum=NvOggbyteRead4(&page,22); NvOggbyteSet4(&page,0,22); if(chksum!=NvChecksum(oy->fifo_tail,oy->bodybytes+oy->headerbytes)){ NvOggbyteSet4(&page,chksum,22); goto sync_fail; } NvOggbyteSet4(&page,chksum,22); } if(og){ og->header=NvOggBufferSplit(&oy->fifo_tail,&oy->fifo_head,oy->headerbytes); og->header_len=oy->headerbytes; og->body=NvOggBufferSplit(&oy->fifo_tail,&oy->fifo_head,oy->bodybytes); og->body_len=oy->bodybytes; }else{ oy->fifo_tail= NvOggBufferPretruncate(oy->fifo_tail,oy->headerbytes+oy->bodybytes); if(!oy->fifo_tail)oy->fifo_head=0; } ret=oy->headerbytes+oy->bodybytes; oy->unsynced=0; oy->headerbytes=0; oy->bodybytes=0; oy->fifo_fill-=ret; return ret; sync_fail: oy->headerbytes=0; oy->bodybytes=0; oy->fifo_tail=NvOggBufferPretruncate(oy->fifo_tail,1); ret--; while(oy->fifo_tail){ NvU8 *now=oy->fifo_tail->buffer->data+oy->fifo_tail->begin; NvU8 *next=memchr(now, 'O', oy->fifo_tail->length); if(next){ NvS32 bytes=next-now; oy->fifo_tail=NvOggBufferPretruncate(oy->fifo_tail,bytes); ret-=bytes; break; }else{ NvS32 bytes=oy->fifo_tail->length; ret-=bytes; oy->fifo_tail=NvOggBufferPretruncate(oy->fifo_tail,bytes); } } if(!oy->fifo_tail)oy->fifo_head=0; oy->fifo_fill+=ret; sync_out: return ret; }
static ogg_buffer_state *NvOggBufferCreate(void); void NvOggBufferDestroy(ogg_buffer_state *bs); ogg_buffer *NvFetchBuffer(ogg_buffer_state *bs,NvS32 bytes); ogg_reference *NvFetchRef(ogg_buffer_state *bs); ogg_reference *NvOggBufferAlloc(ogg_buffer_state *bs,NvS32 bytes); void NvOggBufferRealloc(ogg_reference *or,NvS32 bytes); void NvOggBufferMarkOne(ogg_reference *or); void NvOggBufferMark(ogg_reference *or); ogg_reference *NvOggBufferSub(ogg_reference *or,NvS32 begin,NvS32 length); ogg_reference *NvOggBufferDup(ogg_reference *or); ogg_reference *NvOggBufferSplit(ogg_reference **tail, ogg_reference **head,NvS32 pos); void NvOggBufferReleaseOne(ogg_reference *or); void NvOggBufferRelease(ogg_reference *or); ogg_reference *NvOggBufferPretruncate(ogg_reference *or,NvS32 pos); static ogg_reference *NvOggBufferWalk(ogg_reference *or); ogg_reference *NvOggBufferCat(ogg_reference *tail, ogg_reference *head); void NvPositionB(NvOggByteBuffer *b,NvS32 pos); void NvPositionF(NvOggByteBuffer *b,NvS32 pos); NvS32 NvOggbyteInit(NvOggByteBuffer *b,ogg_reference *or); void NvOggbyteSet4(NvOggByteBuffer *b,ogg_uint32_t val,NvS32 pos); NvU8 NvOggbyteRead1(NvOggByteBuffer *b,NvS32 pos); ogg_uint32_t NvOggbyteRead4(NvOggByteBuffer *b,NvS32 pos); ogg_int64_t NvOggbyteRead8(NvOggByteBuffer *b,NvS32 pos); NvS32 NvOggPageVersion(ogg_page *og); NvS32 NvOggPageBos(ogg_page *og); ogg_uint32_t NvOggPagePageno(ogg_page *og); ogg_uint32_t NvChecksum(ogg_reference *or, NvS32 bytes); void NvNextLace(NvOggByteBuffer *ob,ogg_stream_state *os); void NVSpanQueuedPage(ogg_stream_state *os); NvS32 NvPacketout(ogg_stream_state *os,NvOggPacket *op,NvS32 adv); NvS32 NvOggStreamPacketout(ogg_stream_state *os,NvOggPacket *op); NvS32 NvOggStreamPacketpeek(ogg_stream_state *os,NvOggPacket *op); NvS32 NvOggPacketRelease(NvOggPacket *op); NvS32 NvOggPageRelease(ogg_page *og); void NvOggPageDup(ogg_page *dup,ogg_page *orig); NvS32 Nv0ggPageContinued(ogg_page *og); NvS32 NvOggPageEos(ogg_page *og); ogg_int64_t NvOggPageGranulepos(ogg_page *og); ogg_uint32_t NvOggPageSerialno(ogg_page *og); ogg_sync_state *NvOggSyncCreate(void); NvS32 NvOggSyncDestroy(ogg_sync_state *oy); NvU8 *NvOggSyncBufferin(ogg_sync_state *oy, NvS32 bytes); NvS32 NvOggSyncWrote(ogg_sync_state *oy, NvS32 bytes); NvS32 NvOggSyncReset(ogg_sync_state *oy); ogg_stream_state *NvOggStreamCreate(NvS32 serialno); NvS32 NvOggStreamDestroy(ogg_stream_state *os); NvS32 NvOggStreamDestroyEnd(ogg_stream_state *os); NvS32 NvOggStreamPagein(ogg_stream_state *os, ogg_page *og); NvS32 NvOggStreamReset(ogg_stream_state *os); NvS32 NvOggStreamResetSerialno(ogg_stream_state *os,NvS32 serialno);
5d1e012bc925f1dd457c430b001260c69504b0540cb8bfc8a9241d4aa024c29a
2,236
JianpingZeng
xcc
samples/Juliet/testcases/CWE321_Hard_Coded_Cryptographic_Key/CWE321_Hard_Coded_Cryptographic_Key__w32_char_53d.c
CWE321_Hard_Coded_Cryptographic_Key__w32_char_53d_goodG2BSink
void CWE321_Hard_Coded_Cryptographic_Key__w32_char_53d_goodG2BSink(char * cryptoKey) { { HCRYPTPROV hCryptProv; HCRYPTKEY hKey; HCRYPTHASH hHash; char toBeEncrypted[] = "String to be encrypted"; DWORD encryptedLen = strlen(toBeEncrypted)*sizeof(char); BYTE encrypted[200]; memcpy(encrypted, toBeEncrypted, encryptedLen); if(!CryptAcquireContext(&hCryptProv, NULL, MS_ENHANCED_PROV, PROV_RSA_AES, 0)) { if(!CryptAcquireContext(&hCryptProv, NULL, MS_ENHANCED_PROV, PROV_RSA_AES, CRYPT_NEWKEYSET)) { printLine("Error in acquiring cryptographic context"); exit(1); } } if(!CryptCreateHash(hCryptProv, CALG_SHA_256, 0, 0, &hHash)) { printLine("Error in creating hash"); exit(1); } if(!CryptHashData(hHash, (BYTE *) cryptoKey, strlen(cryptoKey)*sizeof(char), 0)) { printLine("Error in hashing cryptoKey"); exit(1); } if(!CryptDeriveKey(hCryptProv, CALG_AES_256, hHash, 0, &hKey)) { printLine("Error in CryptDeriveKey"); exit(1); } if(!CryptEncrypt(hKey, (HCRYPTHASH)NULL, 1, 0, encrypted, &encryptedLen, sizeof(encrypted))) { printLine("Error in CryptEncrypt"); exit(1); } printBytesLine(encrypted, encryptedLen); if (hKey) { CryptDestroyKey(hKey); } if (hHash) { CryptDestroyHash(hHash); } if (hCryptProv) { CryptReleaseContext(hCryptProv, 0); } } }
void CWE321_Hard_Coded_Cryptographic_Key__w32_char_53d_badSink(char * cryptoKey);
27139bf8b4b60dd2ad987ee2a9389ce6f5f6cbd40fca5a0ea1922d2604da502a
1,854
yzfcer
wind_os
src/core/wind_mutex.c
rent
rent(); if (!IS_F_MUTEX_LOCKED(mutex)) { SET_F_MUTEX_LOCKED(mutex); mutex->nest ++; mutex->owner = wind_thread_current(); wind_enable_switch(); return W_ERR_OK; } if(thread == mutex->owner) { if(mutex->nest < 65535) mutex->nest ++; wind_enable_switch(); return W_ERR_OK; } thread->runstat = THREAD_STATUS_SUSPEND; thread->cause = CAUSE_LOCK; thread->sleep_ticks = 0x7fffffff; dlist_insert_prio(&mutex->waitlist,&thread->suspendnode,thread->prio); wind_enable_switch(); _wind_thread_dispatch(); return W_ERR_OK; } w_err_t wind_mutex_trylock(w_mutex_s *mutex) { w_err_t err; WIND_ASSERT_RETURN(mutex != W_NULL,W_ERR_PTR_NULL); WIND_ASSERT_RETURN(mutex->obj.magic == WIND_MUTEX_MAGIC,W_ERR_INVALID); wind_disable_switch(); if (!IS_F_MUTEX_LOCKED(mu
w_err_t mutex_free(void *mutex); nit(void); ol,sizeof(mutexpool); init(w_mutex_s *mutex,const char *name); NULL,W_NULL); itch(); RN(err == W_ERR_OK, W_ERR_FAIL); ); nd_enable_switch();
82b09a48747cfc25e06c5067c6575f51719b02fd86ee7744581bae96b3a1613a
941
HarryR
ZeroDB
bench/db-bench.c
void db_test_pseudorandom
static void db_test_pseudorandom( benchmark_t* b ) { assert(b != NULL); run_test_rwmix(b, b->entries, bop_read_pseudorand, bop_write_pseudorand); }
DB_OP(count_value);
c9b46888075f7cba7dae7e003eb75afd9f4739c22bd1b402e729f3ff5622f530
150
Blackburn29
PsycoKernel
drivers/mfd/wm8350-core.c
wm8350_phys_read
static int wm8350_phys_read(struct wm8350 *wm8350, u8 reg, int num_regs, u16 *dest) { int i, ret; int bytes = num_regs * 2; dev_dbg(wm8350->dev, "volatile read\n"); ret = wm8350->read_dev(wm8350, reg, bytes, (char *)dest); for (i = reg; i < reg + num_regs; i++) { dest[i - reg] = be16_to_cpu(dest[i - reg]); dest[i - reg] &= wm8350_reg_io_map[i].readable; } dump(num_regs, dest); return ret; }
static int wm8350_read(struct wm8350 *wm8350, u8 reg, int num_regs, u16 *dest); static inline int is_reg_locked(struct wm8350 *wm8350, u8 reg); static int wm8350_write(struct wm8350 *wm8350, u8 reg, int num_regs, u16 *src); int wm8350_clear_bits(struct wm8350 *wm8350, u16 reg, u16 mask); int wm8350_set_bits(struct wm8350 *wm8350, u16 reg, u16 mask); u16 wm8350_reg_read(struct wm8350 *wm8350, int reg); int wm8350_reg_write(struct wm8350 *wm8350, int reg, u16 val); int wm8350_reg_lock(struct wm8350 *wm8350); int wm8350_reg_unlock(struct wm8350 *wm8350); int wm8350_read_auxadc(struct wm8350 *wm8350, int channel, int scale, int vref); static irqreturn_t wm8350_auxadc_irq(int irq, void *irq_data); static int wm8350_create_cache(struct wm8350 *wm8350, int type, int mode); void wm8350_device_exit(struct wm8350 *wm8350);
92875f24e69eac5ec43e6dbaf50cb343dd89ce77deaaac94774962999d2c0df9
424
CEG-ICRISAT
Raspberry
c/htslib-1.2.1/cram/cram_io.c
cram_uncompress_block
int cram_uncompress_block(cram_block *b) { char *uncomp; size_t uncomp_size = 0; if (b->uncomp_size == 0) { b->method = RAW; return 0; } switch (b->method) { case RAW: return 0; case GZIP: uncomp = zlib_mem_inflate((char *)b->data, b->comp_size, &uncomp_size); if (!uncomp) return -1; if ((int)uncomp_size != b->uncomp_size) { free(uncomp); return -1; } free(b->data); b->data = (unsigned char *)uncomp; b->alloc = uncomp_size; b->method = RAW; break; #ifdef HAVE_LIBBZ2 case BZIP2: { unsigned int usize = b->uncomp_size; if (!(uncomp = malloc(usize))) return -1; if (BZ_OK != BZ2_bzBuffToBuffDecompress(uncomp, &usize, (char *)b->data, b->comp_size, 0, 0)) { free(uncomp); return -1; } free(b->data); b->data = (unsigned char *)uncomp; b->alloc = usize; b->method = RAW; b->uncomp_size = usize; break; } #else case BZIP2: fprintf(stderr, "Bzip2 compression is not compiled into this " "version.\nPlease rebuild and try again.\n"); return -1; #endif #ifdef HAVE_LIBLZMA case LZMA: uncomp = lzma_mem_inflate((char *)b->data, b->comp_size, &uncomp_size); if (!uncomp) return -1; if ((int)uncomp_size != b->uncomp_size) return -1; free(b->data); b->data = (unsigned char *)uncomp; b->alloc = uncomp_size; b->method = RAW; break; #else case LZMA: fprintf(stderr, "Lzma compression is not compiled into this " "version.\nPlease rebuild and try again.\n"); return -1; break; #endif case RANS: { unsigned int usize = b->uncomp_size, usize2; uncomp = (char *)rans_uncompress(b->data, b->comp_size, &usize2); assert(usize == usize2); free(b->data); b->data = (unsigned char *)uncomp; b->alloc = usize2; b->method = RAW; b->uncomp_size = usize2; break; } default: return -1; } return 0; }
int itf8_decode(cram_fd *fd, int32_t *val_p); int itf8_encode(cram_fd *fd, int32_t val); int itf8_get(char *cp, int32_t *val_p); int itf8_put(char *cp, int32_t val); int ltf8_put(char *cp, int64_t val); int ltf8_get(char *cp, int64_t *val_p); int ltf8_decode(cram_fd *fd, int64_t *val_p); int itf8_put_blk(cram_block *blk, int val); int int32_decode(cram_fd *fd, int32_t *val); int int32_encode(cram_fd *fd, int32_t val); int int32_get(cram_block *b, int32_t *val); int int32_put(cram_block *b, int32_t val); char *zlib_mem_inflate(char *cdata, size_t csize, size_t *size); static char *lzma_mem_inflate(char *cdata, size_t csize, size_t *size); cram_block *cram_read_block(cram_fd *fd); int cram_write_block(cram_fd *fd, cram_block *b); void cram_free_block(cram_block *b); cram_metrics *cram_new_metrics(void); char *cram_block_method2str(enum cram_block_method m); char *cram_content_type2str(enum cram_content_type t); int paranoid_fclose(FILE *fp); void refs_free(refs_t *r); static refs_t *refs_create(void); static BGZF *bgzf_open_ref(char *fn, char *mode); static refs_t *refs_load_fai(refs_t *r_orig, char *fn, int is_err); int refs2id(refs_t *r, SAM_hdr *h); static int refs_from_header(refs_t *r, cram_fd *fd, SAM_hdr *h); int cram_set_header(cram_fd *fd, SAM_hdr *hdr); void expand_cache_path(char *path, char *dir, char *fn); void mkdir_prefix(char *path, int mode); static const char *get_cache_basedir(const char **extra); static int cram_populate_ref(cram_fd *fd, int id, ref_entry *r); static void cram_ref_incr_locked(refs_t *r, int id); void cram_ref_incr(refs_t *r, int id); static void cram_ref_decr_locked(refs_t *r, int id); void cram_ref_decr(refs_t *r, int id); static char *load_ref_portion(BGZF *fp, ref_entry *e, int start, int end); ref_entry *cram_ref_load(refs_t *r, int id); char *cram_get_ref(cram_fd *fd, int id, int start, int end); int cram_load_reference(cram_fd *fd, char *fn); cram_container *cram_new_container(int nrec, int nslice); void cram_free_container(cram_container *c); cram_container *cram_read_container(cram_fd *fd); int cram_write_container(cram_fd *fd, cram_container *c); static int cram_flush_container2(cram_fd *fd, cram_container *c); int cram_flush_container(cram_fd *fd, cram_container *c); void *cram_flush_thread(void *arg); static int cram_flush_result(cram_fd *fd); int cram_flush_container_mt(cram_fd *fd, cram_container *c); cram_block_compression_hdr *cram_new_compression_header(void); void cram_free_compression_header(cram_block_compression_hdr *hdr); void cram_free_slice_header(cram_block_slice_hdr *hdr); void cram_free_slice(cram_slice *s); cram_slice *cram_new_slice(enum cram_content_type type, int nrecs); cram_slice *cram_read_slice(cram_fd *fd); cram_file_def *cram_read_file_def(cram_fd *fd); int cram_write_file_def(cram_fd *fd, cram_file_def *def); void cram_free_file_def(cram_file_def *def); SAM_hdr *cram_read_SAM_hdr(cram_fd *fd); static void full_path(char *out, char *in); int cram_write_SAM_hdr(cram_fd *fd, SAM_hdr *hdr); static void cram_init_tables(cram_fd *fd); cram_fd *cram_open(const char *filename, const char *mode); cram_fd *cram_dopen(hFILE *fp, const char *filename, const char *mode); int cram_seek(cram_fd *fd, off_t offset, int whence); int cram_flush(cram_fd *fd); int cram_close(cram_fd *fd); int cram_eof(cram_fd *fd); int cram_set_option(cram_fd *fd, enum cram_option opt, ...); int cram_set_voption(cram_fd *fd, enum cram_option opt, va_list args);
542d30d1da9f411279d4e9bf0a699250efd0db01ae47d3ee5851de72ed7adfa2
1,866
AndreyPopovNew
asuswrt-merlin-rt-n
linux-2.6.22.19-cs543/scripts/mod/sumversion.c
cpu_to_le32_array
static inline void cpu_to_le32_array(uint32_t *buf, unsigned int words) { while (words--) { *buf = htonl(*buf); buf++; } }
static inline uint32_t lshift(uint32_t x, unsigned int s); static inline uint32_t F(uint32_t x, uint32_t y, uint32_t z); static inline uint32_t G(uint32_t x, uint32_t y, uint32_t z); static inline uint32_t H(uint32_t x, uint32_t y, uint32_t z); static inline void le32_to_cpu_array(uint32_t *buf, unsigned int words); static void md4_transform(uint32_t *hash, uint32_t const *in); static inline void md4_transform_helper(struct md4_ctx *ctx); static void md4_init(struct md4_ctx *mctx); static void md4_final_ascii(struct md4_ctx *mctx, char *out, unsigned int len); static inline void add_char(unsigned char c, struct md4_ctx *md); static int parse_comment(const char *file, unsigned long len); static int parse_file(const char *fname, struct md4_ctx *md); static int parse_source_files(const char *objfile, struct md4_ctx *md); void get_src_version(const char *modname, char sum[], unsigned sumlen); static int strip_rcs_crap(char *version);
8020fda37fb37cf8a1f01961b0e20ba7801a15990c01da6fd24126e09d11b6a6
129
matthiasbeyer
linux
drivers/mtd/nand/raw/omap2.c
omap_hwcontrol
atic void omap_hwcontrol(struct nand_chip *chip, int cmd, unsigned int ctrl) { struct omap_nand_info *info = mtd_to_omap(nand_to_mtd(chip)); if (cmd != NAND_CMD_NONE) { if (ctrl & NAND_CLE) writeb(cmd, info->reg.gpmc_nand_command); else if (ctrl & NAND_ALE) writeb(cmd, info->reg.gpmc_nand_address); else writeb(cmd, info->reg.gpmc_nand_data); } } /
atic inline struct omap_nand_info *mtd_to_omap(struct mtd_info *mtd); atic int omap_prefetch_enable(int cs, int fifo_th, int dma_mode, unsigned int u32_count, int is_write, struct omap_nand_info *info); atic int omap_prefetch_reset(int cs, struct omap_nand_info *info); atic void omap_read_buf8(struct mtd_info *mtd, u_char *buf, int len); atic void omap_write_buf8(struct mtd_info *mtd, const u_char *buf, int len); atic void omap_read_buf16(struct mtd_info *mtd, u_char *buf, int len); atic void omap_write_buf16(struct mtd_info *mtd, const u_char * buf, int len); atic void omap_read_buf_pref(struct nand_chip *chip, u_char *buf, int len); atic void omap_write_buf_pref(struct nand_chip *chip, const u_char *buf, int len); atic void omap_nand_dma_callback(void *data); atic inline int omap_nand_dma_transfer(struct mtd_info *mtd, void *addr, unsigned int len, int is_write); atic void omap_read_buf_dma_pref(struct nand_chip *chip, u_char *buf, int len); atic void omap_write_buf_dma_pref(struct nand_chip *chip, const u_char *buf, int len); atic irqreturn_t omap_nand_irq(int this_irq, void *dev); atic void omap_read_buf_irq_pref(struct nand_chip *chip, u_char *buf, int len); atic void omap_write_buf_irq_pref(struct nand_chip *chip, const u_char *buf, int len); atic void gen_true_ecc(u8 *ecc_buf); atic int omap_correct_data(struct nand_chip *chip, u_char *dat, u_char *read_ecc, u_char *calc_ecc); atic int omap_calculate_ecc(struct nand_chip *chip, const u_char *dat, u_char *ecc_code); atic void omap_enable_hwecc(struct nand_chip *chip, int mode); atic int omap_wait(struct nand_chip *this); atic int omap_dev_ready(struct nand_chip *chip); atic void __maybe_unused omap_enable_hwecc_bch(struct nand_chip *chip, int mode); atic int _omap_calculate_ecc_bch(struct mtd_info *mtd, const u_char *dat, u_char *ecc_calc, int i); atic int omap_calculate_ecc_bch_sw(struct nand_chip *chip, const u_char *dat, u_char *ecc_calc); atic int omap_calculate_ecc_bch_multi(struct mtd_info *mtd, const u_char *dat, u_char *ecc_calc); atic int erased_sector_bitflips(u_char *data, u_char *oob, struct omap_nand_info *info); atic int omap_elm_correct_data(struct nand_chip *chip, u_char *data, u_char *read_ecc, u_char *calc_ecc); atic int omap_write_page_bch(struct nand_chip *chip, const uint8_t *buf, int oob_required, int page); atic int omap_read_page_bch(struct nand_chip *chip, uint8_t *buf, int oob_required, int page); atic bool is_elm_present(struct omap_nand_info *info, struct device_node *elm_node); atic bool omap2_nand_ecc_check(struct omap_nand_info *info); atic int omap_get_dt_info(struct device *dev, struct omap_nand_info *info); atic int omap_ooblayout_ecc(struct mtd_info *mtd, int section, struct mtd_oob_region *oobregion); atic int omap_ooblayout_free(struct mtd_info *mtd, int section, struct mtd_oob_region *oobregion); atic int omap_sw_ooblayout_ecc(struct mtd_info *mtd, int section, struct mtd_oob_region *oobregion); atic int omap_sw_ooblayout_free(struct mtd_info *mtd, int section, struct mtd_oob_region *oobregion); atic int omap_nand_attach_chip(struct nand_chip *chip); atic int omap_nand_probe(struct platform_device *pdev); atic int omap_nand_remove(struct platform_device *pdev);
09354f928f23f6de5396c1f42100200a9388c23223192cae3cadac69f7831926
373
SNDBXIE
myway-eathena
src/map/battle.c
battle_getenemy
struct block_list* battle_getenemy(struct block_list *target, int type, int range) { struct block_list *bl_list[24]; int c = 0; memset(bl_list, 0, sizeof(bl_list)); map_foreachinrange(battle_getenemy_sub, target, range, type, bl_list, &c, target); if ( c == 0 ) return NULL; if( c > 24 ) c = 24; return bl_list[rnd()%c]; }
int battle_getcurrentskill(struct block_list *bl); static int battle_gettargeted_sub(struct block_list *bl, va_list ap); struct block_list* battle_gettargeted(struct block_list *target); int battle_gettarget(struct block_list* bl); static int battle_getenemy_sub(struct block_list *bl, va_list ap); static int battle_getenemyarea_sub(struct block_list *bl, va_list ap); struct block_list* battle_getenemyarea(struct block_list *src, int x, int y, int range, int type, int ignore_id); int battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr_t data); int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src, struct block_list *target, int attack_type, uint16 skill_id, uint16 skill_lv, int damage, enum damage_lv dmg_lv, int ddelay, bool additional_effects); int battle_attr_ratio(int atk_elem,int def_type, int def_lv); int battle_attr_fix(struct block_list *src, struct block_list *target, int damage,int atk_elem,int def_type, int def_lv); int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_list *target, int nk, int s_ele, int s_ele_, int damage, int left, int flag); int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damage *d,int damage,uint16 skill_id,uint16 skill_lv); int battle_calc_bg_damage(struct block_list *src, struct block_list *bl, int damage, int div_, uint16 skill_id, uint16 skill_lv, int flag); int battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int damage,int div_,uint16 skill_id,uint16 skill_lv,int flag); static int battle_calc_drain(int damage, int rate, int per); int battle_addmastery(struct map_session_data *sd,struct block_list *target,int dmg,int type); static int battle_calc_base_damage(struct status_data *status, struct weapon_atk *wa, struct status_change *sc, unsigned short t_size, struct map_session_data *sd, int flag); void battle_consume_ammo(TBL_PC*sd, int skill, int lv); static int battle_blewcount_bonus(struct map_session_data *sd, uint16 skill_id); static int battle_SAD(struct map_session_data *sd, struct block_list *target, uint16 skill_id); static struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list *target,uint16 skill_id,uint16 skill_lv,int wflag); struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list *target,uint16 skill_id,uint16 skill_lv,int mflag); struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *target,uint16 skill_id,uint16 skill_lv,int mflag); struct Damage battle_calc_attack(int attack_type,struct block_list *bl,struct block_list *target,uint16 skill_id,uint16 skill_lv,int count); int battle_calc_return_damage(struct block_list* bl, struct block_list *src, int *dmg, int flag, uint16 skill_id); void battle_drain(TBL_PC *sd, struct block_list *tbl, int rdamage, int ldamage, int race, int boss); int battle_damage_area( struct block_list *bl, va_list ap); enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* target, unsigned int tick, int flag); int battle_check_undead(int race,int element); struct block_list* battle_get_master(struct block_list *src); int battle_check_target( struct block_list *src, struct block_list *target,int flag); bool battle_check_range(struct block_list *src, struct block_list *bl, int range); void rAthena_report(char* date, char *time_c); static int rAthena_report_timer(int tid, unsigned int tick, int id, intptr_t data); int battle_set_value(const char* w1, const char* w2); int battle_get_value(const char* w1); void battle_set_defaults(); void battle_adjust_conf(); int battle_config_read(const char* cfgName); void do_init_battle(void); void do_final_battle(void);
fed3bbcafd7aed8508d8714f4c6c38c2cf3fc0093c4b6402755df468145f4b56
352
GeneAssembly
biosal
engine/thorium/actor.c
thorium_actor_receive_synchronize
static void thorium_actor_receive_synchronize(struct thorium_actor *self, struct thorium_message *message) { #ifdef THORIUM_ACTOR_DEBUG printf("DEBUG56 replying to %i with THORIUM_ACTOR_PRIVATE_SYNCHRONIZE_REPLY\n", thorium_message_source(message)); #endif thorium_message_init(message, ACTION_SYNCHRONIZE_REPLY, 0, NULL); thorium_actor_send(self, thorium_message_source(message), message); thorium_message_destroy(message); }
void thorium_actor_destroy(struct thorium_actor *self); int thorium_actor_name(struct thorium_actor *self); thorium_actor_receive_fn_t thorium_actor_get_receive(struct thorium_actor *self); void thorium_actor_set_name(struct thorium_actor *self, int name); void thorium_actor_print(struct thorium_actor *self); thorium_actor_init_fn_t thorium_actor_get_init(struct thorium_actor *self); thorium_actor_destroy_fn_t thorium_actor_get_destroy(struct thorium_actor *self); void thorium_actor_set_worker(struct thorium_actor *self, struct thorium_worker *worker); int thorium_actor_send_system(struct thorium_actor *self, int name, struct thorium_message *message); void thorium_actor_send(struct thorium_actor *self, int name, struct thorium_message *message); int thorium_actor_spawn(struct thorium_actor *self, int script); static int thorium_actor_spawn_real(struct thorium_actor *self, int script); void thorium_actor_die(struct thorium_actor *self); struct core_counter *thorium_actor_counter(struct thorium_actor *self); struct thorium_node *thorium_actor_node(struct thorium_actor *self); void thorium_actor_lock(struct thorium_actor *self); void thorium_actor_unlock(struct thorium_actor *self); int thorium_actor_argc(struct thorium_actor *self); char **thorium_actor_argv(struct thorium_actor *self); int thorium_actor_supervisor(struct thorium_actor *self); void thorium_actor_set_supervisor(struct thorium_actor *self, int supervisor); int thorium_actor_receive_system_no_pack(struct thorium_actor *self, struct thorium_message *message); int thorium_actor_receive_system(struct thorium_actor *self, struct thorium_message *message); void thorium_actor_receive(struct thorium_actor *self, struct thorium_message *message); void thorium_actor_synchronize(struct thorium_actor *self, struct core_vector *actors); static int thorium_actor_synchronization_completed(struct thorium_actor *self); int thorium_actor_script(struct thorium_actor *self); void thorium_actor_add_script(struct thorium_actor *self, int name, struct thorium_script *script); static void thorium_actor_clone(struct thorium_actor *self, struct thorium_message *message); static void thorium_actor_continue_clone(struct thorium_actor *self, struct thorium_message *message); int thorium_actor_source(struct thorium_actor *self); int thorium_actor_node_name(struct thorium_actor *self); int thorium_actor_worker_name(struct thorium_actor *self); int thorium_actor_get_node_count(struct thorium_actor *self); int thorium_actor_node_worker_count(struct thorium_actor *self); int thorium_actor_take_action(struct thorium_actor *self, struct thorium_message *message); struct thorium_dispatcher *thorium_actor_dispatcher(struct thorium_actor *self); void thorium_actor_set_node(struct thorium_actor *self, struct thorium_node *node); static void thorium_actor_migrate(struct thorium_actor *self, struct thorium_message *message); static void thorium_actor_notify_name_change(struct thorium_actor *self, struct thorium_message *message); static void thorium_actor_migrate_notify_acquaintances(struct thorium_actor *self, struct thorium_message *message); static void thorium_actor_forward_messages(struct thorium_actor *self, struct thorium_message *message); void thorium_actor_pin_to_node(struct thorium_actor *self); void thorium_actor_unpin_from_node(struct thorium_actor *self); int thorium_actor_acquaintance_count(struct thorium_actor *self); static int thorium_actor_get_child(struct thorium_actor *self, int index); static int thorium_actor_child_count(struct thorium_actor *self); static int thorium_actor_add_child(struct thorium_actor *self, int name); static int thorium_actor_add_acquaintance_private(struct thorium_actor *self, int name); static int thorium_actor_get_acquaintance_index_private(struct thorium_actor *self, int name); static int thorium_actor_get_child_index(struct thorium_actor *self, int name); static void thorium_actor_enqueue_message(struct thorium_actor *self, struct thorium_message *message); static void thorium_actor_dequeue_message(struct thorium_actor *self, struct thorium_message *message); static int thorium_actor_enqueued_message_count(struct thorium_actor *self); struct core_map *thorium_actor_get_received_messages(struct thorium_actor *self); struct core_map *thorium_actor_get_sent_messages(struct thorium_actor *self); int thorium_actor_enqueue_mailbox_message(struct thorium_actor *self, struct thorium_message *message); int thorium_actor_dequeue_mailbox_message(struct thorium_actor *self, struct thorium_message *message); int thorium_actor_work(struct thorium_actor *self); int thorium_actor_get_mailbox_size(struct thorium_actor *self); int thorium_actor_get_sum_of_received_messages(struct thorium_actor *self); char *thorium_actor_script_name(struct thorium_actor *self); void thorium_actor_reset_counters(struct thorium_actor *self); int thorium_actor_get_priority(struct thorium_actor *self); int thorium_actor_get_source_count(struct thorium_actor *self); void thorium_actor_set_priority(struct thorium_actor *self, int priority); void *thorium_actor_concrete_actor(struct thorium_actor *self); struct thorium_worker *thorium_actor_worker(struct thorium_actor *self); int thorium_actor_dead(struct thorium_actor *self); int thorium_actor_trylock(struct thorium_actor *self); static struct core_vector *thorium_actor_acquaintance_vector_private(struct thorium_actor *self); static int thorium_actor_get_acquaintance_private(struct thorium_actor *self, int index); struct core_memory_pool *thorium_actor_get_ephemeral_memory(struct thorium_actor *self); struct core_memory_pool *thorium_actor_get_ephemeral_memory_pool(struct thorium_actor *self); int thorium_actor_get_spawner(struct thorium_actor *self, struct core_vector *spawners); struct thorium_script *thorium_actor_get_script(struct thorium_actor *self); int thorium_actor_get_random_spawner(struct thorium_actor *self, struct core_vector *spawners); void thorium_actor_enable_profiler(struct thorium_actor *self); void thorium_actor_disable_profiler(struct thorium_actor *self); void *thorium_actor_allocate(struct thorium_actor *self, size_t count); void thorium_actor_set_assigned_worker(struct thorium_actor *self, int worker); int thorium_actor_assigned_worker(struct thorium_actor *self); int thorium_actor_get_random_number(struct thorium_actor *self); int thorium_actor_multiplexer_is_enabled(struct thorium_actor *self); struct core_memory_pool *thorium_actor_get_persistent_memory_pool(struct thorium_actor *self); int thorium_actor_get_counter_value(struct thorium_actor *self, int field); void thorium_actor_increment_counter(struct thorium_actor *self, int event); void thorium_actor_spawn_many(struct thorium_actor *self, struct thorium_message *message); void thorium_actor_spawn_many_reply(struct thorium_actor *self, struct thorium_message *message); struct core_memory_pool *thorium_actor_get_abstract_memory_pool(struct thorium_actor *self); int thorium_actor_get_flag(struct thorium_actor *self, int flag); void thorium_actor_set_flag(struct thorium_actor *self, int flag); void thorium_actor_clear_flag(struct thorium_actor *self, int flag); struct core_memory_pool *thorium_actor_get_concrete_memory_pool(struct thorium_actor *self); struct core_memory_pool *thorium_actor_get_memory_pool(struct thorium_actor *self, int pool); void thorium_actor_increment_event_counter(struct thorium_actor *self, int event); void thorium_actor_print_communication_report(struct thorium_actor *self); int thorium_actor_get_message_number(struct thorium_actor *self); int thorium_actor_get_last_message_id_from(struct thorium_actor *self, int name); void thorium_actor_check_fake_identifiers(struct thorium_actor *self, int *actor, int *message);
bf56204ab1a95744357c04d0c23b5f65c9f8547c344bc44241c912ff75bb5416
482
angeld29
TF2003-qvm
tools/q3lcc/src/trace.c
tracereturn
static void tracereturn(Symbol printer, Symbol f, Tree e) { appendstr(f->name); appendstr("#"); tracevalue(idtree(frameno), 0); appendstr(" returned"); if (freturn(f->type) != voidtype && e) { appendstr(" "); tracevalue(e, 0); } appendstr("\n"); tracefinis(printer); }
static void appendstr(char *str); static void tracevalue(Tree e, int lev); static void tracefinis(Symbol printer); static void tracecall(Symbol printer, Symbol f, void *ignore); void traceInit(char *arg);
b7418de50fe4e02adb2107d95d5df54c3a14914a2a7753217befcd36c2be65c0
280
cbuehler
gwyddion
modules/file/gxyzffile.c
gboolean gxyzf_export_dialog
static gboolean gxyzf_export_dialog(GXYZExportArgs *args, GwyAppPage pageno, const gchar *title) { GtkWidget *dialog, *vbox, *label, *all_channels; gchar *desc = NULL; gint response; dialog = gtk_dialog_new_with_buttons(_("Export GXYZF"), NULL, 0, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK); gwy_help_add_to_file_dialog(GTK_DIALOG(dialog), GWY_HELP_DEFAULT); vbox = gtk_vbox_new(FALSE, 2); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), vbox, TRUE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(vbox), 4); if (pageno == GWY_PAGE_CHANNELS) desc = g_strdup_printf("%s %s", _("Channel:"), title); else if (pageno == GWY_PAGE_XYZS) desc = g_strdup_printf("%s %s", _("XYZ data:"), title); label = gtk_label_new(desc); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_label_set_ellipsize(GTK_LABEL(label), PANGO_ELLIPSIZE_END); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 6); g_free(desc); gtk_box_pack_start(GTK_BOX(vbox), gwy_label_new_header(_("Options")), FALSE, FALSE, 0); all_channels = gtk_check_button_new_with_mnemonic(_("Multi-channel " "file with all " "compatible data")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(all_channels), args->all_channels); gtk_box_pack_start(GTK_BOX(vbox), all_channels, FALSE, FALSE, 0); gtk_widget_show_all(dialog); response = gtk_dialog_run(GTK_DIALOG(dialog)); if (response != GTK_RESPONSE_NONE) { args->all_channels = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(all_channels)); gtk_widget_destroy(dialog); } return response == GTK_RESPONSE_OK; }
GWY_MODULE_QUERY(module_info); static inline void append_double(gdouble *target, const gdouble v);
1265829aba984d2ada1e3c3cb99aa1fd70e72d9899b16108c084023828f3bd0b
2,111
CAAkshay
iOS-MAS-Foundation
Example/Pods/MQTTKit/libmosquitto/send_mosq.c
_mosquitto_send_publish
int _mosquitto_send_publish(struct mosquitto *mosq, uint16_t mid, const char *topic, uint32_t payloadlen, const void *payload, int qos, bool retain, bool dup) { #ifdef WITH_BROKER size_t len; #ifdef WITH_BRIDGE int i; struct _mqtt3_bridge_topic *cur_topic; bool match; int rc; char *mapped_topic = NULL; char *topic_temp = NULL; #endif #endif assert(mosq); assert(topic); if(mosq->sock == INVALID_SOCKET) return MOSQ_ERR_NO_CONN; #ifdef WITH_BROKER if(mosq->listener && mosq->listener->mount_point){ len = strlen(mosq->listener->mount_point); if(len < strlen(topic)){ topic += len; }else{ return MOSQ_ERR_SUCCESS; } } #ifdef WITH_BRIDGE if(mosq->bridge && mosq->bridge->topics && mosq->bridge->topic_remapping){ for(i=0; i<mosq->bridge->topic_count; i++){ cur_topic = &mosq->bridge->topics[i]; if(cur_topic->remote_prefix || cur_topic->local_prefix){ rc = mosquitto_topic_matches_sub(cur_topic->local_topic, topic, &match); if(rc){ return rc; } if(match){ mapped_topic = _mosquitto_strdup(topic); if(!mapped_topic) return MOSQ_ERR_NOMEM; if(cur_topic->local_prefix){ if(!strncmp(cur_topic->local_prefix, mapped_topic, strlen(cur_topic->local_prefix))){ topic_temp = _mosquitto_strdup(mapped_topic+strlen(cur_topic->local_prefix)); _mosquitto_free(mapped_topic); if(!topic_temp){ return MOSQ_ERR_NOMEM; } mapped_topic = topic_temp; } } if(cur_topic->remote_prefix){ len = strlen(mapped_topic) + strlen(cur_topic->remote_prefix)+1; topic_temp = _mosquitto_calloc(len+1, sizeof(char)); if(!topic_temp){ _mosquitto_free(mapped_topic); return MOSQ_ERR_NOMEM; } snprintf(topic_temp, len, "%s%s", cur_topic->remote_prefix, mapped_topic); _mosquitto_free(mapped_topic); mapped_topic = topic_temp; } _mosquitto_log_printf(NULL, MOSQ_LOG_DEBUG, "Sending PUBLISH to %s (d%d, q%d, r%d, m%d, '%s', ... (%ld bytes))", mosq->id, dup, qos, retain, mid, mapped_topic, (long)payloadlen); #ifdef WITH_SYS_TREE g_pub_bytes_sent += payloadlen; #endif rc = _mosquitto_send_real_publish(mosq, mid, mapped_topic, payloadlen, payload, qos, retain, dup); _mosquitto_free(mapped_topic); return rc; } } } } #endif _mosquitto_log_printf(NULL, MOSQ_LOG_DEBUG, "Sending PUBLISH to %s (d%d, q%d, r%d, m%d, '%s', ... (%ld bytes))", mosq->id, dup, qos, retain, mid, topic, (long)payloadlen); # ifdef WITH_SYS_TREE g_pub_bytes_sent += payloadlen; # endif #else _mosquitto_log_printf(mosq, MOSQ_LOG_DEBUG, "Client %s sending PUBLISH (d%d, q%d, r%d, m%d, '%s', ... (%ld bytes))", mosq->id, dup, qos, retain, mid, topic, (long)payloadlen); #endif return _mosquitto_send_real_publish(mosq, mid, topic, payloadlen, payload, qos, retain, dup); }
int _mosquitto_send_pingreq(struct mosquitto *mosq); int _mosquitto_send_pingresp(struct mosquitto *mosq); int _mosquitto_send_puback(struct mosquitto *mosq, uint16_t mid); int _mosquitto_send_pubcomp(struct mosquitto *mosq, uint16_t mid); int _mosquitto_send_pubrec(struct mosquitto *mosq, uint16_t mid); int _mosquitto_send_pubrel(struct mosquitto *mosq, uint16_t mid, bool dup); int _mosquitto_send_command_with_mid(struct mosquitto *mosq, uint8_t command, uint16_t mid, bool dup); int _mosquitto_send_simple_command(struct mosquitto *mosq, uint8_t command); int _mosquitto_send_real_publish(struct mosquitto *mosq, uint16_t mid, const char *topic, uint32_t payloadlen, const void *payload, int qos, bool retain, bool dup);
d4b931c87eb5e0b7de366f45edc20ded1e2346d4e06ee0119a87ff5310b4b177
2,875
hefen1
chromium
third_party/openssl/openssl/ssl/s3_pkt.c
do_ssl3_write
static int do_ssl3_write(SSL *s, int type, const unsigned char *buf, unsigned int len, int create_empty_fragment) { unsigned char *p,*plen; int i,mac_size,clear=0; int prefix_len=0; int eivlen; long align=0; SSL3_RECORD *wr; SSL3_BUFFER *wb=&(s->s3->wbuf); SSL_SESSION *sess; if (wb->left != 0) return(ssl3_write_pending(s,type,buf,len)); if (s->s3->alert_dispatch) { i=s->method->ssl_dispatch_alert(s); if (i <= 0) return(i); } if (wb->buf == NULL) if (!ssl3_setup_write_buffer(s)) return -1; if (len == 0 && !create_empty_fragment) return 0; wr= &(s->s3->wrec); sess=s->session; if ( (sess == NULL) || (s->enc_write_ctx == NULL) || (EVP_MD_CTX_md(s->write_hash) == NULL)) { #if 1 clear=s->enc_write_ctx?0:1; #else clear=1; #endif mac_size=0; } else { mac_size=EVP_MD_CTX_size(s->write_hash); if (mac_size < 0) goto err; } if (!clear && !create_empty_fragment && !s->s3->empty_fragment_done) { prefix_len = do_ssl3_write(s, type, buf, 0, 1); if (prefix_len <= 0) goto err; if (prefix_len > (SSL3_RT_HEADER_LENGTH + SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD)) { SSLerr(SSL_F_DO_SSL3_WRITE, ERR_R_INTERNAL_ERROR); goto err; } } s->s3->empty_fragment_done = 1; } if (create_empty_fragment) { #if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD!=0 align = (long)wb->buf + 2*SSL3_RT_HEADER_LENGTH; align = (-align)&(SSL3_ALIGN_PAYLOAD-1); #endif p = wb->buf + align; wb->offset = align; } else if (prefix_len) { p = wb->buf + wb->offset + prefix_len; } else { #if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD!=0 align = (long)wb->buf + SSL3_RT_HEADER_LENGTH; align = (-align)&(SSL3_ALIGN_PAYLOAD-1); #endif p = wb->buf + align; wb->offset = align; } *(p++)=type&0xff; wr->type=type; *(p++)=(s->version>>8); if (s->state == SSL3_ST_CW_CLNT_HELLO_B && !s->renegotiate && TLS1_get_version(s) > TLS1_VERSION) *(p++) = 0x1; else *(p++)=s->version&0xff; plen=p; p+=2; if (s->enc_write_ctx && s->version >= TLS1_1_VERSION) { int mode = EVP_CIPHER_CTX_mode(s->enc_write_ctx); if (mode == EVP_CIPH_CBC_MODE) { eivlen = EVP_CIPHER_CTX_iv_length(s->enc_write_ctx); if (eivlen <= 1) eivlen = 0; } else if (mode == EVP_CIPH_GCM_MODE) eivlen = EVP_GCM_TLS_EXPLICIT_IV_LEN; else eivlen = 0; } else if (s->aead_write_ctx != NULL && s->aead_write_ctx->variable_nonce_included_in_record) { eivlen = s->aead_write_ctx->variable_nonce_len; } else eivlen = 0; wr->data=p + eivlen; wr->length=(int)len; wr->input=(unsigned char *)buf; if (s->compress != NULL) { if (!ssl3_do_compress(s)) { SSLerr(SSL_F_DO_SSL3_WRITE,SSL_R_COMPRESSION_FAILURE); goto err; } } else { memcpy(wr->data,wr->input,wr->length); wr->input=wr->data; } if (mac_size != 0) { if (s->method->ssl3_enc->mac(s,&(p[wr->length + eivlen]),1) < 0) goto err; wr->length+=mac_size; } wr->input=p; wr->data=p; if (eivlen) { wr->length += eivlen; } s->method->ssl3_enc->enc(s,1); s2n(wr->length,plen); wr->type=type; wr->length+=SSL3_RT_HEADER_LENGTH; if (create_empty_fragment) { return wr->length; } wb->left = prefix_len + wr->length; s->s3->wpend_tot=len; s->s3->wpend_buf=buf; s->s3->wpend_type=type; s->s3->wpend_ret=len; return ssl3_write_pending(s,type,buf,len); err: return -1; }
int ssl3_read_n(SSL *s, int n, int max, int extend); static int ssl3_get_record(SSL *s); int ssl3_do_uncompress(SSL *ssl); int ssl3_do_compress(SSL *ssl); int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len); int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek); int ssl3_do_change_cipher_spec(SSL *s); int ssl3_send_alert(SSL *s, int level, int desc); int ssl3_dispatch_alert(SSL *s);
935d92481a9b7a7a1379218b517c02c4c81d70d0e351f8231f039d008b676bdf
3,522
dimkr
xchat
src/fe-gtk/maingui.c
void tree_select_row
static void tree_select_row (GtkWidget * tree, GList * row) { struct tree_data *td; struct session *sess = NULL; struct server *serv = NULL; td = ((struct tree_data *) ((GtkCListRow *) row->data)->data); if (!td) return; if (td->type == TREE_SESSION) { sess = td->data; if (sess->is_tab) { if (main_window) { wins_bring_tofront (sess->gui->window); } } else { gtk_widget_hide (sess->gui->window); gtk_widget_show (sess->gui->window); } } else if (td->type == TREE_SERVER) { serv = td->data; sess = serv->front_session; if (serv->front_session) { if (serv->front_session->is_tab) { if (main_window) { wins_bring_tofront (sess->gui->window); } } else { gtk_widget_hide (sess->gui->window); gtk_widget_show (sess->gui->window); } } } }
feb88f0286cf0eb62c22860e76ab0108ed050747ff4686ad21476ad891894b7d
832
CapOM
gst-plugins-bad
ext/ladspa/gstladspasink.c
void ladspa_register_sink_element
void ladspa_register_sink_element (GstPlugin * plugin, GstStructure * ladspa_meta) { GTypeInfo info = { sizeof (GstLADSPASinkClass), (GBaseInitFunc) gst_ladspa_sink_type_base_init, (GBaseFinalizeFunc) gst_ladspa_sink_type_base_finalize, (GClassInitFunc) gst_ladspa_sink_type_class_init, NULL, NULL, sizeof (GstLADSPASink), 0, (GInstanceInitFunc) gst_ladspa_sink_type_init, NULL }; ladspa_register_element (plugin, GST_TYPE_LADSPA_SINK, &info, ladspa_meta); }
static gboolean gst_ladspa_sink_type_set_caps (GstBaseSink * base, GstCaps * caps); static gboolean gst_ladspa_sink_type_query (GstBaseSink * base, GstQuery * query); static GstFlowReturn gst_ladspa_sink_type_preroll (GstBaseSink * base, GstBuffer * buffer); static GstFlowReturn gst_ladspa_sink_type_render (GstBaseSink * base, GstBuffer * buf); static void gst_ladspa_sink_type_init (GstLADSPASink * ladspa, LADSPA_Descriptor * desc); static void gst_ladspa_sink_type_dispose (GObject * object); static void gst_ladspa_sink_type_finalize (GObject * object); static void gst_ladspa_sink_type_base_init (GstLADSPASinkClass * ladspa_class); static void gst_ladspa_sink_type_base_finalize (GstLADSPASinkClass * ladspa_class); static void gst_ladspa_sink_init (GstLADSPASink * ladspa); static void gst_ladspa_sink_class_init (GstLADSPASinkClass * ladspa_class);
ab4a88f919ebd4f4702204c7fefe79b4d2394a06ef10552a823cddfa9553355d
505
briansorahan
libchuck
src/util_sndfile.c
gsm_mult
word gsm_mult ( word a, word b) { if (a == MIN_WORD && b == MIN_WORD) return MAX_WORD; return SASR_L( (longword)a * (longword)b, 15 ); }
word gsm_add ( word a, word b); word gsm_sub ( word a, word b); word gsm_mult_r ( word a, word b); word gsm_abs (word a); longword gsm_L_mult (word a, word b); longword gsm_L_add ( longword a, longword b); longword gsm_L_sub ( longword a, longword b); word gsm_norm (longword a ); longword gsm_L_asl (longword a, int n); word gsm_asr (word a, int n); word gsm_asl (word a, int n); longword gsm_L_asr (longword a, int n); word gsm_div (word num, word denum); void psf_get_date_str (char *str, int maxlen); static void psf_log_syserr (SF_PRIVATE *psf, int error); int psf_fopen (SF_PRIVATE *psf, const char *pathname, int open_mode); int psf_set_stdio (SF_PRIVATE *psf, int mode); void psf_set_file (SF_PRIVATE *psf, int fd); int psf_filedes_valid (SF_PRIVATE *psf); sf_count_t psf_fseek (SF_PRIVATE *psf, sf_count_t offset, int whence); sf_count_t psf_fread (void *ptr, sf_count_t bytes, sf_count_t items, SF_PRIVATE *psf); sf_count_t psf_fwrite (void *ptr, sf_count_t bytes, sf_count_t items, SF_PRIVATE *psf); sf_count_t psf_ftell (SF_PRIVATE *psf); int psf_fclose (SF_PRIVATE *psf); sf_count_t psf_fgets (char *buffer, sf_count_t bufsize, SF_PRIVATE *psf); int psf_is_pipe (SF_PRIVATE *psf); sf_count_t psf_get_filelen (SF_PRIVATE *psf); int psf_ftruncate (SF_PRIVATE *psf, sf_count_t len); int psf_fopen (SF_PRIVATE *psf, const char *pathname, int open_mode); sf_count_t psf_fseek (SF_PRIVATE *psf, sf_count_t offset, int whence); sf_count_t psf_fread (void *ptr, sf_count_t bytes, sf_count_t items, SF_PRIVATE *psf); sf_count_t psf_fwrite (void *ptr, sf_count_t bytes, sf_count_t items, SF_PRIVATE *psf); sf_count_t psf_ftell (SF_PRIVATE *psf); int psf_fclose (SF_PRIVATE *psf); sf_count_t psf_fgets (char *buffer, sf_count_t bufsize, SF_PRIVATE *psf); int psf_is_pipe (SF_PRIVATE *psf); sf_count_t psf_get_filelen (SF_PRIVATE *psf); int psf_ftruncate (SF_PRIVATE *psf, sf_count_t len); int g723_40_encoder (int sl, G72x_STATE *state_ptr); int g723_40_decoder (int i, G72x_STATE *state_ptr); void private_init_state (G72x_STATE *state_ptr); int g72x_reader_init (G72x_DATA *data, int codec); int g72x_writer_init (G72x_DATA *data, int codec); int unpack_bytes (G72x_DATA *data, int bits); int g72x_decode_block (G72x_DATA *data); int pack_bytes (G72x_DATA *data, int bits); int g72x_encode_block (G72x_DATA *data); int predictor_zero (G72x_STATE *state_ptr); int predictor_pole(G72x_STATE *state_ptr); int step_size (G72x_STATE *state_ptr); gsm gsm_create (void); void gsm_init (gsm state); int gsm_decode (gsm s, gsm_byte * c, gsm_signal * target); void gsm_destroy (gsm S); void gsm_encode (gsm s, gsm_signal * source, gsm_byte * c); int gsm_option (gsm r, int opt, int * val); static int nist_read_header (SF_PRIVATE *psf);
ff985cfe4c01c1fa59ce9c0a6fd5a9c74b42a7bab1243ed0444e2e35e77138de
143
EwoudSmeur
paparazzi
sw/airborne/modules/imu/imu_mpu60x0_i2c.c
imu_mpu_i2c_event
void imu_mpu_i2c_event(void) { uint32_t now_ts = get_sys_time_usec(); mpu60x0_i2c_event(&imu_mpu_i2c.mpu); if (imu_mpu_i2c.mpu.data_available) { RATES_COPY(imu.gyro_unscaled, imu_mpu_i2c.mpu.data_rates.rates); VECT3_COPY(imu.accel_unscaled, imu_mpu_i2c.mpu.data_accel.vect); imu_mpu_i2c.mpu.data_available = false; imu_scale_gyro(&imu); imu_scale_accel(&imu); AbiSendMsgIMU_GYRO_INT32(IMU_MPU60X0_ID, now_ts, &imu.gyro); AbiSendMsgIMU_ACCEL_INT32(IMU_MPU60X0_ID, now_ts, &imu.accel); } }
void imu_mpu_i2c_init(void); void imu_mpu_i2c_periodic(void);
414285dfa3772c1f2baa8c1cd313d21dbcd4084f35030855c4ad6c7dc6cbf581
529
MasayukiNagase
samples
AllJoyn/Samples/BACnetAdapter/bacnet-stack-0.8.2/ports/atmega8/bv.c
Binary_Value_Present_Value
static BACNET_BINARY_PV Binary_Value_Present_Value( uint32_t object_instance) { BACNET_BINARY_PV value = BINARY_INACTIVE; if (object_instance < MAX_BINARY_VALUES) { value = Present_Value[object_instance]; } return value; }
1c1cfe46fe635c38a39b8b9839ecf1463375226ad503ef95a254440629181b84
253
xiandaicxsj
copyKvm
drivers/video/sis/init301.c
BOOLEAN SiS_IsTVOrYPbPrOrScart
static BOOLEAN SiS_IsTVOrYPbPrOrScart(struct SiS_Private *SiS_Pr) { unsigned short flag; if(SiS_Pr->ChipType >= SIS_315H) { flag = SiS_GetReg(SiS_Pr->SiS_P3d4,0x30); if(flag & SetCRT2ToTV) return TRUE; flag = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38); if(flag & EnableCHYPbPr) return TRUE; if(flag & EnableCHScart) return TRUE; } else { flag = SiS_GetReg(SiS_Pr->SiS_P3d4,0x30); if(flag & SetCRT2ToTV) return TRUE; } return FALSE; }
5b521e412eee6cc99bfd5ca72c1628053854585df83c32e16e52cb9e0dd529e5
513
BHSPitMonkey
linwizard-strtrk
drivers/usb/serial/digi_acceleport.c
cond_wait_interruptible_timeout_irqrestore
static long cond_wait_interruptible_timeout_irqrestore( wait_queue_head_t *q, long timeout, spinlock_t *lock, unsigned long flags) { DEFINE_WAIT(wait); prepare_to_wait(q, &wait, TASK_INTERRUPTIBLE); spin_unlock_irqrestore(lock, flags); timeout = schedule_timeout(timeout); finish_wait(q, &wait); return timeout; }
static void digi_wakeup_write_lock(struct work_struct *work); static void digi_wakeup_write(struct usb_serial_port *port); static void digi_rx_throttle(struct usb_serial_port *port); static void digi_rx_unthrottle(struct usb_serial_port *port); static void digi_break_ctl(struct usb_serial_port *port, int break_state); static int digi_tiocmget(struct usb_serial_port *port, struct file *file); static int digi_write(struct usb_serial_port *port, const unsigned char *buf, int count); static void digi_write_bulk_callback(struct urb *urb); static int digi_write_room(struct usb_serial_port *port); static int digi_chars_in_buffer(struct usb_serial_port *port); static int digi_open(struct usb_serial_port *port, struct file *filp); static void digi_close(struct usb_serial_port *port, struct file *filp); static int digi_startup_device(struct usb_serial *serial); static int digi_startup(struct usb_serial *serial); static void digi_shutdown(struct usb_serial *serial); static void digi_read_bulk_callback(struct urb *urb); static int digi_read_inb_callback(struct urb *urb); static int digi_read_oob_callback(struct urb *urb); static int __init digi_init(void); static void __exit digi_exit (void);
49f2a9c970ec462c11d2ce91bbf9b2cad028789ad10e07d4472dae14e6023f43
324
justlostintime
gambas
main/gbx/gbx_signal.c
*add_handler
static SIGNAL_HANDLER *add_handler(void) { if (!_handlers) ARRAY_create_inc(&_handlers, 1); return ARRAY_add_void(&_handlers); }
void SIGNAL_install(SIGNAL_HANDLER *handler, int signum, void (*callback); void SIGNAL_uninstall(SIGNAL_HANDLER *handler, int signum); void SIGNAL_previous(SIGNAL_HANDLER *handler, int signum, siginfo_t *info, void *context); static SIGNAL_HANDLER *find_handler(int signum); static void handle_signal(int signum, siginfo_t *info, void *context); static void purge_callbacks(void); void SIGNAL_raise_callbacks(int fd, int type, void *data); SIGNAL_CALLBACK *SIGNAL_register(int signum, void (*callback); void SIGNAL_unregister(int signum, SIGNAL_CALLBACK *cb); void SIGNAL_exit(void); int SIGNAL_get_fd(void);
2c4b62c135b3b1837143127a7775919d2378f9716b8ee3f2f9f221c8f135e015
135
taeguk
OS-pintos
lib_hw1_taeguk/hash.c
void insert_elem
static void insert_elem (struct hash *h, struct list *bucket, struct hash_elem *e) { h->elem_cnt++; list_push_front (bucket, &e->list_elem); }
280cfc5127a1a41f9bcf69311350e446b767bc217f9fb6bf1018658387edd217
148
Peanhua
diamond-girl
src/gfx_image.c
gfx_image_treasure
truct image * gfx_image_treasure(struct treasure * treasure, bool greyscale) { struct image * image; image = NULL; assert(treasure_images != NULL); for(unsigned int i = 0; image == NULL && i < treasure_images->size; i++) { struct treasure_image * ti; ti = treasure_images->data[i]; if(ti->greyscale == greyscale && ti->reference.type == treasure->type && ti->reference.material == treasure->material && ti->reference.gemstones == treasure->gemstones ) image = ti->image; } if(image == NULL) { struct treasure_image * ti; ti = malloc(sizeof *ti); assert(ti != NULL); if(ti != NULL) { ti->greyscale = greyscale; ti->reference.type = treasure->type; ti->reference.material = treasure->material; ti->reference.gemstones = treasure->gemstones; struct image * tmp; ti->image = NULL; tmp = image_load(get_data_filename(treasure_filename(&ti->reference, "png")), true); if(tmp != NULL) { ti->image = image_trim(tmp); tmp = image_free(tmp); } image = ti->image; if(ti->image != NULL) { if(greyscale == true) image_to_greyscale(ti->image); #ifdef WITH_OPENGL if(globals.opengl) image_to_texture(ti->image, false, true); #endif stack_push(treasure_images, ti); } else { fprintf(stderr, "%s(): Failed to load image '%s'\n", __FUNCTION__, get_data_filename(treasure_filename(&ti->reference, "png"))); free(ti); } } else fprintf(stderr, "%s(): Failed to allocate memory: %s\n", __FUNCTION__, strerror(errno)); } return image; }
ool gfx_image_initialize(void); oid gfx_image_cleanup(void); truct image * gfx_image(enum GFX_IMAGE image_id); truct td_object * gfx_td_object_treasure(struct treasure * treasure);
a19e06e0b289e0c9b6663a89e02192641eeea83ac176dba8fd5cdb5c0c750edd
1,938
ZFine0
kernel_3.4.49
viatelecom/kernel/drivers/audio/cad5000.c
cad5000_driver_exit
static void __exit cad5000_driver_exit(void) { i2c_del_driver(&cad5000_i2c_driver); }
static void cad5000_apll1_enable(struct snd_soc_codec *codec, int enable); static void cad5000_apll2_enable(struct snd_soc_codec *codec, int enable); static inline int get_rate_tbl_idx(int rate); static int cad5000_mute(struct snd_soc_dai *dai, int mute); unsigned int cad5000_clk_i2c_read(struct snd_soc_codec *codec, unsigned int reg); void cad5000_poweron(struct snd_soc_codec *codec); unsigned int cad5000_get_chipversion(void); static int cad5000_init(struct snd_soc_codec *codec); static int cad5000_codec_probe(struct snd_soc_codec *codec); static int cad5000_codec_remove(struct snd_soc_codec *codec); static int cad5000_codec_suspend(struct snd_soc_codec *codec); static int cad5000_codec_resume(struct snd_soc_codec *codec); static int cad5000_suspend(struct device *dev); static int cad5000_resume(struct device *dev); int cad5000_i2c_write(unsigned int reg, unsigned int value); unsigned int cad5000_i2c_read(unsigned int reg); static __devexit int cad5000_i2c_remove(struct i2c_client *client); static int __init cad5000_driver_init(void); void cad5000_rst(void); static void cad5000_vddana_onoff(u8 onoff);
53a42659bef57d32ab9b862006e5fd22d66b733722bedc26d01f87f60d3f8f19
90
fabianfreyer
libvirt
src/util/virresctrl.c
int virResctrlLockWrite
static int virResctrlLockWrite(void) { int fd = open(SYSFS_RESCTRL_PATH, O_RDWR | O_CLOEXEC); if (fd < 0) { virReportSystemError(errno, "%s", _("Cannot open resctrl")); return -1; } if (virFileFlock(fd, true, true) < 0) { virReportSystemError(errno, "%s", _("Cannot lock resctrl")); VIR_FORCE_CLOSE(fd); return -1; } return fd; }
c001425a9301de4bb6d480618003577e90b438a6909bb1e0bb907ee4a8ce4783
397
mishamehra
claws-mail
src/plugins/vcalendar/libical/libical/icalderivedproperty.c
icalproperty_new_url
icalproperty* icalproperty_new_url(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_URL_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); icalproperty_set_url((icalproperty*)impl,v); return (icalproperty*)impl; }
const char* icalproperty_kind_to_string(icalproperty_kind kind); icalproperty_kind icalproperty_string_to_kind(const char* string); icalvalue_kind icalproperty_value_kind_to_kind(icalvalue_kind kind); icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind); const char* icalproperty_enum_to_string(int e); int icalproperty_string_to_enum(const char* str); int icalproperty_enum_belongs_to_property(icalproperty_kind kind, int e); const char* icalproperty_method_to_string(icalproperty_method method); icalproperty_method icalproperty_string_to_method(const char* str); const char* icalenum_status_to_string(icalproperty_status status); icalproperty_status icalenum_string_to_status(const char* str); icalproperty* icalproperty_new_action(enum icalproperty_action v); icalproperty* icalproperty_vanew_action(enum icalproperty_action v, ...); void icalproperty_set_action(icalproperty* prop, enum icalproperty_action v); enum icalproperty_action icalproperty_get_action(icalproperty* prop); icalproperty* icalproperty_new_attach(struct icalattachtype v); icalproperty* icalproperty_vanew_attach(struct icalattachtype v, ...); void icalproperty_set_attach(icalproperty* prop, struct icalattachtype v); struct icalattachtype icalproperty_get_attach(icalproperty* prop); icalproperty* icalproperty_new_attendee(const char* v); icalproperty* icalproperty_vanew_attendee(const char* v, ...); void icalproperty_set_attendee(icalproperty* prop, const char* v); const char* icalproperty_get_attendee(icalproperty* prop); icalproperty* icalproperty_new_calscale(const char* v); icalproperty* icalproperty_vanew_calscale(const char* v, ...); void icalproperty_set_calscale(icalproperty* prop, const char* v); const char* icalproperty_get_calscale(icalproperty* prop); icalproperty* icalproperty_new_categories(const char* v); icalproperty* icalproperty_vanew_categories(const char* v, ...); void icalproperty_set_categories(icalproperty* prop, const char* v); const char* icalproperty_get_categories(icalproperty* prop); icalproperty* icalproperty_new_class(const char* v); icalproperty* icalproperty_vanew_class(const char* v, ...); void icalproperty_set_class(icalproperty* prop, const char* v); const char* icalproperty_get_class(icalproperty* prop); icalproperty* icalproperty_new_comment(const char* v); icalproperty* icalproperty_vanew_comment(const char* v, ...); void icalproperty_set_comment(icalproperty* prop, const char* v); const char* icalproperty_get_comment(icalproperty* prop); icalproperty* icalproperty_new_completed(struct icaltimetype v); icalproperty* icalproperty_vanew_completed(struct icaltimetype v, ...); void icalproperty_set_completed(icalproperty* prop, struct icaltimetype v); struct icaltimetype icalproperty_get_completed(icalproperty* prop); icalproperty* icalproperty_new_contact(const char* v); icalproperty* icalproperty_vanew_contact(const char* v, ...); void icalproperty_set_contact(icalproperty* prop, const char* v); const char* icalproperty_get_contact(icalproperty* prop); icalproperty* icalproperty_new_created(struct icaltimetype v); icalproperty* icalproperty_vanew_created(struct icaltimetype v, ...); void icalproperty_set_created(icalproperty* prop, struct icaltimetype v); struct icaltimetype icalproperty_get_created(icalproperty* prop); icalproperty* icalproperty_new_description(const char* v); icalproperty* icalproperty_vanew_description(const char* v, ...); void icalproperty_set_description(icalproperty* prop, const char* v); const char* icalproperty_get_description(icalproperty* prop); icalproperty* icalproperty_new_dtend(struct icaltimetype v); icalproperty* icalproperty_vanew_dtend(struct icaltimetype v, ...); void icalproperty_set_dtend(icalproperty* prop, struct icaltimetype v); struct icaltimetype icalproperty_get_dtend(icalproperty* prop); icalproperty* icalproperty_new_dtstamp(struct icaltimetype v); icalproperty* icalproperty_vanew_dtstamp(struct icaltimetype v, ...); void icalproperty_set_dtstamp(icalproperty* prop, struct icaltimetype v); struct icaltimetype icalproperty_get_dtstamp(icalproperty* prop); icalproperty* icalproperty_new_dtstart(struct icaltimetype v); icalproperty* icalproperty_vanew_dtstart(struct icaltimetype v, ...); void icalproperty_set_dtstart(icalproperty* prop, struct icaltimetype v); struct icaltimetype icalproperty_get_dtstart(icalproperty* prop); icalproperty* icalproperty_new_due(struct icaltimetype v); icalproperty* icalproperty_vanew_due(struct icaltimetype v, ...); void icalproperty_set_due(icalproperty* prop, struct icaltimetype v); struct icaltimetype icalproperty_get_due(icalproperty* prop); icalproperty* icalproperty_new_duration(struct icaldurationtype v); icalproperty* icalproperty_vanew_duration(struct icaldurationtype v, ...); void icalproperty_set_duration(icalproperty* prop, struct icaldurationtype v); struct icaldurationtype icalproperty_get_duration(icalproperty* prop); icalproperty* icalproperty_new_exdate(struct icaltimetype v); icalproperty* icalproperty_vanew_exdate(struct icaltimetype v, ...); void icalproperty_set_exdate(icalproperty* prop, struct icaltimetype v); struct icaltimetype icalproperty_get_exdate(icalproperty* prop); icalproperty* icalproperty_new_exrule(struct icalrecurrencetype v); icalproperty* icalproperty_vanew_exrule(struct icalrecurrencetype v, ...); void icalproperty_set_exrule(icalproperty* prop, struct icalrecurrencetype v); struct icalrecurrencetype icalproperty_get_exrule(icalproperty* prop); icalproperty* icalproperty_new_freebusy(struct icalperiodtype v); icalproperty* icalproperty_vanew_freebusy(struct icalperiodtype v, ...); void icalproperty_set_freebusy(icalproperty* prop, struct icalperiodtype v); struct icalperiodtype icalproperty_get_freebusy(icalproperty* prop); icalproperty* icalproperty_new_geo(struct icalgeotype v); icalproperty* icalproperty_vanew_geo(struct icalgeotype v, ...); void icalproperty_set_geo(icalproperty* prop, struct icalgeotype v); struct icalgeotype icalproperty_get_geo(icalproperty* prop); icalproperty* icalproperty_new_lastmodified(struct icaltimetype v); icalproperty* icalproperty_vanew_lastmodified(struct icaltimetype v, ...); void icalproperty_set_lastmodified(icalproperty* prop, struct icaltimetype v); struct icaltimetype icalproperty_get_lastmodified(icalproperty* prop); icalproperty* icalproperty_new_location(const char* v); icalproperty* icalproperty_vanew_location(const char* v, ...); void icalproperty_set_location(icalproperty* prop, const char* v); const char* icalproperty_get_location(icalproperty* prop); icalproperty* icalproperty_new_maxresults(int v); icalproperty* icalproperty_vanew_maxresults(int v, ...); void icalproperty_set_maxresults(icalproperty* prop, int v); int icalproperty_get_maxresults(icalproperty* prop); icalproperty* icalproperty_new_maxresultssize(int v); icalproperty* icalproperty_vanew_maxresultssize(int v, ...); void icalproperty_set_maxresultssize(icalproperty* prop, int v); int icalproperty_get_maxresultssize(icalproperty* prop); icalproperty* icalproperty_new_method(enum icalproperty_method v); icalproperty* icalproperty_vanew_method(enum icalproperty_method v, ...); void icalproperty_set_method(icalproperty* prop, enum icalproperty_method v); enum icalproperty_method icalproperty_get_method(icalproperty* prop); icalproperty* icalproperty_new_organizer(const char* v); icalproperty* icalproperty_vanew_organizer(const char* v, ...); void icalproperty_set_organizer(icalproperty* prop, const char* v); const char* icalproperty_get_organizer(icalproperty* prop); icalproperty* icalproperty_new_percentcomplete(int v); icalproperty* icalproperty_vanew_percentcomplete(int v, ...); void icalproperty_set_percentcomplete(icalproperty* prop, int v); int icalproperty_get_percentcomplete(icalproperty* prop); icalproperty* icalproperty_new_priority(int v); icalproperty* icalproperty_vanew_priority(int v, ...); void icalproperty_set_priority(icalproperty* prop, int v); int icalproperty_get_priority(icalproperty* prop); icalproperty* icalproperty_new_prodid(const char* v); icalproperty* icalproperty_vanew_prodid(const char* v, ...); void icalproperty_set_prodid(icalproperty* prop, const char* v); const char* icalproperty_get_prodid(icalproperty* prop); icalproperty* icalproperty_new_query(const char* v); icalproperty* icalproperty_vanew_query(const char* v, ...); void icalproperty_set_query(icalproperty* prop, const char* v); const char* icalproperty_get_query(icalproperty* prop); icalproperty* icalproperty_new_queryname(const char* v); icalproperty* icalproperty_vanew_queryname(const char* v, ...); void icalproperty_set_queryname(icalproperty* prop, const char* v); const char* icalproperty_get_queryname(icalproperty* prop); icalproperty* icalproperty_new_rdate(struct icaldatetimeperiodtype v); icalproperty* icalproperty_vanew_rdate(struct icaldatetimeperiodtype v, ...); void icalproperty_set_rdate(icalproperty* prop, struct icaldatetimeperiodtype v); struct icaldatetimeperiodtype icalproperty_get_rdate(icalproperty* prop); icalproperty* icalproperty_new_recurrenceid(struct icaltimetype v); icalproperty* icalproperty_vanew_recurrenceid(struct icaltimetype v, ...); void icalproperty_set_recurrenceid(icalproperty* prop, struct icaltimetype v); struct icaltimetype icalproperty_get_recurrenceid(icalproperty* prop); icalproperty* icalproperty_new_relatedto(const char* v); icalproperty* icalproperty_vanew_relatedto(const char* v, ...); void icalproperty_set_relatedto(icalproperty* prop, const char* v); const char* icalproperty_get_relatedto(icalproperty* prop); icalproperty* icalproperty_new_repeat(int v); icalproperty* icalproperty_vanew_repeat(int v, ...); void icalproperty_set_repeat(icalproperty* prop, int v); int icalproperty_get_repeat(icalproperty* prop); icalproperty* icalproperty_new_requeststatus(const char* v); icalproperty* icalproperty_vanew_requeststatus(const char* v, ...); void icalproperty_set_requeststatus(icalproperty* prop, const char* v); const char* icalproperty_get_requeststatus(icalproperty* prop); icalproperty* icalproperty_new_resources(const char* v); icalproperty* icalproperty_vanew_resources(const char* v, ...); void icalproperty_set_resources(icalproperty* prop, const char* v); const char* icalproperty_get_resources(icalproperty* prop); icalproperty* icalproperty_new_rrule(struct icalrecurrencetype v); icalproperty* icalproperty_vanew_rrule(struct icalrecurrencetype v, ...); void icalproperty_set_rrule(icalproperty* prop, struct icalrecurrencetype v); struct icalrecurrencetype icalproperty_get_rrule(icalproperty* prop); icalproperty* icalproperty_new_scope(const char* v); icalproperty* icalproperty_vanew_scope(const char* v, ...); void icalproperty_set_scope(icalproperty* prop, const char* v); const char* icalproperty_get_scope(icalproperty* prop); icalproperty* icalproperty_new_sequence(int v); icalproperty* icalproperty_vanew_sequence(int v, ...); void icalproperty_set_sequence(icalproperty* prop, int v); int icalproperty_get_sequence(icalproperty* prop); icalproperty* icalproperty_new_status(enum icalproperty_status v); icalproperty* icalproperty_vanew_status(enum icalproperty_status v, ...); void icalproperty_set_status(icalproperty* prop, enum icalproperty_status v); enum icalproperty_status icalproperty_get_status(icalproperty* prop); icalproperty* icalproperty_new_summary(const char* v); icalproperty* icalproperty_vanew_summary(const char* v, ...); void icalproperty_set_summary(icalproperty* prop, const char* v); const char* icalproperty_get_summary(icalproperty* prop); icalproperty* icalproperty_new_target(const char* v); icalproperty* icalproperty_vanew_target(const char* v, ...); void icalproperty_set_target(icalproperty* prop, const char* v); const char* icalproperty_get_target(icalproperty* prop); icalproperty* icalproperty_new_transp(const char* v); icalproperty* icalproperty_vanew_transp(const char* v, ...); void icalproperty_set_transp(icalproperty* prop, const char* v); const char* icalproperty_get_transp(icalproperty* prop); icalproperty* icalproperty_new_trigger(struct icaltriggertype v); icalproperty* icalproperty_vanew_trigger(struct icaltriggertype v, ...); void icalproperty_set_trigger(icalproperty* prop, struct icaltriggertype v); struct icaltriggertype icalproperty_get_trigger(icalproperty* prop); icalproperty* icalproperty_new_tzid(const char* v); icalproperty* icalproperty_vanew_tzid(const char* v, ...); void icalproperty_set_tzid(icalproperty* prop, const char* v); const char* icalproperty_get_tzid(icalproperty* prop); icalproperty* icalproperty_new_tzname(const char* v); icalproperty* icalproperty_vanew_tzname(const char* v, ...); void icalproperty_set_tzname(icalproperty* prop, const char* v); const char* icalproperty_get_tzname(icalproperty* prop); icalproperty* icalproperty_new_tzoffsetfrom(int v); icalproperty* icalproperty_vanew_tzoffsetfrom(int v, ...); void icalproperty_set_tzoffsetfrom(icalproperty* prop, int v); int icalproperty_get_tzoffsetfrom(icalproperty* prop); icalproperty* icalproperty_new_tzoffsetto(int v); icalproperty* icalproperty_vanew_tzoffsetto(int v, ...); void icalproperty_set_tzoffsetto(icalproperty* prop, int v); int icalproperty_get_tzoffsetto(icalproperty* prop); icalproperty* icalproperty_new_tzurl(const char* v); icalproperty* icalproperty_vanew_tzurl(const char* v, ...); void icalproperty_set_tzurl(icalproperty* prop, const char* v); const char* icalproperty_get_tzurl(icalproperty* prop); icalproperty* icalproperty_new_uid(const char* v); icalproperty* icalproperty_vanew_uid(const char* v, ...); void icalproperty_set_uid(icalproperty* prop, const char* v); const char* icalproperty_get_uid(icalproperty* prop); icalproperty* icalproperty_vanew_url(const char* v, ...); void icalproperty_set_url(icalproperty* prop, const char* v); const char* icalproperty_get_url(icalproperty* prop); icalproperty* icalproperty_new_version(const char* v); icalproperty* icalproperty_vanew_version(const char* v, ...); void icalproperty_set_version(icalproperty* prop, const char* v); const char* icalproperty_get_version(icalproperty* prop); icalproperty* icalproperty_new_x(const char* v); icalproperty* icalproperty_vanew_x(const char* v, ...); void icalproperty_set_x(icalproperty* prop, const char* v); const char* icalproperty_get_x(icalproperty* prop); icalproperty* icalproperty_new_xlicclustercount(const char* v); icalproperty* icalproperty_vanew_xlicclustercount(const char* v, ...); void icalproperty_set_xlicclustercount(icalproperty* prop, const char* v); const char* icalproperty_get_xlicclustercount(icalproperty* prop); icalproperty* icalproperty_new_xlicerror(const char* v); icalproperty* icalproperty_vanew_xlicerror(const char* v, ...); void icalproperty_set_xlicerror(icalproperty* prop, const char* v); const char* icalproperty_get_xlicerror(icalproperty* prop); icalproperty* icalproperty_new_xlicmimecharset(const char* v); icalproperty* icalproperty_vanew_xlicmimecharset(const char* v, ...); void icalproperty_set_xlicmimecharset(icalproperty* prop, const char* v); const char* icalproperty_get_xlicmimecharset(icalproperty* prop); icalproperty* icalproperty_new_xlicmimecid(const char* v); icalproperty* icalproperty_vanew_xlicmimecid(const char* v, ...); void icalproperty_set_xlicmimecid(icalproperty* prop, const char* v); const char* icalproperty_get_xlicmimecid(icalproperty* prop); icalproperty* icalproperty_new_xlicmimecontenttype(const char* v); icalproperty* icalproperty_vanew_xlicmimecontenttype(const char* v, ...); void icalproperty_set_xlicmimecontenttype(icalproperty* prop, const char* v); const char* icalproperty_get_xlicmimecontenttype(icalproperty* prop); icalproperty* icalproperty_new_xlicmimeencoding(const char* v); icalproperty* icalproperty_vanew_xlicmimeencoding(const char* v, ...); void icalproperty_set_xlicmimeencoding(icalproperty* prop, const char* v); const char* icalproperty_get_xlicmimeencoding(icalproperty* prop); icalproperty* icalproperty_new_xlicmimefilename(const char* v); icalproperty* icalproperty_vanew_xlicmimefilename(const char* v, ...); void icalproperty_set_xlicmimefilename(icalproperty* prop, const char* v); const char* icalproperty_get_xlicmimefilename(icalproperty* prop); icalproperty* icalproperty_new_xlicmimeoptinfo(const char* v); icalproperty* icalproperty_vanew_xlicmimeoptinfo(const char* v, ...); void icalproperty_set_xlicmimeoptinfo(icalproperty* prop, const char* v); const char* icalproperty_get_xlicmimeoptinfo(icalproperty* prop);
e5d9b6655e89c52fba0e06eefb5203a36a123e8702e59bbf2d995b67f2314a09
251
wireshark
wireshark
epan/dissectors/packet-qsig.c
dissect_qsig_sd_KeypadArg_PDU
static int dissect_qsig_sd_KeypadArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); offset = dissect_qsig_sd_KeypadArg(FALSE, tvb, offset, &asn1_ctx, tree, hf_qsig_sd_qsig_sd_KeypadArg_PDU); return offset; }
static int dissect_qsig_na_NameArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cf_ARG_activateDiversionQ_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cf_RES_activateDiversionQ_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cf_ARG_deactivateDiversionQ_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cf_RES_deactivateDiversionQ_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cf_ARG_interrogateDiversionQ_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cf_IntResultList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cf_ARG_checkRestriction_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cf_RES_checkRestriction_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cf_ARG_callRerouteing_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cf_RES_callRerouteing_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cf_ARG_divertingLegInformation1_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cf_ARG_divertingLegInformation2_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cf_ARG_divertingLegInformation3_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cf_ARG_cfnrDivertedLegFailed_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cf_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pr_DummyArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pr_PRProposeArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pr_PRSetupArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pr_DummyResult_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pr_PRRetainArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pr_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ct_DummyArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ct_CTIdentifyRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ct_CTInitiateArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ct_DummyRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ct_CTSetupArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ct_CTActiveArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ct_CTCompleteArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ct_CTUpdateArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ct_SubaddressTransferArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ct_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cc_CcRequestArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cc_CcRequestRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cc_CcOptionalArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cc_CcExtension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cc_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_co_PathRetainArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_co_ServiceAvailableArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_co_DummyArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_co_DummyRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_co_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_dnd_DNDActivateArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_dnd_DNDActivateRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_dnd_DNDDeactivateArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_dnd_DummyRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_dnd_DNDInterrogateArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_dnd_DNDInterrogateRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_dnd_DNDOverrideArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_dnd_PathRetainArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_dnd_ServiceAvailableArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_dnd_DummyArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_dnd_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ci_PathRetainArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ci_ServiceAvailableArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ci_CIRequestArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ci_CIRequestRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ci_DummyArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ci_CIGetCIPLRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ci_DummyRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ci_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_aoc_AocRateArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_aoc_AocInterimArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_aoc_AocFinalArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_aoc_ChargeRequestArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_aoc_ChargeRequestRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_aoc_DummyArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_aoc_AocCompleteArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_aoc_AocCompleteRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_aoc_AocDivChargeReqArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_aoc_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_re_ReAlertingArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_re_ReAnswerArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sync_SynchronizationReqArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sync_SynchronizationReqRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sync_SynchronizationInfoArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sync_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cint_CintInformation1Arg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cint_CintInformation2Arg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cint_CintCondArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cint_CintExtension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cmn_DummyArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cmn_CmnArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cpi_CPIRequestArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cpi_CPIPRequestArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pumr_PumRegistrArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pumr_PumRegistrRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pumr_PumDelRegArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pumr_DummyRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pumr_PumDe_regArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pumr_PumInterrogArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pumr_PumInterrogRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pumr_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pumch_EnquiryArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pumch_EnquiryRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pumch_DivertArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pumch_DummyRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pumch_InformArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pumch_PumoArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_pumch_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ssct_SSCTInitiateArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ssct_DummyRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ssct_SSCTSetupArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ssct_DummyArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ssct_SSCTDigitInfoArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_ssct_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmlr_LocUpdArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmlr_DummyRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmlr_LocDelArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmlr_LocDeRegArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmlr_PisnEnqArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmlr_PisnEnqRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmlr_GetRRCInfArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmlr_GetRRCInfRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmlr_LocInfoCheckArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmlr_LocInfoCheckRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmlr_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmch_EnquiryArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmch_EnquiryRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmch_DivertArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmch_DummyRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmch_InformArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmch_WtmoArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmch_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmau_AuthWtmArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmau_AuthWtmRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmau_WtatParamArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmau_WtatParamRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmau_WtanParamArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmau_WtanParamRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmau_ARG_transferAuthParam_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_wtmau_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sd_DisplayArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sd_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cidl_CallIdentificationAssignArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_cidl_CallIdentificationUpdateArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sms_SmsSubmitArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sms_SmsSubmitRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sms_SmsDeliverArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sms_SmsDeliverRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sms_SmsStatusReportArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sms_SmsStatusReportRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sms_SmsCommandArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sms_SmsCommandRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sms_ScAlertArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sms_DummyRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sms_PAR_smsDeliverError_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sms_PAR_smsSubmitError_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sms_PAR_smsStatusReportError_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sms_PAR_smsCommandError_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_sms_SmsExtension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_mcr_MCRequestArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_mcr_MCRequestResult_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_mcr_MCInformArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_mcr_MCAlertingArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_mcr_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_mcm_MCMNewMsgArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_mcm_MCMDummyRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_mcm_MCMNoNewMsgArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_mcm_MCMUpdateArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_mcm_MCMUpdateReqArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_mcm_MCMUpdateReqRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_mcm_MCMServiceArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_mcm_MCMInterrogateArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_mcm_MCMInterrogateRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_mcm_MCMailboxFullArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_mcm_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_mid_MIDMailboxAuthArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_mid_MIDDummyRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_mid_MIDMailboxIDArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_qsig_mid_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static const qsig_op_t *get_op(gint32 opcode); static gint32 get_service(gint32 opcode); static const qsig_err_t *get_err(gint32 errcode); void proto_register_qsig(void); void proto_reg_handoff_qsig(void);
8b3a107eb686a6220e1149f6626f9388e67229557d527d8dd493070abd868c2e
348
nfont
librtas
librtasevent_src/rtas_post.c
print_re_post_scn
int print_re_post_scn(struct scn_header *shdr, int verbosity) { struct rtas_post_scn *post = (struct rtas_post_scn *)shdr; int len = 0; if (shdr->scn_id != RTAS_POST_SCN) { errno = EFAULT; return 0; } len += print_scn_title("Power-On Self Test Section"); if (post->devname[0]) len += rtas_print("%-20s%s\n", "Failing Device:", post->devname); if (post->firmware) len += rtas_print("Firmware Error.\n"); if (post->config) len += rtas_print("Configuration Error.\n"); if (post->cpu) len += rtas_print("CPU POST Error.\n"); if (post->memory) len += rtas_print("Memory POST Error.\n"); if (post->io) len += rtas_print("I/O Subsystem POST Error.\n"); if (post->keyboard) len += rtas_print("Keyboard POST Error.\n"); if (post->mouse) len += rtas_print("Mouse POST Error.\n"); if (post->display) len += rtas_print("Display POST Error.\n"); if (post->ipl_floppy) len += rtas_print("Floppy IPL Error.\n"); if (post->ipl_controller) len += rtas_print("Drive Controller Error during IPL.\n"); if (post->ipl_cdrom) len += rtas_print("CDROM IPL Error.\n"); if (post->ipl_disk) len += rtas_print("Disk IPL Error.\n"); if (post->ipl_net) len += rtas_print("Network IPL Error.\n"); if (post->ipl_other) len += rtas_print("Other (tape,flash) IPL Error.\n"); if (post->firmware_selftest) len += rtas_print("Self-test error in firmware extended " "diagnostics.\n"); len += rtas_print("POST Error Code: %x\n", post->err_code); len += rtas_print("Firmware Revision Code: %x\n", post->firmware_rev); len += rtas_print("\n"); return len; }
9d0e287587a2dc699e4e7309b0618c70e23333e058445f6053c05efe4f649045
1,718
spinlock
ucore
x86_64/lab5_mutexsync/proj15/kern/process/proc.c
* alloc_proc
static struct proc_struct * alloc_proc(void) { struct proc_struct *proc = kmalloc(sizeof(struct proc_struct)); if (proc != NULL) { proc->state = PROC_UNINIT; proc->pid = -1; proc->runs = 0; proc->kstack = 0; proc->need_resched = 0; proc->parent = NULL; proc->mm = NULL; memset(&(proc->context), 0, sizeof(struct context)); proc->tf = NULL; proc->cr3 = boot_cr3; proc->flags = 0; memset(proc->name, 0, PROC_NAME_LEN); proc->wait_state = 0; proc->cptr = proc->optr = proc->yptr = NULL; list_init(&(proc->thread_group)); proc->rq = NULL; list_init(&(proc->run_link)); proc->time_slice = 0; proc->sem_queue = NULL; event_box_init(&(proc->event_box)); } return proc; }
6c1bccb0593c118616ba5c266b260a3a1a6cbaeb284a9e00fce76c8f269a5152
840
01org
Igvtg-kernel
3.10/arch/cris/arch-v32/kernel/kgdb.c
* mem2hex
static char * mem2hex(char *buf, unsigned char *mem, int count) { int i; int ch; if (mem == NULL) { for (i = 0; i < count; i++) { *buf++ = '0'; *buf++ = '0'; } } else { for (i = 0; i < count; i++) { ch = *mem++; buf = hex_byte_pack(buf, ch); } } *buf = '\0'; return buf; }
int insn_size(unsigned long pc); void register_fixup(int sigval); static void insert_watchpoint(char type, int addr, int len); static void remove_watchpoint(char type, int addr, int len);
809fd6f11b28984218a2b80b6e53e2a2401aed20c77d8a6d6feaa1d9afff401a
424
Fe-Pi
linux
drivers/media/i2c/tvp5150.c
tvp5150_write
static int tvp5150_write(struct v4l2_subdev *sd, unsigned char addr, unsigned char value) { struct i2c_client *c = v4l2_get_subdevdata(sd); int rc; dev_dbg_lvl(sd->dev, 2, debug, "tvp5150: writing %02x %02x\n", addr, value); rc = i2c_smbus_write_byte_data(c, addr, value); if (rc < 0) dev_err(sd->dev, "i2c i/o error: rc == %d\n", rc); return rc; }
static inline struct tvp5150 *to_tvp5150(struct v4l2_subdev *sd); static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl); static int tvp5150_read(struct v4l2_subdev *sd, unsigned char addr); static int tvp5150_log_status(struct v4l2_subdev *sd); static void tvp5150_selmux(struct v4l2_subdev *sd); static int tvp5150_vdp_init(struct v4l2_subdev *sd); static int tvp5150_get_vbi(struct v4l2_subdev *sd, int line); static int tvp5150_set_std(struct v4l2_subdev *sd, v4l2_std_id std); static int tvp5150_s_std(struct v4l2_subdev *sd, v4l2_std_id std); static int tvp5150_reset(struct v4l2_subdev *sd, u32 val); static int tvp5150_s_ctrl(struct v4l2_ctrl *ctrl); static v4l2_std_id tvp5150_read_std(struct v4l2_subdev *sd); static int tvp5150_s_stream(struct v4l2_subdev *sd, int enable); static int tvp5150_s_raw_fmt(struct v4l2_subdev *sd, struct v4l2_vbi_format *fmt); static int tvp5150_s_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *svbi); static int tvp5150_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *svbi); static int tvp5150_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg); static int tvp5150_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg); static int tvp5150_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt); static int tvp5150_registered(struct v4l2_subdev *sd); static int tvp5150_detect_version(struct tvp5150 *core); static int tvp5150_init(struct i2c_client *c); static int tvp5150_parse_dt(struct tvp5150 *decoder, struct device_node *np); static int tvp5150_remove(struct i2c_client *c);
c3b2145d5340ccb38d225303bc5a55d154aa84caf7b8a5d46cc0ec7da74f14dc
364
JosephMcc
muffin
clutter/clutter/clutter-actor.c
clutter_actor_compute_resource_scale
clutter_actor_compute_resource_scale (ClutterActor *self, float *resource_scale) { graphene_rect_t bounding_rect; ClutterActorPrivate *priv = self->priv; if (CLUTTER_ACTOR_IN_DESTRUCTION (self) || CLUTTER_ACTOR_IN_PREF_SIZE (self) || !clutter_actor_is_mapped (self)) { return FALSE; } clutter_actor_get_transformed_position (self, &bounding_rect.origin.x, &bounding_rect.origin.y); clutter_actor_get_transformed_size (self, &bounding_rect.size.width, &bounding_rect.size.height); if (bounding_rect.size.width == 0.0 || bounding_rect.size.height == 0.0 || !_clutter_actor_get_resource_scale_for_rect (self, &bounding_rect, resource_scale)) { if (priv->parent) { gboolean in_clone_paint; gboolean was_parent_in_clone_paint; gboolean was_parent_unmapped; gboolean was_parent_paint_unmapped; gboolean ret; in_clone_paint = clutter_actor_is_in_clone_paint (self); was_parent_unmapped = !clutter_actor_is_mapped (priv->parent); was_parent_in_clone_paint = clutter_actor_is_in_clone_paint (priv->parent); was_parent_paint_unmapped = priv->parent->priv->enable_paint_unmapped; if (in_clone_paint && was_parent_unmapped) { _clutter_actor_set_in_clone_paint (priv->parent, TRUE); _clutter_actor_set_enable_paint_unmapped (priv->parent, TRUE); } ret = _clutter_actor_compute_resource_scale (priv->parent, resource_scale); if (in_clone_paint && was_parent_unmapped) { _clutter_actor_set_in_clone_paint (priv->parent, was_parent_in_clone_paint); _clutter_actor_set_enable_paint_unmapped (priv->parent, was_parent_paint_unmapped); } return ret; } else { return FALSE; } } return TRUE; } static ClutterAc
gchar * _clutter_actor_get_debug_name (ClutterActor *actor); c inline void clutter_actor_verify_map_state (ClutterActor *self); c void _clutter_actor_pop_pick_clip (ClutterActor *self); c void clutter_actor_real_map (ClutterActor *self); clutter_actor_map (ClutterActor *self); ean clutter_actor_is_mapped (ClutterActor *self); c void maybe_unset_key_focus (ClutterActor *self); c void clutter_actor_real_unmap (ClutterActor *self); clutter_actor_unmap (ClutterActor *self); c void clutter_actor_queue_shallow_relayout (ClutterActor *self); c void clutter_actor_real_show (ClutterActor *self); c void clutter_actor_queue_redraw_on_parent (ClutterActor *self); clutter_actor_show (ClutterActor *self); ean clutter_actor_is_visible (ClutterActor *self); clutter_actor_show_all (ClutterActor *self); c void clutter_actor_real_hide (ClutterActor *self); clutter_actor_hide (ClutterActor *self); clutter_actor_realize (ClutterActor *self); ean clutter_actor_is_realized (ClutterActor *self); c void clutter_actor_realize_internal (ClutterActor *self); c void clutter_actor_real_unrealize (ClutterActor *self); clutter_actor_unrealize (ClutterActor *self); c void clutter_actor_unrealize_internal (ClutterActor *self); c void clutter_actor_unrealize_not_hiding (ClutterActor *self); ean clutter_actor_should_pick_paint (ClutterActor *self); c inline gboolean clutter_actor_needs_relayout (ClutterActor *self); c void clutter_actor_real_queue_relayout (ClutterActor *self); clutter_actor_get_abs_allocation_vertices (ClutterActor *self, graphene_point3d_t *verts); _clutter_actor_apply_modelview_transform (ClutterActor *self, ClutterMatrix *matrix); _clutter_actor_push_clone_paint (void); _clutter_actor_pop_clone_paint (void); c gboolean in_clone_paint (void); c void _clutter_actor_update_last_paint_volume (ClutterActor *self); c gboolean needs_flatten_effect (ClutterActor *self); c void add_or_remove_flatten_effect (ClutterActor *self); clutter_actor_paint (ClutterActor *self, ClutterPaintContext *paint_context); ter_actor_continue_paint (ClutterActor *self, ClutterPaintContext *paint_context); actor_pick (ClutterActor *actor, ClutterPickContext *pick_context); r_continue_pick (ClutterActor *actor, ClutterPickContext *pick_context); ter_actor_stop_transitions (ClutterActor *self); sformInfo * _clutter_actor_get_transform_info_or_defaults (ClutterActor *self); er_transform_info_free (gpointer data); nfo * _clutter_actor_get_transform_info (ClutterActor *self); ctor_get_rotation_angle (ClutterActor *self, ClutterRotateAxis axis); er_actor_set_clip_rect (ClutterActor *self, const graphene_rect_t *clip); er_actor_dispose (GObject *object); er_actor_finalize (GObject *object); er_actor_get_accessible (ClutterActor *self); * clutter_actor_real_get_accessible (ClutterActor *actor); * _clutter_actor_ref_accessible (AtkImplementor *implementor); mplementor_iface_init (AtkImplementorIface *iface); lutter_actor_update_default_paint_volume (ClutterActor *self, ClutterPaintVolume *volume); lutter_actor_real_get_paint_volume (ClutterActor *self, ClutterPaintVolume *volume); tVolume * clutter_actor_get_default_paint_volume (ClutterActor *self); lutter_actor_real_has_overlaps (ClutterActor *self); er_actor_real_destroy (ClutterActor *actor); er_actor_class_init (ClutterActorClass *klass); er_actor_init (ClutterActor *self); utter_actor_new (void); r_destroy (ClutterActor *self); or_finish_queue_redraw (ClutterActor *self, ClutterPaintVolume *clip); ter_actor_get_allocation_clip (ClutterActor *self, ClutterActorBox *clip); r_queue_redraw (ClutterActor *self); or_queue_only_relayout (ClutterActor *self); r_queue_redraw_with_clip (ClutterActor *self, const cairo_rectangle_int_t *clip); r_queue_relayout (ClutterActor *self); _clutter_actor_get_effective_x_align (ClutterActor *self); r_get_allocation_box (ClutterActor *self, ClutterActorBox *box); er_actor_update_constraints (ClutterActor *self, ClutterActorBox *allocation); er_actor_adjust_allocation (ClutterActor *self, ClutterActorBox *allocation); actor_get_fixed_position_set (ClutterActor *self); r_set_fixed_position_set (ClutterActor *self, gboolean is_set); er_actor_set_min_width (ClutterActor *self, gfloat min_width); er_actor_set_min_height (ClutterActor *self, gfloat min_height); er_actor_set_natural_width (ClutterActor *self, gfloat natural_width); er_actor_set_natural_height (ClutterActor *self, gfloat natural_height); er_actor_set_min_width_set (ClutterActor *self, gboolean use_min_width); er_actor_set_min_height_set (ClutterActor *self, gboolean use_min_height); er_actor_set_natural_width_set (ClutterActor *self, gboolean use_natural_width); er_actor_set_natural_height_set (ClutterActor *self, gboolean use_natural_height); r_set_request_mode (ClutterActor *self, ClutterRequestMode mode); e clutter_actor_get_request_mode (ClutterActor *self); er_actor_set_size_internal (ClutterActor *self, const graphene_size_t *size); tor_get_width (ClutterActor *self); tor_get_height (ClutterActor *self); r_set_width (ClutterActor *self, gfloat width); r_set_height (ClutterActor *self, gfloat height); er_actor_set_position_internal (ClutterActor *self, const graphene_point_t *position); r_set_x (ClutterActor *self, gfloat x); r_set_y (ClutterActor *self, gfloat y); tor_get_x (ClutterActor *self); tor_get_y (ClutterActor *self); r_set_scale_z (ClutterActor *self, gdouble scale_z); ctor_get_scale_z (ClutterActor *self); utter_actor_get_scale_gravity (ClutterActor *self); r_set_opacity (ClutterActor *self, guint8 opacity); tter_actor_get_paint_opacity_internal (ClutterActor *self); tor_get_paint_opacity (ClutterActor *self); tor_get_opacity (ClutterActor *self); r_set_offscreen_redirect (ClutterActor *self, ClutterOffscreenRedirect redirect); edirect clutter_actor_get_offscreen_redirect (ClutterActor *self); r_set_name (ClutterActor *self, const gchar *name); tter_actor_get_name (ClutterActor *self); r_set_z_position (ClutterActor *self, gfloat z_position); tor_get_z_position (ClutterActor *self); r_set_pivot_point_z (ClutterActor *self, gfloat pivot_z); tor_get_pivot_point_z (ClutterActor *self); r_set_depth (ClutterActor *self, gfloat depth); tor_get_depth (ClutterActor *self); utter_actor_get_z_rotation_gravity (ClutterActor *self); r_remove_clip (ClutterActor *self); actor_has_clip (ClutterActor *self); ctor_get_children (ClutterActor *self); r_add_child (ClutterActor *self, ClutterActor *child); r_set_parent (ClutterActor *self, ClutterActor *parent); utter_actor_get_parent (ClutterActor *self); actor_get_paint_visibility (ClutterActor *actor); r_remove_child (ClutterActor *self, ClutterActor *child); r_remove_all_children (ClutterActor *self); r_destroy_all_children (ClutterActor *self); r_unparent (ClutterActor *self); actor_contains (ClutterActor *self, ClutterActor *descendant); r_set_reactive (ClutterActor *actor, gboolean reactive); actor_get_reactive (ClutterActor *actor); utter_actor_get_anchor_point_gravity (ClutterActor *self); r_move_anchor_point_from_gravity (ClutterActor *self, ClutterGravity gravity); r_set_anchor_point_from_gravity (ClutterActor *self, ClutterGravity gravity); er_actor_store_content_box (ClutterActor *self, const ClutterActorBox *box); er_container_iface_init (ClutterContainerIface *iface); er_scriptable_iface_init (ClutterScriptableIface *iface); er_animatable_iface_init (ClutterAnimatableInterface *iface); actor_is_rotated (ClutterActor *self); actor_is_scaled (ClutterActor *self); lutter_actor_get_stage_internal (ClutterActor *actor); utter_actor_get_stage (ClutterActor *actor); r_allocate_preferred_size (ClutterActor *self, ClutterAllocationFlags flags); r_grab_key_focus (ClutterActor *self); e_pango_context (ClutterBackend *backend, PangoContext *context); utter_actor_get_pango_context (ClutterActor *self); utter_actor_create_pango_context (ClutterActor *self); tter_actor_create_pango_layout (ClutterActor *self, const gchar *text); r_set_opacity_override (ClutterActor *self, gint opacity); r_get_opacity_override (ClutterActor *self); r_inhibit_culling (ClutterActor *actor); r_uninhibit_culling (ClutterActor *actor); or_set_enable_model_view_transform (ClutterActor *self, gboolean enable); or_set_enable_paint_unmapped (ClutterActor *self, gboolean enable); vity clutter_anchor_coord_get_gravity (const AnchorCoord *coord); er_anchor_coord_set_gravity (AnchorCoord *coord, ClutterGravity gravity); lutter_anchor_coord_is_zero (const AnchorCoord *coord); clutter_actor_get_flags (ClutterActor *self); r_set_flags (ClutterActor *self, ClutterActorFlags flags); r_unset_flags (ClutterActor *self, ClutterActorFlags flags); er_actor_set_transform_internal (ClutterActor *self, const ClutterMatrix *transform); r_set_transform (ClutterActor *self, const ClutterMatrix *transform); r_get_transform (ClutterActor *self, ClutterMatrix *transform); or_set_in_clone_paint (ClutterActor *self, gboolean is_in_clone_paint); actor_is_in_clone_paint (ClutterActor *self); actor_has_damage (ClutterActor *actor); et_direction_recursive (ClutterActor *actor, gpointer user_data); r_set_text_direction (ClutterActor *self, ClutterTextDirection text_dir); or_set_has_pointer (ClutterActor *self, gboolean has_pointer); or_set_has_key_focus (ClutterActor *self, gboolean has_key_focus); ion clutter_actor_get_text_direction (ClutterActor *self); actor_has_pointer (ClutterActor *self); actor_has_allocation (ClutterActor *self); r_add_action (ClutterActor *self, ClutterAction *action); r_remove_action (ClutterActor *self, ClutterAction *action); r_remove_action_by_name (ClutterActor *self, const gchar *name); ctor_get_actions (ClutterActor *self); lutter_actor_get_action (ClutterActor *self, const gchar *name); r_clear_actions (ClutterActor *self); r_add_constraint (ClutterActor *self, ClutterConstraint *constraint); r_remove_constraint (ClutterActor *self, ClutterConstraint *constraint); r_remove_constraint_by_name (ClutterActor *self, const gchar *name); ctor_get_constraints (ClutterActor *self); r_clear_constraints (ClutterActor *self); r_set_clip_to_allocation (ClutterActor *self, gboolean clip_set); actor_get_clip_to_allocation (ClutterActor *self); r_add_effect (ClutterActor *self, ClutterEffect *effect); r_remove_effect (ClutterActor *self, ClutterEffect *effect); r_remove_effect_by_name (ClutterActor *self, const gchar *name); ctor_get_effects (ClutterActor *self); lutter_actor_get_effect (ClutterActor *self, const gchar *name); r_clear_effects (ClutterActor *self); actor_has_key_focus (ClutterActor *self); clutter_actor_get_paint_volume_real (ClutterActor *self, ClutterPaintVolume *pv); clutter_actor_has_active_paint_volume_override_effects (ClutterActor *self); ntVolume * _clutter_actor_get_paint_volume_mutable (ClutterActor *self); tVolume * clutter_actor_get_paint_volume (ClutterActor *self); actor_get_paint_box (ClutterActor *self, ClutterActorBox *box); or_queue_update_resource_scale_recursive (ClutterActor *self); lutter_actor_update_resource_scale (ClutterActor *self); er_actor_ensure_resource_scale (ClutterActor *self); _actor_get_real_resource_scale (ClutterActor *self, gfloat *resource_scale); actor_get_resource_scale (ClutterActor *self, gfloat *resource_scale); actor_has_overlaps (ClutterActor *self); actor_has_effects (ClutterActor *self); actor_has_constraints (ClutterActor *self); actor_has_actions (ClutterActor *self); r_get_n_children (ClutterActor *self); utter_actor_get_child_at_index (ClutterActor *self, gint index_); yout_manager_changed (ClutterLayoutManager *manager, ClutterActor *self); r_set_layout_manager (ClutterActor *self, ClutterLayoutManager *manager); ger * clutter_actor_get_layout_manager (ClutterActor *self); t_info_free (gpointer data); * _clutter_actor_peek_layout_info (ClutterActor *self); * _clutter_actor_get_layout_info (ClutterActor *self); utInfo * _clutter_actor_get_layout_info_or_defaults (ClutterActor *self); r_set_x_align (ClutterActor *self, ClutterActorAlign x_align); clutter_actor_get_x_align (ClutterActor *self); r_set_y_align (ClutterActor *self, ClutterActorAlign y_align); clutter_actor_get_y_align (ClutterActor *self); r_set_margin (ClutterActor *self, const ClutterMargin *margin); r_get_margin (ClutterActor *self, ClutterMargin *margin); r_set_margin_top (ClutterActor *self, gfloat margin); tor_get_margin_top (ClutterActor *self); r_set_margin_bottom (ClutterActor *self, gfloat margin); tor_get_margin_bottom (ClutterActor *self); r_set_margin_left (ClutterActor *self, gfloat margin); tor_get_margin_left (ClutterActor *self); r_set_margin_right (ClutterActor *self, gfloat margin); tor_get_margin_right (ClutterActor *self); r_set_background_color (ClutterActor *self, const ClutterColor *color); r_get_background_color (ClutterActor *self, ClutterColor *color); utter_actor_get_previous_sibling (ClutterActor *self); utter_actor_get_next_sibling (ClutterActor *self); utter_actor_get_first_child (ClutterActor *self); utter_actor_get_last_child (ClutterActor *self); r_iter_init (ClutterActorIter *iter, ClutterActor *root); actor_iter_is_valid (const ClutterActorIter *iter); actor_iter_next (ClutterActorIter *iter, ClutterActor **child); actor_iter_prev (ClutterActorIter *iter, ClutterActor **child); r_iter_remove (ClutterActorIter *iter); r_iter_destroy (ClutterActorIter *iter); er_animation_info_free (gpointer data); ationInfo * _clutter_actor_get_animation_info_or_defaults (ClutterActor *self); nfo * _clutter_actor_get_animation_info (ClutterActor *self); ition_closure_free (gpointer data); hould_skip_implicit_transition (ClutterActor *self, GParamSpec *pspec); r_remove_transition (ClutterActor *self, const char *name); r_remove_all_transitions (ClutterActor *self); r_set_easing_duration (ClutterActor *self, guint msecs); or_get_easing_duration (ClutterActor *self); r_set_easing_mode (ClutterActor *self, ClutterAnimationMode mode); ode clutter_actor_get_easing_mode (ClutterActor *self); r_set_easing_delay (ClutterActor *self, guint msecs); or_get_easing_delay (ClutterActor *self); r_save_easing_state (ClutterActor *self); r_restore_easing_state (ClutterActor *self); r_set_content (ClutterActor *self, ClutterContent *content); clutter_actor_get_content (ClutterActor *self); r_set_content_gravity (ClutterActor *self, ClutterContentGravity gravity); vity clutter_actor_get_content_gravity (ClutterActor *self); r_get_content_box (ClutterActor *self, ClutterActorBox *box); d clutter_actor_queue_compute_expand (ClutterActor *self); r_set_x_expand (ClutterActor *self, gboolean expand); actor_get_x_expand (ClutterActor *self); r_set_y_expand (ClutterActor *self, gboolean expand); actor_get_y_expand (ClutterActor *self); er_actor_compute_expand (ClutterActor *self); actor_needs_expand (ClutterActor *self, ClutterOrientation orientation); r_set_content_repeat (ClutterActor *self, ClutterContentRepeat repeat); eat clutter_actor_get_content_repeat (ClutterActor *self); or_handle_event (ClutterActor *self, const ClutterEvent *event); er_actor_set_child_transform_internal (ClutterActor *self, const ClutterMatrix *transform); r_set_child_transform (ClutterActor *self, const ClutterMatrix *transform); r_get_child_transform (ClutterActor *self, ClutterMatrix *transform); er_actor_push_in_cloned_branch (ClutterActor *self, gulong count); er_actor_pop_in_cloned_branch (ClutterActor *self, gulong count); or_attach_clone (ClutterActor *actor, ClutterActor *clone); or_detach_clone (ClutterActor *actor, ClutterActor *clone); or_queue_redraw_on_clones (ClutterActor *self); or_queue_relayout_on_clones (ClutterActor *self); actor_has_mapped_clones (ClutterActor *self); closure_free (gpointer data_); actor_has_accessible (ClutterActor *actor);
b0de38dd07b12ec154807bd7113b3665eb0105ea460ed7f27cd6f2d1b6819610
2,427
00wendi00
MyProject
W_eclipse1_3/ch06.Quake/jni/Quake/world.c
*SV_HullForEntity
hull_t *SV_HullForEntity (edict_t *ent, vec3_t mins, vec3_t maxs, vec3_t offset) { model_t *model; vec3_t size; vec3_t hullmins, hullmaxs; hull_t *hull; if (ent->v.solid == SOLID_BSP) { if (ent->v.movetype != MOVETYPE_PUSH) { ED_Print (ent); Sys_Error ("SOLID_BSP without MOVETYPE_PUSH (%s)", ED_DbgEdict (&ent->v)); } model = sv.models[ (int)ent->v.modelindex ]; if (!model || model->type != mod_brush) { ED_Print (ent); if (!model) Sys_Error ("SOLID_BSP with a missing model (%s)", ED_DbgEdict (&ent->v)); else Sys_Error ("SOLID_BSP with a non bsp (%d) model (%s)", model->type, ED_DbgEdict (&ent->v)); } VectorSubtract (maxs, mins, size); if (size[0] < 3) hull = &model->hulls[0]; else if (size[0] <= 32) hull = &model->hulls[1]; else hull = &model->hulls[2]; VectorSubtract (hull->clip_mins, mins, offset); VectorAdd (offset, ent->v.origin, offset); } else { VectorSubtract (ent->v.mins, maxs, hullmins); VectorSubtract (ent->v.maxs, mins, hullmaxs); hull = SV_HullForBox (hullmins, hullmaxs); VectorCopy (ent->v.origin, offset); } return hull; }
void SV_InitBoxHull (void); hull_t *SV_HullForBox (vec3_t mins, vec3_t maxs); areanode_t *SV_CreateAreaNode (int depth, vec3_t mins, vec3_t maxs); void SV_ClearWorld (void); void SV_UnlinkEdict (edict_t *ent); void SV_TouchLinks ( edict_t *ent, areanode_t *node ); void SV_FindTouchedLeafs (edict_t *ent, mnode_t *node); void SV_LinkEdict (edict_t *ent, qboolean touch_triggers); int SV_HullPointContents (hull_t *hull, int num, vec3_t p); int SV_PointContents (vec3_t p); int SV_TruePointContents (vec3_t p); edict_t *SV_TestEntityPosition (edict_t *ent); qboolean SV_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec3_t p1, vec3_t p2, trace_t *trace); trace_t SV_ClipMoveToEntity (edict_t *ent, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end); void SV_ClipToLinks ( areanode_t *node, moveclip_t *clip ); void SV_MoveBounds (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, vec3_t boxmins, vec3_t boxmaxs); trace_t SV_Move (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int type, edict_t *passedict);
a4a4396b45200e09b60ce79be031378236cfab7101fff3dd0a2f48c7eb9ce7c6
1,150
siebenmann
liferea-cks
src/db.c
db_item_get_duplicates
GSList * db_item_get_duplicates (const gchar *guid) { GSList *duplicates = NULL; sqlite3_stmt *stmt; gint res; debug_start_measurement (DEBUG_DB); stmt = db_get_statement ("duplicatesFindStmt"); res = sqlite3_bind_text (stmt, 1, guid, -1, SQLITE_TRANSIENT); if (SQLITE_OK != res) g_error ("db_item_get_duplicates: sqlite bind failed (error code %d)!", res); while (sqlite3_step (stmt) == SQLITE_ROW) { gulong id = sqlite3_column_int (stmt, 0); duplicates = g_slist_append (duplicates, GUINT_TO_POINTER (id)); } sqlite3_finalize (stmt); debug_end_measurement (DEBUG_DB, "searching for duplicates"); return duplicates; }
1c028b7e2e28a23c5f5e60609c6c2c74eb3069230569da7b2533950fab335028
649
Thileen
SECLAB_ECC
seclabec.c
hmp_inv
id hmp_inv(bit_32 *a, bit_32 *c){ short carry; short i; bit_32 *q; bit_32 *u; bit_32 *z; bit_32 *tmp1; bit_32 *tmp11; q = calloc(dp->key_size,sizeof(bit_32)); u = calloc(dp->key_size,sizeof(bit_32)); z = calloc(dp->key_size,sizeof(bit_32)); tmp1 = calloc(dp->key_size,sizeof(bit_32)); tmp11 = calloc(dp->key_size*2,sizeof(bit_32)); cpArray(a,z,dp->key_size); u[dp->key_size-1] = 0x1; while (compareAI(z,0x1,dp->key_size) != 1){ omp_div(dp->p, dp->key_size, z, dp->key_size, q, tmp11); gmp_mul(q, z, tmp11, dp->key_size); gmp_sub(dp->p, &tmp11[dp->key_size], z, &carry, dp->key_size); gmp_sub(dp->p,q,tmp1,&carry,dp->key_size); gmp_mul_mod(tmp1, u, u); } cpArray(u,c,dp->key_size); free(q); free(u); free(z); free(tmp1); free(tmp11); }
it_16 compareAA(bit_32 *a, bit_32 *b, bit_16 len); it_16 compareAI(bit_32 *a, bit_32 b, bit_16 len); it_16 compareP(point *p, point *q); oid cpArray(bit_32 *tmp, bit_32 *c, bit_16 len); oid cpPoint(point *p, point *q); oid cpPointZ(point *p, point *q); it_16 getMSBPos(bit_32 *a, bit_16 len); it_16 getIthBit(bit_32 *a,bit_16 pos); it_16 getIthBit_rs(bit_32 *a, bit_16 pos); it_16 getIthBits(bit_32 *a,bit_16 lsbPos,bit_16 w); oid shiftArrayLeft_mod(bit_32 *a, bit_16 len); oid shiftArrayLeft_fast_reduction(bit_32 *a, bit_16 len, bit_16 *carry); oid shiftArrayLeft_br_mod(bit_32 *a, bit_16 len); oid shiftArrayLeft_fr_mod(bit_32 *a, bit_16 len); oid shiftArrayRight(bit_32 *a, bit_16 len); oid shiftArrayRightBySteps(bit_32 *a, bit_16 len, bit_16 steps); oid shiftArrayLeftBySteps(bit_32 *a, bit_16 len, bit_16 steps); oid andArray(bit_32 *a, bit_32 *b, bit_32 *c, bit_16 len); oid rndPermPoint(bit_32 *rndNum); oid free_memory(); oid init_memory(); it_16 init_ecc(bit_32 name); oid gmp_add(bit_32 *a, bit_32 *b, bit_32 *c, bit_16 *carry,bit_16 len); oid gmp_sub(bit_32 *a, bit_32 *b, bit_32 *c, bit_16 *carry, bit_16 len); oid gmp_add_mod(bit_32 *a, bit_32 *b, bit_32 *c); oid gmp_sub_mod(bit_32 *a, bit_32 *b, bit_32 *c); oid gmp_mul(bit_32 *a, bit_32 *b, bit_32 *c, bit_16 len); oid gmp_sqrt(bit_32 *a, bit_32 *c, bit_16 len); oid omp_div(bit_32 *a, bit_16 lenA, bit_32 *b, bit_16 lenB, bit_32 *c, bit_32 *r); oid gmp_mul_mod(bit_32 *a, bit_32 *b, bit_32 *c); oid gmp_mul_mod_fr(bit_32 *a, bit_32 *b, bit_32 *c); oid gmp_inv(bit_32 *a, bit_32 *c); id gmp_mont_inv(bit_32 *a, bit_32 *c); id conclude_barrett_reduction(); id fast_reduction_p256(bit_32 *a,bit_32 *c); id init_barrett_reduction(); d br_mod(bit_32 *a, bit_32 *c); d mod_div(bit_32 *a, bit_32 *b, bit_32 *c); d p_add_aff_w(point *p, point *q); d p_dbl_aff_w(point *p); r p_mul_aff_w_bin(bit_32 *private_key, point *public_key); d p_add_proj_w(point *p, point *q, point *r); p_dbl_proj_w(point *p); transforProjToAff(point *p); p_mul_proj_w_bin(bit_32 *private_key, point *public_key); preComputSW_w(); p_mul_proj_w_rndSW(bit_32 *private_key, point *public_key, bit_32 *rnd1, bit_32 *rnd2); randomize_scalar(bit_32 *private_key, bit_32 rnd, bit_32 *rs_private_key); p_mul_proj_w_rndSca(bit_32 *private_key, point *public_key, bit_32 rnd); p_mul_proj_w_daa(bit_32 *private_key, point *public_key); p_mul_proj_w_rndCoor(bit_32 *private_key, point *public_key, bit_32 rnd); p_mul_proj_w_ml(bit_32 *private_key, point *public_key); p_mul_proj_w_rss(bit_32 *private_key, point *public_key, bit_32 *rnd); p_add_aff_w_fr(point *p, point *q); p_dbl_aff_w_fr(point *p); p_add_proj_w_fr(point *p, point *q, point *r); dbl_proj_w_fr(point *p); ansforProjToAff_fr(point *p); mul_aff_w_bin_fr(bit_32 *private_key, point *public_key); mul_proj_w_bin_fr(bit_32 *private_key, point *public_key); mul_proj_w_rndSW_fr(bit_32 *private_key, point *public_key, bit_32 *rnd1, bit_32 *rnd2); mul_proj_w_rndSca_fr(bit_32 *private_key, point *public_key, bit_32 rnd); mul_proj_w_daa_fr(bit_32 *private_key, point *public_key); mul_proj_w_rndCoor_fr(bit_32 *private_key, point *public_key, bit_32 rnd); mul_proj_w_ml_fr(bit_32 *private_key, point *public_key); mul_proj_w_rss_fr(bit_32 *private_key, point *public_key, bit_32 *rnd); add_aff_ed(point *p, point *q); add_aff_ted(point *p, point *q); mul_aff_ted_bin(bit_32 *private_key, point *public_key); d_proj_ed(point *p, point *q); ed(point *p, point *q, point *r); ed_bin(bit_32 *private_key, point *public_key); ToAff_ed(point *p); ted(); ed_rndSW(bit_32 *private_key, point *public_key, bit_32 *rnd1, bit_32 *rnd2); ed_rndSca(bit_32 *private_key, point *public_key, bit_32 rnd); ed_daa(bit_32 *private_key, point *public_key); ed_rndCoor(bit_32 *private_key, point *public_key, bit_32 rnd); ed_ml(bit_32 *private_key, point *public_key); ed_rss(bit_32 *private_key, point *public_key, bit_32 *rnd);
4525396ef0d3f391a3e9022d9389c598475dfabb96ebaaa4e92d2c799ef96799
809
dbatyai
jerryscript
jerry-ext/handle-scope/handle-scope.c
jerry_value_t jerryx_handle_scope_add_handle_to
jerry_value_t jerryx_handle_scope_add_handle_to (jerryx_handle_t *handle, jerryx_handle_scope scope) { size_t prelist_handle_count = scope->prelist_handle_count; if (prelist_handle_count < JERRYX_HANDLE_PRELIST_SIZE) { ++scope->prelist_handle_count; jerry_value_t jval = handle->jval; jerry_heap_free (handle, sizeof (jerryx_handle_t)); scope->handle_prelist[prelist_handle_count] = jval; return jval; } handle->sibling = scope->handle_ptr; scope->handle_ptr = handle; return handle->jval; }
9f75fbb95a2b40d263dc82953e93f6c939b5299b601f23caa859fd9e80921500
527
bitthunder-toolchain
newlib
newlib/libc/sys/bt/bt_api.c
*BT_GetThreadTag
void *BT_GetThreadTag(void) { return NULL; }
BT_HANDLE BT_Open(const BT_i8 *name, const BT_i8 *mode, BT_ERROR *pError); BT_ERROR BT_CloseHandle(BT_HANDLE h); void *BT_kMalloc(BT_u32 size); void BT_kFree(void *ptr); void BT_kPrint(const char *fmt); BT_ERROR BT_SetFileDescriptor(BT_u32 n, BT_HANDLE h); BT_HANDLE BT_GetFileDescriptor(BT_u32 n, BT_ERROR *pError); BT_u32 BT_Read(BT_HANDLE hFile, BT_u32 ulFlags, BT_u32 ulSize, void *pBuffer, BT_ERROR *pError); BT_u32 BT_Write(BT_HANDLE hFile, BT_u32 ulFlags, BT_u32 ulSize, const void *pBuffer, BT_ERROR *pError); BT_ERROR BT_ThreadSleep(BT_u32 ticks); void BT_SetThreadTag(void *tag);
7ee00278b1d0fef74213b4d971bafc7ae4f807b68b187a5aefcd03a02ac6f01d
46
puppeh
gcc-6502
gcc/caller-save.c
void init_caller_save
void init_caller_save (void) { rtx addr_reg; int offset; rtx address; int i, j; if (caller_save_initialized_p) return; caller_save_initialized_p = true; CLEAR_HARD_REG_SET (no_caller_save_reg_set); for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) { if (call_used_regs[i] && !TEST_HARD_REG_BIT (call_fixed_reg_set, i)) { for (j = 1; j <= MOVE_MAX_WORDS; j++) { regno_save_mode[i][j] = HARD_REGNO_CALLER_SAVE_MODE (i, j, VOIDmode); if (regno_save_mode[i][j] == VOIDmode && j == 1) { SET_HARD_REG_BIT (call_fixed_reg_set, i); } } } else regno_save_mode[i][1] = VOIDmode; } for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) if (TEST_HARD_REG_BIT (reg_class_contents [(int) base_reg_class (regno_save_mode[i][1], ADDR_SPACE_GENERIC, PLUS, CONST_INT)], i)) break; gcc_assert (i < FIRST_PSEUDO_REGISTER); addr_reg = gen_rtx_REG (Pmode, i); for (offset = 1 << (HOST_BITS_PER_INT / 2); offset; offset >>= 1) { address = gen_rtx_PLUS (Pmode, addr_reg, gen_int_mode (offset, Pmode)); for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) if (regno_save_mode[i][1] != VOIDmode && ! strict_memory_address_p (regno_save_mode[i][1], address)) break; if (i == FIRST_PSEUDO_REGISTER) break; } if (offset == 0) address = addr_reg; test_reg = gen_rtx_REG (VOIDmode, 0); test_mem = gen_rtx_MEM (VOIDmode, address); savepat = gen_rtx_SET (test_mem, test_reg); restpat = gen_rtx_SET (test_reg, test_mem); saveinsn = gen_rtx_INSN (VOIDmode, 0, 0, 0, savepat, 0, -1, 0); restinsn = gen_rtx_INSN (VOIDmode, 0, 0, 0, restpat, 0, -1, 0); for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) for (j = 1; j <= MOVE_MAX_WORDS; j++) if (reg_save_code (i,regno_save_mode[i][j]) == -1) { regno_save_mode[i][j] = VOIDmode; if (j == 1) { SET_HARD_REG_BIT (call_fixed_reg_set, i); if (call_used_regs[i]) SET_HARD_REG_BIT (no_caller_save_reg_set, i); } } }
ed2e0a308c7f1df93d07569239c753a00300cf635fbba80f5c33d8bc7dba539e
2,044
Dennisbonke
DB-OS
kernel/fs/inode.c
_late_init
static void _late_init(void) { printk("[FS]: Making node /proc/inodes..."); proc_create("/proc/inodes", kobj_lru_proc_read, &_proc_inode_lru_info); printk(" ok\n"); }
static bool _inode_page_initialize(void *obj, void *_id, void *data); static void _inode_page_release(void *obj, void *data); static void _inode_create(void *obj); static void _inode_put(void *obj); static ssize_t _inode_proc_lru_read_entry(void *item, size_t off, size_t len, char *buf); static bool _inode_initialize(void *obj, void *id, void *data); static void _inode_release(void *obj, void *data); __initializer static void _inode_init_lru(void); struct inode *inode_lookup(struct inode_id *id); void inode_put(struct inode *inode); struct inodepage *inode_get_page(struct inode *node, int nodepage); void inode_release_page(struct inodepage *page); static bool _do_inode_check_perm(struct inode *node, int type, int uid, int gid); bool inode_check_perm(struct inode *node, int type); bool inode_check_access(struct inode *node, int type);
c1b0336efa2cf01cb861e906193f330f33603148d404ab632e0031484ff7f0c4
170
tyreld
ppc64-diag
lpd/lp_diag.c
int set_attn_indicator
static int set_attn_indicator(struct loc_code *attn_loc, int new_state) { int rc; int state; rc = get_indicator_state(ATTN_INDICATOR, attn_loc, &state); if (rc || state != new_state) { rc = set_indicator_state(ATTN_INDICATOR, attn_loc, new_state); if (rc) indicator_log_write("System Attention Indicator :" "Unable to %s", new_state ? "enable" : "disable"); else indicator_log_write("System Attention Indicator : %s", new_state ? "ON" : "OFF"); } return rc; }
void resize_handler(int sig);
8dbc868e1d427f24be56ddfee7ec924b62c580fe2a2b6ff254cf67529b363997
508
8l
Bcachefs
drivers/net/wireless/iwlwifi/iwl-agn.c
iwl_set_mode
static int iwl_set_mode(struct iwl_priv *priv, int mode) { iwl_connection_init_rx_config(priv, mode); iwl_set_rxon_chain(priv); memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN); iwl_clear_stations_table(priv); if (!iwl_is_ready_rf(priv)) return -EAGAIN; iwl_commit_rxon(priv); return 0; }
static int iwl_commit_rxon(struct iwl_priv *priv); void iwl_update_chain_flags(struct iwl_priv *priv); static void iwl_clear_free_frames(struct iwl_priv *priv); static struct iwl_frame *iwl_get_free_frame(struct iwl_priv *priv); static void iwl_free_frame(struct iwl_priv *priv, struct iwl_frame *frame); static int iwl_send_beacon_cmd(struct iwl_priv *priv); static inline dma_addr_t iwl_tfd_tb_get_addr(struct iwl_tfd *tfd, u8 idx); static inline u16 iwl_tfd_tb_get_len(struct iwl_tfd *tfd, u8 idx); static inline u8 iwl_tfd_get_num_tbs(struct iwl_tfd *tfd); void iwl_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq); static u16 iwl_adjust_beacon_interval(u16 beacon_val); static void iwl_setup_rxon_timing(struct iwl_priv *priv); static void iwl_bg_beacon_update(struct work_struct *work); static void iwl_bg_statistics_periodic(unsigned long data); int iwl_set_pwr_src(struct iwl_priv *priv, enum iwl_pwr_src src); static void iwl_setup_rx_handlers(struct iwl_priv *priv); void iwl_rx_handle(struct iwl_priv *priv); static inline void iwl_synchronize_irq(struct iwl_priv *priv); static void iwl_error_recovery(struct iwl_priv *priv); static void iwl_irq_tasklet(struct iwl_priv *priv); static void iwl_dealloc_ucode_pci(struct iwl_priv *priv); static void iwl_nic_start(struct iwl_priv *priv); static int iwl_read_ucode(struct iwl_priv *priv); static void iwl_alive_start(struct iwl_priv *priv); static void __iwl_down(struct iwl_priv *priv); static void iwl_down(struct iwl_priv *priv); static int __iwl_up(struct iwl_priv *priv); static void iwl_bg_init_alive_start(struct work_struct *data); static void iwl_bg_alive_start(struct work_struct *data); static void iwl_bg_run_time_calib_work(struct work_struct *work); static void iwl_bg_up(struct work_struct *data); static void iwl_bg_restart(struct work_struct *data); static void iwl_bg_rx_replenish(struct work_struct *data); static void iwl_post_associate(struct iwl_priv *priv); static int iwl_mac_start(struct ieee80211_hw *hw); static void iwl_mac_stop(struct ieee80211_hw *hw); static int iwl_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb); static int iwl_mac_config(struct ieee80211_hw *hw, u32 changed); static void iwl_config_ap(struct iwl_priv *priv); static void iwl_mac_reset_tsf(struct ieee80211_hw *hw); static int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb); static void iwl_setup_deferred_work(struct iwl_priv *priv); static void iwl_cancel_deferred_work(struct iwl_priv *priv); static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent); static void __devexit iwl_pci_remove(struct pci_dev *pdev); static int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state); static int iwl_pci_resume(struct pci_dev *pdev); static int __init iwl_init(void); static void __exit iwl_exit(void);
23fe3ef9a272a65eb9ffa56f4ab2b382946207ef95f252bbb920e2f033ad000a
319
FeyoMx
MDSdevKernel_a7010
drivers/input/touchscreen/mediatek/ft5446/focaltech_flash.c
fts_5x26_ctpm_fw_upgrade
int fts_5x26_ctpm_fw_upgrade(struct i2c_client *client, u8 *pbt_buf, u32 dw_lenth) { u8 reg_val[4] = {0}; u32 i = 0; u32 packet_number; u32 j; u32 temp; u32 lenght; u8 packet_buf[FTS_PACKET_LENGTH + 6]; u8 auc_i2c_write_buf[10]; u8 bt_ecc; int i_ret = 0; i_ret = HidI2c_To_StdI2c(client); if (i_ret == 0) { FTS_DBG("HidI2c change to StdI2c fail ! \n"); } for (i = 0; i < FTS_UPGRADE_LOOP; i++) { fts_write_reg(client, 0xfc, FTS_UPGRADE_AA); msleep(fts_updateinfo_curr.delay_aa); fts_write_reg(client, 0xfc, FTS_UPGRADE_55); msleep(fts_updateinfo_curr.delay_55); auc_i2c_write_buf[0] = FTS_UPGRADE_55; auc_i2c_write_buf[1] = FTS_UPGRADE_AA; i_ret = fts_i2c_write(client, auc_i2c_write_buf, 2); if (i_ret < 0) { FTS_DBG("failed writing 0x55 and 0xaa ! \n"); continue; } i_ret = HidI2c_To_StdI2c(client); if (i_ret < 0) { FTS_DBG("failed to Switch HidtoI2c Protocol ! \n"); continue; } auc_i2c_write_buf[0] = 0x90; auc_i2c_write_buf[1] = auc_i2c_write_buf[2] = auc_i2c_write_buf[3] = 0x00; reg_val[0] = reg_val[1] = 0x00; fts_i2c_read(client, auc_i2c_write_buf, 4, reg_val, 2); if (reg_val[0] == fts_updateinfo_curr.upgrade_id_1 && reg_val[1] == fts_updateinfo_curr.upgrade_id_2) { FTS_DBG("[FTS] Step 3: READ OK CTPM ID,ID1 = 0x%x,ID2 = 0x%x\n", reg_val[0], reg_val[1]); break; } else { dev_err(&client->dev, "[FTS] Step 3: CTPM ID,ID1 = 0x%x,ID2 = 0x%x\n", reg_val[0], reg_val[1]); continue; } } if (i >= FTS_UPGRADE_LOOP) return -EIO; FTS_DBG("Step 4:erase app and panel paramenter area\n"); auc_i2c_write_buf[0] = 0x61; fts_i2c_write(client, auc_i2c_write_buf, 1); auc_i2c_write_buf[0] = 0x63; fts_i2c_write(client, auc_i2c_write_buf, 1); auc_i2c_write_buf[0] = 0x04; fts_i2c_write(client, auc_i2c_write_buf, 1); msleep(fts_updateinfo_curr.delay_earse_flash); bt_ecc = 0; FTS_DBG("Step 5:write firmware(FW) to ctpm flash\n"); temp = 0; packet_number = (dw_lenth) / FTS_PACKET_LENGTH; packet_buf[0] = 0xbf; packet_buf[1] = 0x00; for (j = 0; j < packet_number; j++) { temp = j * FTS_PACKET_LENGTH; packet_buf[2] = (u8)(temp >> 8); packet_buf[3] = (u8) temp; lenght = FTS_PACKET_LENGTH; packet_buf[4] = (u8)(lenght >> 8); packet_buf[5] = (u8) lenght; for (i = 0; i < FTS_PACKET_LENGTH; i++) { packet_buf[6 + i] = pbt_buf[j * FTS_PACKET_LENGTH + i]; bt_ecc ^= packet_buf[6 + i]; } fts_i2c_write(client, packet_buf, FTS_PACKET_LENGTH + 6); msleep(FTS_PACKET_LENGTH / 6 + 1); } if ((dw_lenth) % FTS_PACKET_LENGTH > 0) { temp = packet_number * FTS_PACKET_LENGTH; packet_buf[2] = (u8)(temp >> 8); packet_buf[3] = (u8) temp; temp = (dw_lenth) % FTS_PACKET_LENGTH; packet_buf[4] = (u8)(temp >> 8); packet_buf[5] = (u8) temp; for (i = 0; i < temp; i++) { packet_buf[6 + i] = pbt_buf[packet_number * FTS_PACKET_LENGTH + i]; bt_ecc ^= packet_buf[6 + i]; } fts_i2c_write(client, packet_buf, temp + 6); msleep(20); } FTS_DBG("Step 6: read out checksum\n"); auc_i2c_write_buf[0] = 0xcc; reg_val[0] = reg_val[1] = 0x00; fts_i2c_read(client, auc_i2c_write_buf, 1, reg_val, 1); printk(KERN_WARNING "Checksum FT5X26:%X %X \n", reg_val[0], bt_ecc); if (reg_val[0] != bt_ecc) { dev_err(&client->dev, "[FTS]--ecc error! fw_ecc=%02x flash_ecc=%02x\n", reg_val[0], bt_ecc); return -EIO; } FTS_DBG("Step 7: reset the new FW\n"); auc_i2c_write_buf[0] = 0x07; fts_i2c_write(client, auc_i2c_write_buf, 1); FTS_DBG("Step 8: Disable Write Flash\n"); auc_i2c_write_buf[0] = 0x04; fts_i2c_write(client, auc_i2c_write_buf, 1); msleep(300); auc_i2c_write_buf[0] = auc_i2c_write_buf[1] = 0x00; fts_i2c_write(client, auc_i2c_write_buf, 2); return 0; }
int HidI2c_To_StdI2c(struct i2c_client *client); void fts_update_fw_vendor_id(struct fts_ts_data *data); void fts_update_fw_ver(struct fts_ts_data *data); int fts_ctpm_fw_upgrade_ReadVendorID(struct i2c_client *client, u8 *ucPVendorID); int fts_ctpm_fw_upgrade_ReadProjectCode(struct i2c_client *client, char *pProjectCode); void fts_get_upgrade_array(void); int fts_ctpm_auto_clb(struct i2c_client *client); static void delay_qt_ms(unsigned long w_ms); int fts_6x36_ctpm_fw_upgrade(struct i2c_client *client, u8 *pbt_buf, u32 dw_lenth); int fts_6x06_ctpm_fw_upgrade(struct i2c_client *client, u8 *pbt_buf, u32 dw_lenth); int fts_5x36_ctpm_fw_upgrade(struct i2c_client *client, u8 *pbt_buf, u32 dw_lenth); int fts_5822_ctpm_fw_upgrade(struct i2c_client *client, u8 *pbt_buf, u32 dw_lenth); int fts_5x06_ctpm_fw_upgrade(struct i2c_client *client, u8 *pbt_buf, u32 dw_lenth); int fts_5x46_ctpm_fw_upgrade(struct i2c_client *client, u8 *pbt_buf, u32 dw_lenth); static int fts_GetFirmwareSize(char *firmware_name); static int fts_ReadFirmware(char *firmware_name, unsigned char *firmware_buf); int fts_ctpm_fw_upgrade_with_app_file(struct i2c_client *client, char *firmware_name); int fts_ctpm_get_i_file_ver(); int fts_ctpm_update_project_setting(struct i2c_client *client); int fts_ctpm_fw_upgrade_with_i_file(struct i2c_client *client); int fts_ctpm_auto_upgrade(struct i2c_client *client);
dfa01b9f4e97431e57ea7e7377c1130577213d0e8e94238642b7a62a11f3c26d
3,768