text
stringlengths
3.08k
10.5k
// implement fork from user space #include <inc/string.h> #include <inc/lib.h> // PTE_COW marks copy-on-write page table entries. // It is one of the bits explicitly allocated to user processes (PTE_AVAIL). #define PTE_COW 0x800 extern void _pgfault_upcall(void); // // Custom page fault handler - if faulting page is...
// 2014 - 2015 /*! \file system.c \brief Contains functions that are needed to configure the whole system/ device. \references [1] dsPIC Family Reference Manual, Section 24. Device Configuration - dsPIC30F FRM, doc no.DS70071D, Microchip (r), http://ww1.microchip.com/downloads/en/DeviceDoc...
// clang -o runner runner.c #include <stdlib.h> #include <stdio.h> #include <string.h> #include <dlfcn.h> #include <signal.h> #include <unistd.h> #include <spawn.h> #include <sys/wait.h> #include <mach/mach_init.h> #include <mach/vm_map.h> #include <mach/vm_page_size.h> #define page_align(addr) (vm_address_t)((uint...
/* * wc_db_util.c : Various util functions for wc_db(_pdh) * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional info...
/*- * BSD LICENSE * * Copyright(c) 2016 Intel Corporation. All rights reserved. * 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 mus...
/** * Copyright (C) 2013 Netronome Systems, Inc. All rights reserved. * * @file run.c * @brief Example code for packet egress, interactiving with the simulator * */ #include <errno.h> #include <fcntl.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #incl...
#include <pebble.h> #include "clock_area.h" #include "messaging.h" #include "settings.h" #include "weather.h" #include "sidebar.h" #include "util.h" // windows and layers static Window* mainWindow; static Layer* windowLayer; // current bluetooth state static bool isPhoneConnected; // current time service subscriptio...
// // peg_brute.c // PegasusEar // // Created by <NAME> on 11/5/2020. // #include <stdio.h> #include <stddef.h> #include <stdint.h> #include <stdbool.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #include <inttypes.h> #include "common/macros.h" #include "common/dynamic_string.h" ...
/****************************************************************************** * @file LIDAR_Lite_v3HP.c * @author MCD Application Team * @version V1.1.2 * @date 30-Novermber-2018 * @brief manages the sensors on the application *********************************************************************...
/** @example example_TI_Fee_Write_Read.c * This is an example which descibes the steps to use TI-Fee Driver for simple Write Sync, Write Async, * Read, Invalidate and Full Format of EEPROM bank. * * @b Step @b 1: * * Create a new project. * * Navigate: -> File -> New -> Project -> TMS570xx / RMx * *...
/* Copyright (c) <NAME>, 2017. */ /* All rights reserved. */ /*********************** self documentation **********************/ /************************************************************************* SDFT - sliding discrete fourier transform SDFT_init initialise a SDFT transformer handle SDFT ...
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <time.h> #include "colors.h" #include "doubledouble.h" double get_time() { struct timespec ts; clock_gettime(CLOCK_REALTIME, &ts); return ts.tv_sec * 1000.0 + ts.tv_nsec / 1000000.0; } int main(int argc, char **argv) { ...
/**************************************************************************** * arch/arm/src/tms570/tms570_timerisr.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyr...
#include "tests/lib.h" #include <random.h> #include <stdarg.h> #include <stdio.h> #include <string.h> #include <syscall.h> const char* test_name; bool quiet = false; static void vmsg(const char* format, va_list args, const char* suffix) { /* We go to some trouble to stuff the entire message into a single buffe...
#include<stdio.h> #include<stdlib.h> #include<string.h> #define TRUE 1 #define FALSE 0 #define OK 2 #define ERROR 3 #define INFEASIBLE -1 #define OVERFLOW -2 #define LIST_INITIAL_SIZE 2 #define LIST_INCREMENT 2 typedef int Status; typedef int ElemType; typedef struct { ElemType* elem; int length; int listsize; }S...
#include "ir.h" #include "rgb.h" /* TX is on Port A 0 = IR 1 1 = IR 2 2 = IR 3 3 = IR 4 4 = IR 5 5 = IR 6 RX is on Port F 7 = IR 1 6 = IR 2 5 = IR 3 4 = IR 4 3 = IR 5 2 = IR 6 */ #define IRZERO 3 #define IRONE 6 #define IRZEROOFF 6 #define IRONEOFF 3 #define IRRESET 15 #define IRRESETOF...
/* * Copyright (C) 2009-2012 by <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 followi...
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause /* * Copyright (C) 2012-2014, 2020 Intel Corporation * Copyright (C) 2016 Intel Deutschland GmbH */ #include <net/mac80211.h> #include "fw-api.h" #include "mvm.h" struct iwl_mvm_iface_iterator_data { struct ieee80211_vif *ignore_vif; int idx; struct iwl_mvm_ph...
#include <stdio.h> #include <unistd.h> #include <fcntl.h> #include <string.h> #include <stdlib.h> #include <stdint.h> #include <limits.h> #include <sys/mman.h> typedef unsigned char __u8; typedef unsigned short int __u16; typedef unsigned int __u32; struct slot_entry { __u8 bus; __u8 device; __u8 inta_link; ...
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <windows.h> #include <string.h> #include <mmsystem.h> #include "iGraphics.h" #define PI acos(-1.0) #define window_width 1280 #define window_height 720 #define bottom_margin 50 #define total_bricks 105 #define BrickLength 65 #define BrickHeight 25 #define...
/* vim: set et fdm=syntax sts=4 sw=4 ts=4 : */ /** * Copyright © 2010 <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 code must retain the...
/* This file is part of GNUnet. Copyright (C) 2011-2016 GNUnet e.V. GNUnet 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, or (at your option) any later version. ...
/* Copyright ©2007-2010 <NAME> <maglione.k at Gmail> * Copyright ©2004-2006 <NAME> <<EMAIL>> * See LICENSE file for license details. */ #include <errno.h> #include <netdb.h> #include <netinet/in.h> #include <signal.h> #include <string.h> #include <stdlib.h> #include <stdio.h> #include <sys/types.h> #include <sys/sta...
/*************************************************************************** * Copyright (C) 2004, 2006 Symbian Software Ltd. * * All rights reserved. * * Copyright (C) 2007, 2008 <NAME>, <EMAIL> * * All rights reserved....
// Copyright 2019 Tricot Inc. // Use of this source code is governed by the license in the LICENSE file. // Loop events example. #include <string.h> #include "esp_log.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "xsp_eventfd.h" #include "xsp_loop.h" #include "xsp_loop_events.h" static cons...
#include <assert.h> #include <limits.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <dirent.h> #include <fcntl.h> #include <sys/errno.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include "hashtable.h" #include "logger.h" #include "shader.h" char *sh...
#include <stdio.h> #include <stdarg.h> #include <gmp.h> #define TRUE 1 #define FALSE 0 typedef struct mk { mpz_t m; unsigned long int k; } mk_t; /* Function prototypes (Miller-Rabin) */ mk_t get_mk (mpz_t); int millerrabin (mpz_t); int mrcore (mpz_t, mpz_t, unsigned long int, unsigned long int, mpz_t, mpz_t, ...
#include "allelefreq.h" #include <math.h> #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <gsl/gsl_sf_psi.h> #include <gsl/gsl_errno.h> void P_update_simple(const uint8_t* G, const double* zetabeta, const double* zetagamma, const double* xi, const double* beta, const double* gamma, double* var_bet...
/* * ULCB board CPLD access support * * Copyright (C) 2017 Renesas Electronics Corporation * Copyright (C) 2017 Cogent Embedded, Inc. * * SPDX-License-Identifier: GPL-2.0+ */ #include <common.h> #include <spi.h> #include <asm/io.h> #include <asm/gpio.h> #define SCLK (192 + 8) /* GPIO6 8 */ #define SSTBZ (6...
/* circuit.c: DECnet circuit ------------------------------------------------------------------------------ Copyright (c) 2012, <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 ...
/* Copyright (c) 2012-2015, The Saffire Group 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 conditi...
/* * MIT License * * Copyright (c) 2020 dead-end * * 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,...
/* MIT License * * Copyright (c) 2019 <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...
/* * audio.c * * Test standard Amiga audio hardware. * * Written & released by <NAME> <<EMAIL>> * * This is free and unencumbered software released into the public domain. * See the file COPYING for more details, or visit <http://unlicense.org>. */ #include "testkit.h" #include "ptplayer/wrapper.c" extern...
/*===================================================================== ======= COPYRIGHT NOTICE ======= Copyright (C) 1996, Carnegie Mellon University, Cambridge University, <NAME> and <NAME>. All rights reserved. This software is made available for research purposes only. It may be redistribut...
#include "removefile.h" #include <assert.h> #include <errno.h> #include <stdio.h> #include <fcntl.h> #include <pthread.h> #include <unistd.h> static struct timeval tv; static void start_timer(const char* str) { fprintf(stderr, "%s... ", str); assert(gettimeofday(&tv, NULL) == 0); } static void stop_timer() { struc...
#include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <unistd.h> #include <pigpio.h> /* 2014-08-20 gcc -o freq_count_1 freq_count_1.c -lpigpio -lpthread $ sudo ./freq_count_1 4 7 8 This program uses the gpioSetAlertFunc function to request a callback (the same one) for each gpio to be monitored. EXA...
// Reduced Offset LZ #include <assert.h> #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include "comp.h" #define MAX_LIT_RUN 128 // implied 1 #define MIN_MATCH_LEN 2 #define MAX_MATCH_LEN (255 + 7 + MIN_MATCH_LEN) #define HASH_BITS 16 #define HASH_SIZE (1 << HASH_BITS) #define HA...
/*********************************************************************** ** ** REBOL [R3] Language Interpreter and Run-time Environment ** Copyright 2012 REBOL Technologies ** REBOL is a trademark of REBOL Technologies ** Licensed under the Apache License, Version 2.0 ** This is a code-generated file. ** *********...
/* Copyright (C) 2008 <NAME>. This file is part of the Kate codec library. Written by <NAME>. Use, distribution and reproduction of this library is governed by a BSD style source license included with this source in the file 'COPYING'. Please read these terms before distributing. */ #ifdef HAVE_CONFIG...
/** * $Author: bing.jian $ * $Date: 2008-11-06 15:45:11 -0500 (Thu, 06 Nov 2008) $ * $Revision: 98 $ */ #include <Python.h> /* Reference: Writing a C extension to NumPy http://numpy.scipy.org/numpydoc/numpy-13.html Note the location of arrayobject.h has been changed! See http://projects.scipy.org/pipermail/nu...
/* vstring.c - variable-length strings ncc, the new c compiler Copyright (c) 2021 <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: * Redistributions of source code mus...
/* calculate_start_values.c gcc calculate_start_values.c && ./a.out Calculate values of the look up table for fast_sqrt.c Copyright (c) 2021, <EMAIL> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1....
#include "main.h" static uint16_t wMaxPos = 0; static uint16_t wCurPos = 0; volatile uint16_t wPos = 0; uint8_t byRunning = 0; uint8_t byDirection = DIR_OPEN; uint8_t ModelN_Get_EndPos(void); void ModelN_Timer_Handler(void) { if(byRunning != 0) { if(byDirection == DIR_OPEN) { wPos++; } else...
/* * Copyright (C) 2020 Open Source Robotics Foundation * * 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...
#include <GL/glut.h> #include <stdio.h> #include <bmp.h> #include <uvc_cam_sdk.h> #define TEST_PIXEL_WIDTH (1280) #define TEST_PIXEL_HEIGHT (480) #define TEST_PIXEL_NUM (TEST_PIXEL_WIDTH*TEST_PIXEL_HEIGHT) GLubyte pixel_array[TEST_PIXEL_NUM*3]; GLint width=TEST_PIXEL_WIDTH,height=TEST_PIXEL_HEIGHT; float zoom_h_rat...
#include <stdio.h> #include "testFgets.c" #include "automate.c" int *traduction(char str[160]); int transition(int depart, char symbole);//revoir le modèle des transitions car je m'en sert pas... int parcoursAutomate(int etatInitial, int listeTransitions[5][5][5], char *argv[]); int isAcceptant(int numerosEtat); void...
/****************************************************************************** * qHttpd - http://www.qdecoder.org * * Copyright (c) 2008-2012 <NAME>. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions...
// Based on: https://medium.com/@padam.singh/an-event-driven-tcp-server-using-libuv-50cce9a473c0 #include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> #include <uv.h> const char http_reply[] = "HTTP/1.0 200 OK\r\n" "Date: Thu, 07 May 2020 12:49:30 GMT\r\n" "Connection: close\r\n" "Accep...
/* * Copyright (c) 2012-2013 Etnaviv Project * * 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...
/* =========================================================================== * Orange 0.1.0 * * Please refer to LICENSE for copyright information * * Orange: A hobby OS designed for studying OS development. * * Kernel: The main kernel * * File : alloc.c * Purpose : ker...
/* * Base58.h * * Created on: 03/10/2012 * Created by: <NAME> * Copyright (c) 2012 Bitcoin Project Team */ #include "Base58.h" #include "../BigInt/BigInt.h" #include <stdint.h> BigInt decodeBase58(char * str) { BigInt bi; bi.data = malloc(1); if (! bi.data) { bi.length = 0; return bi; } bi.data...
#include <stdio.h> #include <string.h> #include <pthread.h> #include <ctype.h> #include <stdlib.h> #include <unistd.h> #include <time.h> #include <semaphore.h> int N, P, C, X; // int N, P, C, X are amount of buffers, producer and consumer threads //amount of consumers and extra consumers int Consumer_N = ...
/***************************************************************************** *;++ * Name : $RCSfile: w32dll.h,v $ * Title : W32DLL.H * C Author : <NAME> * Created : 21/04/95 * * Copyright : 1995-2022 Imagination Technologies (c) * License : MIT * * Description : globals...
#ifndef lint static const char RCSid[] = "$Id: mtext.c,v 1.7 2011/08/16 18:09:53 greg Exp $"; #endif /* * Program to convert ascii file to metafile * * 6/4/85 * * cc mtext.c mfio.o syscalls.o misc.o */ #include <string.h> #include "meta.h" #include "plot.h" #define MAXLINE 1024 #define CWIDTH 250 ...
/* * Subor: proj1.c * Datum: 2013/11/07 * Autor: <NAME>, <EMAIL> * Projekt: 1. projekt IZP na FIT VUT * Popis: Program nacita vstup a spocita slova podla zadanych argumentov */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <limits.h> // Maximalna dlzka slova pre debug...
/* * tec_pcap.c * * Created on: 2017-9-16 * Author: root */ #include <time.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include "tec_pcap.h" #include "LRU_Cache.h" #include "tec_maria.h" struct ether_header { unsigned char ether_dhost[6]; //目的mac unsigned char ether_shost[6]; //源mac uns...
/* authored from 2015-2018 by <NAME> and <NAME> LICENSE: This software is dual-licensed to the public domain and under the following license: you are granted a perpetual, irrevocable license to copy, modify, publish and distribute this file as you see fit. */ #include <assert.h> #include <stdio.h> #incl...
/**************************************************************************** ** Copyright (C) 2020 MikroElektronika d.o.o. ** Contact: https://www.mikroe.com/contact ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and associated documentation files (the "Software"...
/****************************************************************************** * Copyright (C) 2017 Broadcom. The term "Broadcom" refers to Broadcom Limited * and/or its subsidiaries. * * This program is the proprietary software of Broadcom and/or its licensors, * and may only be used, duplicated, modified or...
/* $Id$ */ /* * Copyright (c) 2016 <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 appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE A...
//Initialize Timers unsigned long gpsTimer = millis(); unsigned long gpsInterval = 1L * 1000L; unsigned long ahrsTimer = millis(); unsigned long ahrsInterval = 1L * 100L; unsigned long heartbeatTimer_TX = millis(); unsigned long heartbeatTimer_RX = millis(); unsigned long heartbeatInterval_TX = 1.0L * 1000L; unsigned ...
/* * Copyright (c) 2003-2004, <NAME> <<EMAIL>> * * This source code is released for free distribution under the terms of the * GNU General Public License version 2 or (at your option) any later version. * * This module contains functions for generating tags for R language files. * R is a programming language ...
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /* Contains the PERDIF program that implements personalized diffusions for recommendations. Code by: <NAME> and <NAME> University of Minnesota 2019 */ //////////////////////////...
#include <stdlib.h> #include "General/Calc.h" #include "Thinner.h" static bool Thinner_IsFalseEnding(BinaryMap *map, Point possibleEnding); static bool thinner_IsRemovable(int i) { static bool isRemovable[256] = { 0 }; static bool init = false; if (!init) { for (uint32_t mask = 0; mask < 256; ++mask) { boo...
/******************************************************************************* Module for Microchip Graphics Library Company: Microchip Technology Inc. File Name: drv_gfx_tcon_bitbang.c Summary: This module initializes the SSD1289 Timing Controller (TCON) Module. ********************************...
#include<stdio.h> #include<stdlib.h> typedef struct { int subpartID; int cost_per_day; int duration; } subpart_data; typedef struct{ int predecessorID; int successorID; } dependency_info; void merge(subpart_data a[],int lower,int middle,int upper) { subpart_data b[100],c[100]; int i,j,k,h1,h2; h1=0; for(i=l...
#include <pololu/orangutan.h> /* * serial2: for the Orangutan SVP and Orangutan X2 controllers. * * This example listens for serial bytes transmitted via USB to the controller's * virtual COM port (USB_COMM). Whenever it receives a byte, it performs a * custom action. Whenever the user presses the ...
#include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <errno.h> #include <sys/ptrace.h> #include <linux/ptrace.h> #include <sys/user.h> #include <sys/types.h> #include <sys/wait.h> #include "read_note.h" #define CMP_OPCODE 0x3d #define CALL_OPCODE 0xe8 int modify_probe(pid_t cpid, unsigned long addr, b...
#include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <stdint.h> #include <err.h> #include <errno.h> #include <assert.h> #include <string.h> #include <sys/param.h> #include <poll.h> #include <regex.h> #include "glean.h" #include "array.h" #include "nextline.h" /* filter program: gln_index passes results...
int do_sellstock(string arg) { string str, tick; float amount, price; int player_money, total_money, total, player_stocks; object player; sscanf(arg, "%f %s", amount, tick); if (amount < 1.00) { return 0; } if (STOCK_D->is_stock(tick)) { price = STOCK_D->query_stock_price(tick); to...
/* Adapted to AMT by <NAME>, 2016 */ /* development of the original files: 1999 - 2004 <NAME> */ #include <stdlib.h> #include "mex.h" #include "math.h" typedef struct adaptloopstatevar { int loops; int nsigs; double *state; double corr; double mult; double limit; double minlvl; double *a1; dou...
#include "stars.h" #include "constants.h" #include <math.h> #include <stdio.h> #include <string.h> void gate_load_stars(ConstSpiceChar *table, ConstSpiceChar const *filter, SpiceInt *rows) { ConstSpiceChar *actual_filter = ""; if (filter != NULL) { actual_filter = filter; } SpiceInt query_len ...
#include <stdint.h> #include <string.h> #include "util.h" #include "base64url.h" /** * Maps base64url characters into their ascii equivalent. */ static uint8_t decoding_table[] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 0 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1...
/******************************************************************************/ /* Files to Include */ /******************************************************************************/ #ifdef __XC32 #include <xc.h> /* Defines special function registers...
/* * Copyright (c) 2021 HopeBayTech. * * This file is part of Tera. * See https://github.com/HopeBayMobile for further info. * * 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 * * ...
/* * If not stated otherwise in this file or this component's Licenses.txt file the * following copyright and licenses apply: * * Copyright 2015 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 obtain ...
/* * $Id: ntp.c,v 1.3 2004/02/20 18:53:49 mike Exp $ * * libnet 1.1 * Build an NTP Packet * * Copyright (c) 1998 - 2004 <NAME> <<EMAIL>> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * ar...
/* Definitions of target machine GNU compiler. IA-64/AIX version. Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by <NAME> (<EMAIL>) This file is part of GNU CC. GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License ...
#include <nautilus/nautilus.h> #include <nautilus/syscalls/decl.h> #include <nautilus/thread.h> #define SYSCALL_NAME "sys_clone" #include "impl_preamble.h" #define ARCH_SET_FS 0x1002 // These are copied directly from /usr/include/linux #define CSIGNAL 0x000000ff /* signal mask to be sent at exit */ #define CLONE...
/*- * Copyright (c) 1988, 1993 * The Regents of the University of California. 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 copy...
#include <string.h> #include <rbtree.h> static void rotate_node(struct rb_tree *tree, struct rb_node *node, enum rb_dir dir) { struct rb_node *parent = node->parent; struct rb_node *child = node->child[!dir]; if ((node->child[!dir] = node->child[dir])) { node->child[dir]->parent = node; } child->child[dir] ...
// // SENAC BCC PI 2 // Projeto Betelgeuse #include <stddef.h> #include <stdio.h> #include "finalScene.h" #include "creditsScene.h" #include "../engine/colors.h" //!!!TO-DO!!! READ RESULT AND DEFINE OUTCOME //-> If win: play win song and write win text. Else: play loss song and write loss text. static int bgAsset,...
/* Copyright (C) 1996-1997 Id Software, Inc. 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 th...
#include <sys/types.h> #include <sys/wait.h> #include <sys/stat.h> #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <errno.h> #include <unistd.h> #include <syslog.h> #include <string.h> #include <time.h> #include <signal.h> #include <wait.h> int mysignal = 1 ; void custom_signal_x(in...
#include "mgos.h" #include "led_master.h" typedef struct { uint8_t meteor_size; double meteor_trail_decay; bool meteor_random_decay; tools_rgb_data color; tools_rgb_data out_pix; } meteor_data; static meteor_data* md_pool = NULL; static tools_rgb_data color; static tools_rgb_data out_pix; static i...
#include "config.h" #define LOG_LEVEL LOG_LEVEL_INF #include <logging/log.h> LOG_MODULE_REGISTER(n2_comms); #include <zephyr.h> #include <device.h> #include <uart.h> #include <kernel.h> #include <sys/ring_buffer.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include "comms.h" #include "at_commands.h" ...
/****************************************************************************** * Copyright (c) 2014-2015, <NAME>, <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: * * Redistributi...
/*********************** check_ks_invert.c *******************************/ /* MIMD version 7 */ /* Main procedure for SU3 with dynamical staggered fermions */ /* general quark action, general gauge action */ /* NOTE: REMOVE MdaggerM inverse CHECK */ /* This code performs and/or checks the KS inversion */ #in...
/** * @file TextFile.c */ #include <assert.h> #include <stdlib.h> #include <stdio.h> #include <memory.h> #include <stdarg.h> #include "bolib/file/TextFile.h" #include "bolib/data/Str.h" /* this header isn't read from anything other */ /* than inherited object. */ #include "TextFile.protected.h" ...
#define _DEFAULT_SOURCE /* strdup() */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include <strings.h> #include <assert.h> #include <fcntl.h> #include <sys/mman.h> #include <sys/stat.h> #include <unistd.h> #include <traildb.h> #include "tdbcli.h" /* SYNTAX: - Disjunctions are separated by space -...
/* * File: main.c * Author: nigra * * Created on September 2, 2017, 4:36 AM */ /* * */ /* Based on code found at: * https://stackoverflow.com/questions/6947413/how-to-open-read-and-write-from-serial-port-in-c * * Used alternate answer by * For demo code that conforms to POSIX standard as described in...
/* Foma: a finite-state toolkit and library. */ /* Copyright © 2008-2015 <NAME> */ /* This file is part of foma. */ /* Licensed under the Apache License, Version 2.0 (the "License"); ...
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include <stdio.h> #include <string.h> #include <csi_core.h> #include <k_arch.h> #include <aos/debug.h> #define REG_NAME_WIDTH 8 extern volatile uint32_t g_crash_steps; typedef context_t PANIC_CONTEXT; typedef struct { long mcause; long mtval;...
/* include file containing all AODT library global variables */ #include "../inc/odtlib.h" #include "../inc/odtlibfuncs.h" #ifndef PI #define PI 3.14159265358979323846 #endif int aodtv64_dfft(double [],double [],int); double aodtv64_cmplx_abs( double, double ); int aodtv64_fft(float *cbd,float *dx2,int *idxcnt) { ...
/** @file plussz.c - one of the simplest max objects you can make -rdd 2001 (plussz is/was the name of a Hungarian vitamin C tablet-drink from the early 90s) this example is provided for musicians who want to learn to write their own Max externals but who only have rudimentary computer programming skills and feel...
/* $NetBSD: output_db.c,v 1.1 2010/04/25 00:54:46 joerg Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by <NAME> and <NAME>. * * Redistribution and use in source and binary forms, with or without ...
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <pthread.h> #include <stdbool.h> #include <semaphore.h> #include <errno.h> // n : number of processes // m : number of resources #define n 8 #define m 4 // max resources required for each processes int max[n][m] = { {1,1,1,0},//0 {0,1,1,1}, ...
/* * Copyright (c) 2007 - 2015 <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, publi...
/* * Copyright (C) 2021 Southern Storm Software, Pty Ltd. * * 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, ...