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

What Can This Function Possibly Do?

Name: Anonymous 2011-09-28 5:17

I'm all lost...

libEntity *__cdecl cyLibDataEntry254(libEntity *E, entityPair *P)
{
  libEntity *L; // edx@1
  libEntity *Result; // eax@5
  libEntity *R; // edx@7

  L = E->L;
  if ( L )
  {
    L->R = E->R;
again:
    R = E->R;
    if ( R )
    {
      Result = E->L;
      R->L = Result;
    }
    else
    {
      if ( P->R != E )
        debugfail(254, "cglib/src/cylibdataentry.cpp");
      Result = E->L;
      P->R = Result;
    }
    E->L = 0;
    E->R = 0;
    return Result;
  }
  if ( P->L == E )
  {
    P->L = E->R;
    goto again;
  }
  if ( E->R )
    debugfail(243, "cglib/src/cylibdataentry.cpp");
  return Result;
}

Name: Anonymous 2011-09-28 5:58

>>22
No "Infinite Set"? I know you were lying.

Name: >>22 2011-09-28 6:04

>>23-kun I am not >>19. Nevertheless, I'd love to help, but if help came, then everyone is going to want help. The thread has peacefully ended. Ended, it has peacefully.

Name: Anonymous 2011-09-28 6:27

>>21
I would be happy if you could show me an empty set.

Name: Xarn 2011-09-28 6:58

SLACKWARESUPREMACYSLACKWARESUPREMACYSLACKWARESUPREMACYSLACKWARESUPREMACYSLACKWARESUPREMACY

Name: Anonymous 2011-09-28 7:13

>>25
I show you, but you cant see it.

Name: Anonymous 2011-09-28 8:44

>>1
It's a part of a bigger algorithm. E and P might be heavily aliased (refer to same or very close nodes).

Also it might be buggy, notice how it might return undefined value (Result) if all checks fail.

Name: Anonymous 2011-09-28 9:08

>>28
debugfail(254, "cglib/src/cylibdataentry.cpp") originally leaded to C++ exception handler or someting

Name: Anonymous 2011-09-28 9:13

struct Might look something like this..?
..wait, how you do recursive structs.... =/


probably some typedef here?

struct libEntity{
       libEntity *E, *R, *L; //could be left & right, e is up/down?(maybe?)
       };

struct entityPair{
       libEntry  *E, *R;};

Name: Anonymous 2011-09-28 9:15

struct Might look something like this..?
..wait, how you do recursive structs.... =/ ??


probably some typedef here?

struct libEntity{
       libEntity *E, *R, *L; //could be left & right, e is up/down?(maybe?)
       };

struct entityPair{
       libEntry  *E, *R;};

Name: Anonymous 2011-09-28 9:22

test

Name: Anonymous 2011-09-28 9:27

struct Might look something like this..? plus/minus a lot probably,,

struct libEntity{
       libEntity *E, *R, *L; //could be left & right (circular perhaps?), e is up/down?(maybe?)
       };

struct entityPair{
       libEntry  *E, *R;}; //two linked objects? or two pieces of an object? E & R..?


>>cylib :? cyclic library?

Name: Anonymous 2011-09-28 9:31

test

Name: Anonymous 2011-09-28 9:36

test

Name: Anonymous 2011-09-28 9:44

test

Name: Anonymous 2011-09-28 9:56


libEntity *__cdecl cyLibDataEntry254(libEntity *E, entityPair *P)
{

  L = E->L;

// L = E.L;

  if ( (E.)L ) // Got an E.L
  {


      (E.)L->R = E->R;
//E.L.R = E.R

again: (goto loop)


      R = E->R;
// R = E.R

    if ( R ) //Got an E.R
    {
      Result = E->L;  //Result E.L ?
      R->L = Result;  //Set E.R.L as result
    }
    else //Got no E.R
    {
      if ( P->R != E )
        debugfail(254, "cglib/src/cylibdataentry.cpp");
//skip off to somewhere if P.R !=E
 
      Result = E->L; 
      P->R = Result;  //Same as if got an E.R

    }
    E->L = 0; //Zero E.L & E.R
    E->R = 0;
    return Result;
  } 

//End here if we got an E.L // Start here if not

  if ( P->L == E )
  {
    P->L = E->R;
    goto again;
  }
  if ( E->R )
    debugfail(243, "cglib/src/cylibdataentry.cpp");
  return Result;
}

