text
stringlengths
3.08k
10.5k
#include <stdio.h> #include <string.h> #include <errno.h> #include <sys/socket.h> #include <resolv.h> #include <stdlib.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> #include <openssl/ssl.h> #include <openssl/err.h> #define MAXBUF 1024 int port = 8000; char *addr = "127.0.0.1"; void ShowCerts(...
/* * Copyright 2015 Big Switch Networks, Inc * Copyright 2017 Google Inc. * Copyright 2017-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/l...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <time.h> #define OPTION(s) strcmp(argv[i],s) == 0 char *getpath(char *path) { char *p = path + strlen(path); for(;p!=path&&*p!='/'&&*p!='\\';p--); p++; *p=0; return path; } char *getpure(char *path) { char *p = path + strlen(...
/*----------------------------------------------------------------------------*/ /* Xymon RRD handler module. */ /* */ /* Copyright (C) 2004-2011 <NAME> <<EMAIL>> */ /* ...
/* Code to control 3 stepper motors on an DE10-Lite FPGA */ #include "stdio.h" #include "system.h" #include "altera_avalon_pio_regs.h" #include "unistd.h" #define MOTOR SAIDA_C_BASE #define SENSORES ENTRADA_C_BASE #define saida(porta,valor) IOWR(porta, 0, valor) #define entrada(porta) IORD(porta, 0) #define dela...
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* * Copyright (c) 2004-2017 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2015 Research Organization for Information Scien...
#define sidEngine {0x02, 0x03} static CODECONST(BYTE ) rgbSidEngine[] = sidEngine; typedef struct { OBJID objidParent; const CHAR *szName; OBJID objid; OBJTYP objtyp; } SYSOBJECTDEF; static CODECONST(SYSOBJECTDEF) rgsysobjdef[] = { { objidRoot, szTcObject, objidTblCont...
#include "rl_net.h" // Keil.MDK-Pro Dual Stack::Network:CORE #if !defined(SOCKET_ERROR) /** error in socket operation */ #define SOCKET_ERROR -1 #endif #define INVALID_SOCKET SOCKET_ERROR //#include <sys/socket.h> //#include <sys/param.h> //#include <sys/time.h> //#include <netinet/in.h> //#inc...
#include <common.h> #include <stdarg.h> #include <pspsdk.h> #include <pspkernel.h> #include <pspthreadman.h> #include <pspintrman.h> #include <psploadexec.h> #include <psprtc.h> // Keep track of the last thread we saw here. static volatile int schedulingPlacement = 0; // So we can log the result from the thread. stat...
//------------------------------------------------------------------------------ // events-sapp.c //------------------------------------------------------------------------------ #include "sokol_gfx.h" #include "sokol_app.h" #include <stdio.h> // printf static sg_pass_action pass_action = { .colors[0] = { .actio...
/* SPDX-License-Identifier: GPL-2.0 */ static const char *__doc__ = "XDP loader\n" " - Allows selecting BPF section --progsec name to XDP-attach to --dev\n"; #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <getopt.h> #include <locale.h> #include <unistd.h> #include <time.h> #i...
#include <stdio.h> #include <string.h> #include <readline/readline.h> #include <readline/history.h> #include <stdlib.h> #include <ctype.h> #include <unistd.h> #include <sys/wait.h> const int MAX_PROCS = 100; /* Borrowed from https://stackoverflow.com/questions/122616/how-do-i-trim-leading-trailing-whitespace-in-a-st...
#include "types.h" #include "stat.h" #include "user.h" #include "fcntl.h" #include "benny_thread.h" #ifdef KTHREADS #ifndef TRUE # define TRUE 1 #endif // TRUE #ifndef FALSE # define FALSE 0 #endif // FALSE // I have run with 10 threads, but not more #define MAX_THREADS 10 // if you go much higher than this, it cau...
/* OpenSSL client Example This example code is in the Public Domain (or CC0 licensed, at your option.) Unless required by applicable law or agreed to in writing, this software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ #include "openssl...
/*************************************************************************** * __________ __ ___. * Open \______ \ ____ ____ | | _\_ |__ _______ ___ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / * Jukebox | | ( <_> ) \___| < | \_\ ( <_> ...
/* Copyright (C) 2008-2011 <NAME>. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of version 2.1 of the GNU Lesser General Public License as published by the Free Software Foundation. This program is distributed in the hope that it would be use...
/** ****************************************************************************** * @file accelerometer.c * @author <NAME>, <NAME>, <NAME> * @version 1.0.0 * @date February-2016 * @brief Accelerometer initialazation and control **********************************************************************...
/* SDLTRS version Copyright (c): 2006, <NAME> */ /* 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 fol...
#include "DominoData.h" void salvarArquivo(tipo_jogo *domino, tipo_peca jogador1[], tipo_peca jogador2[], tipo_mesa *tabuleiro, tipo_peca monte[], tipo_arquivo arqSalvo[]){ int n; printf("\nDigite em que espaco da memoria voce quer salvar esse arquivo: "); scanf("%d", &n); while(n <= 0 || n > 5){ ...
// initialize section #include "types.h" #include "param.h" #include "arm.h" #include "mmu.h" #include "defs.h" #include "memlayout.h" void _uart_putc(int c) { volatile uint8 * uart0 = (uint8*)UART0; *uart0 = c; } void _puts (char *s) { while (*s != '\0') { _uart_putc(*s); s++; } } v...
#include <stdint.h> #include "terminal.h" #include "terminal_menu.h" #include "settings.h" typedef void (*on_exit_t)(void); typedef void (*on_entry_t)(void); typedef void (*act_t)(event_t); typedef struct { on_entry_t on_entry; on_exit_t on_exit; act_t act; } menu_t; void settings_act(event_t e); void ...
/** * @file usb.h * @brief Common USB (usb:*) service IPC header. * @author SciresM, yellows8 * @copyright libnx Authors */ #pragma once #include "../types.h" #include "../services/sm.h" #include "../kernel/event.h" /// Names starting with "libusb" were changed to "usb" to avoid collision with actual libusb if it...
/* $OpenBSD: gethostnamadr.c,v 1.13 2015/09/14 07:38:37 guenther Exp $ */ /* * Copyright (c) 2012,2013 <NAME> <<EMAIL>> * * 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 ap...
/* $OpenBSD: mmu.c,v 1.3 2010/07/06 20:41:06 miod Exp $ */ /* $NetBSD: mmu.c,v 1.8 2008/04/28 20:23:36 martin Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by <NAME>. * * Redistribution and use i...
/* * An IPv4-only reimplementation of getnameinfo(), getaddrinfo(), * freeaddrinfo() and inet_pton() for old IP stacks. * IPv6-enabled stacks don't need this, so we assume we have IPv4 everywhere. * * Jedi <j at pureftpd dot org> * <NAME> <matthias.andree at stud.uni-dortmund.de> */ #include <config.h> #incl...
#include <assert.h> #include <mrsh/arithm.h> #include <mrsh/ast.h> #include <stdlib.h> void mrsh_arithm_expr_destroy(struct mrsh_arithm_expr *expr) { if (expr == NULL) { return; } switch (expr->type) { case MRSH_ARITHM_LITERAL:; struct mrsh_arithm_literal *al = mrsh_arithm_expr_get_literal(expr); free(al); ...
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <ctype.h> #include <string.h> #include <pthread.h> #include <semaphore.h> #include <signal.h> #include "defs.h" #define BUFFER 255 struct museum_ds { int id; int visitor; int status; //0 for open, 1 for closed }; void lowercase(char* str){ for...
/*- * VARNISH HIVE * ______ * / \ * \______/ * /\ ____ /\ * \ \ \ / / / * \ \ \/ / / * \_\ /_/ * * Copyright (c) 2017 vente-privee * All rights reserved. * * Authors: <NAME> <<EMAIL>> * <NAME> <<EMAIL>> * * Redistribution and use in source and binary forms, with or...
/* * Copyright 2010 <NAME> * * This file is part of Project Ubertooth. * * 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, or (at your option) * any later version. * * ...
int Sysco_PostIrq(int nr); void Sysco_UnPostIrq(int nr); void NS9750_TimerInit(const char *name); #define SYS_AHB_GCFG (0xA0900000) #define SYS_AHB_BRC0 (0xA0900004) #define SYS_AHB_BRC1 (0xA0900008) #define SYS_AHB_BRC2 (0xA090000c) #define SYS_AHB_BRC3 (0xA0900010) /* Table 49 on Page 125 */ #define AHB_MASTER_ARM...
#include <string.h> #include <stdlib.h> #include <stdio.h> #ifdef NGRAM_CASE_INSENSITIVE #include <ctype.h> #define eq(x, y) (tolower(x) == tolower(y)) #else #define eq(x, y) ((x) == (y)) #endif #ifndef max #define max( a, b ) ( ((a) > (b)) ? (a) : (b) ) #endif #ifndef min #define min( a, b ) ( ((a) < (b)) ...
/** * Copyright (c) 2017 <NAME> SAS * Copyright (c) 2017 <NAME> * * 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 cond...
/** ********************************************************************************* * SPDX-License-Identifier: Apache-2.0 * * @file wss_svr.c * @brief Heart rate service definition * @version V1.0 * @author yuzrain * *****************************************************************************...
/* * This is a RANDOMLY GENERATED PROGRAM. * * Generator: csmith 2.0.0 * svn version: exported * Options: --check-global -s 1014 * Seed: 1014 */ #include "random_runtime.h" long __undefined; /* --- Struct/Union Declarations --- */ /* --- GLOBAL VARIABLES --- */ int32_t g_2 = 0xF1124F01L; int32_t g_4 =...
/* plugin_section_reorder.c -- Simple plugin to reorder function sections Copyright (C) 2011-2021 Free Software Foundation, Inc. Written by <NAME> <<EMAIL>>. This file is part of gold. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Lic...
/* * Copyright (©) 2015 <NAME>, <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 ...
#pragma ident "$Id: glob.c,v 1.8 2007/10/05 19:35:46 dechavez Exp $" /*====================================================================== * * Read the global initialization file. This is expected to be called * early in the application while still in the foreground. If anything * goes wrong, then the routine ...
/** * @file ultrasonicmm.c * * ESP-IDF driver for ultrasonic range meters, e.g. HC-SR04, HY-SRF05 and the like * * Ported from esp-open-rtos * * Copyright (C) 2016, 2018 <NAME> <<EMAIL>> * * BSD Licensed as described in the file LICENSE * * Adapted to take multiple measure and take temperature into account. ...
/* socketpair.c Copyright 2007, 2010 by <NAME> <<EMAIL>> 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 followin...
#include <sys/types.h> #include <sys/times.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <signal.h> #include "../records/record.h" #include "../defines.h" void heapsort(recordPtr *, long, int); // Heap Sort Algorithm void heapify(recordPtr *, long, long, int); // Heapify A...
#include <stdlib.h> #include <stdint.h> #include <stdbool.h> #define ANGLE_360_DEGREES 4096 #define ANGLE_300_DEGREES ( 5 * ANGLE_360_DEGREES / 6 ) #define ANGLE_240_DEGREES ( 2 * ANGLE_360_DEGREES / 3 ) #define ANGLE_180_DEGREES ( ANGLE_360_DEGREES / 2 ) #define ANGLE_120_DEGREES ( ANGLE...
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Fluent Bit * ========== * Copyright (C) 2019 The Fluent Bit Authors * Copyright (C) 2015-2018 Treasure Data Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in co...
/* hmac-openssl.c * * Copyright (c) 2019 Apple Computer, Inc. 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 ...
/* Tomato Firmware Copyright (C) 2006-2009 <NAME> */ #include "rc.h" #include <arpa/inet.h> static const char tcpudp[2][4] = {"tcp", "udp"}; void ipt_forward(ipt_table_t table) { char *nv, *nvp, *b; const char *proto, *saddr, *xports, *iport, *iaddr; const char *c; const char *mdport; int i; char ip[64];...
/* * Copyright (c) 2007, 2008 University of Tsukuba * 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 ...
/* ** Copyright 2014-2016 The Earlham Institute ** ** 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...
/* * ===================================================================================== * * Filename: autls.c * * Description: * * Version: 1.0 * Created: 04/20/18 10:37:21 * Revision: none * Compiler: gcc * * Author: xiaominfc (xiaoyang) * Eamil: <EMAIL> * Organization: 武汉...
// ---------------------------------------------------------------------------- // ATMEL Crypto-Devices Software Support - Colorado Springs, CO - // ---------------------------------------------------------------------------- // DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR // IMP...
/**** COMMON; common.c, (include to include all of common-c) Copyright (C) 2015, 2016, 2017, 2018 <NAME> This file is a part of Commoner 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...
#include<sys/util.h> #include<sys/defs.h> #include<sys/sbunix.h> #include<sys/paging.h> #include<sys/process.h> extern process* current_running_process; void memset(char* address, uint64_t size, uint64_t value){ char *ptr = (char*)(address); int i =0; for(i=0;i<size;i++){ *ptr = value; ptr++; } } void memcpy(...
/* EmbeddedGUI Library version 0.4.2 Copyright (C) 2009 <NAME> This program 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 3 of the License, or (at your opti...
#include <math.h> #include <string.h> double longBitsToDoubleC(long x); long doubleToRawLongBits(double x); double snippet (double x ) { double retval = 0; double x_org=0; double x2 =0; int md_b_sign=0; int xexp=0; int sign=0; int md_b_m1=0; int md_b_m2=0; int IEEE_MAX =...
/* <NAME> | ITU Computer Engineering Assignment 3 | Deciding the outcome of an election. */ #include <stdio.h> #include <stdlib.h> typedef struct candidate { char letter; int votes; float percent; } CANDIDATE; typedef struct district { int votes_A; int votes_B; int votes_C; int votes_D; ...
// Load-balancing broker // Clients and workers are shown here in-process #include "zhelpers.h" #include <pthread.h> #define NBR_CLIENTS 10 #define NBR_WORKERS 3 // Dequeue operation for queue implemented as array of anything #define DEQUEUE(q) memmove (&(q)[0], &(q)[1], sizeof (q) - sizeof (q [0])) // Basic req...
/* * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * * * 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 noti...
/* -*- linux-c -*- * * (C) Copyright IBM Corp. 2005-2006 * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This * file and program are licensed under a BSD style license...
// ex: set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <libgen.h> #include <sys/stat.h> #include "ug_index.h" #include "ug_gzip.h" #include "zlib.h" int build_index(char *, char *, char *); /* target_offset is the offset in the uncompressed str...
#include <math.h> #include "sdl_system.h" #include "screen.h" #define WAV_FILE "sound/316852__kwahmah-02__1khz-30-seconds.wav" SDL_Scancode hex_key_scancode_map[] = { SDL_SCANCODE_N, // 0x0, SDL_SCANCODE_5, // 0x1 SDL_SCANCODE_6, // 0x2 SDL_SCANCODE_7, // 0x3 SDL_SCANCODE_T, // 0x4 SDL_SCANCOD...
#include "print.h" #include "wolf3d.h" #include "ray_cast.h" input_t input_g; window_t window_g; wolf3d_data_t data_g; void check_collision(float new_x, float new_y) { vec2f_t new_pos = { .x = data_g.player.pos.x + new_x, .y = data_g.player.pos.y + new_y }; if (!data_g.map.data[(int32_t)data_g.pla...
/*------------------------------------------------------------------------- * * varsup.c * postgres OID & XID variables support routines * * Copyright (c) 2000, PostgreSQL Global Development Group * * IDENTIFICATION * $Header: /home/hjcvs/OB-CCM-1.0/postgresql/src/backend/access/transam/varsup.c,v 1.2 2004/...
/**************************************************************************** * * Copyright 2016 Samsung Electronics 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...
#include "emulator_struct.h" #include "libEmu/emulator.h" #include "libEmu/regression.h" #include "libEmu/emulate-fns.h" #include <gsl/gsl_linalg.h> #include <gsl/gsl_blas.h> /********************************************************************* Allocates emulator_struct. * * ccs, should be thread safe now ***********...
#include <stdio.h> #include <string.h> #include <pthread.h> #include <unistd.h> #include <errno.h> #include <sys/stat.h> #include "config.h" #include "scan.h" #include "hwmalloc.h" #include "worker.h" #include "log.h" #include "util.h" #ifdef _WIN32 #define rindex(x, y) strchr(x, y) #endif /** * Add a filename to the...
/*- * Copyright (c) 1988, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 2002 Networks Associates Technology, Inc. * All rights reserved. * * Portions of this software were developed for the FreeBSD Project by * ThinkSec AS and NAI Labs, the Security Research Divi...
/* mpn_brootinv, compute r such that r^k * y = 1 (mod 2^b). Contributed to the GNU project by <NAME> (as part of perfpow.c). Copyright 2009, 2010, 2012, 2013, 2018 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify it...
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> //BUFFER utilizado na funcao readLine #define BUFFER 4096 //enum BOOL, para realizar operações booleanas de TRUE ou FALSE typedef enum{ FALSE, TRUE }BOOL; //struct Repetidos, contém as informações dos números repetidos typedef struct{ i...
/* * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * Copyright (C) 2005-2014, <NAME> <<EMAIL>> * * Version: MPL 1.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the Lic...
/* * This file is part of VL53L1 Platform * * Copyright (c) 2016, STMicroelectronics - All Rights Reserved * * License terms: BSD 3-clause "New" or "Revised" License. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following condit...
#include "geef.h" #include "repository.h" #include "object.h" #include "oid.h" #include <zlib.h> #include <string.h> #include <git2.h> void geef_object_free(ErlNifEnv *env, void *cd) { geef_object *obj = (geef_object *) cd; enif_release_resource(obj->repo); git_object_free(obj->obj); } ERL_NIF_TERM geef_object_typ...
/* Copyright (c) 2005-2008, <NAME> 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 and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WI...
/* * 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...
/* * W25Q16DV_unit_tests.c * * Created on: Feb 8, 2020 * Author: <NAME> */ #include "W25Q16DV_unit_tests.h" Display_Handle debug; char row[55]; void dump(uint8_t* addr, uint32_t len){ Display_clear(debug); Display_doClear(debug); Display_printf(debug, 0, 0, "test3"); int ...
#include <stdio.h> #include <stdlib.h> // Structure of a linked list node struct node { int info; struct node* next; }; // Pointer to last node in the list struct node* last = NULL; // Function to insert a node in the // starting of the list void insertAtFront() { // Stores the number to be inserted int data; ...
/** * @file encode.c * @brief Encode raw frames to video. * @author <NAME> <<EMAIL>> * @date March 18, 2015 * @bug No known bugs. */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <unistd.h> #include <libswscale/swscale.h> #include <libavutil/mem.h> #includ...
/* * Copyright 2019 Arcus Project * * 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 ...
/** * Assignment 025 - Miltao's Show * * 'Miltao's Show' is a game where the users choose a * math question and try to answer it correctly. The * game ends when the user types "FIM" or fails to answer * a question. * * The program reads from stdin the questions to be * registered until it finds the string "FIM...
#include <stdio.h> #include <FindSurface.h> #include "pointcloud.h" static void runCTest(); int main(int argc, const char* argv[]) { runCTest(); return 0; } static void runTest(FIND_SURFACE_CONTEXT fs_ctx, FS_FEATURE_TYPE type, unsigned int seed_index, float seed_radius); void runCTest() { c...
// SPDX-License-Identifier: GPL-2.0+ or BSD-3-Clause /* * Copyright (C) 2013 <NAME> <<EMAIL>> * Copyright (C) 2021 Microchip */ #include <io.h> #include <kernel/delay.h> #include <kernel/panic.h> #include <mm/core_memprot.h> #include <types_ext.h> #include "at91_clk.h" #define PERIPHERAL_ID_MIN 2 #define PERIPH...
/* * E/STACK - UNIX port * * Author: <NAME> * Date: 18/12/2017 * Email: <EMAIL> */ #include <lwiot_arch.h> #define _GNU_SOURCE #include <stdlib.h> #include <string.h> #include <stdint.h> #include <time.h> #include <assert.h> #include <lwiot.h> #include <unistd.h> #include <pthread.h> #incl...
/** * Behavior for bhvCoffinSpawner and bhvCoffin. * The coffins are spawned by a singular spawner, * with half being able to stand up. * Coffins unload after leaving the room. */ /** * Struct with s16 values for a horizontal position. */ struct LateralPosition { s16 x; s16 z; }; /** * Array of positi...
/* * Copyright (c) 2018 ZenDIY * 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 * * Unless required by appl...
/* * Copyright (c) 2008 <NAME>. <<EMAIL>> * * Based on testcases/kernel/syscalls/waitpid/waitpid01.c * Original copyright message: * * Copyright (c) International Business Machines Corp., 2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU...
/* * Copyright (c) 2013-2016, Yanzi Networks AB. * 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 ...
#include <art32/numbers.h> #include <driver/ledc.h> #include <freertos/FreeRTOS.h> #include <freertos/task.h> #include <naos.h> #include "srv.h" #define SRV_1 GPIO_NUM_15 #define SRV_2 GPIO_NUM_5 #define SRV_3 GPIO_NUM_26 #define SRV_4 GPIO_NUM_25 #define SRV_5 GPIO_NUM_33 #define SRV_6 GPIO_NUM_32 static bool srv_a...
#include "pebble.h" #define SOFA_MENU_SECTIONS 1 #define SOFA_MENU_ITEMS 5 #define POSITION_MENU_SECTIONS 1 #define POSITION_MENU_ITEMS 3 static Window *window; static Window *position_window; // This is a simple menu layer static SimpleMenuLayer *sofa_menu_layer; static SimpleMenuLayer *position_menu_layer; // A...
// SPDX-License-Identifier: GPL-2.0-only /* * TI keystone reboot driver * * Copyright (C) 2014 Texas Instruments Incorporated. http://www.ti.com/ * * Author: <NAME> <<EMAIL>> */ #include <linux/io.h> #include <linux/module.h> #include <linux/notifier.h> #include <linux/reboot.h> #include <linux/regmap.h> #includ...
/* * ac_monitor: Watch AC adapter and beep if disconnected * Copyright (C) by <NAME> <<EMAIL>> */ #include <fcntl.h> #include <getopt.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <time.h> #include <errno.h> #include <dirent.h> #include <sys/ioctl.h> ...
#include <string.h> #include <mpi.h> #include "ScaleME.h" #include "precision.h" #include "mlfma.h" #include "itsolver.h" #include "measure.h" #include "frechet.h" /* Computes a contribution to the Frechet derivative for one transmitter. */ int frechet (cplx *crt, cplx *fld, cplx *sol, measdesc *obs, solveparm *...
#include <assert.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <sys/wait.h> #include <xcb/xcb.h> #include <xcb/xcb_ewmh.h> #include <xcb/xcb_icccm.h> #include <xcb/screensaver.h> #define SHELL "/bin/sh" xcb_connection_t* dis; xcb_window_t root; xcb_ewmh_connection_t* ewmh; char screensaverFir...
/* test-xdpms.c --- playing with the XDPMS extension. * xscreensaver, Copyright (c) 1998-2011 <NAME> <<EMAIL>> * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copi...
/** * \file * * \brief Display demo widget application * * Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries. * * \asf_license_start * * \page License * * Subject to your compliance with these terms, you may use Microchip * software and any derivatives exclusively with Microchip product...
#ifdef _WIN32 #define _CRT_SECURE_NO_WARNINGS #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #include "heat.h" #define OK (0) #define NOT_OK (1) int initialize_arrays (HeatModel *self); void heat_from_input_file (HeatModel **heat, const char * filename) { HeatModel * self = NULL; if (*hea...
/***************************************************************************** * @file main.c * @brief Main program body ******************************************************************************* Copyright 2020 GL-iNet. https://www.gl-inet.com/ Licensed under the Apache License, Version 2.0 (the "License");...
/* * Copyright (c) 2019 Trail of Bits, Inc. * * 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 o...
/* FUSE: Filesystem in Userspace Copyright (C) 2001-2007 <NAME> <<EMAIL>> This program can be distributed under the terms of the GNU LGPLv2. See the file COPYING.LIB. */ #include "fuse_i.h" #include "fuse_kernel.h" #include "fuse_lowlevel.h" #include "fuse_misc.h" #include <errno.h> #include <semaphore.h> #...
/* * windows_util.c * * Copyright (c) 2017 Juniper Networks, Inc. All rights reserved. */ #include <assert.h> #include <strsafe.h> #include <stdbool.h> #include <netinet/ether.h> #include <vr_defs.h> #include <vr_mem.h> #include <nl_util.h> #include <windows_shmem_ioctl.h> #define ETHER_ADDR_STR_LEN (ETHER_ADDR_L...
#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...
/** * \file * * \brief I2C Master Quick Start Guide with Callbacks for SAMB * * Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries. * * \asf_license_start * * \page License * * Subject to your compliance with these terms, you may use Microchip * software and any derivatives exclusively w...
#include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "net_stats.h" /* The udp rx queue size is reported in multiples of some kernel-internal * buffer. We want the number of packets queued, which is presumably the * number of buffers. However, if we ever see a rx queue value that is...
/* * perf events self profiling example test case for hw breakpoints. * * This tests perf PERF_TYPE_BREAKPOINT parameters * 1) tests all variants of the break on read/write flags * 2) tests exclude_user == 0 and 1 * 3) test array matches (if DAWR is supported)) * 4) test different numbers of breakpoints matches ...