code
stringlengths
1
2.06M
language
stringclasses
1 value
/* 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 distribut...
C++
/* 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 distribut...
C++
/* 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 distribut...
C++
/* 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 distribut...
C++
/* 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...
C++
/* 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 distribut...
C++
/* 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 distribut...
C++
/* 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 distribut...
C++
/* * snd_android.c * Android-specific sound interface * */ #include "quakedef.h" #include <pthread.h> #include <time.h> #include <math.h> #include <stdlib.h> #include <utils/Log.h> #include <media/AudioTrack.h> using namespace android; static AudioTrack gAudioTrack; // Written by the callback function runnin...
C++
/* 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 distribut...
C++
/* Copyright (C) 2007 The Android Open Source Project */ #include "quakedef.h" unsigned short d_8to16table[256]; unsigned d_8to24table[256]; #ifdef SUPPORT_8BIT_MIPMAPGENERATION unsigned char d_15to8table[65536]; #endif cvar_t mouse_button_commands[3] = { CVAR2("mouse1","+attack"), CVAR2("mouse2","+strafe...
C++
/* 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...
C++
/* 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...
C++
/* 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 distribut...
C++
/* 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 distribut...
C++
/* 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...
C++
/* 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 distribut...
C++
/* 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 distribut...
C++
/* 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 distribut...
C++
/* 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 distribut...
C++
/* 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 distribut...
C++
/* 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 distribut...
C++
/* 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 distribut...
C++
// LibDepthSmoother.cpp : Defines the exported functions for the DLL application. // #include "stdafx.h" #include <stdlib.h> #include <Windows.h> #define DllExport extern "C" __declspec(dllexport) #define MaxDepthDistance 4000 #define MinDepthDistance 800 #define MaxDepthDistanceOffset 3150 static int ...
C++
// stdafx.cpp : source file that includes just the standard includes // LibDepthSmoother.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file
C++
// dllmain.cpp : Defines the entry point for the DLL application. #include "stdafx.h" BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH...
C++
// list.cc // Routines to manage a singly-linked list of integers. // // A "ListElement" is allocated for each item to be put on the // list; it is de-allocated when the item is removed. This means // we don't need to keep a "next" pointer in every object we // want to put on a list. // // Copyright ...
C++
// inheritstack.cc // Routines for two implementions of a LIFO stack of integers, // one as an array, the other as a list. // // Copyright (c) 1992,1993,1995 The Regents of the University of California. // All rights reserved. See copyright.h for copyright notice and limitation // of liability and disclaimer of war...
C++
// stack.cc // Routines to implement a LIFO stack of integers. // // The stack is represented as an array; we return an error // if the caller tries to push more things onto the stack than we have // room for. // // Copyright (c) 1992,1993,1995 The Regents of the University of California. // All rights reserved. See ...
C++
// templatestack.h // Data structures for a stack" -- a Last-In-First-Out list -- // of arbitrary things. // // Copyright (c) 1992,1993,1995 The Regents of the University of California. // All rights reserved. See copyright.h for copyright notice and limitation // of liability and disclaimer of warranty provisions. ...
C++
// inheritstack.h // Data structures for a "stack" -- a Last-In-First-Out list of integers. // // We define two separate implementations of stacks, to // illustrate C++ inheritance. // // Copyright (c) 1992,1993,1995 The Regents of the University of California. // All rights reserved. See copyright.h for copyright not...
C++
// stack.h // Data structures for a "stack" -- a Last-In-First-Out list of integers. // // Copyright (c) 1992,1993,1995 The Regents of the University of California. // All rights reserved. See copyright.h for copyright notice and limitation // of liability and disclaimer of warranty provisions. #ifndef STACK_H // t...
C++
// templatestack.cc // Routines to implement a LIFO stack of arbitrary things. // // The stack is represented as an array; we return an error // if the caller tries to push more things onto the stack than we have // room for. // // Copyright (c) 1992,1993,1995 The Regents of the University of California. // All rights...
C++
// list.h // Data structures to manage LISP-like lists. // // Copyright (c) 1992,1993,1995 The Regents of the University of California. // All rights reserved. See copyright.h for copyright notice and limitation // of liability and disclaimer of warranty provisions. #ifndef LIST_H #define LIST_H #include "copyri...
C++
/* * VMManager.cc * * Created on: Dec 28, 2009 * Author: qi * Modified by Hyper: Dec 29 2009 */ #include "system.h" #include "vmmanager.h" VirtualMemoryManager::VirtualMemoryManager() : bitMap(SWAP_SIZE) { fileSystem->Create("SWAP", PageSize * SWAP_SIZE); swapFile = fileSystem->Open("SWAP"); pageI...
C++
/* * VMManager.h * * Created on: Dec 28, 2009 * Author: qi */ #ifndef VMMANAGER_H_ #define VMMANAGER_H_ #include "bitmap.h" #include "addrspace.h" #include "list.h" #define SWAP_SIZE 512 class PhysicalPageInfo{ public : //time AddrSpace * space; int pageTableIndex; }; class DiskPageInfo{ public : Dis...
C++
// threadtest.cc // Simple test case for the threads assignment. // // Create two threads, and have them context switch // back and forth between themselves by calling Thread::Yield, // to illustratethe inner workings of the thread system. // // Copyright (c) 1992-1993 The Regents of the University of Californ...
C++
// main.cc // Bootstrap code to initialize the operating system kernel. // // Allows direct calls into internal operating system functions, // to simplify debugging and testing. In practice, the // bootstrap code would just initialize data structures, // and start a user program to print the login prompt. // // Most...
C++
// list.cc // // Routines to manage a singly-linked list of "things". // // A "ListElement" is allocated for each item to be put on the // list; it is de-allocated when the item is removed. This means // we don't need to keep a "next" pointer in every object we // want to put on a list. // //...
C++
// scheduler.cc // Routines to choose the next thread to run, and to dispatch to // that thread. // // These routines assume that interrupts are already disabled. // If interrupts are disabled, we can assume mutual exclusion // (since we are on a uniprocessor). // // NOTE: We can't use Locks to provide mutual exclus...
C++
// synchlist.h // Data structures for synchronized access to a list. // // Implemented by surrounding the List abstraction // with synchronization routines. // // Copyright (c) 1992-1993 The Regents of the University of California. // All rights reserved. See copyright.h for copyright notice and limitation /...
C++
// synch.cc // Routines for synchronizing threads. Three kinds of // synchronization routines are defined here: semaphores, locks // and condition variables (the implementation of the last two // are left to the reader). // // Any implementation of a synchronization routine needs some // primitive atomic operatio...
C++
// scheduler.h // Data structures for the thread dispatcher and scheduler. // Primarily, the list of threads that are ready to run. // // Copyright (c) 1992-1993 The Regents of the University of California. // All rights reserved. See copyright.h for copyright notice and limitation // of liability and disclaimer of ...
C++
// synchlist.cc // Routines for synchronized access to a list. // // Implemented by surrounding the List abstraction // with synchronization routines. // // Implemented in "monitor"-style -- surround each procedure with a // lock acquire and release pair, using condition signal and wait for // synchronizatio...
C++
// list.h // Data structures to manage LISP-like lists. // // As in LISP, a list can contain any type of data structure // as an item on the list: thread control blocks, // pending interrupts, etc. That is why each item is a "void *", // or in other words, a "pointers to anything". // // Copyright (c)...
C++
// synch.h // Data structures for synchronizing threads. // // Three kinds of synchronization are defined here: semaphores, // locks, and condition variables. The implementation for // semaphores is given; for the latter two, only the procedure // interface is given -- they are to be implemented as part of //...
C++
// thread.h // Data structures for managing threads. A thread represents // sequential execution of code within a program. // So the state of a thread includes the program counter, // the processor registers, and the execution stack. // // Note that because we allocate a fixed size stack for each // thread, it is p...
C++
// utility.cc // Debugging routines. Allows users to control whether to // print DEBUG statements, based on a command line argument. // // Copyright (c) 1992-1993 The Regents of the University of California. // All rights reserved. See copyright.h for copyright notice and limitation // of liability and disclaimer ...
C++
// system.cc // Nachos initialization and cleanup routines. // // Copyright (c) 1992-1993 The Regents of the University of California. // All rights reserved. See copyright.h for copyright notice and limitation // of liability and disclaimer of warranty provisions. #include "copyright.h" #include "system.h" // Thi...
C++
// thread.cc // Routines to manage threads. There are four main operations: // // Fork -- create a thread to run a procedure concurrently // with the caller (this is done in two steps -- first // allocate the Thread object, then call Fork on it) // Finish -- called when the forked procedure finishes, to clean up //...
C++
// exception.cc // Entry point into the Nachos kernel from user programs. // There are two kinds of things that can cause control to // transfer back to here from user code: // // syscall -- The user code explicitly requests to call a procedure // in the Nachos kernel. Right now, the only function we support is ...
C++
// processmanager.h // Defines PCB class -- Data structures to keep necessary information about a process, // Such as PID, parent PID, Thread*, and thread status. // // Defines ProcessManager class -- like memory manager function, return an unused process // id, clear a process id respectively by using a bitmap, store ...
C++
// addrspace.cc // Routines to manage address spaces (executing user programs). // // In order to run a user program, you must: // // 1. link with the -N -T 0 option // 2. run coff2noff to convert the object file to Nachos format // (Nachos object code format is essentially just a simpler // version of the ...
C++
// useropenfile.h // Defines UserOpenFile class contains an index into the global SysOpenFile table and // an integer offset represeting a process's current position in that file. // // Created on: Dec 10, 2009 // Author: qi #ifndef USEROPENFILE_H_ #define USEROPENFILE_H_ class UserOpenFile{ public: int fileInd...
C++
// SysOpenFile.h // Defines SysOpenFile class that contains a pointer to the file system's OpenFile object // and (char *)fileName for that file and the number of user processes currently accessing // it. Declare an array of SysOpenFile objects for use by all system calls implemented. // // Defines SysOpenFile Manager ...
C++
// memorymanager.h // Methods defining in Memory Manager that will be used to facilitate contiguous virtual memory. // The amount of memory available to the user space is the same as the amount // of physical memory. // // Memory Manager allocates the first clear page, takes the index of a page // and frees it, and get...
C++
// addrspace.h // Data structures to keep track of executing user programs // (address spaces). // // For now, we don't keep any information about address spaces. // The user level CPU state is saved and restored in the thread // executing the user program (see thread.h). // // Copyright (c) 1992-1993 The Regents of ...
C++
// bitmap.c // Routines to manage a bitmap -- an array of bits each of which // can be either on or off. Represented as an array of integers. // // Copyright (c) 1992-1993 The Regents of the University of California. // All rights reserved. See copyright.h for copyright notice and limitation // of liability and dis...
C++
// sysopenfile.cc // Defines SysOpenFile class that contains a pointer to the file system's OpenFile object // and (char *)fileName for that file and the number of user processes currently accessing // it. Declare an array of SysOpenFile objects for use by all system calls implemented. // // Defines SysOpenFile Manager...
C++
// myutilities.cc // Method for compare two buffer. // // Created on: 2009-12-11 // Author: hyper #include "myutilities.h" //---------------------------------------------------------------------- // strcmp // Do little endian to big endian conversion on the bytes in the // object file header, in case the file ...
C++
// processmanager.cc // Defines PCB class -- Data structures to keep necessary information about a process, // Such as PID, parent PID, Thread*, and thread status. // // Defines ProcessManager class -- like memory manager function, return an unused process // id, clear a process id respectively by using a bitmap, store...
C++
// progtest.cc // Test routines for demonstrating that Nachos can load // a user program and execute it. // // Also, routines for testing the Console hardware device. // // Copyright (c) 1992-1993 The Regents of the University of California. // All rights reserved. See copyright.h for copyright notice and limitatio...
C++
// bitmap.h // Data structures defining a bitmap -- an array of bits each of which // can be either on or off. // // Represented as an array of unsigned integers, on which we do // modulo arithmetic to find the bit we are interested in. // // The bitmap can be parameterized with with the number of bits being // manag...
C++
/* * useropenfile.cc * * Created on: Dec 10, 2009 * Author: qi */ #include "useropenfile.h"
C++
// memorymanager.cc // Routines to manage a memory manager -- that will be used to facilitate // contiguous virtual memory. The amount of memory available to the user // space is the same as the amount of physical memory. // // Memory Manager allocates the first clear page, takes the index of a page // and frees it, an...
C++
// nettest.cc // Test out message delivery between two "Nachos" machines, // using the Post Office to coordinate delivery. // // Two caveats: // 1. Two copies of Nachos must be running, with machine ID's 0 and 1: // ./nachos -m 0 -o 1 & // ./nachos -m 1 -o 0 & // // 2. You need an implementation of condition var...
C++
// post.h // Data structures for providing the abstraction of unreliable, // ordered, fixed-size message delivery to mailboxes on other // (directly connected) machines. Messages can be dropped by // the network, but they are never corrupted. // // The US Post Office delivers mail to the addressed mailbox. // By ...
C++
// post.cc // Routines to deliver incoming network messages to the correct // "address" -- a mailbox, or a holding area for incoming messages. // This module operates just like the US postal service (in other // words, it works, but it's slow, and you can't really be sure if // your mail really got through!). // // N...
C++
// directory.cc // Routines to manage a directory of file names. // // The directory is a table of fixed length entries; each // entry represents a single file, and contains the file name, // and the location of the file header on disk. The fixed size // of each directory entry means that we have the restriction // o...
C++
// filehdr.cc // Routines for managing the disk file header (in UNIX, this // would be called the i-node). // // The file header is used to locate where on disk the // file's data is stored. We implement this as a fixed size // table of pointers -- each entry in the table points to the // disk sector containing tha...
C++
// openfile.h // Data structures for opening, closing, reading and writing to // individual files. The operations supported are similar to // the UNIX ones -- type 'man open' to the UNIX prompt. // // There are two implementations. One is a "STUB" that directly // turns the file operations into the underlying UNIX ...
C++
// filehdr.h // Data structures for managing a disk file header. // // A file header describes where on disk to find the data in a file, // along with other information about the file (for instance, its // length, owner, etc.) // // Copyright (c) 1992-1993 The Regents of the University of California. // All rights r...
C++
// openfile.cc // Routines to manage an open Nachos file. As in UNIX, a // file must be open before we can read or write to it. // Once we're all done, we can close it (in Nachos, by deleting // the OpenFile data structure). // // Also as in UNIX, for convenience, we keep the file header in // memory while the file i...
C++
// filesys.cc // Routines to manage the overall operation of the file system. // Implements routines to map from textual file names to files. // // Each file in the file system has: // A file header, stored in a sector on disk // (the size of the file header data structure is arranged // to be precisely the size...
C++
// directory.h // Data structures to manage a UNIX-like directory of file names. // // A directory is a table of pairs: <file name, sector #>, // giving the name of each file in the directory, and // where to find its file header (the data structure describing // where to find the file's data blocks) on disk. /...
C++
// synchdisk.h // Data structures to export a synchronous interface to the raw // disk device. // // Copyright (c) 1992-1993 The Regents of the University of California. // All rights reserved. See copyright.h for copyright notice and limitation // of liability and disclaimer of warranty provisions. #include "cop...
C++
// fstest.cc // Simple test routines for the file system. // // We implement: // Copy -- copy a file from UNIX to Nachos // Print -- cat the contents of a Nachos file // Perftest -- a stress test for the Nachos file system // read and write a really large file in tiny chunks // (won't work on baseline sy...
C++
// filesys.h // Data structures to represent the Nachos file system. // // A file system is a set of files stored on disk, organized // into directories. Operations on the file system have to // do with "naming" -- creating, opening, and deleting files, // given a textual file name. Operations on an individual // "o...
C++
// synchdisk.cc // Routines to synchronously access the disk. The physical disk // is an asynchronous device (disk requests return immediately, and // an interrupt happens later on). This is a layer on top of // the disk providing a synchronous interface (requests wait until // the request completes). // // Use a s...
C++
// stats.h // Routines for managing statistics about Nachos performance. // // DO NOT CHANGE -- these stats are maintained by the machine emulation. // // Copyright (c) 1992-1993 The Regents of the University of California. // All rights reserved. See copyright.h for copyright notice and limitation // of liability a...
C++
// timer.h // Data structures to emulate a hardware timer. // // A hardware timer generates a CPU interrupt every X milliseconds. // This means it can be used for implementing time-slicing, or for // having a thread go to sleep for a specific period of time. // // We emulate a hardware timer by scheduling an interrup...
C++
// translate.cc // Routines to translate virtual addresses to physical addresses. // Software sets up a table of legal translations. We look up // in the table on every memory reference to find the true physical // memory location. // // Two types of translation are supported here. // // Linear page table -- the virt...
C++
// mipssim.cc -- simulate a MIPS R2/3000 processor // // This code has been adapted from Ousterhout's MIPSSIM package. // Byte ordering is little-endian, so we can be compatible with // DEC RISC systems. // // DO NOT CHANGE -- part of the machine emulation // // Copyright (c) 1992-1993 The Regents of the Univer...
C++
// console.h // Data structures to simulate the behavior of a terminal // I/O device. A terminal has two parts -- a keyboard input, // and a display output, each of which produces/accepts // characters sequentially. // // The console hardware device is asynchronous. When a character is // written to the device, the...
C++
// interrupt.h // Data structures to emulate low-level interrupt hardware. // // The hardware provides a routine (SetLevel) to enable or disable // interrupts. // // In order to emulate the hardware, we need to keep track of all // interrupts the hardware devices would cause, and when they // are supposed to occur. ...
C++
// network.cc // Routines to simulate a network interface, using UNIX sockets // to deliver packets between multiple invocations of nachos. // // DO NOT CHANGE -- part of the machine emulation // // Copyright (c) 1992-1993 The Regents of the University of California. // All rights reserved. See copyright.h for copyr...
C++
// network.h // Data structures to emulate a physical network connection. // The network provides the abstraction of ordered, unreliable, // fixed-size packet delivery to other machines on the network. // // You may note that the interface to the network is similar to // the console device -- both are full duplex cha...
C++
// disk.h // Data structures to emulate a physical disk. A physical disk // can accept (one at a time) requests to read/write a disk sector; // when the request is satisfied, the CPU gets an interrupt, and // the next request can be sent to the disk. // // Disk contents are preserved across machine crashes, but if /...
C++
// timer.cc // Routines to emulate a hardware timer device. // // A hardware timer generates a CPU interrupt every X milliseconds. // This means it can be used for implementing time-slicing. // // We emulate a hardware timer by scheduling an interrupt to occur // every time stats->totalTicks has in...
C++
// disk.cc // Routines to simulate a physical disk device; reading and writing // to the disk is simulated as reading and writing to a UNIX file. // See disk.h for details about the behavior of disks (and // therefore about the behavior of this simulation). // // Disk operations are asynchronous, so we have to invoke ...
C++
// interrupt.cc // Routines to simulate hardware interrupts. // // The hardware provides a routine (SetLevel) to enable or disable // interrupts. // // In order to emulate the hardware, we need to keep track of all // interrupts the hardware devices would cause, and when they // are supposed to occur. // // This mod...
C++
// translate.h // Data structures for managing the translation from // virtual page # -> physical page #, used for managing // physical memory on behalf of user programs. // // The data structures in this file are "dual-use" - they // serve both as a page table entry, and as an entry in // a software-managed translat...
C++
// machine.h // Data structures for simulating the execution of user programs // running on top of Nachos. // // User programs are loaded into "mainMemory"; to Nachos, // this looks just like an array of bytes. Of course, the Nachos // kernel is in memory too -- but as in most machines these days, // the kernel is lo...
C++
// console.cc // Routines to simulate a serial port to a console device. // A console has input (a keyboard) and output (a display). // These are each simulated by operations on UNIX files. // The simulated device is asynchronous, // so we have to invoke the interrupt handler (after a simulated // delay), to signal th...
C++
// sysdep.cc // Implementation of system-dependent interface. Nachos uses the // routines defined here, rather than directly calling the UNIX library, // to simplify porting between versions of UNIX, and even to // other systems, such as MSDOS. // // On UNIX, almost all of these routines are simple wrappers // for th...
C++
// stats.h // Data structures for gathering statistics about Nachos performance. // // DO NOT CHANGE -- these stats are maintained by the machine emulation // // // Copyright (c) 1992-1993 The Regents of the University of California. // All rights reserved. See copyright.h for copyright notice and limitation // of l...
C++
/* Copyright 2011, Janne Kytömäki 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 agr...
C++
/* Copyright 2011, Janne Kytömäki 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 agr...
C++
/* /** Copyright 2011, Janne Kytömäki 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...
C++
/* * Visible snake objects, rendered by openGL/GLUT. */ #include <iostream> class SnakeObject { public: SnakeObject(int x, int y); SnakeObject(int x, int y, int z); void SnakeObjectDisplay(); int& X(); int& Y(); int& Z(); void setX(int x); void setY(int y); void setZ(int z); private: ...
C++