This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssize_t readlink (const char *filename, char *buffer, size_t size) | |
char *readlink_malloc (const char *filename) | |
{ | |
int size = 100; | |
char *buffer = NULL; | |
while (1) | |
{ | |
buffer = (char *) xrealloc (buffer, size); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
int main(int argc, char* argv[]) | |
{ | |
if (argc != 2) | |
{ | |
printf("\nCorrect usage is: gdb_script plaintext\n"); | |
return 1; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct node | |
{ | |
int n; | |
struct node *next; | |
} | |
node; | |
bool search(int n, node* list) | |
{ | |
node* ptr = list; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <cs50.h> | |
#include <ctype.h> | |
int main(int argc, char *argv[]) | |
{ | |
if (argc != 2) | |
{ |
NewerOlder