Sigrid Solveig Haflínudóttirforgot to add the file7a701273 years agoHistory
24 lines · 344 B · C
RawDownload
#include <stdlib.h> intmkstemp(char *t){	int i, l, n, f;	char *s; 	s = t;	n = 0;	l = strlen(t);	for(i = l-1; i >= 0 && t[i] == 'X'; i--, n++);	if(n < 11){		s = malloc(l+11-n+1);		strcpy(s, t);		for(i = l; i < l+11-n; i++)			s[i] = 'X';		s[i] = 0;	}	f = create(mktemp(s), ORDWR|OEXCL, 0600);	if(s != t)		free(s);	return f;}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t