text stringlengths 3.12k 18.7k |
|---|
#include "slab.h"
#include "buddy.h"
#include "libc.h"
#define println uart_println
#define printf uart_print
#define KB_4 (1 << 12)
unsigned long next_pow2(unsigned long x) {
return x == 1 ? 1 : 1 << (64 - __builtin_clzl(x - 1));
}
/* self : slab itself, the slab memory is come from slab metadata */
/* start : ... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2019 <NAME> (tinyusb.org)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... |
/*
* chunked-file.c - A simple interface for reading and writing binary files
* consisting of PNG-style chunks with 4-character identifiers.
*
* As with PNG images, the file consists of a fixed signature
* followed by any number of chunks. Each chunk consists of
... |
/*
* Copyright 2016 Google Inc. All Rights Reserved.
* Author: <EMAIL> (<NAME>)
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction,
* including without limitation th... |
/**
*******************************************************************************
*******************************************************************************
*
* @file video-config.c
* @author <NAME>
* @email <EMAIL>
* @version v1.0
* @date 2018 April 10
* @brief piSmasher Video Configuration Application... |
/*
* NBUS driver for TS-4600 based boards
*
* Copyright (c) 2016 - Savoir-faire Linux
* Author: <NAME> <<EMAIL>>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*
* This dr... |
#define _GNU_SOURCE
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <signal.h>
#include <sys/types.h>
#include <dirent.h>
#include <wchar.h>
#include <locale.h>
#include <ace/hash.h>
#include "treebank.h"
struct ucl
{
int nchains;
struct uc
{
int n;
struct tb_edge **e;
... |
/*
* This file is part of the SSH Library
*
* Copyright (c) 2015 by <NAME>
*
* The SSH Library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at your
* op... |
/*
* Copyright (c) 2008-2012 <NAME>.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLA... |
/*
Copyright 2011,2013 <NAME> <<EMAIL>>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hop... |
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Whether we have flex and bison for GP2DDB */
/* #undef ENABLED_GP2DDB */
/* Define to 1 if tra... |
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
#include <Rinternals.h>
#include "processx.h"
#ifdef _WIN32
#include <windows.h>
/* FILETIME origin is January 1, 1601 (UTC).
See https://msdn.microsoft.com/en-us/9baf8a0e-59e3-4fbd-9616-2ec9161520d1
Unix origin is January 1, 1970.
The difference is 116444... |
#include "mpr.h"
#include "mprPrivate.h"
/* You may (if you want) define new functions or #define macros here;
but our intent is only that they would be used in this file. Thus,
prefix any function declarations here with "static" */
// v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v begin student code
// ( 0 lines in re... |
/* Copyright (c) 2010, The Linux Foundation. All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of con... |
#include <u.h>
#include <libc.h>
#include <stdio.h>
int failed;
/* Consume argument and ignore it */
int
Zflag(Fmt* f)
{
if(va_arg(f->args, int))
;
return 1; /* it's a flag */
}
void
verify(char *s, char *t)
{
if(strcmp(s, t) != 0){
failed = 1;
fprintf(stderr, "error: (%s) != (%s)\n", s, t);
}
free(s);
}
... |
/*
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of t... |
/** @file aq_launchermain.c
* @brief Launcher service library.
*
* Copyright (c) 2008-2013, tSoniq. http://tsoniq.com
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
* ... |
/*
* Unit test suite for dir functions
*
* Copyright 2006 CodeWeavers, <NAME>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your op... |
/*
* os_specific_a.c
*
* Created on: Aug 20, 2012
* Author: <NAME>
*/
#include "os_specific.h"
void update_environment(char* base_path)
{
/*
*
*
Set the following environment variables:
1) PIN_VM_LD_LIBRARY_PATH (put pin_libs in front of existing LD_LIBRARY_PATH)
2) PIN_LD_REST... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "pendsv.h"
#include "py/mphal.h"
#include "py/runtime.h"
#include "lib/netutils/netutils.h"
#include "esp826601_ll.h"
#include "led.h"
#define ESP_DEBUG(...) printf(__VA_ARGS__)
// #define ESP_DEBUG(...)
// atomic operator
#define ESP_ENTER() uint3... |
#include "middleSOES.h"
#define WD_RESET 1000
#define DEFAULTTXPDOMAP 0x1a00
#define DEFAULTRXPDOMAP 0x1600
#define DEFAULTTXPDOITEMS 1
#define DEFAULTRXPDOITEMS 1
volatile _ESCvar ESCvar;
_MBX MBX[MBXBUFFERS];
_MBXcontrol MBXcontrol[MBXBUFFERS];
uint8_... |
/* This version of `getopt' appears to the caller like standard Unix getopt()
but it behaves differently for the user, since it allows the user
to intersperse the options with the other arguments.
As getopt() works, it permutes the elements of `argv' so that,
when it is done, all the options precede everyt... |
#include "_TRIE.h"
#include "_LINKED_LIST.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
void MAY_REALLOC(char** fp, int* fp_count, int* fp_size){
/*******************************************************************
* DESCRIPTION : Reallocs the fp if fp_count has reach the ... |
/*
* Parallel Shark Smell Optimization algorithm implementation.
*
* (C) 2021 <NAME>
*/
#include "sso.h"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <errno.h>
#include "mpi.h"
int main(int argc, char *argv[])
{
int rank; /* rank */
int size; ... |
/*
* Block driver for Conectix/Microsoft Virtual PC images
*
* Copyright (c) 2005 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limita... |
#include <wiringPi.h>
#include <stdio.h>
#include <pthread.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
#include <signal.h>
#include "pi_lcd.h"
#define CLOCKWISE 1
#define COUNTER_CLOCKWISE 2
#define pinA 1
#define pinB 0
#define pinC 2
#... |
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
... |
/*$
Copyright (c) 2014-2017, Azel
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the follow... |
/*-
* Copyright (c) 2012-2015 UPLEX Nils Goroll Systemoptimierung
* Copyright (c) 2012-2015 Otto Gmbh & Co KG
* All rights reserved
* Use only with permission
*
* Author: <NAME> <<EMAIL>>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the foll... |
/*
* Copyright (c) 2018, Commonwealth Scientific and Industrial Research
* Organisation (CSIRO)
* All rights reserved.
*/
/* Includes -------------------------------------------------*/
#include "FreeRTOS.h"
#include "task.h"
#include "bluetooth.h"
#include "board.h"
#include "gpio.h"
#include "leds.h"
#includ... |
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#ifdef __linux__
#include <sys/random.h>
typedef struct {
unsigned off;
uint8_t random[32 * 1024];
} RandomSource;
static void random_init(RandomSource *s) { s->off = sizeof(s->random); }
static void random_destroy(RandomSource *s) {}
static uint8_... |
/////////////////////////////////////////////////////////////////////////////
//
// httphandler.c
//
// MiniWeb - mini webserver implementation
//
/////////////////////////////////////////////////////////////////////////////
#include <stdio.h>
#include <string.h>
#include "httppil.h"
#include "httpapi.h"
#include "rev... |
#include "usart_char.h"
#include "MadISR.h"
#define RX_BUFF_LOCK() do { madCSDecl(cpsr); madCSLock(cpsr);
#define RX_BUFF_UNLOCK() madCSUnlock(cpsr); } while(0)
static void set_info(mUsartChar_t *port, const struct termios *tp);
MadBool mUsartChar_Init(mUsartChar_t *port)
{
struct termios tp;
MadU8 ... |
#include <api_socket.h>
#include <ntp.h>
#include <api_debug.h>
#include <time.h>
#define NTP_TIMESTAMP_70_YEARS 2208988800UL
#define LI(packet) (uint8_t) ((packet.li_vn_mode & 0xC0) >> 6) // (li & 11 000 000) >> 6
#define VN(packet) (uint8_t) ((packet.li_vn_mode & 0x38) >> 3) // (vn & 00 111 000) >> 3
#defi... |
/*
* Copyright (c) 2014 - 2018 The DragonFly Project. All rights reserved.
*
* This code is derived from software contributed to The DragonFly Project
* by <NAME> <<EMAIL>>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions... |
#if HAVE_CONFIG_H
#include <config.h>
#endif
#define _GNU_SOURCE
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <signal.h>
#include <poll.h>
#include <stdint.h>
#include <math.h>
#include <errno.h>
#include <cairo.h>
#include <cairo-xlib.h>
#include <X11/Xlib.h>
#include <X1... |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolar... |
#include "mathinput.h"
#include <stdio.h>
#include <string.h>
inputBox *mathinput_initBox(int font, int maxChars, int x, int y, int xEnd) {
inputBox *theBox = malloc(sizeof(inputBox));
theBox->font = font;
theBox->maxChars = maxChars;
theBox->posX = x;
theBox->posY = y;
theBox->width = xEnd - x... |
/*
*
* (C) 2015 - ntop.org
*
* Module for supporting InveaTech NICs
*
*/
#include "pfring_mod_invea.h"
#include "pfring_mod.h" /* to print stats under /proc */
//#define DEBUG
/* **************************************************** */
static void __pfring_invea_release_resources(pfring *ring) {
pfring_invea... |
/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1992-2010 AT&T Intellectual Property *
* and i... |
#include "cactus.h"
#include "sonLib.h"
#include "bioioC.h"
#include <stdio.h>
#include <ctype.h>
void checkBranchLengthsAreDefined(stTree *tree) {
if (isinf(stTree_getBranchLength(tree))) {
st_errAbort("Got a non defined branch length in the input tree: %s.\n", stTree_getNewickTreeString(tree));
}
... |
/*
* Copyright 2019 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... |
/*------------------------------------------------------------------------------
Copyright (c) 2008 The Khronos Group Inc.
All Rights Reserved. This code is protected by copyright laws and contains
material proprietary to the Khronos Group, Inc. This is UNPUBLISHED
PROPRIETARY SOURCE CODE that may not be disclosed i... |
/**
* \file
*
* \brief Low Power and QTouch Demo for SAM4L.
*
* Copyright (c) 2012-2014 Atmel Corporation. All rights reserved.
*
* \asf_license_start
*
* \page License
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions... |
/*
* json.c
*
* Simple JSON parser.
*
* https://github.com/e03213ac/libjson
*
* This work belongs to the Public Domain. Everyone is free to use, modify,
* republish, sell or give away this work without prior consent from anybody.
*
* This software is provided on an "AS IS" basis, without warranty of any kind.... |
/*
wld.c
This file provides source code for a sample implementation of
a workload distribution (WLD) model that allows for multiple FM
function calls to be distributed over a group of HSM adapters.
This code is sample ONLY and Thales Inc. assumes no liability
or responsibility for its correct... |
#include "stm32f0xx_ll_bus.h"
#include "stm32f0xx_ll_gpio.h"
#include "stm32f0xx_ll_rcc.h"
#include "stm32f0xx_ll_system.h"
#include "stm32f0xx_ll_usart.h"
#include "stm32f0xx_ll_dma.h"
#include "stm32f0xx_ll_tim.h"
#include "stm32f0xx_ll_adc.h"
#include <string.h>
#include <stdlib.h>
/*
* Terminal cont... |
/*
FreeRTOS V8.2.3 - Copyright (C) 2015 Real Time Engineers Ltd.
All rights reserved
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under
the... |
/*
* HeartBit -- the HeartBeat Simulator Framework
*
* Copyright (C) 2014 Bolo -- <NAME>
*
* All original work here is distributed via a BSD license terms.
* Basically you are free to use it and you can't take credit for it.
*
* Portions of this may reflect code structure and comments from
* from the openssl c... |
/* NetHack 3.6 mhtxtbuf.c $NHDT-Date: 1432512803 2015/05/25 00:13:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */
/* Copyright (C) 2003 by <NAME> */
/* NetHack may be freely redistributed. See license for details. */
#include "mhtxtbuf.h"
/* Collect Nethack text messages and render text into edit box.
Wr... |
/*
The MIT License (MIT)
Copyright (c) 2017-2020 oarplayer(qingkouwei)
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, ... |
/** alphahttpd: receive and parse HTTP request
2022, <NAME> */
#include <FFOS/path.h>
#include <FFOS/perf.h>
static int req_parse(struct client *c);
static int req_open(struct client *c)
{
return CHAIN_FWD;
}
static void req_close(struct client *c)
{
if (c->ka) {
// preserve pipelined data
ffstr_erase_left((f... |
/*
* Copyright (c) 2015-16 <NAME>, for NetDEF, Inc.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE ... |
#include "helper.h"
#include "initLB.h"
#include "LBDefinitions.h"
#include <regex.h>
/**
* Reads the parameters for the lid driven cavity scenario from a config file.
* Throws an error if number of program arguments does not equal 2.
**/
int readParameters(
int *length, /* reads domain si... |
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public Lic... |
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <semaphore.h>
#include <unistd.h>
#include <sched.h>
#include <sys/types.h>
#include <string.h>
#include <sys/time.h>
/* Virtual Pager */
typedef struct vpager_t {
int p_size;
int p_num;
int id;
FILE* source;
void* stack;
int active;
} vpager_t;... |
/*
** Copyright (c) 2018, <NAME>
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are met:
**
** 1. Redistributions of source code must retain the above copyright
** notice, this list of c... |
#ifndef ERROR_H
#define ERROR_H
#include <stdarg.h>
#include <stdio.h>
#define UNUSED_PARAMETER(expr) (void)(expr);
#if defined(NDEBUG) && (NDEBUG == 1)
#undef DEBUG
#else
#define DEBUG
#endif
#if defined(DEBUG)
#define MESSAGE(errtype, format, ...) ... |
#include "parser.h"
#include <stdlib.h>
#include <stdio.h>
#include <memory.h>
#include <errno.h>
#include <time.h>
#include "vector.h"
int isAcceptedCharacter(char c);
int _parsePattern(const char str[], flatterm* ft, int i, term* parent, int argno);
term* term_create() {
term* t = malloc(sizeof(term));
if (!t)... |
/*
Created: September 2012
(c) 2012 by <NAME> <<EMAIL>>
Changes for Micronucleus protocol version V2.x
(c) 2014 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restricti... |
//////////////////////////////////////////////////////////////////////////
// The confidential and proprietary information contained in this file may
// only be used by a person authorized under and to the extent permitted
// by a subsisting licensing agreement from Eta Compute Inc.
//
// (C) Copyright 2016 Eta ... |
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
... |
#include "ngx_http_vkupload_headerparser.h"
#include <ngx_core.h>
#include <ngx_http.h>
#include <ctype.h>
#define str_starts_with(str, end, static_string) \
((size_t) ((end) - (str)) >= (sizeof(static_string) - 1) && \
ngx_strncasecmp((str), (u_char *) (static_string), (sizeof(static_string) - 1)) == 0)
... |
/**
* @file OpModeManager_bu.c
* @author <NAME> (<EMAIL>/<EMAIL>)
* @brief OpModeManager Boot Up (BU) mode initialisations
*
* Task ref: [UT_2.9.10]
*
* @version 0.1
* @date 2021-04-01
*
* @copyright Copyright (c) 2021
*/
/* -------------------------------------------------------------------------
* ... |
/*
* Frontend variables and functions.
*
* Copyright 2000-2013 <NAME> <<EMAIL>>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) a... |
/* dl.c - arch-dependent part of loadable module support */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2013 Free Software Foundation, Inc.
*
* GRUB is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software ... |
/* LuminariMUD */
#ifndef MAKEDEPEND
# include <stdio.h>
# include <assert.h>
# include <stdlib.h>
#endif
#include "rTreeIndex.h"
#include "card.h"
/** Initialize one branch cell in a node. */
static void RTreeInitBranch(struct Branch *b)
{
RTreeInitRect(&(b->rect));
b->child = NULL;
}
/** Initialize a... |
/*
rgb_lcd.cpp
2013 Copyright (c) Seeed Technology Inc. All right reserved.
Author:Loovee
2013-9-18
Ported:Abysmal
2019-10-28
add rgb backlight fucnction @ 2013-10-15
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associat... |
/* custom psp2bootconfig reimplementation
*
* Copyright (C) 2020 skgleba
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <vitasdkkern.h>
#include "... |
/* parseDump - all you need to dump out a parse tree in
* a human-readable form. */
#include "common.h"
#include "hash.h"
#include "pfToken.h"
#include "pfType.h"
#include "pfParse.h"
char *pfParseTypeAsString(enum pfParseType type)
/* Return string corresponding to pfParseType */
{
switch (type)
{
case ppt... |
typedef unsigned int ILenum;
typedef unsigned char ILboolean;
typedef unsigned int ILbitfield;
typedef signed char ILbyte;
typedef signed short ILshort;
typedef int ILint;
typedef size_t ILsizei;
typedef unsigned char ILubyte;
typedef unsigned short ILushort;
typedef unsigned int ILuint;
typedef float ILfloat;
typede... |
/*****************************************************************
* This copyrighted source code is freely distributed
* under the terms of the GNU General Public License. See
* the files COPYRIGHT and LICENSE for details.
*****************************************************************/
/* main for sh... |
/*
* Copyright (c) 2014-2018 Cesanta Software Limited
* All rights reserved
*
* Licensed under the Apache License, Version 2.0 (the ""License"");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* ... |
/*
lwcc/parse.c
Copyright © 2013 <NAME>
This file is part of LWTOOLS.
LWTOOLS is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
This progra... |
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 <NAME>, <NAME> and <NAME>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your op... |
/* @(#)tmscp.h 1.2 (2.11BSD) 1998/2/23 */
/****************************************************************
* *
* Licensed from Digital Equipment Corporation *
* Copyright (c) *
* ... |
/*
* Copyright (c) 2010 Aalto University and RWTH Aachen University.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to ... |
/***************************************************************************
* Connection.h -- The "Connection" class holds information specifically *
* pertaining to connection probes. Objects of this class must always *
* belong to a certain "Service" object. *
* ... |
/*
* Author: <NAME>
* Copyright: Crownstone (https://crownstone.rocks)
* Date: Mar 17, 2022
* License: LGPLv3+, Apache License 2.0, and/or MIT (triple-licensed)
*/
#include <cs_SharedConfig.h>
#include <drivers/cs_Uicr.h>
#include <protocol/cs_ErrorCodes.h>
#include <nrf_nvmc.h>
#include <nrf_sdh.h>
#include <s... |
#include <stdio.h>
#include <stdlib.h>
#include "det.h"
int sort_index(int* array, int n, int* index);
int det_re(int** M, int n);
int det(int** M, int n)
{
int i, d;
int** M2 = (int**)malloc(n * sizeof(int *));
for (i = 0; i < n; ++i)
M2[i] = (int*)malloc(n * sizeof(int));
copy_matrix(M, M2, n);
// 把M2拿去算... |
#include "stdint.h"
#include "stdlib.h"
#include "stdio.h"
#include "sat.h"
#include "array.h"
B256 constrain(uint8_t pos, uint8_t neg){
static const uint64_t ks[6] = {0xAAAAAAAAAAAAAAAA,
0x6666666666666666,
0xf0f0f0f0f0f0f0f0,
0xff00ff00ff00ff00,
0xffff0000ffff0000,
... |
/* This example shows how to put a dynamic cairo-generated image
on an OpenGL texture. It's just a dirty hack on top of an
article by Rob "<NAME> which you can find here:
http://www.gamedev.net/reference/articles/article2333.asp */
/* Author: marcoil
You can find more info on this demo at ... |
/*
* Copyright 2020 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wr... |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolar... |
#include "video_x264.h"
// h.264 encoder lib
// this requires stdint.h first or else it complains...
#include <stdint.h>
#include <x264.h>
// for malloc
#include <stdlib.h>
// for fprintf
#include <stdio.h>
// structure definition for the encoder (private data)
struct encoder_video {
// user callback to generate m... |
/*! \file main.c \brief DMX512 Communication. */
//*****************************************************************************
/*
DMX512 Communication
All rights reserved @
<NAME> (<EMAIL>)
<NAME> (<EMAIL>)
Course Project (Spring 2014)
Embedded System Controller - EE5314
Dr. <NAME>
Department of Electrical Engine... |
/* Copyright (c) 2018-2019, DF9DQ
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list
* of conditions... |
#include "shell.h"
#include "miniuart.h"
#include "meta_macro.h"
#include "string_util.h"
#include "pm.h"
const char * shell_command_list[] = {
"hello",
"help",
"timestamp",
"reboot",
0x0
};
const char * shell_command_descriptions[] = {
"Print Hello World!",
"Help",
"Get current timestamp",
"Reboot ... |
/*
* Copyright 2018 Red Hat Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, d... |
#include <stdlib.h>
#include <stdio.h>
#include <ugens.h>
#include "setup.h"
static int space_called = 0;
static int matrix_flag = 0;
static int _UseMikes = 0;
static float _front, _right, _back, _left, _ceiling, _abs_factor, _rvb_time;
static double _MikeAngle = PI / 4.0; /* in radians - default is 45 ... |
/*
MIT License
Copyright (c) <NAME> 2019 miniwin Embedded Window Manager
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy... |
/* Copyright (c) 2004-2006 <NAME>, <NAME>
*
* Redistribution and use in source forms, with and without modification,
* are permitted provided that this entire comment appears intact.
*
* Redistribution in binary form may occur without any restrictions.
* Obviously, it would be nice if you gave credit where ... |
#ifndef CVEC_TYPE
//#error Define type and name before including template.
#define CVEC_TYPE cvec_float
#define CVEC_(N) cvec_ ## N
#include <math.h>
#include "cvec.h"
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/ioctl.h>
#endif
extern int cvec_njobs;
#ifndef CVEC_... |
/**********
Copyright 1991 Regents of the University of California. All rights reserved.
Author: 1987 <NAME>, U. C. Berkeley CAD Group
Author: 1991 <NAME>, U. C. Berkeley CAD Group
**********/
/**********
Two-Dimensional Numerical Device Setup Routines
**********/
#include "ngspice/ngspice.h"
#include "ngspice/numgl... |
/*
* Copyright (C) 2015 Endless Mobile
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is dis... |
#include "common.h"
#include "screen.h"
#include "keyboard.h"
void shell_main(void);
void do_command(void);
void dohelp(void);
void phrase_path(unsigned char* path);
void copy_file(char* commandline);
void main(void){
shell_main();
}
unsigned char key;
unsigned char cmd_buf[1023];
unsigned char path... |
#include "Header.h"
#include "interpreter.h"
#include "lexicalCheck.h"
#include "interpreterExecute.h"
#include "executeInOut.h"
//-------------------------------------------------------------------------------
myvar* fscanf_constants (FILE* fin, names_table *Names_table, myvar *cur)
{ myvar var = {0}, *rsl = NULL;
... |
#include "hashtable.h"
#include "zlib.h"
#include "mempool.h"
#include "manager.h"
#include <math.h>
/*
Buckets are stored as chunks in a memory pool. Each chunk has the format:
struct chunk {
void **prev;
hash_t hash;
char[sizeof(data)] val;
}
*/
#define LOAD_MAX 0.8f
// Walk backwards until condition c ... |
/* lpc.stable.f -- translated by f2c (version 19950110).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static integer c__1 = 1;
/* Subroutine */ int stabl_(anal, unstab, npoles, anal_len, unstab_len)
char *anal, *unstab... |
#include "lcd_driver.h"
#include "bsp.h"
#include "stm32f4xx_gpio.h"
#include "stm32f4xx_rcc.h"
#define ALL_DATA_PINS ((uint16_t)(LCD_D4 | LCD_D5 | LCD_D6 | LCD_D7))
#define CHECK_BIT(byte, bit) ((byte) & (1 << (bit)))
/* Upper nibble = row
* 0x0X -> 1st row
* 0x4X -> 2nd row
* Lower nibble = column
* 0xX0 -> 1st... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.