text
stringlengths
3.08k
10.5k
#include<stdlib.h> #include<stdio.h> #include<ctype.h> #include<math.h> #include <string.h> #define MAXOP 100 #define NUMBER 0 #define IDENTIFIER 1 #define TRUE 1 #define FALSE 0 /* The new additions deal with adding functions from math.h to the calculator. In anticipation of the f...
/* * AVL TREE */ #include <stdio.h> #include <stdlib.h> #include "avl_tree.h" static void left_rotation(tree_pointer *parent); static void right_rotation(tree_pointer *parent); void list_insert(list_head_pointer list_head, tree_pointer *tree_node); list_pointer list_remove(list_head_pointer list_head); list_pointer...
#include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <errno.h> #include <strings.h> uint32_t betole32(uint32_t be_data){ uint32_t le_data; le_data = be_data >> 24; le_data |= (be_data >> 8) & 0xFF00; le_data |= (be_data << 8) & 0xFF0000; le_data |= (be_data << 24) & 0xFF0000...
/* * Copyright (c) 2015-2019, Renesas Electronics Corporation. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <common/debug.h> #include <lib/mmio.h> #include "dram_sub_func.h" #include "rcar_def.h" #if RCAR_SYSTEM_SUSPEND /* Local defines */ #define DRAM_BACKUP_GPIO_USE 0 #include "i...
/* * Copyright (C) 2017 Fundacion Inria Chile * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level * directory for more details. */ /** * @{ * @ingroup net * @file * @brief Netdev adoption for OpenThread * * @a...
/* * Copyright (c) 2011, <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: * * * Redistributions of source code must retain the above copyright notice, this list of conditions and the...
#include <config.h> #include <stdint.h> #include <l0/lrt/types.h> #include <l0/cobj/cobj.h> #include <lrt/io.h> #include <l0/lrt/pic.h> #include <l0/lrt/trans.h> #include <l0/types.h> #include <l0/sys/trans.h> #include <lrt/assert.h> #include <stdio.h> #include <assert.h> #include <stdlib.h> #include <string.h> #incl...
/** @file FreeRTOSConfig.h * @brief FreeRTOS configuration paramaters. * * @author <NAME> */ /** * MIT License * * Copyright 2018, <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 th...
#include "command.h" #include "shell.h" #include <dc_util/filesystem.h> #include <dc_util/path.h> #include <dc_util/strings.h> #include <stdlib.h> #include <string.h> #include <wordexp.h> bool get_error_redirect(const struct dc_posix_env *env, struct command *command, ...
/* *************************************************************************** * Ralink Tech Inc. * 4F, No. 2 Technology 5th Rd. * Science-based Industrial Park * Hsin-chu, Taiwan, R.O.C. * * (c) Copyright 2002-2004, Ralink Technology, Inc. * * All rights reserved. Ralink's source code is an unpublished work a...
#include "gps.h" #include "muxDemux.h" #include <string.h> #include <stdlib.h> //GPS CONSTANTS #define MAX_NUM_CHARS 120 uint8_t parseHex(char c); char NMEA_line[MAX_NUM_CHARS]; char info[MAX_NUM_CHARS]; /** * Initialize the run_coors and run_names arrays. */ void initialize_internal_gps_map(long run_coor[3][4], c...
//=================== Inclusion =======================================// #include <string.h> #include <stdio.h> #include <unistd.h> #include "mosquitto.h" //=================== Macros =========================================// #define DEBUG #define BROKER_IP "192.168.7.36" #define PORT 1202 #define xCA_APPROACH #d...
#include <stdio.h> #include <string.h> #include <ctype.h> #include <stdlib.h> #include "directive.h" /** * File: * directive.c handles directive statements syntax related issues. */ #define ERROR -1 char *directives[DIREC_NUM] = {"data", "string", "entry", "extern"}; /* * Private function: * read_data analyze...
#include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <math.h> #include <string.h> int L; // latura matricei int N; // numarul de elemente de sortat int P; int *v; int *vQSort; int **M; pthread_barrier_t barrier; void compare_vectors(int *a, int *b) { int i; for (i = 0; i < N; i++) { if (a[i] != ...
/* * Copyright (c) 2016 Freescale Semiconductor * Copyright 2017 NXP * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * o Redistributions of source code must retain the above copyright no...
/* * MPG-Nano - Firmware and UCCNC plugin for Arduino Nano based serial-over-USB * interface for modified 4-axis Chinese MPG pendant. * * https://github.com/mattbucknall/mpg-nano * * Copyright (c) 2021 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software an...
//-------------------------------------------------------------------------! // ! // N A S P A R A L L E L B E N C H M A R K S 3.3 ! // ! // ...
/* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ /* program author(s) */ #define AUTHOR "<NAME> <<EMAIL>>" /* copyright info */ #define COPYRIGHT "Copyright (C) 2006-2014 <NAME>\nThis is free software; see the source for copying conditions. Th...
/* librist. Copyright © 2020 SipRadius LLC. All right reserved. * Author: <NAME>, Ph.D. <<EMAIL>> * * SPDX-License-Identifier: BSD-2-Clause */ #include <string.h> #include <stdio.h> #include "oob_shared.h" #ifdef _WIN32 #include <ws2tcpip.h> #else #include <arpa/inet.h> #endif #include "socket-shim.h" #ifdef USE_T...
/*! \file tester.c \brief Validate kNN ring implementation (MPI). \author <NAME> \date 2019-11-25 */ #include <stdio.h> #include <stdlib.h> #include <time.h> #include <math.h> #include <assert.h> #include "knnring.h" #include "mpi.h" #include "tester_helper.h" #include <sys/time.h> // %%%%%%%%%%%%%%%...
#pragma once #include <stdio.h> #include <kernel/compiler.h> #include <kernel/bitops.h> #include <kernel/os.h> #include <assert.h> #include <errno.h> #include <limits.h> #include <stdarg.h> #include <string.h> #include <bits/size_t.h> #include <bits/ssize_t.h> #include <bits/null.h> enum _io_orientation { _io_byte...
/* $NetBSD: mkbootimage.c,v 1.6 2002/05/14 06:34:20 lukem Exp $ */ /* * Copyright (c) 1999 <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 ...
/* * (c) Jul.2000 AngelFire / [LmT] * * Greetz: all members of [LmT] * and all my friendz that makes me happy of this shitty world. * * PLEASE DISTRIBUTE (sick of PRIVATE shitz!) * * Some code is of course stolen from its rightful owners. * */ #include <stdio.h> #include <stdlib.h> #include <stdarg.h...
/* * File: pwm.c * Author: sstevens * * Created on April 8, 2019, 5:18 PM */ #include <math.h> #include "xc.h" #include "pwm.h" #include "system.h" #include "user.h" void set_pwm_period( float period_us ) { volatile float Fpwm, prescale; Fpwm = ( 1 / period_us ); prescale = pow( 4, PWMPrescal...
/* * File: main.c * Author: pschilk * * Created on June 24, 2020, 8:34 AM */ // CONFIG1 #pragma config FOSC = INTOSC // (INTOSC oscillator; I/O function on CLKIN pin) #pragma config WDTE = ON // Watchdog Timer Enable (WDT enabled) #pragma config PWRTE = OFF // Power-up Timer Enable (PWRT disable...
/*------------------------------------------ * Copyright (c) 2017, Synopsys, Inc. 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 copyri...
// Copyright (c) 2021, SafeBreach & Guardicore // 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 o...
/* Copyright 2018 <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 writing...
/* main.c * * Copyright (C) 2021 fgsfds, <NAME> * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/stat.h> #include <switch.h> #include "config.h" #include "util.h...
#include <ruby.h> #include "quirc_internal.h" #define LIB_VERSION rb_str_new_cstr(quirc_version()) VALUE mQuirc; VALUE cQuircRecognizer; VALUE cQuircData; typedef struct { struct quirc *quirc; } quirc_recognizer_t; static void quirc_recognizer_t_dfree(void* _qr) { quirc_recognizer_t* qr = (quirc_recognizer_t*)_...
#include "skp_libevent_buffer_test.h" void do_write_buffer(evutil_socket_t fd, short events, void *arg) { printf("do_write\n"); } char rot13_char_buffer(char c) { /* We don't want to use isalpha here; setting the locale would change * which characters are considered alphabetical. */ if ((c >= 'a' && ...
/* * The MIT License (MIT) * * Copyright (c) 2015 <NAME> <<EMAIL>> * * 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 ...
#include <stdio.h> #include <stdlib.h> #include <dlfcn.h> #include <CL/cl.h> #include <stdint.h> #include <time.h> static inline uint64_t nanos_since_boot() { struct timespec t; clock_gettime(CLOCK_BOOTTIME, &t); return t.tv_sec * 1000000000ULL + t.tv_nsec; } struct kernel { cl_kernel k; const char *name; ...
// Copyright (c) 2004-2013 <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 the rights // to use, copy, modify, merge, publish, d...
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "../geohash.h" struct hms { short h, m; unsigned short ms; }; static struct hms hms_unpack(double a) { double f = fabs(fmod(a, 1.0)); int h = a; int m = f*60; int ms = (f*3600 - m*60) * 1000; return (...
/** This file is in the public domain. * * @homepage http://github.com/pabigot/bsp430 * */ #include <bsp430/platform.h> #include <bsp430/utility/led.h> #include <bsp430/periph/port.h> #include <bsp430/utility/uptime.h> #include <bsp430/utility/console.h> #include <bsp430/periph/timer.h> #include <bsp430/periph/sys...
/* packet-dmx-test.c * DMX Test packet disassembly. * * This dissector is written by * * <NAME> <<EMAIL>> * Copyright 2011 <NAME> * * Wireshark - Network traffic analyzer * <NAME> <<EMAIL>> * Copyright 1999 <NAME> * * This program is free software; you can redistribute it and/or * modify it under the ...
/** * * Witchcraft Compiler Collection * * Author: <NAME> - <EMAIL> * ******************************************************************************* * The MIT License (MIT) * Copyright (c) 2016-2022 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associat...
#include <stdio.h> #include <assert.h> #include "rz_smp.h" #define OMG 0 #define KEYI 1 #if OMG struct smp_descriptor desc[] = { _ADD_SMP_DESC("HEAD", 0, 1, 0xAA), _ADD_SMP_DESC("LENG", DESC_TYPE_IN_CS, 1, 0), _ADD_SMP_DESC("VDAT", DESC_TYPE_PAYLOAD | DESC_TYPE_IN_LEN | DESC_TYPE_IN_CS, 0, 0), ...
#define USE_STDPERIPH_DRIVER #include "stm32f10x.h" #include <stdlib.h> /* Flag whenever the button is pressed. * Note that the interrupt handler is initialized to only * fire when the button is pressed, not released. */ uint8_t button_pressed = 0; void EXTI0_IRQHandler(void) { /* Make sure the line has a pend...
/******************************************************************** * FILE: prior-dist.c * AUTHOR: <NAME>, <NAME>, <NAME> * CREATION DATE: 2010-11-19 * COPYRIGHT: 2010 UW * * This file contains the implmentation for the data structures and * functions used to store and manipulate the distribution of priors. *...
/** * Copyright (C) 2020 Bosch Sensortec GmbH. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <stdint.h> #include <stdlib.h> #include <stdio.h> #include "bma400.h" #include "coines.h" /*! Read write length varies based on user requirement */ #define READ_WRITE_LENGTH UINT8_C(46) /* ...
/* search.c - ldap backend search function */ /* $OpenLDAP: pkg/ldap/servers/slapd/back-ldap/search.c,v 1.8.2.4 2001/01/17 06:04:25 kurt Exp $ */ /* * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ /* This is an altered version */ /* * Copyright...
#include <geminc.h> #include <gemprm.h> #include <gbcmn.h> #include <dccmn.h> #include "dcgrib.h" unsigned char *bmsstart; unsigned char *gdsstart; int isquasi; int idrct, jdrct, consec; void decode_grib1 (unsigned char *gribbul, int lenbul, char *gemfil, char *filnam, int maxgrd, int *iret) { /************...
/* * 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 conditions and the * following disclaimer. * * 2. Redistribu...
/* * If not stated otherwise in this file or this component's Licenses.txt file * the following copyright and licenses apply: * * Copyright 2019 RDK Management * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may...
/* * Description: Test painting with Pen on a rotated and scaled elevation grid. */ #include <webots/camera.h> #include <webots/motor.h> #include <webots/pen.h> #include <webots/position_sensor.h> #include <webots/robot.h> #include "../../../lib/ts_assertion.h" #include "../../../lib/ts_utils.h" #define TIME_STEP...
/****************************************************************************** DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2017-2018 Yeonji <<EMAIL>> Everyone is permitted to copy and distribute verbatim or modified copies of this license document...
/* * Copyright (c) 2009 <NAME> <<EMAIL>> * * Licensed under GPLv2, see file LICENSE in this source tree. */ /* * This program is a CGI application. It processes server-side includes: * <!--#include file="file.html" --> * * Usage: put these lines in httpd.conf: * * *.html:/bin/httpd_ssi * *.htm:/bin/httpd_ss...
#include "freertos/FreeRTOS.h" #include "esp_wifi.h" #include "esp_wifi_types.h" #include "esp_system.h" #include "esp_event.h" #include "esp_event_loop.h" #include "nvs_flash.h" #include <stdio.h> #include <string.h> #define CHANNEL_SWITCHING true // true, if channel chould be switched. otherwise define a s...
#include <lua.h> #include <lualib.h> #include <lauxlib.h> #include <stdlib.h> #include <time.h> #include <unistd.h> #include <stdlib.h> #include <stdint.h> #include <getopt.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #define NO_FCGI_DEFINES #include <fcgi_stdio.h> #ifndef LUA_OK #define LUA_OK...
#include <inttypes.h> #include <sys/time.h> #include <postgres.h> #include "utils.h" #include "prom.h" #include "parse.h" #define MAX_NAMELEN 1024 #define fail(format, ...) \ ereport(ERROR, \ (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), \ errmsg("invalid input syntax for promethe...
//Hemisphere #include <stdio.h> #include <stdlib.h> #include <math.h> const char shades[11] = "@%#&eo*!:."; const int shade_length = 10; void normalize(double* p, double* np); double dot(double* p1, double* p2); void make_hemisphere_points(const int R, double* xarr, double* yarr, double* zarr, int* length); void dr...
#include <unistd.h> #include <assert.h> #include <sys/types.h> #include <sys/stat.h> #include <time.h> #include <string.h> #include <errno.h> #include "slist.h" #include "storage.h" #include "pages.h" #include "inode.h" #include "directory.h" void storage_init(const char* path) { pages_init(path); } int storage...
/* * Copyright (c) 2020 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) * OS-Lab-2020 (i.e., ChCore) is licensed under the Mulan PSL v1. * You can use this software according to the terms and conditions of the Mulan PSL v1. * You may obtain a copy of Mulan PSL v1 at: * ...
/* * ping program * * Copyright (C) 2010 <NAME> * Copyright (C) 2018 <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 opt...
#include "iap.h" #include "flash.h" #include "string.h" #include "uart_parse.h" #include "usb_parse.h" extern USBD_HandleTypeDef hUsbDeviceHS; extern struct EEPROM_CONFIG_STRUCT eeprom; int isReadUpgrade = 0; int jump_app_count = JUMP_APP_DELAY; void boot(void) { usb_receive_struct_init(); flash_eeprom_load(...
/* A simple http client */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include <sys/socket.h> #include <arpa/inet.h> #include <unistd.h> #include <regex.h> struct UrlInfo { char ip_addr[16]; char protocol[8]; char port[8]; char path[64]; }; struct RequestInfo { struct UrlInfo url_...
#include "luby.h" #include "comm.h" #include "mersenne_twister.h" #include "basics.h" #include "remotes.h" /* <NAME>. "A simple parallel algorithm for the maximal independent set problem." SIAM journal on computing 15.4 (1986): 1036-1053. */ int luby_mis(unsigned nneigh, int const neigh[], int in_V) { unsigne...
/* * Copyright (c) 2017, <NAME> - http://www.spd.gr * 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, th...
/* * hidden - A small program to listen all windows with WM_STATE set to * Iconic. * * Copyright (c) 2012 <NAME>, mc at the domain * hack.org. * * Permission to use, copy, modify, and/or distribute this software * for any purpose with or without fee is hereby granted, provided * that the above copyright notice...
/*! * \file board.c * * \brief Target board general functions implementation * * \copyright Revised BSD License, see section \ref LICENSE. * * \code * ______ _ * / _____) _ | | * ( (____ _____ _...
// SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later /* * Copyright 2013-2018 IBM Corp. */ #include <config.h> #define BITS_PER_LONG (sizeof(long) * 8) #include "dummy-cpu.h" #include <stdlib.h> /* Use these before we undefine them below. */ static inline void *real_malloc(size_t size) { return malloc(siz...
/* Copyright (c) 2012, Broadcom Europe Ltd 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 t...
/* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2008-2012 Zmanda, Inc. All Rights Reserved. * Copyright (c) 2013-2016 Carbonite, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public Li...
#include <render.h> #include <stdio.h> #include <stdlib.h> int SCREEN_WIDTH; int SCREEN_HEIGHT; unsigned int shaderProgram; const char* vertexShaderSource = "#version 300 core\n" "layout (location = 0) in vec3 aPos;\n" "layout (location = 1) in vec2 aTexcord;\n" "out vec2 Texcord;\n" "void main()\n" "{\n" " Texcord...
#include "sfil.h" #include <stdio.h> #include <string.h> #include <stdlib.h> #define BMP_SIGNATURE (0x4D42) typedef struct { unsigned short bfType; unsigned int bfSize; unsigned short bfReserved1; unsigned short bfReserved2; unsigned int bfOffBits; }__attribute__((packed)) BITMAPFILEHEADER; typedef struct { u...
#include "shared.h" #include "comms.h" #include "mesh.h" #include <math.h> #include <stdio.h> #include <stdlib.h> #ifdef MPI #include "mpi.h" #endif struct Profile compute_profile; struct Profile comms_profile; // Write out data for visualisation in visit void write_to_visit(const int nx, const int ny, const int x_o...
#include <stdio.h> #include <stdlib.h> #include <time.h> #define N 3 /***************DICHIARAZIONE DI FUNZIONI********************/ void getMatrix( int m[][N], int n); void readMatrix( int m[][N], int n); void printMatrix( int m[][N], int n); void verifyMatrix( int m[][N], int n); void createMatrix( int m[...
/*BEGIN_LEGAL Intel Open Source License Copyright (c) 2002-2017 Intel Corporation. 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 noti...
/****************************************************************************** * * Copyright © International Business Machines Corp., 2006, 2008 * * 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 ...
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. * Copyright (c) 2004-2007 The University of Tennessee a...
/* This file performs the following test: hardware info and which events are available */ #include "papi_test.h" extern int TESTS_QUIET; /* Declared in test_utils.c */ static void print_help(void) { printf("This is the PAPI avail program.\n"); printf("It provides availability and detail information\nfor...
#include "cube_average.h" #include <stdlib.h> #include "utils.h" VALUE CubeAverageClass = Qnil; const double removed_fraction_per_side = 0.05; typedef struct { size_t capacity; size_t size; size_t insert_index; double* values; double average; } CubeAverageData; static size_t CubeAverageData_size(const vo...
#pragma once #include <uapi/cdefs.h> /* APIC registers */ enum { LAPIC_ID = 0x2, LAPIC_VERSION = 0x3, LAPIC_TPR = 0x8, LAPIC_APR = 0x9, LAPIC_PPR = 0xa, LAPIC_EOI = 0xb, LAPIC_LDR = 0xd, LAPIC_DFR = 0xe, /* Not in x2APIC */ LAPIC_SVR = 0xf, LAPIC_ISR0 = 0x10, LAPIC_ISR1 = 0...
// // Created by <NAME> on 2019-12-07. // #include "MaxHeap.h" // ********* Structures ********* struct MaxHeap{ int maxSize; int currentSize; char *name; element* array; // Maybe ** // Pointers Functions freeFunction freeFunction; equalFunction equalFunction; printFunction printFunc...
#include "samd20e18.h" void sei() { // Generate a Data Memory Barrier __DMB(); // Clear I-bit in the CPSR enabling interrupts __enable_irq(); } void cli() { // Set the I-bit in the CPSR, disabling interrupts __disable_irq(); // Generate a Data Memory Barrier __DMB(); } void clock_init(void) { // Set the NVM co...
#include "recv.h" #include "assert.h" #include "convert.h" #include "entry.h" #include "heap.h" #include "log.h" #include "membership.h" #include "recv_append_entries.h" #include "recv_append_entries_result.h" #include "recv_install_snapshot.h" #include "recv_request_vote.h" #include "recv_request_vote_result.h" #incl...
/* $OpenBSD: macdefs.h,v 1.2 2007/12/22 12:48:52 stefan Exp $ */ /* * Copyright (c) 2003 <NAME> (<EMAIL>). * 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 c...
/* * varcpuload: Simple tool to create reproducable artifical sustained load on * a machine. * * Copyright (C) 2008-2013 Red Hat, Inc. * Authors: <NAME> * * 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 ...
#include "snfd.h" #include <stdlib.h> #include <string.h> #include "snfd_internal.h" #include "snfd_utils.h" /* * 1. Initialize blocks which are broken or not initialized. * 2. Store state of each block */ SNFD_ERROR snfd_startup(SNFD * snfd) { SNFD_UINT32 i; SNFD_BLOCK_STATE block_state; SNFD_BLOCK_HEA...
#define _CRT_SECURE_NO_WARNINGS #define DEFAULT_PROGRAM "blank.cl" #define DEFAULT_KERNEL "blank" #include <stdio.h> #include <stdlib.h> #ifdef MAC #include <OpenCL/cl.h> #else #include <CL/cl.h> #endif /* Find a GPU or CPU associated with the first available platform */ cl_device_id create_device() { ...
#define TMW 80 #define TMH 25 #define TMC(f, b) ((((uint8_t)(f) & 0x0F) << 8) + (((uint8_t)(b) & 0x0F) << 12)) #include <stdint.h> #include <io/ports/ports.h> uint16_t* gfxbaktextbuf_begin = 0; uint16_t* textmode_vbuf = (uint16_t *)0x000B8000; void textmode_setchar(int x, int y, char c) { textmode_vbuf[x + y *...
#pragma once #include "Types.h" #include "systemio/Window.h" #define MOUSE_LEFT GLFW_MOUSE_BUTTON_1 #define MOUSE_RIGHT GLFW_MOUSE_BUTTON_2 #define MOUSE_MIDDLE GLFW_MOUSE_BUTTON_3 #define KEY_SPACE GLFW_KEY_SPACE #define KEY_ESC GLFW_KEY_ESCAPE #define KEY_ENTER GLFW_KEY_ENTER #define KEY_TAB GLFW_KEY_TAB #define K...
#include <arpa/inet.h> #include <netinet/in.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <sys/time.h> #include <sys/types.h> #include <unistd.h> /* server side send file to client server有公网IP,client只有局域网IP server要先接受到client请求,获取client地址后,再给client发送数据 compile command g...
/* SCREENTextFont.c AUTHORS: <EMAIL> awi <EMAIL> mk PLATFORMS: All. HISTORY: 11/19/03 awi Wrote it. DESCRIPTION: Sets the text font for the specified window record. NOTES: */ #include "Screen.h" // If you change useString then also change the corresponding synopsis string in ScreenSy...
/** * Sanguinololu board pin assignments */ #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__) #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. #endif #define X_STEP_PIN 15 #define X_DIR_PIN 21 #define X_STOP_PIN 18 #define Y_STEP_PIN ...
#include <avr/io.h> #include <inttypes.h> #ifndef F_CPU // #define F_CPU 12000000UL #define F_CPU 1000000UL #endif #include <util/delay.h> #include "lcd.h" #define LCD_DATA_PORT PORT(LCD_DATA) #define LCD_E_PORT PORT(LCD_E) #define LCD_RS_PORT PORT(LCD_RS) #define LCD_RW_PORT PORT(LCD_RW) #define LCD_DAT...
#include <unistd.h> #include <string.h> #include <sys/poll.h> #include <sys/time.h> #include <errno.h> #include <mbedtls/entropy.h> #include <mbedtls/ctr_drbg.h> #include <mbedtls/ssl.h> #include <mbedtls/sha1.h> #include <mbedtls/platform.h> #include <mbedtls/sha256.h> #include "tls.h" #include "logger.h" #include "c...
#include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> #include <math.h> void insertionsort(char** array, int strMax) { char* current; int position; for (int i = 1; i < strMax; i++) { current = (char*)malloc(sizeof(array[i])); strcpy(current, array[i]); position = i; while ( (position...
// porres 2017-2020 #include "m_pd.h" #include <stdlib.h> #include <math.h> static t_class *xselect_class; #define INPUTLIMIT 512 #define HALF_PI (3.14159265358979323846 * 0.5) typedef struct _xselect{ t_object x_obj; int x_channel; int x_lastchannel; int x_ninlets; do...
#include "../kernel.h" #include "../kinc/api.h" void advset(){ char cps = KEY_A; char cpsii = KEY_A; int i; clscr(); gotoxy(25, 0); printf("AhnTri Advanced settings\n\n"); printf("1. Change Text color - NOT WORKING\n"); printf("2. Change Theme color - NOT WORKING\n"); printf("3. Reload GDT\n"); printf("4. Re...
// SPDX-License-Identifier: BSD-3-Clause // // Copyright(c) 2022 Mediatek. All rights reserved. // // Author: <NAME> <<EMAIL>> // <NAME> <<EMAIL>> #include <sof/debug/panic.h> #include <sof/drivers/interrupt.h> #include <sof/ipc/driver.h> #include <sof/ipc/msg.h> #include <sof/ipc/schedule.h> #include <sof/lib...
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward d...
// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (C) 2018 Synopsys, Inc. All rights reserved. */ #include <common.h> #include <cpu_func.h> #include <init.h> #include <malloc.h> #include <dwmmc.h> #include <asm/global_data.h> #include <linux/bitops.h> #include <linux/libfdt.h> #include <fdtdec.h> #include <asm/ar...
/* * Copyright (c) Bridgetek Pte Ltd * * THIS SOFTWARE IS PROVIDED BY BRIDGETEK PTE LTD "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * BRIDGETEK PTE LTD BE LIABLE F...
#include "fasta_input.h" #include <core/system/memory.h> #include <core/system/debugger.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #define MEMORY_FASTA 0x480002a5 void core_fasta_input_init(struct biosal_input_format *self); void core_fasta_input_destroy(struct biosal_input_format *self); uint64...
/* * Simple Programming Examples And References * Copyright (C) 2011 <NAME> <<EMAIL>>. * * @SYZDEK_BSD_LICENSE_START@ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source...
#include <stdio.h> #include <stdlib.h> typedef struct BaseNode { int value; struct BaseNode *left; struct BaseNode *right; struct BaseNode *parent; } BaseNode; typedef struct tree { struct BaseNode *root; int count; } Tree; typedef struct listBaseNode { BaseNode *ptr_node_tree; struct listBaseNode *next; }Lis...
/* * Phoenix-RTOS --- networking stack * * Packet buffer handling * * Copyright 2017 Phoenix Systems * Author: <NAME> * * %LICENSE% */ #include "physmmap.h" #include "pktmem.h" #include "lwip/mem.h" #include "lwip/pbuf.h" #include "lwip/sys.h" #include <stdio.h> #include <string.h> #define CACHE_LINE_SIZE 6...