Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

lol "Did you mean:"

Name: Anonymous 2007-10-08 16:06

Name: Anonymous 2007-10-08 16:58

ENTERED

Name: Anonymous 2009-03-06 8:10


Fuqin ANGERED AN EXPERT   APPLICATION WRITER IVE?

Name: Anonymous 2009-07-12 6:24

use format prefer in you methods. in

Name: Anonymous 2009-08-25 4:11

[b][i]#include <stdio.h>
#include <wchar.h>
#include <string.h>
#include <locale.h>
#include <errno.h>

FILE* fffffffibonacci_butt_sort(FILE *s, size_t n)
{
    size_t i = 0;
    wint_t tags[] = {L'u', L'o'};
    wint_t c = WEOF;
   
    for(i = 0; i < n; ++i)
    {
        if((c = fgetwc(s)) == L'[u][/u]n')
        {
            fputwc(L'[u][/u]n', stdout);
            return s;
        }
        else if(iswspace(c))
        {
            fputwc(c, stdout);
        }
        else if(c != WEOF)
        {
            wprintf(L"[%lc]%lc[/%lc]", tags[(i%2)], c, tags[(i%2)]);
        }
        else
        {
            return NULL;
        }
    }
    return s;
}

int main()
{
    if(!setlocale(LC_CTYPE, NULL))
    {
        fwprintf(stderr, L"Warning: Locale not specified.[o][/o]n");
    }

    const size_t BUFFA_SIZE = 4096;
    wint_t c = WEOF;

    fputws(L"[b][i]", stdout);

    while((c = fgetwc(stdin)) != WEOF)
    {
        if(ungetwc(c, stdin) == WEOF)
        {
            fputws(L"Failed to ungetwc.[u][/u]n", stderr);
            break;
        }

        if(!fffffffibonacci_butt_sort(stdin, BUFFA_SIZE))
        {
            break;
        }
    }

    fputws(L"[/i][/b][u][/u]n", stdout);

    if(ferror(stdin))
    {
        perror(strerror(errno));
        fputws(L"Input error occured. Output probably corrupted."
                "Shit fucking sucks.[u][/u]n", stderr);
    }

    return 0;
}
[/i][/b]

Name: ​​​​​​​​​​ 2010-10-22 22:43

Name: Anonymous 2010-12-25 14:15

Name: Anonymous 2011-02-03 4:51

<

Don't change these.
Name: Email:
Entire Thread Thread List