Name: Anonymous 2011-09-28 9:55


libEntity *__cdecl cyLibDataEntry254(libEntity *E, entityPair *P)
{

  L = E->L;

// L = E.L;

  if ( (E.)L ) // Got an E.L
  {


      (E.)L->R = E->R;
//E.L.R = E.R

again: (goto loop)


      R = E->R;
// R = E.R

    if ( R ) //Got an E.R
    {
      Result = E->L;  //Result E.L ?
      R->L = Result;  //Set E.R.L as result
    }
    else //Got no E.R
    {
      if ( P->R != E )
        debugfail(254, "cglib/src/cylibdataentry.cpp");
//skip off to somewhere if P.R !=E
 
      Result = E->L; 
      P->R = Result;  //Same as if got an E.R

    }
    E->L = 0; //Zero E.L & E.R
    E->R = 0;
    return Result;
  } 

//End here if we got an E.L // Start here if not

  if ( P->L == E )
  {
    P->L = E->R;
    goto again;
  }
  if ( E->R )
    debugfail(243, "cglib/src/cylibdataentry.cpp");
  return Result;
}

Name: Anonymous 2011-09-28 11:00

>>33
>cylib :? cyclic library?
cyberlore library
http://en.wikipedia.org/wiki/Cyberlore_Studios

Name: Anonymous 2011-09-28 11:01

>>33
>cylib :? cyclic library?
cyberlore library
http://en.wikipedia.org/wiki/Cyberlore_Studios

Name: 1010011010 2011-09-28 14:32

>>22
What do you mean, "peacefully"? People here are still alive!

Name: Anonymous 2011-09-28 18:26

You know, I'm tempted to say it's part of the code of a self-balancing tree, maybe a red-black tree or a splay tree.
I'm a bit too drunk to be arsed to figure out exactly which step this does right now.

Name: !!kCq+A64Losi56ze 2011-09-28 19:57

>>1
Oh oh, I know what the codes does. Too bad all niggers and jews on here that work shirt hourly jobs don't know.

Name: Anonymous 2011-09-28 20:15

SLACKWARESUPREMACYSLACKWARESUPREMACY

Name: Anonymous 2011-09-28 20:18

>>43
You are too stupid to notice that

  L = E->L;
  if ( L )
  {
    L->R = E->R;

does list unlinking. But if I name the vars...

  P = E->Prev;
  if ( P )
  {
    P->Next = E->Next;

...now even niggers will understand the code.

Name: Anonymous 2011-09-28 20:21

>>42
Drunk out your mind? How can you still be a good programmer with your brain floating in alcohol?

Name: Anonymous 2011-09-28 20:22

>>46
drank
self fix

Name: Anonymous 2011-09-28 20:22

>>45
Then how come you just stood there with your fucking thumb up your butt when the OP posted the code?

Name: Anonymous 2011-09-28 20:24

>>48
I'm the OP, you fucktard!

Name: Anonymous 2011-09-28 20:33

/prog/ is so retarded, it cant discern linked list from a "splay tree"

Name: Anonymous 2011-09-28 22:53


void __cdecl libEntry_delFromList(libEntry *E, libEntryList *L)
{
  libEntry *P; // edx@1
  libEntry *N; // edx@7

  P = E->Prev;
  if ( P )
  {
    P->Next = E->Next;
again:
    N = E->Next;
    if ( N )
    {
      N->Prev = E->Prev;
    }
    else
    {
      if ( L->Last != E )
        debugfail(254, "cglib/src/cylibdataentry.cpp");
      L->Last = E->Prev;
    }
    E->Prev = 0;
    E->Next = 0;
    return;
  }
  if ( L->First == E )
  {
    L->First = E->Next;
    goto again;
  }
  if ( E->Next )
    debugfail(243, "cglib/src/cylibdataentry.cpp");
}

Name: Xarn 2011-09-28 23:18

SLACKWARESUPREMACYSLACKWARESUPREMACYSLACKWARESUPREMACY

Name: Anonymous 2011-09-29 13:24

>>50
I resemble that statement!

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