type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
defines | #define neq (idadls_mem->d_n) |
defines | #define jacDQ (idadls_mem->d_jacDQ) |
defines | #define djac (idadls_mem->d_djac) |
defines | #define JJ (idadls_mem->d_J) |
defines | #define lpivots (idadls_mem->d_lpivots) |
defines | #define nje (idadls_mem->d_nje) |
defines | #define nreDQ (idadls_mem->d_nreDQ) |
defines | #define jacdata (idadls_mem->d_J_data) |
defines | #define last_flag (idadls_mem->d_last_flag) |
functions | int IDADense(void *ida_mem, long int Neq)
{
IDAMem IDA_mem;
IDADlsMem idadls_mem;
int flag;
/* Return immediately if ida_mem is NULL. */
if (ida_mem == NULL) {
IDAProcessError(NULL, IDADLS_MEM_NULL, "IDADENSE", "IDADense", MSGD_IDAMEM_NULL);
return(IDADLS_MEM_NULL);
} |
functions | int IDADenseInit(IDAMem IDA_mem)
{
IDADlsMem idadls_mem;
idadls_mem = (IDADlsMem) lmem;
nje = 0;
nreDQ = 0;
if (jacDQ) {
djac = idaDlsDenseDQJac;
jacdata = IDA_mem;
} |
functions | int IDADenseSetup(IDAMem IDA_mem, N_Vector yyp, N_Vector ypp,
N_Vector rrp, N_Vector tmp1, N_Vector tmp2,
N_Vector tmp3)
{
int retval;
long int retfac;
IDADlsMem idadls_mem;
idadls_mem = (IDADlsMem) lmem;
/* Increment nje counter. */
nje++;
/* Zero out ... |
functions | int IDADenseSolve(IDAMem IDA_mem, N_Vector b, N_Vector weight,
N_Vector ycur, N_Vector ypcur, N_Vector rrcur)
{
IDADlsMem idadls_mem;
realtype *bd;
idadls_mem = (IDADlsMem) lmem;
bd = N_VGetArrayPointer(b);
DenseGETRS(JJ, lpivots, bd);
/* Scale the correction to account for chan... |
functions | int IDADenseFree(IDAMem IDA_mem)
{
IDADlsMem idadls_mem;
idadls_mem = (IDADlsMem) lmem;
DestroyMat(JJ);
DestroyArray(lpivots);
free(lmem); lmem = NULL;
return(0);
} |
includes | #include <inttypes.h> |
includes | #include <assert.h> |
includes | #include <bsp/bsp.h> |
includes |
#include <mgmt/mgmt.h> |
includes | #include <mynewt_smp/smp.h> |
includes | #include <uart/uart.h> |
includes |
#include <crc/crc16.h> |
includes | #include <base64/base64.h> |
defines | #define MGMT_NLIP_MAX_FRAME 127 |
defines |
#define SHELL_NLIP_PKT 0x0609 |
defines | #define SHELL_NLIP_DATA 0x0414 |
defines |
#define NUS_EV_TO_STATE(ptr) \ |
structs | struct smp_uart_state {
struct smp_transport sus_transport; /* keep first in struct */
struct os_event sus_cb_ev;
struct uart_dev *sus_dev;
struct os_mbuf *sus_tx;
int sus_tx_off;
struct os_mbuf_pkthdr *sus_rx_pkt;
struct os_mbuf_pkthdr *sus_rx_q;
struct os_mbuf_pkthdr *sus_rx;
}; |
structs | struct smp_ser_hdr {
uint16_t nsh_seq;
uint16_t nsh_len;
}; |
functions | uint16_t
smp_uart_mtu(struct os_mbuf *m)
{
return MGMT_MAX_MTU;
} |
functions | int
smp_uart_out(struct os_mbuf *m)
{
struct smp_uart_state *sus = &smp_uart_state;
struct os_mbuf_pkthdr *mpkt;
struct os_mbuf *n;
uint16_t tmp_buf[6];
char *dst;
int off;
int boff;
int slen;
int sr;
int rc;
int last;
int tx_sz;
assert(OS_MBUF_IS_PKTHDR(m));
mpk... |
functions | int
smp_uart_tx_char(void *arg)
{
struct smp_uart_state *sus = (struct smp_uart_state *)arg;
struct os_mbuf *m;
uint8_t ch;
if (!sus->sus_tx) {
/*
* Out of data. Return -1 makes UART stop asking for more.
*/
return -1;
} |
functions | void
smp_uart_rx_pkt(struct smp_uart_state *sus, struct os_mbuf_pkthdr *rxm)
{
struct os_mbuf *m;
struct smp_ser_hdr *nsh;
uint16_t crc;
int rc;
m = OS_MBUF_PKTHDR_TO_MBUF(rxm);
if (rxm->omp_len <= sizeof(uint16_t) + sizeof(crc)) {
goto err;
} |
functions | void
smp_uart_rx_frame(struct os_event *ev)
{
struct smp_uart_state *sus = NUS_EV_TO_STATE(ev);
struct os_mbuf_pkthdr *m;
int sr;
OS_ENTER_CRITICAL(sr);
m = sus->sus_rx_q;
sus->sus_rx_q = NULL;
OS_EXIT_CRITICAL(sr);
if (m) {
smp_uart_rx_pkt(sus, m);
} |
functions | int
smp_uart_rx_char(void *arg, uint8_t data)
{
struct smp_uart_state *sus = (struct smp_uart_state *)arg;
struct os_mbuf *m;
int rc;
if (!sus->sus_rx) {
m = os_msys_get_pkthdr(MGMT_NLIP_MAX_FRAME, 0);
if (!m) {
return 0;
} |
functions | void
smp_uart_pkg_init(void)
{
struct smp_uart_state *sus = &smp_uart_state;
int rc;
struct uart_conf uc = {
.uc_speed = MYNEWT_VAL(SMP_UART_SPEED),
.uc_databits = 8,
.uc_stopbits = 1,
.uc_parity = UART_PARITY_NONE,
.uc_flow_ctl = UART_FLOW_CTL_NONE,
.uc_tx_ch... |
includes |
#include <windows.h> |
includes | #include <windowsx.h> |
includes |
#include <stdlib.h> |
includes | #include <string.h> |
includes | #include <ctype.h> |
defines |
#define DWORD_ALIGN(p) { while ((DWORD)p % 4) *p++ = 0x00; } |
defines |
#define ADD_DLGITEM_defpushbutton(a, b, c, d, e, f, g) \ |
defines |
#define ADD_DLGITEM_pushbutton(a, b, c, d, e, f, g) \ |
defines |
#define ADD_DLGITEM_left_static(a, b, c, d, e, f, g) \ |
defines |
#define ADD_DLGITEM_centered_static(a, b, c, d, e, f, g) \ |
defines |
#define ADD_DLGITEM_right_static(a, b, c, d, e, f, g) \ |
defines |
#define ADD_DLGITEM_entry(a, b, c, d, e, f, g) \ |
defines |
#define ADD_DLGITEM_hidden_entry(a, b, c, d, e, f, g) \ |
defines |
#define SPACE_Y 4 /* logical units */ |
defines | #define SPACE_X 4 /* logical units */ |
defines | #define ENTRY_PX 120 /* pixels */ |
defines | #define BUTTON_PX 70 /* pixels */ |
defines | #define BUTTON_PY 30 /* pixels */ |
functions | int
ADD_WORD(unsigned char *p, WORD w)
{
*((WORD *)p) = w;
return 2;
} |
functions | int
ADD_DWORD(unsigned char *p, DWORD dw)
{
*((DWORD *)p) = dw;
return 4;
} |
functions | size_t
ADD_UNICODE_STRING(unsigned char *p, const char *s)
{
WORD *w;
size_t i;
size_t len;
w = (WORD *)p;
len = strlen(s) + 1; /* copy the null, too */
for (i = 0 ; i < len ; i++)
*w++ = *s++;
return (len * 2);
} |
functions | size_t
ADD_DLGTEMPLATE(unsigned char *dlg, short x, short y, short cx, short cy,
const char *caption, const char *fontname, WORD fontsize,
WORD n)
{
unsigned char *p;
DLGTEMPLATE dlt;
p = dlg;
dlt.style = (DS_MODALFRAME | WS_POPUP);
if (caption != NULL)
dlt.style |= WS_CAPTION;
if (fontname != NU... |
functions | size_t
ADD_DLGITEM(unsigned char *dlg, short x, short y, short cx, short cy,
const char *label, WORD id, WORD type, DWORD style)
{
unsigned char *p;
DLGITEMTEMPLATE dit;
p = dlg;
dit.style = style;
dit.dwExtendedStyle = 0;
dit.x = x;
dit.y = y;
dit.cx = cx;
dit.cy = cy;
dit.id = id;
memcpy(p, &di... |
functions | void
vardlg_config(HWND hwnd, WORD width, const char *banner, WORD num_prompts,
krb5_prompt *prompts, WORD id)
{
int n;
WORD cid;
HDC hdc;
SIZE csize;
SIZE maxsize;
LONG cx, cy;
LONG ccx, ccy;
LONG space_x, space_y;
LONG max_x, max_y;
LON... |
defines |
#define ECMA_BUILTINS_INTERNAL |
defines |
#define BUILTIN_INC_HEADER_NAME "ecma-builtin-json.inc.h" |
defines | #define BUILTIN_UNDERSCORED_ID json |
functions | else if (class_name == LIT_MAGIC_STRING_STRING_UL)
{
ECMA_TRY_CATCH (val,
ecma_op_to_string (arg3),
ret_value);
ecma_free_value (space);
space = ecma_copy_value (val);
ECMA_FINALIZE (val);
} |
functions | else if (current_char == LIT_CHAR_BS
|| current_char == LIT_CHAR_FF
|| current_char == LIT_CHAR_LF
|| current_char == LIT_CHAR_CR
|| current_char == LIT_CHAR_TAB)
{
ecma_string_t *backslash_str_p = ecma_get_magic_string (LIT_MAGIC_STRING_BACKSLASH_CHAR);
... |
functions | else if (current_char < LIT_CHAR_SP)
{
ecma_string_t *backslash_str_p = ecma_get_magic_string (LIT_MAGIC_STRING_BACKSLASH_CHAR);
/* 2.c.i */
tmp_str_p = ecma_concat_ecma_strings (product_str_p, backslash_str_p);
ecma_deref_ecma_string (product_str_p);
ecma_deref_ecma_string (backslash... |
functions | else if (class_name == LIT_MAGIC_STRING_STRING_UL)
{
ECMA_TRY_CATCH (val,
ecma_op_to_string (my_val),
ret_value);
ecma_free_value (my_val);
my_val = ecma_copy_value (val);
ECMA_FINALIZE (val);
} |
functions | else if (class_name == LIT_MAGIC_STRING_BOOLEAN_UL)
{
ECMA_TRY_CATCH (val,
ecma_op_to_primitive (my_val, ECMA_PREFERRED_TYPE_NO),
ret_value);
ecma_free_value (my_val);
my_val = ecma_copy_value (val);
ECMA_FINALIZE (val);
} |
includes | #include <winsock2.h> |
includes |
#include <stdarg.h> |
includes | #include <stddef.h> |
includes | #include <stdint.h> |
includes | #include <stdio.h> |
includes | #include <stdlib.h> |
includes | #include <sys/types.h> |
includes | #include <sys/select.h> |
includes | #include <sys/socket.h> |
includes |
#include <microhttpd.h> |
functions | void httpsrv_prepare_resp(struct MHD_Response *resp)
{
MHD_add_response_header(resp, MHD_HTTP_HEADER_SERVER, bfgminer_name_slash_ver);
} |
functions | int httpsrv_handle_req(struct MHD_Connection *conn, const char *url, const char *method, bytes_t *upbuf)
{
return handle_getwork(conn, upbuf);
} |
functions | int httpsrv_handle_access(void *cls, struct MHD_Connection *conn, const char *url, const char *method, const char *version, const char *upload_data, size_t *upload_data_size, void **con_cls)
{
bytes_t *upbuf;
if (!*con_cls)
{
*con_cls = upbuf = malloc(sizeof(bytes_t));
bytes_init(upbuf);
return MHD_YES;
} |
functions | void httpsrv_cleanup_request(void *cls, struct MHD_Connection *conn, void **con_cls, enum MHD_RequestTerminationCode toe)
{
if (*con_cls)
{
bytes_t *upbuf = *con_cls;
bytes_free(upbuf);
free(upbuf);
*con_cls = NULL;
} |
functions | void httpsrv_log(void *arg, const char *fmt, va_list ap)
{
if (!opt_debug)
return;
char tmp42[LOGBUFSIZ] = "HTTPSrv: ";
vsnprintf(&tmp42[9], sizeof(tmp42)-9, fmt, ap);
_applog(LOG_DEBUG, tmp42);
} |
functions | void httpsrv_start(unsigned short port)
{
httpsrv = MHD_start_daemon(
MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
port, NULL, NULL,
&httpsrv_handle_access, NULL,
MHD_OPTION_NOTIFY_COMPLETED, &httpsrv_cleanup_request, NULL,
MHD_OPTION_EXTERNAL_LOGGER, &httpsrv_log, NULL,
MHD_OPTION_END);
if (httpsrv)
applo... |
functions | void httpsrv_stop()
{
if (!httpsrv)
return;
applog(LOG_DEBUG, "Stopping HTTP server");
MHD_stop_daemon(httpsrv);
httpsrv = NULL;
} |
includes | #include <sys/types.h> |
includes | #include <pwd.h> |
includes | #include <stdlib.h> |
includes | #include <stdio.h> |
includes | #include <string.h> |
includes | #include <unistd.h> |
defines | #define nil 0 |
defines |
#define setkey pwdauth_setkey |
defines | #define encrypt pwdauth_encrypt |
defines |
#define LEN 1024 |
main | int main(int argc, char **argv)
{
char key[LEN];
char *salt;
struct passwd *pw;
int n;
/* Read input data. Check if there are exactly two null terminated
* strings.
*/
n= read(0, key, LEN);
if (n < 0) return 1;
salt = key + n;
n = 0;
while (salt > key) if (*--salt == 0) n++;
if (n != 2) return 1;
salt... |
includes |
#include <stdio.h> |
includes | #include <string.h> |
includes | #include <stdlib.h> |
includes |
#include <freerdp/api.h> |
includes | #include <freerdp/freerdp.h> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.