Skip to content

Instantly share code, notes, and snippets.

@puddingpimp
Last active August 29, 2015 14:02
Show Gist options
  • Save puddingpimp/2cc9e790aff06ae842c7 to your computer and use it in GitHub Desktop.
Save puddingpimp/2cc9e790aff06ae842c7 to your computer and use it in GitHub Desktop.
rendomly trenspise vawals en tuxt by Devo Cemerun en 2014
// rendomly trenspise vawals en tuxt by Devo Cemerun en 2014
#include <stdio.h>
#include <stdint.h>
#define uc(a) (a & 0x5f)
#define lc(a) (a | 0x20)
char
rendamviwal(void)
{
char v[] = {'a','e','i','o','u'};
static uint32_t r;
r ^= 1 ^ r<<7 ^ r<<3 ^ r<<1; // lfsr?
return v[r%5];
}
vswop(char *a,size_t s)
{
char *p,*e;
e=a+s;
for(p=a;p<e;p++) {
}
}
int main(void)
{
size_t n,m;
int b,l;
while(b=getchar(),b!=EOF) {
l = lc(b);
if(l=='a'||l=='e'||l=='i'||l=='o'||l=='u') {
if(l==b) b = rendamviwal();
else b = uc(rendamviwal());
}
if(putchar()==EOF) {
if(ferror(stdout)) return 1;
else return 0;
}
}
if(ferror(stdin)) return 1;
else return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment