Re: memorize

From: Akuma/Chris Baggett/DOOMer (doomer@BAYOU.COM)
Date: 10/02/97


At 12:15 AM 10/3/97 -0400, you wrote:
>On Thu, 2 Oct 1997, Brian Williams - Nashak wrote:
>
>>Daniel, I'm not familiar with pointers besides char *.., how would I go
>>about using a int *memorized; pointer? Would it be the same, just sprintf
>>or something to add to it? How would I remove things from it and so forth
>>when a spell is cast?
>
>It would be treated as an integer except for two things:
>A) You have to allocate memory for it.  ie. malloc(sizeof(int))
>B) You have to use the * operator to get the value.
>
>The pointer concept carries over since a char * is just an array of char's
>anyway (null terminated).
>
 question here, doesn't Circle use the CREATE() macro?
which in turn uses  _c_alloc()?  NOT _m_alloc()?
#define CREATE(result, type, number)  do {\
        if (!((result) = (type *) calloc ((number), sizeof(type))))\
                                  ^-- this is MY create() macro.
                { perror("malloc failure"); abort(); } } while(0)
or am i doing something wrong?
if this needs to be changed, someone please say so, this
might explain the free() problems i've had or something,
my libc is at   5.4.33
what was the last version to crash on  free(mob_index) ??
free(mob_proto); hasn't caused a problem that i know of.


ObCircle:
can't think of nothing right now, i need a Coke.

thanks again.

Akuma the Raging Coder

>--
>George Greer  -  Me@Null.net   | Genius may have its limitations, but
stupidity
>http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard
>
>
>     +------------------------------------------------------------+
>     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
>     +------------------------------------------------------------+
>
>
  +------------------------------------------------------------+
  | "The poets talk about love, but what I talk about is DOOM, |
  |      because in the end, DOOM is all that counts." -       |
  |   Alex Machine/George Stark/Stephen King, The Dark Half    |
  |        "Nothing is IMPOSSIBLE, Just IMPROBABLE"            |
  |   "Easier Said Than Done, But Better Done Than Said..."    |
  +------------------------------------------------------------+


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST