text
stringlengths
3.08k
10.5k
/* * Battmond: A battery monitoring daemon. * * Author: <NAME> <<EMAIL>> * URL: https://github.com/ntarmos/battmond/ * * $FreeBSD$ * $Id: battmond.c 54 2006-09-08 13:12:05Z ntarmos $ */ #include <ctype.h> #include <errno.h> #include <fcntl.h> #include <grp.h> #include <stdarg.h> #include <stdio.h> #include <st...
#include <gio/gio.h> static gchar *opt_name = NULL; static gchar *opt_object_path = NULL; static gchar *opt_interface = NULL; static gboolean opt_system_bus = FALSE; static gboolean opt_no_auto_start = FALSE; static gboolean opt_no_properties = FALSE; static GOptionEntry opt_entries[] = { { "name", 'n',...
/* $Id: combpath_test.c 1892 2007-07-13 20:56:28Z peter $ * * Copyright (C) 2006-2007 <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...
/** * * @FILE : JSON.C * @DESCRIPTION : LIBRARY TO CREATE SIMPLE JSON OBJECT * * @AUTHOR : VIKI (A) <NAME> * @CONTACT : VIKILABS.ORG * */ /* Copyright (c) 2016 Viki( <NAME> ) Contact @ vikilabs.org Permission is hereby granted, free of charge, to any person obtaining a...
#include <stdio.h> #include <math.h> #include <float.h> #include <stdlib.h> #define NPLANET 10 double bigG = 1.0; //Just put G=1 for simplicity double m_earth = 1.0; //Mass of earth in earth masses double m_sol = 332946; //Mass of sun in earth masses double r_au = 1.0; // 1 AU typedef struct planet planet; struct p...
/* * Copyright (C) 2018 NVIDIA CORPORATION. * Author: <NAME> <<EMAIL>> * Factored out from gstv4l2h264enc by <NAME> <<EMAIL>> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; ...
/* * Copyright (c) 2018 Yahweasel * * 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...
#include <stdio.h> #include <stdlib.h> struct slist { struct slist *next; int n; }; struct stack { struct slist *t; }; typedef struct stack stack; typedef struct stack pile; typedef struct slist slist; pile *init_pile(void); int pile_pleine(const pile *p); int pile_vide(const pile *p); int sommet_pile(const pile...
#include <stdbool.h> #include <stddef.h> #include <stdint.h> #include <utils/mem.h> #include <boot/multiboot.h> #include <sys/multiboot.h> #include <mm/layout.h> #include <arch/paging.h> #include <mm/allocator.h> #include <mm/kmem.h> #include <mm/malloc.h> #include <arch/gdt.h> #include <arch/pic.h> #include <arch/api...
#include <stdio.h> #include <stdlib.h> #define CADMAX 100 // DEFININDO O TAMANHO MAXIMO DE CADASTROS DE ALUNOS #define A1P 0.2 // porcentagem da A1 #define A2P 0.3 // porcentagem da A2 #define A3P 0.5 //porcentagem da A3 //AMBAS DEFINIDOS COMO CONSTANTES PARA FICAR MAIS FACIL DE MUDAR POSTERIORMENTE //Definindo uma s...
/* * ProjectUtils.c * * Created on: 09 giu 2018 * Author: sergio */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> #include <sys/stat.h> #include <sys/types.h> #include "../include/ProjectUtils.h" double** create_matrix(int rows_cols){ double** M = malloc(...
/* g2gOverlap - Look at clone clone overlap. */ #include "common.h" #include "hash.h" #include "linefile.h" #include "hCommon.h" #include "psl.h" int maxTail = 200; /* Maximum length of tail. */ float maxBad = 0.01; /* Maximum bad ratio. */ int minUnique = 50; /* Minimum number of unique matches. */ int minMatch = 1...
/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolar...
#include "m_pd.h" /******************** tabosc2~ ***********************/ /* this is all copied from d_osc.c... what include file could this go in? */ #define UNITBIT32 1572864. /* 3*2^19; bit 32 has place value 1 */ #if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) \ || defined(__OpenB...
/* * PlayerViewer * Copyright (C) <NAME> 2002 * * 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...
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) /* Copyright (C) 2018 Netronome Systems, Inc */ /* Copyright (C) 2021 Corigine, Inc */ #include <linux/dma-direction.h> #include <linux/dma-mapping.h> #include <linux/slab.h> #include <net/xdp_sock_drv.h> #include <trace/events/xdp.h> #include "nfp_app.h" #in...
/* * This file is part of the Black Magic Debug project. * * Copyright (C) 2011 Black Sphere Technologies Ltd. * Written by <NAME> <<EMAIL>> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Founda...
/* $OpenBSD$ */ /* * Copyright (c) 2009 <NAME> <<EMAIL>> * Copyright (c) 2009 <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. * ...
/* * 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 copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
#include "server.h" #include <signal.h> #include <errno.h> #include <sys/wait.h> void print_prefix() { if (accept_mode == USE_MULTI_PROCESS) { if (debug) { printf("[Child] (PID=%d) ", getpid()); } else { printf("[Child] "); } } else if (accept_mode == USE_MULT...
#define _GNU_SOURCE #include "malloc.h" #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <stdarg.h> #include <errno.h> #include <unistd.h> #include <pthread.h> #include <sys/mman.h> //========================================================= // Your implementations HERE //==========================...
/* * Copyright notice goes here */ // Home Assistant Mitsubishi Electric Heat Pump Controller https://github.com/unixko/mehpha // using native MQTT Climate (HVAC) component with MQTT discovery for automatic configuration // NB: Set PubSubClient.h MQTT_MAX_PACKET_SIZE to 1280 /***************************************...
/* particles - libpreviewer - PVPreviewer.c * * Copyright 2010 <NAME>. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright...
/******************************************************************************/ /* Files to Include */ /******************************************************************************/ #include <pic16f1824.h> #include <xc.h> /* XC8 General Includ...
/* * Find the integers 1 <= a < b < c < d <= N that produce the longest sequence of integer values * given by arithmetic expressions using the integers as operands, operators +, -, *, / and parentheses */ #include <stdio.h> #include <stdlib.h> #include <limits.h> #include "utils.h" #include "math_utils.h" #include ...
/* * @brief RTC tick to (a more) Universal Time * Adds conversion functions to use an RTC that only provides a * seconds capability to provide "struct tm" support. * * @note * Copyright(C) NXP Semiconductors, 2014 * All rights reserved. * * @par * Software that is described herein is for illustrative purposes...
/* * 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...
//FIXME: //use mmap() and munmap() to map or unmap the page table in monitor typedef unsigned long pt_entry_t; #define PTE_V 0x001 // Valid #define PTE_R 0x002 // Read #define PTE_W 0x004 // Write #define PTE_X 0x008 // Execute #define PTE_U 0x010 // User #define PTE_G 0x020 // Global #define PT...
// The following file comes from the harbour repo, contrib/hbfoxpro/relfunc.c file. // Modified the functions name to be prefixed with "VFP_" /* * FoxPro compatible functions BETWEEN(), INLIST() * * Copyright 2021 <NAME> Modifed __FOX_SEEK to Create VFP_SEEK * Copyright 2016 <NAME> <druzus / at / priv.onet.pl> *...
/*===========================================================================* * * * testdate.c - Test date conversion functions * * * * ...
// // Created by gunavaran on 4/6/21. // #include "fileIO.h" #include "frigate.h" #include <stdio.h> #include <stdlib.h> #include <memory.h> #include <inttypes.h> void write_meta_data(int thread_count, int k_value, uint64_t write_length, char *binary_output_location) { FILE *meta_file; char meta_file_location...
#define gba_screenw 240 #define gba_screenh 160 #define reg_vcount *(volatile unsigned char*)0x04000006 #define reg_vidmode *(volatile unsigned short*)0x04000000 #define val_vidmode_reset 0x0483 #define reg_vram ((volatile unsigned short*)0x06000000) #define reg_oam ((volatile unsigned short*)0x070000...
/* Copyright (c) 2019-2022 <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...
/* GStreamer tmplayer format subtitle parser * Copyright (C) 2006-2008 <NAME> <tim centricular net> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the Lice...
/* SPDX-License-Identifier: BSD-3-Clause */ #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "files.h" #include "tpm2_nv_util.h" #include "tpm2_tool.h" typedef struct tpm_nvwrite_ctx tpm_nvwrite_ctx; struct tpm_nvwrite_ctx { struct { const char *ctx_path; con...
#include <stdlib.h> #include <string.h> #include <stdint.h> struct dictionairy_entry_t { char * key; void * value; }; struct dictionairy_t { uint8_t depth; struct dictionairy_entry_t * entry; struct dictionairy_list_t * subdict_list; }; struct dictionairy_list_t { struct dictionairy_t * dict_...
/* Copyright 2018 ishtob * Driver for DRV2605L written for QMK * * 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. ...
#include "image_wrapper.h" #include "texture_wrapper.h" #include "mruby/data.h" #include "mruby/class.h" #include "mruby/string.h" #include "mruby/array.h" #include "mruby/variable.h" //================================================================// // Texture struct //=============================================...
#include "marksweep.h" #include "header.h" #include "utils.h" #include "stats.h" #include <stdlib.h> #include <stdio.h> #include <assert.h> void ms_init(MarkSweep *ms) { ms->black_bit = 0; ms->has_roots = false; ms->marked = 0; ms->allocated = 0; ms->factor = 2; ms->mark_stack = NULL; ms->blocks = NULL; ...
#include <string.h> #include <stdlib.h> #include <stdio.h> #include "hxa.h" #include "hxa_utils.h" #define FALSE 0 #define TRUE !FALSE int hxa_corner_get_next(int *ref, unsigned int corner) { unsigned int i; if(ref[corner] >= 0) { return corner + 1; }else { for(i = corner - 1; i != 0; i--)...
/* * Copyright (C) 2017 Red Hat, Inc. * * Author: <NAME> * * This file is part of GnuTLS. * * GnuTLS is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your opt...
#include "shared.h" extern int sceKernelExtendThreadStack(SceSize size, int func(void *), void *param); const char *extendTitle = NULL; SceUID mainThreadID = 0; void *mainThreadStack = NULL; u32 mainThreadStackSize = 0; void *getStackAddr(SceUID threadID) { SceKernelThreadInfo status; status.size = sizeof(status);...
#include "../header.h" /* Function: audio_size * --------------------- * Finds the length in bytes of the input file * * @param file * Name of input file * * @return * Length of file in bytes */ long int audio_size(char* file) { FILE* f = fopen(file, "rb"); if(f == NULL) { printf("File not found!\n"...
#include "raw/grammatical_evolution.h" #include "raw/cmp.h" void r_ge_init(r_ge* g, size_t seed, size_t pop_size, size_t elites, size_t codon_size, size_t max_wrap, const char* grammar, r_parsing_err* err) { g->pop_size = pop_size; if (g->pop_size < 10) { g->pop_size = 10; } ...
#define EXPORT_SYMTAB #include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h> #include <linux/fs.h> #include <linux/sched.h> #include <linux/pid.h> /* For pid types */ #include <linux/tty.h> /* For the tty declarations */ #include <linux/version.h> /* For LINUX_VERSION_CODE */ #include <linux/sema...
/* * 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 copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
#include "nn_network_tests.h" void test_nn_network_create_destroy(void **state) { const uintmax_t layers[] = {4, 3, 2}; const size_t n = sizeof(layers) / sizeof(layers[0]); nn_network *network = nn_network_create(n, layers); assert_int_equal(network->size, n); for (size_t i = 0; i < n; i++) ass...
/* * Copyright 2020 Makani Technologies LLC * * 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 ...
/** * VUEngine Platformer Demo * * © <NAME> <<EMAIL>> and <NAME> <<EMAIL>> * * For the full copyright and license information, please view the LICENSE file * that was distributed with this source code. */ //--------------------------------------------------------------------------------------------------------...
/* * Copyright (c) 2012, JANET(UK) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of condit...
/* * Copyright 2010 <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, distrib...
#include <assert.h> #include <elf.h> #include <errno.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define IMAGE_FILE "./image" #define ARGS "[--extended] [--vm] <bootblock> <executable-file> ..." #define OS_SIZE_LOC 0x1fc /* structure to store command line options */ static struct ...
/* * Copyright (c) 2017, NVIDIA CORPORATION. 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 requi...
/************************************************************************************************** * * * This file is part of HPIPM. * * ...
/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 <NAME> Modified: Apr 2000 - <NAME> Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "resdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" IFparm RESpTable[] = { /* parameters...
#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS #endif #include <stdio.h> #include <inttypes.h> #include <stddef.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <getopt.h> #include "ttd.h" #include "ttd_filebuffer.h" #define TTD_DECIMATE_EXIT 1 #define TTD_DECIMATE_MISSING_FLAG -1 st...
#include <stdbool.h> #include <stdint.h> #include "mongoose.h" typedef struct { uint16_t af; uint16_t bc; uint16_t de; uint16_t hl; uint16_t af_prime; uint16_t bc_prime; uint16_t de_prime; uint16_t hl_prime; uint16_t pc; uint16_t sp; uint16_t ix; uint16_t iy; uint8_t i; /* interrupt-page a...
/* $OpenBSD: dump.c,v 1.12 2008/06/10 04:49:11 reyk Exp $ */ /* $KAME: dump.c,v 1.10 2002/05/31 10:10:03 itojun Exp $ */ /* * Copyright (C) 1999 WIDE Project. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following co...
// -*-Mode: C++;-*- // technically C99 // * BeginRiceCopyright ***************************************************** // // $HeadURL$ // $Id$ // // -------------------------------------------------------------------------- // Part of HPCToolkit (hpctoolkit.org) // // Information about sources of support for research an...
/* * useful_lib.h * * Created on: 16/09/2015 * Author: <NAME> */ #include "useful_lib.h" //função de inicialização void init(void) { //Configurando as portas de saida P1DIR |= BIT0; // P1.0 = LED P4DIR |= BIT7; // P4.7 = LED VERDE DE COMMUNICACAO P4OUT &= ~BIT7; } extern void ___receive_char_u...
/* * debug-launchpad * * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. * * Contact: <NAME> <<EMAIL>>, <NAME> <<EMAIL>> * * 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 o...
/* * Created 20 Oct 2004 by <NAME> * * Basic support for Delkin/ASKA/Workbit Cardbus CompactFlash adapter * * Modeled after the 16-bit PCMCIA driver: ide-cs.c * * This is slightly peculiar, in that it is a PCI driver, * but is NOT an IDE PCI driver -- the IDE layer does not directly * support hot inserti...
/** * load_folder.c - folder loading support for sciteproj * * Copyright 2012-2016 <NAME> * * This file is part of SciteProj. * * SciteProj 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 vers...
/********************************************************************** * * PostGIS - Spatial Types for PostgreSQL * http://postgis.net * * PostGIS 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, eithe...
/*----------------------------- 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...
/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (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 * o...
/*********************************************************************** * * * This software is part of the ast package * * Copyright (c) 1992-2010 AT&T Intellectual Property * * and i...
/* From: <NAME> <<EMAIL>> Date: Fri, 9 Apr 1999 10:13:27 -0700 (PDT) To: <EMAIL> Subject: new readline example Message-ID: <<EMAIL>> Chet, I've been using readline 4.0. Specifically, I've been using the perl version Term::ReadLine::Gnu. It works great. Anyway, I've been playing around the alternate inte...
/* $OpenBSD: core.c,v 1.8 2007/08/01 15:44:37 deraadt Exp $ */ /* * Copyright (c) 2002 <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 sour...
/* * Copyright 2018 Red Hat Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, d...
#include <stdint.h> #include <stdlib.h> #include <string.h> #include <avr/io.h> #include <util/delay.h> #define G 0 #define R 1 #define B 2 #define N_LED 24 uint8_t neo[N_LED][3]; uint8_t string1[N_LED][3]; uint8_t string2[N_LED][3]; uint8_t string3[N_LED][3]; /* speeds for strings */ #define PRIME1 107 #define P...
/**************************************************************************** * PROJECT: Squeak port for Win32 * FILE: sqWin32LocalePlugin.c * CONTENT: locale support * * AUTHORS: <NAME> (ar) , <NAME> (be) * ADDRESS: Magdeburg, Germany * EMAIL: <EMAIL>, <EMAIL> *********************************...
#include "lcd_discovery.h" #define LCD_HSYNC 30 #define LCD_HBP 114 #define LCD_HFP 16 #define LCD_VSYNC 3 #define LCD_VBP 32 #define LCD_VFP 10 /* Variables */ extern LTDC_HandleTypeDef LTDCHandle; extern GUI_Layer_t Layers[]; voi...
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <time.h> #include <pthread.h> /* * All STATIC variables are used only in main for easy configuration. * No STATIC variables (other than DEBUG) are used outside of main. */ #define DEBUG 0 #define THREADS_NUM 10 #define TABLE_SIZE 1000 #define TA...
#include "cameraopt.h" #define TRUE 1 #define FALSE 0 int video_fd ; int length ; char *yuv[COUNT] ; struct v4l2_buffer enqueue , dequeue ; //定义出入队的操作结构体成员 int Init_Cameral(int Width , int Hight) { //参数检查 char *videodevname = NULL ; videodevname = "/dev/video0" ; //打开设备 video_fd = open(videodevname , ...
/* Copyright (C) <2009> <<NAME> and <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 the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distri...
/** * Simple program to test my singly linked list implementation. * @author <NAME> (Talendar). */ #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include "singly_linked_list.h" const bool USE_SCREEN_CLEANER = true; //clear the screen between menus; turn off in case of incompatibility /* * Clear...
/* ______ ___ ___ * /\ _ \ /\_ \ /\_ \ * \ \ \\ \\//\ \ \//\ \ __ __ _ __ ___ * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ * ...
// Copyright (C) <NAME> <<EMAIL>> // SPDX-License-Identifier: Apache-2.0 #include <stdio.h> #include <errno.h> #include <libxnvme_spec.h> #include <libxnvme_spec_pp.h> #include <libxnvme_znd.h> #include <libxnvmec.h> static int test_open_zdptr(struct xnvmec *cli) { struct xnvme_dev *dev = cli->args.dev; struct xnvme...
#include <stdio.h> #include <stdlib.h> #include <errno.h> #include <string.h> #include <unistd.h> #include <netinet/in.h> #include <arpa/inet.h> #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> // Crash/Error Function void setupfail() { perror("Communication Crashed"); exit(-1); } ssize_t wri...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "shellmemory.h" #include "shell.h" #include "kernel.h" int runFlag = 0; int execFlag = 0; void help(char *words[]); void quit(char *words[]); int set(char *words[], int wordCount); int print(char *words[], int wordCount); int run_script(char *wo...
#include "parse.h" #include "env.h" #include "value.h" #include "operator.h" #include "tokenize.h" #include <stdio.h> #include <stdlib.h> #include <string.h> /****************************************************************************/ Value let_binding(char **line, Env e); Env where_binding(char **line, char *tok...
#define _GNU_SOURCE #include "afl/types.h" #include "afl/describe.h" #include <fcntl.h> #include <stdio.h> #include <string.h> #include <sys/stat.h> /* Describe integer. Uses 12 cyclic static buffers for return values. The value returned should be five characters or less for all the integers we reasonably expe...
#include "bl.h" #include "vlock.h" #include "barrier.h" void msleep(int msec) { usleep(msec * 1000); } void release_wait() { FILE *fp; fp = fopen(BL_RELEASE, "w"); fclose(fp); while (!access(BL_RELEASE, F_OK)) sleep(1); } void bl(int id, char *shmbuf, char *lock_vec, int blocks, size_t...
/* anticorps.c : les anti-corps */ #include <stdio.h> #include <math.h> /* Pour fabs */ #include <stdlib.h> /* Pour malloc, free */ #include <string.h> /* Pour memmove */ #include "params.h" #include "geo.h" #include "anticorps.h" #include "random.h" #include "gnuplot....
/* Copyright (c) 2016, Google 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 notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DIS...
#include <stdio.h> #include <stdlib.h> #include<unistd.h> #include<pthread.h> #include<sys/sem.h> #include<sys/shm.h> #include<sys/stat.h> #include <signal.h> #include<stdio.h> #include<stdlib.h> #include<string.h> #include<sys/types.h> #include<fcntl.h> #include <sys/wait.h> int shmid=23333; int Mykey=7777; void P(in...
/* Copyright (c) 2014, <NAME> All rights reserved. This file is part of the hyLISP project. http://hylisp.org 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...
#include <stdio.h> #include <stdlib.h> #define nil 0 #define false 0 #define true 1 #define bubblebase 1.61f #define dnfbase 3.5f #define permbase 1.75f #define queensbase 1.83f #define towersbase 2.39f #define quickbase 1.92f #define intmmbase 1.46f #define treebase 2.5f #define mmbase 0.0f #defi...
/* $OpenBSD: sti_sgc.c,v 1.15 2009/02/06 22:51:03 miod Exp $ */ /* * Copyright (c) 2005, <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 copyrigh...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <inttypes.h> /* SCNu64 */ #include <assert.h> #include "discord.h" void print_usage(void) { printf( "\n\nThis bot demonstrates how easy it is to create/delete" " reactions from a message.\n" "1. Reply to a message with 're...
/*- * Copyright (c) 2010 <NAME> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions a...
/** * Marlin 3D Printer Firmware * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. * Copyright (C) 2011 <NAME> / <NAME> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as ...
#include <stdio.h> #define GRID_WIDTH 10 #define GRID_HEIGHT 10 struct lattice_node { struct lattice_node *right; /* NULL if at edge of grid */ struct lattice_node *down; /* NULL if at edge of grid */ }; struct lattice_node node_array[GRID_WIDTH+1][GRID_HEIGHT+1]; /* construct_lattice: construct the lattice given...
/* * Copyright (C) <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 use, copy, modify, merge, publish...
/* * Copyright (c) 2015-2018 Qualcomm Technologies, Inc. * 2015-2016 Qualcomm Atheros, Inc. * All Rights Reserved */ // Copyright (c) 2018 Qualcomm Technologies, Inc. // All rights reserved. // Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations...
/*********************************************************** lu.c -- LU分解 ***********************************************************/ #include "matutil.c" /* 行列操作の小道具集 */ #include <math.h> double lu(int n, matrix a, int *ip) { int i, j, k, ii, ik; double t, u, det; vector weight; weight = new_ve...
#include "screen.h" #define VGA_WIDTH 80 #define VGA_HEIGHT 25 int cursorX = 0, cursorY = 0; uint32 vga_index; uint16 cursor_pos = 0, cursor_next_line_index = 1; static uint32 next_line_index = 1; uint8 g_fore_color = WHITE, g_back_color = BLACK; const uint8 sw = 80,sh = 25,sd = 2; int color = 0x0f; int digit_ascii...
#include "player.h" #include <stddef.h> #include <SDL2/SDL.h> #include "ellipsoid.h" #include "guard.h" #include "linalg.h" #include "log.h" #include "map.h" #include "misc.h" #include "sound.h" #include "wall.h" /* Most keyboards don't allow arbitrarily many keys to be pressed down at the same time. Something like tw...
/* * @Author: Zazu * @Date: 2018-12-22 11:52:02 * @Git: https://github.com/Zazu979 * @Last Modified by: Zazu * @Last Modified time: 2019-01-26 20:59:06 */ #include <png.h> #include <stdio.h> #include <stdlib.h> #include <readPNG.h> typedef struct{ png_bytep* rows; /*3 for RGB, 4 for RGBA*/ int p...