A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4621
Function: _optimize_regexp_list_tokens_to_string

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 693
Function: getPaste

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

Re: PasteBin Clone! - Stikked
From Crimson Tern, 11 Years ago, written in C++.
This paste is a reply to PasteBin Clone! from NuLLFiX - go back
Embed
Viewing differences between PasteBin Clone! and Re: PasteBin Clone!
<!--
             .__  .__   _____.__                              
  ____  __ __|  | |  |_/ ______|__  ___   ____  ____   _____  
 /    |  |    | |  |   __|    /  / _/ ___/  _  /      
|   |    |  /  |_|  |_|  |  |  |>    <    __(  <_> )  Y Y  
|___|  /____/|____/____/__|  |__/__/_  /___  >____/|__|_|  /
     /                               / /   /            /
Created by nullfix @ nullfix.com
-->
 
Need Pastebin.com CLONE?
 
Head to
http://demo.nullfix.com/pastebox/ <--- demo
http://nullfix.com/pastebox <--- more info
 
Regards
#include "DoubleLinkedList.h"

// ????????????? ??????????? ??????
void InitDList(DList *L) {
        L->left = NULL;
        L->right = NULL;
        L->ptr = NULL;
        DListError = DListEmpty;
}

// ???????? ??????? ? ?????? ????? ??????? ??????????
void PrevPutDList(DList *L, BaseType E) {
        PtrEl next = NULL;                                // ?????????? ?????????? ????????
        PtrEl prev = NULL;                                // ?????????? ??????????? ????????
        PtrEl NewEl = new elementDList [1];

        // ???? ?? ?????????? ???????? ??????
        if (NewEl == NULL) {
                DListError = DListNotMem;
                return;
        }

        // ???? ?????? ????, ?? ????? ????????? ?? ????? ? ?????? ?????
        // ?????? ????????????? ?? ????? ???????
        if (EmptyDList(L)) {
                L->left = NewEl;
                L->right = L->left;
                L->ptr = L->left;
        } else {
                next = L->ptr;                 // ????????? ??????? ????????
                prev = L->ptr->prev; // ????????? ????????? ?? ?????????? ???????

                L->ptr->prev = NewEl;
                L->ptr = NewEl;

                if (BeginDList(L)) {
                        L->left = L->ptr;
                } else {
                        prev->next = NewEl;
                }
        }

        L->ptr->next = next;
        L->ptr->prev = prev;
        L->ptr->data = E;
        DListError = DListOk;
}

// ???????? ??????? ? ?????? ????? ???????? ?????????
void NextPutDList(DList *L, BaseType E) {
         PtrEl next = NULL;
        PtrEl prev = NULL;
        PtrEl NewEl = new elementDList [1];

        if (NewEl == NULL) {
                DListError = DListNotMem;
                return;
        }

        if (EmptyDList(L)) {
                L->left = NewEl;
                L->right = L->left;
                L->ptr = L->left;
        } else {
                next = L->ptr->next;
                prev = L->ptr;

                L->ptr->next = NewEl;
                L->ptr = NewEl;

                if (EndDList(L)) {
                        L->right = NewEl;
                } else {
                        next->prev = NewEl;
                }
        }

        L->ptr->next = next;
        L->ptr->prev = prev;
        L->ptr->data = E;
        DListError = DListOk;
}

// ????????? ??????? ?? ?????? ?? ?????????
void PrevGetDList(DList *L, BaseType *E) {
        if (EmptyDList(L)) {
                return;
        }

        ReadDList(L, E);

        if (L->left == L->right && L->left == L->ptr) {
                *E = L->ptr->data;
                delete L->ptr;
                L->ptr = NULL;
                L->left = NULL;
                L->right = NULL;
                return;
        }

        if (BeginDList(L)) {
                return;
        } else {
                *E = L->ptr->prev->data;
                if (L->ptr->prev->prev) {
                        PtrEl pntr = L->ptr->prev;
                        delete L->ptr->prev;
                        L->ptr->prev = pntr->prev;
                        pntr->prev->next = L->ptr;
                } else {
                        L->left = L->ptr;
                        delete L->ptr->prev;
                        L->ptr->prev = NULL;
                }

        }

}

// ????????? ??????? ?? ?????? ????? ?????????
void NextGetDList(DList *L, BaseType *E) {
        if (EmptyDList(L)) {
                return;
        }

        if (L->left == L->right && L->left == L->ptr) {
                *E = L->ptr->data;
                delete L->ptr;
                L->ptr = NULL;
                L->left = NULL;
                L->right = NULL;
                return;
        }

        if (EndDList(L)) {
                return;
        } else {
                *E = L->ptr->next->data;
                if (L->ptr->next->next) {
                        PtrEl pntr = L->ptr->next->next;
                        delete L->ptr->next;
                        L->ptr->next = pntr;
                        L->ptr->next->prev = L->ptr;
                } else {
                        L->right = L->ptr;
                        delete L->ptr->next;
                        L->ptr->next = NULL;
                }

        }

}

// ????????? ??????? ??????? ?? ??????
void ReadDList(DList *L, BaseType *E) {
        if (EmptyDList(L)) {
                return;
        }

        *E = L->ptr->data;
}

// ??????? ??????
void DoneDList(DList *L) {
        BeginPtrDList(L);
        BaseType e;

        while (!EmptyDList(L)) {
                NextGetDList(L, &e);
        }

        NextGetDList(L, &e);
}

// ??????????? ????????? ??????
void NextMoveDList(DList *L) {
        if (!EndDList(L)) {
                L->ptr = L->ptr->next;
        }
}

// ??????????? ????????? ?????
void PrevMoveDList(DList *L) {
        if (!BeginDList(L)) {
                L->ptr = L->ptr->prev;
        }
}

// ?????????, ???? ?? ??????
int EmptyDList(DList *L) {
        if (!L->left && !L->right) {
                DListError = DListEmpty;
                return 1;
        }

        return 0;
}

// ?????????, ?? ?????? ?? ?????? ?????????? ??????? ?????????
int BeginDList(DList *L) {
        if (EmptyDList(L) || !L->ptr->prev) {
                DListError = DListBegin;
                return 1;
        }

        return 0;
}

// ?????????, ? ????? ?? ?????? ?????????? ??????? ?????????
int EndDList(DList *L) {
        if (EmptyDList(L) || !L->ptr->next) {
                DListError = DListEnd;
                return 1;
        }

        return 0;
}

// ?????????? ????????? ? ??????
void BeginPtrDList(DList *L) {
        L->ptr = L->left;
        BeginDList(L);
}

// ?????????? ????????? ? ?????
void EndPtrDList(DList *L) {
        L->ptr = L->right;
        EndDList(L);
}

// ???????? ????????? ?????? ??????
int GetLastErrorDList() {
        return DListError;
}