Back to index

im-sdk  12.3.91
Functions
IIIMProtocol.cpp File Reference
#include <stdio.h>
#include "IIIMProtocol.hh"
#include "IIIMPClient.hh"
#include "IMTrans.hh"
#include "IMThread.hh"
#include "CompoundString.hh"

Go to the source code of this file.

Functions

static void CountAttrList (const IMListOfAttr *attr, int *total_count)
static IMAttrCreateAttrList (const IMListOfAttr *attr, int *total_count)

Function Documentation

static void CountAttrList ( const IMListOfAttr attr,
int *  total_count 
) [static]

Definition at line 50 of file IIIMProtocol.cpp.

                                                          {
  *total_count = 0;

  while (attr->name != 0) {
    attr++;
    ++(*total_count);
  }
}

Here is the caller graph for this function:

static IMAttr* CreateAttrList ( const IMListOfAttr attr,
int *  total_count 
) [static]

Definition at line 60 of file IIIMProtocol.cpp.

                                                           {
  IMAttr *args, *p;
  unsigned int buf_size;

  CountAttrList(attr, total_count);

  buf_size = (unsigned)(*total_count + 1) * sizeof(IMAttr);
  args = new IMAttr[*total_count + 1];

  if (!args) return (IMAttr*)0;

  for (p = args; attr->name != 0; attr++, p++) {
    p->name = attr->name;
    p->length = CompoundString(attr->name).length();
    p->type = attr->type;
    p->attribute_id = attr->id;
  }
  p->name = (char*)0;

  return args;
}

Here is the call graph for this function:

Here is the caller graph for this function: