コード例 #1
0
void MemoryService::add_g1PermGen_memory_pool(G1CollectedHeap* g1h,
                                              MemoryManager* mgr) {
  assert(mgr != NULL, "should have one manager");

  CompactingPermGenGen* perm_gen = (CompactingPermGenGen*) g1h->perm_gen();
  PermanentGenerationSpec* spec = perm_gen->spec();
  size_t max_size = spec->max_size() - spec->read_only_size()
                                     - spec->read_write_size();
  MemoryPool* pool = add_space(perm_gen->unshared_space(),
                               "G1 Perm Gen",
                               false, /* is_heap */
                               max_size,
                               true   /* support_usage_threshold */);
  mgr->add_pool(pool);

  // in case we support CDS in G1
  if (UseSharedSpaces) {
    pool = add_space(perm_gen->ro_space(),
                     "G1 Perm Gen [shared-ro]",
                     false, /* is_heap */
                     spec->read_only_size(),
                     true   /* support_usage_threshold */);
    mgr->add_pool(pool);

    pool = add_space(perm_gen->rw_space(),
                     "G1 Perm Gen [shared-rw]",
                     false, /* is_heap */
                     spec->read_write_size(),
                     true   /* support_usage_threshold */);
    mgr->add_pool(pool);
  }
}
コード例 #2
0
void MemoryService::add_compact_perm_gen_memory_pool(CompactingPermGenGen* perm_gen,
                                                     MemoryManager* mgr) {
  PermanentGenerationSpec* spec = perm_gen->spec();
  size_t max_size = spec->max_size() - spec->read_only_size() - spec->read_write_size();
  MemoryPool* pool = add_space(perm_gen->unshared_space(),
                               "Perm Gen",
                                false, /* is_heap */
                                max_size,
                                true   /* support_usage_threshold */);
  mgr->add_pool(pool);
  if (UseSharedSpaces) {
    pool = add_space(perm_gen->ro_space(),
                     "Perm Gen [shared-ro]",
                     false, /* is_heap */
                     spec->read_only_size(),
                     true   /* support_usage_threshold */);
    mgr->add_pool(pool);

    pool = add_space(perm_gen->rw_space(),
                     "Perm Gen [shared-rw]",
                     false, /* is_heap */
                     spec->read_write_size(),
                     true   /* support_usage_threshold */);
    mgr->add_pool(pool);
  }
}
コード例 #3
0
ファイル: print_str.c プロジェクト: aneopsy/my_ls
unsigned int	print_str(t_tmp_arg *tmp, t_params *params,
			  unsigned int s_to_add, unsigned int s_to_print)
{
  unsigned int	cwrite;

  cwrite = 0;
  if (tmp->t_char == NULL)
  {
    my_putstr("(null)");
    return (0);
  }
  if (params->is_precision == 1
      && params->precision <= my_strlen(tmp->t_char))
    s_to_print = params->precision;
  else
    s_to_print = my_strlen(tmp->t_char);
  if ((int)s_to_print < params->width)
    s_to_add = params->width - s_to_print;
  cwrite = s_to_print + s_to_add;
  if (params->less == 1)
    put_n_str(tmp->t_char, s_to_print);
  if (params->width >= (int)s_to_print)
    add_space(s_to_add);
  if (params->less == 0)
    put_n_str(tmp->t_char, s_to_print);
  return (cwrite);
}
コード例 #4
0
ファイル: baseapi.cpp プロジェクト: GaryShearer/BasicOCR
// Extract the OCR results, costs (penalty points for uncertainty),
// and the bounding boxes of the characters.
static void extract_result(ELIST_ITERATOR *out,
                           PAGE_RES* page_res) {
  PAGE_RES_IT page_res_it(page_res);
  int word_count = 0;
  while (page_res_it.word() != NULL) {
    WERD_RES *word = page_res_it.word();
    const char *str = word->best_choice->string().string();
    const char *len = word->best_choice->lengths().string();

    if (word_count)
      add_space(out);
    TBOX bln_rect;
    PBLOB_LIST *blobs = word->outword->blob_list();
    PBLOB_IT it(blobs);
    int n = strlen(len);
    TBOX** boxes_to_fix = new TBOX*[n];
    for (int i = 0; i < n; i++) {
      PBLOB *blob = it.data();
      TBOX current = blob->bounding_box();
      bln_rect = bln_rect.bounding_union(current);
      TESS_CHAR *tc = new TESS_CHAR(rating_to_cost(word->best_choice->rating()),
                                    str, *len);
      tc->box = current;
      boxes_to_fix[i] = &tc->box;

      out->add_after_then_move(tc);
      it.forward();
      str += *len;
      len++;
    }

    // Find the word bbox before normalization.
    // Here we can't use the C_BLOB bboxes directly,
    // since connected letters are not yet cut.
    TBOX real_rect = word->word->bounding_box();

    // Denormalize boxes by transforming the bbox of the whole bln word
    // into the denorm bbox (`real_rect') of the whole word.
    double x_stretch = double(real_rect.width()) / bln_rect.width();
    double y_stretch = double(real_rect.height()) / bln_rect.height();
    for (int j = 0; j < n; j++) {
      TBOX *box = boxes_to_fix[j];
      int x0 = int(real_rect.left() +
                   x_stretch * (box->left() - bln_rect.left()) + 0.5);
      int x1 = int(real_rect.left() +
                   x_stretch * (box->right() - bln_rect.left()) + 0.5);
      int y0 = int(real_rect.bottom() +
                   y_stretch * (box->bottom() - bln_rect.bottom()) + 0.5);
      int y1 = int(real_rect.bottom() +
                   y_stretch * (box->top() - bln_rect.bottom()) + 0.5);
      *box = TBOX(ICOORD(x0, y0), ICOORD(x1, y1));
    }
    delete [] boxes_to_fix;

    page_res_it.forward();
    word_count++;
  }
}
コード例 #5
0
ファイル: request.c プロジェクト: ameingast/libanidb
ani_request_t *ani_create_request(const char *raw_request)
{
    ani_request_t *request = (ani_request_t *)xmalloc(sizeof(ani_request_t));

    assert(NULL != raw_request);
    (void)xstrncpy(request->msg, raw_request, RAW_LEN);
    add_space(request);
    add_tag(request);
    add_session(request);
    return request;
}
コード例 #6
0
void MemoryService::add_compact_perm_gen_memory_pool(CompactingPermGenGen* perm_gen,
                                                     MemoryManager* mgr) {
  PermanentGenerationSpec* spec = perm_gen->spec();
size_t max_size=spec->max_size();
  MemoryPool* pool = add_space(perm_gen->unshared_space(),
                               "Perm Gen", 
                                false, /* is_heap */
                                max_size,
                                true   /* support_usage_threshold */);
  mgr->add_pool(pool);
}
コード例 #7
0
// Add memory pool(s) for one generation
void MemoryService::add_generation_memory_pool(Generation* gen, 
                                               MemoryManager* major_mgr,
                                               MemoryManager* minor_mgr) {
  Generation::Name kind = gen->kind();
  int index = _pools_list->length();

  switch (kind) {
    case Generation::DefNew: {
      assert(major_mgr != NULL && minor_mgr != NULL, "Should have two managers");
      DefNewGeneration* young_gen = (DefNewGeneration*) gen;
      // Add a memory pool for each space and young gen doesn't 
      // support low memory detection as it is expected to get filled up.
      MemoryPool* eden = add_space(young_gen->eden(),
                                   "Eden Space",
                                   true, /* is_heap */
                                   young_gen->max_eden_size(),
                                   false /* support_usage_threshold */);
      MemoryPool* survivor = add_survivor_spaces(young_gen, 
                                                 "Survivor Space", 
                                                 true, /* is_heap */
                                                 young_gen->max_survivor_size(),
                                                 false /* support_usage_threshold */);
      break;
    }

    case Generation::MarkSweepCompact: {
      assert(major_mgr != NULL && minor_mgr == NULL, "Should have only one manager");
      add_gen(gen,
              "Tenured Gen",
              true, /* is_heap */
              true  /* support_usage_threshold */);
      break;
    }

    default:
      assert(false, "should not reach here");
      // no memory pool added for others
      break;
  }

  assert(major_mgr != NULL, "Should have at least one manager");
  // Link managers and the memory pools together
  for (int i = index; i < _pools_list->length(); i++) {
    MemoryPool* pool = _pools_list->at(i);
    major_mgr->add_pool(pool);
    if (minor_mgr != NULL) {
      minor_mgr->add_pool(pool);
    }
  }
}
コード例 #8
0
bool CntrlSubGroup_Extended_string::strcpy_center_text(const char*_text)
{
	if (metric.height*metric.width > strlen(_text))
	{
		if (metric.height == 1)
		{
			add_space((metric.width - strlen(_text)) / 2);
			strcat(text, _text);
		}
		else
			strcpy(text, _text);
		modification = true;
		return true;
	}
	else
		return false;
}
コード例 #9
0
bool CntrlSubGroup::strcpy_center_text(float _ftext, int afterpoint)
{
	char _text[string_length];
	ftoa(_ftext, _text, afterpoint);
	if (metric.height*metric.width > strlen(_text) + 1)
	{
		if (metric.height == 1)
		{
			add_space((metric.width - strlen(_text)) / 2);
			strcat(text, _text);
		}
		else
			strcpy(text, _text);
		modification = true;
		return true;
	}
	else
		return false;
}
コード例 #10
0
bool CntrlSubGroup_Extended_string::strcpy_center_text(int _ntext)
{
	char _text[string_length];
	itoa(_ntext, _text);
	if (metric.height*metric.width > strlen(_text) + 1)
	{
		if (metric.height == 1)
		{
			add_space((metric.width - strlen(_text)) / 2);
			strcat(text, _text);
		}
		else
			strcpy(text, _text);
		modification = true;
		return true;
	}
	else
		return false;
}
コード例 #11
0
ファイル: print_char.c プロジェクト: sebastiencs/my_printf
unsigned int	print_char(t_tmp_arg *tmp, t_params *params,
			   unsigned int s_to_add,
			   unsigned int s_to_print)
{
  unsigned int	chars_written;

  chars_written = 0;
  tmp->t_int = (unsigned char)tmp->t_int;
  s_to_print = 1;
  if (s_to_print < params->width)
    s_to_add = params->width - s_to_print;
  chars_written = s_to_print + s_to_add;
  if (params->less == 1)
    my_putchar(tmp->t_int);
  if (params->width >= s_to_print)
    add_space(s_to_add);
  if (params->less == 0)
    my_putchar(tmp->t_int);
  return (chars_written);
}
コード例 #12
0
void main()
{
	setlocale(LC_CTYPE,"rus");
	printf("Введите текст (длина %d строк)\n",N);
	char buffer[128];
	for (int i = 0; i < N; i++)
	{
		gets(buffer);
		strings[i] = new char [string_length(buffer)];
		string_copy(buffer,strings[i]);
	}
	printf("\nВыравнивание по ширине относительно самой длинной строки:\n");
	string_maxlength();
	for (int i = 0; i < N; i++)
	{
		add_space (strings[i], string_length(strings[i]));
		puts(strings[i]);
	}
	getch();
}
コード例 #13
0
ファイル: print_hex.c プロジェクト: aneopsy/my_ls
void	finish_little_hexa(t_tmp_arg *tmp, t_params *params,
				  unsigned int s_to_add,
				  unsigned int s_to_print)
{
  if (params->less == 1)
  {
    if (params->hash == 1 && tmp->uint != 0)
      my_putstr("0x");
    my_put_unsigned_nb(tmp->uint, s_to_print, "0123456789abcdef");
  }
  if (params->width >= params->precision && params->zero == 1
      && params->is_precision == 0 && params->less == 0
      && params->width > (int)s_to_print)
    add_zero(s_to_add);
  else if (params->width >= (params->precision) &&
	   params->width > (int)s_to_print)
    add_space(s_to_add);
  if (params->less == 0)
  {
    if (params->hash == 1 && tmp->uint != 0)
      my_putstr("0x");
    my_put_unsigned_nb(tmp->uint, s_to_print, "0123456789abcdef");
  }
}
コード例 #14
0
ファイル: mod_autoind.c プロジェクト: nask0/calipso
static int mod_autoind_make_index_table(calipso_reply_t * reply, const char *uri, int prop)
{
    DIR *dir;
    struct stat sb;
    struct tm tm;
    char date[26];
    struct dirent *ent;

    cpo_array_t arr;
    cpo_autoind_entry_t *entry;
    int i,dname_len;
    char *dname;
    const char * directory = calipso_resource_get_path(reply->resource);

    struct chunk_ctx * cb  = chunk_ctx_alloc(reply->pool);

    arr.elem_size = sizeof(cpo_autoind_entry_t);
    arr.v = calloc(40 , sizeof(cpo_autoind_entry_t) );
    arr.num = 0;
    arr.max = 32;


    if ((dir = opendir(directory)) == NULL) {

        calipso_reply_set_status(reply, HTTP_FORBIDDEN);
        return CPO_ERR;
    }

    while ((ent = readdir(dir)) != NULL) {

        if(!strncmp(ent->d_name, ".", 1)) {
            continue;
        }

        if( stat(ent->d_name , &sb) != -1) {

            entry = cpo_array_push(&arr);
            entry->name  = cpo_pool_strdup(reply->pool, ent->d_name);
            entry->mtime = sb.st_mtime;
            entry->size =  sb.st_size;
            entry->is_dir =  S_ISDIR(sb.st_mode);
        }
    }

    closedir(dir);

    cpo_array_qsort(&arr, mod_autoindex_cmp_entries);

    chunk_ctx_printf(reply->pool, cb, indheadfoot[0], uri, uri);

    if(strcmp(uri,"/") ) {
        char dir[FILENAME_MAX];
        strncpy(dir, uri, sizeof(dir));

        chunk_ctx_printf(reply->pool, cb, "<a href=\"%s\">%s</a>%s %40s\n",
                         dirname(dir), PARENT_DIR_NAME, add_space(PARENT_DIR_NAME,
                                 sizeof(PARENT_DIR_NAME), SPACE_CHAR), "-");
    }

    for(i =0; i < arr.num; i++)
    {
        entry = cpo_array_get_at(&arr, i);
        dname_len = cpo_strlen(entry->name);

        if(ETALON_SPACE < dname_len) {
            int dots;
            dname = cpo_pool_strdup(reply->pool, entry->name);

            for(dots = 4; dots >= 1; dots--) {
                dname[ETALON_SPACE-dots] = ((dots == 1) ? '>' : '.');
            }

            dname[ETALON_SPACE]='\0';
            dname_len = ETALON_SPACE;
        } else {
            dname = entry->name;
        }

        if(dname) {

            cpo_gmtime(&tm, &entry->mtime);

            cpo_snprintf(date, sizeof(date), "%02d-%s-%d %02d:%02d ",
                         tm.tm_mday, months[tm.tm_mon ],	tm.tm_year, tm.tm_hour, tm.tm_min);

            if(entry->is_dir) {

                chunk_ctx_printf(reply->pool, cb, "<a href=\"%s%s/\">%s/</a>%s%10s %20s\n",
                                 uri, entry->name , dname, add_space(dname, dname_len, SPACE_CHAR), date, "-");
            } else {

                chunk_ctx_printf(reply->pool, cb, "<a href=\"%s%s\">%s</a>%s %s %20.llu\n",
                                 uri, entry->name , dname, add_space(dname, dname_len ,SPACE_CHAR), date, (uintmax_t) entry->size);
            }
            //free dname
        }
    }

    chunk_ctx_printf(reply->pool, cb, indheadfoot[1], "");

    CNUNKS_ADD_TAIL_CTX(reply->out_filter, cb);

    free(arr.v);

    return CPO_OK;
}
コード例 #15
0
// Add memory pool(s) for one generation
void MemoryService::add_generation_memory_pool(Generation* gen,
                                               MemoryManager* major_mgr,
                                               MemoryManager* minor_mgr) {
  guarantee(gen != NULL, "No generation for memory pool");
  Generation::Name kind = gen->kind();
  int index = _pools_list->length();

  switch (kind) {
    case Generation::DefNew: {
      assert(major_mgr != NULL && minor_mgr != NULL, "Should have two managers");
      DefNewGeneration* young_gen = (DefNewGeneration*) gen;
      // Add a memory pool for each space and young gen doesn't
      // support low memory detection as it is expected to get filled up.
      MemoryPool* eden = add_space(young_gen->eden(),
                                   "Eden Space",
                                   true, /* is_heap */
                                   young_gen->max_eden_size(),
                                   false /* support_usage_threshold */);
      MemoryPool* survivor = add_survivor_spaces(young_gen,
                                                 "Survivor Space",
                                                 true, /* is_heap */
                                                 young_gen->max_survivor_size(),
                                                 false /* support_usage_threshold */);
      break;
    }

#if INCLUDE_ALL_GCS
    case Generation::ParNew:
    case Generation::ASParNew:
    {
      assert(major_mgr != NULL && minor_mgr != NULL, "Should have two managers");
      // Add a memory pool for each space and young gen doesn't
      // support low memory detection as it is expected to get filled up.
      ParNewGeneration* parnew_gen = (ParNewGeneration*) gen;
      MemoryPool* eden = add_space(parnew_gen->eden(),
                                   "Par Eden Space",
                                   true /* is_heap */,
                                   parnew_gen->max_eden_size(),
                                   false /* support_usage_threshold */);
      MemoryPool* survivor = add_survivor_spaces(parnew_gen,
                                                 "Par Survivor Space",
                                                 true, /* is_heap */
                                                 parnew_gen->max_survivor_size(),
                                                 false /* support_usage_threshold */);

      break;
    }
#endif // INCLUDE_ALL_GCS

    case Generation::MarkSweepCompact: {
      assert(major_mgr != NULL && minor_mgr == NULL, "Should have only one manager");
      add_gen(gen,
              "Tenured Gen",
              true, /* is_heap */
              true  /* support_usage_threshold */);
      break;
    }

#if INCLUDE_ALL_GCS
    case Generation::ConcurrentMarkSweep:
    case Generation::ASConcurrentMarkSweep:
    {
      assert(major_mgr != NULL && minor_mgr == NULL, "Should have only one manager");
      ConcurrentMarkSweepGeneration* cms = (ConcurrentMarkSweepGeneration*) gen;
      MemoryPool* pool = add_cms_space(cms->cmsSpace(),
                                       "CMS Old Gen",
                                       true, /* is_heap */
                                       cms->reserved().byte_size(),
                                       true  /* support_usage_threshold */);
      break;
    }
#endif // INCLUDE_ALL_GCS

    default:
      assert(false, "should not reach here");
      // no memory pool added for others
      break;
  }

  assert(major_mgr != NULL, "Should have at least one manager");
  // Link managers and the memory pools together
  for (int i = index; i < _pools_list->length(); i++) {
    MemoryPool* pool = _pools_list->at(i);
    major_mgr->add_pool(pool);
    if (minor_mgr != NULL) {
      minor_mgr->add_pool(pool);
    }
  }
}
コード例 #16
0
ファイル: sprintf.c プロジェクト: Hobbitron/tmi2_fluffos_v3
/*
 * Converts any LPC datatype into an arbitrary string format
 * and returns a pointer to this string.
 * Scary number of parameters for a recursive function.
 */
void svalue_to_string (svalue_t * obj, outbuffer_t * outbuf, int indent, int trailing, int indent2)
{
    int i;

    /* prevent an infinite recursion on self-referential structures */
    if (indent > 20) {
        outbuf_add(outbuf, "...");
        return;
    }
    if (!indent2)
        add_space(outbuf, indent);
    switch ((obj->type & ~T_FREED)) {
        case T_INVALID:
            outbuf_add(outbuf, "T_INVALID");
            break;
        case T_LVALUE:
            outbuf_add(outbuf, "lvalue: ");
            svalue_to_string(obj->u.lvalue, outbuf, indent + 2, trailing, 0);
            break;
        case T_REF:
            if(!obj->u.ref->lvalue)
                kill_ref(obj->u.ref);
            else {
                outbuf_add(outbuf, "ref: ");
                svalue_to_string(obj->u.ref->lvalue, outbuf, indent + 2, trailing, 0);
            }
            break;
        case T_NUMBER:
            numadd(outbuf, obj->u.number);
            break;
        case T_REAL:
            outbuf_addv(outbuf, "%f", obj->u.real);
            break;
        case T_STRING:
            outbuf_add(outbuf, "\"");
            outbuf_add(outbuf, obj->u.string);
            outbuf_add(outbuf, "\"");
            break;
        case T_CLASS:
            {
                int n = obj->u.arr->size;
                outbuf_add(outbuf, "CLASS( ");
                        numadd(outbuf, n);
                        outbuf_add(outbuf, n == 1 ? " element\n" : " elements\n");
                        for (i = 0; i < (obj->u.arr->size) - 1; i++)
                        svalue_to_string(&(obj->u.arr->item[i]), outbuf,
                            indent + 2, 1, 0);
                        if(obj->u.arr->size)
                        svalue_to_string(&(obj->u.arr->item[i]), outbuf,
                            indent + 2, 0, 0);
                        outbuf_add(outbuf, "\n");
                        add_space(outbuf, indent);
                        outbuf_add(outbuf, " )");
                        break;
            }
        case T_ARRAY:
            if (!(obj->u.arr->size)) {
                outbuf_add(outbuf, "({ })");
            } else {
                outbuf_add(outbuf, "({ /* sizeof() == ");
                        numadd(outbuf, obj->u.arr->size);
                        outbuf_add(outbuf, " */\n");
                        for (i = 0; i < (obj->u.arr->size) - 1; i++)
                        svalue_to_string(&(obj->u.arr->item[i]), outbuf, indent + 2, 1, 0);
                        svalue_to_string(&(obj->u.arr->item[i]), outbuf, indent + 2, 0, 0);
                        outbuf_add(outbuf, "\n");
                        add_space(outbuf, indent);
                        outbuf_add(outbuf, "})");
            }
            break;
#ifndef NO_BUFFER_TYPE
        case T_BUFFER:
            outbuf_add(outbuf, "<buffer>");
            break;
#endif
        case T_FUNCTION:
            {
                svalue_t tmp;
                object_t *ob;
                tmp.type = T_ARRAY;

                outbuf_add(outbuf, "(: ");
                        switch (obj->u.fp->hdr.type) {
                        case FP_LOCAL | FP_NOT_BINDABLE:
                        ob = obj->u.fp->hdr.owner;
                        if (!ob || ob->flags & O_DESTRUCTED) {
                        outbuf_add(outbuf, "0");
                        break;
                        }
                        outbuf_add(outbuf, function_name(ob->prog,
                                obj->u.fp->f.local.index));
                        break;
                        case FP_SIMUL:
                        outbuf_add(outbuf, simuls[obj->u.fp->f.simul.index].func->funcname);
                        break;
                        case FP_FUNCTIONAL:
                        case FP_FUNCTIONAL | FP_NOT_BINDABLE:
                        {
                        char buf[10];
                        int n = obj->u.fp->f.functional.num_arg;

                        outbuf_add(outbuf, "<code>(");
                            for (i=1; i < n; i++) {
                            sprintf(buf, "$%i, ", i);
                            outbuf_add(outbuf, buf);
                            }
                            if (n) {
                            sprintf(buf, "$%i", n);
                            outbuf_add(outbuf, buf);
                            }
                            outbuf_add(outbuf, ")");
                            break;
                        }
                        case FP_EFUN:
                        {
                            int i;
                            i = obj->u.fp->f.efun.index;
                            outbuf_add(outbuf, query_instr_name(i));
                            break;
                        }
                        }
                        if (obj->u.fp->hdr.args) {
                            for (i=0; i<obj->u.fp->hdr.args->size; i++) {
                                outbuf_add(outbuf, ", ");
                                svalue_to_string(&(obj->u.fp->hdr.args->item[i]), outbuf, indent, 0, 0);
                            }
                        }
            }
            outbuf_add(outbuf, " :)");
            break;
        case T_MAPPING:
            if (!(obj->u.map->count)) {
                outbuf_add(outbuf, "([ ])");
            } else {
                outbuf_add(outbuf, "([ /* sizeof() == ");
                        numadd(outbuf, obj->u.map->count);
                        outbuf_add(outbuf, " */\n");
                        for (i = 0; i <= obj->u.map->table_size; i++) {
                        mapping_node_t *elm;

                        for (elm = obj->u.map->table[i]; elm; elm = elm->next) {
                        svalue_to_string(&(elm->values[0]), outbuf, indent + 2, 0, 0);
                        outbuf_add(outbuf, " : ");
                        svalue_to_string(&(elm->values[1]), outbuf, indent + 4, 1, 1);
                        }
                        }
                        add_space(outbuf, indent);
                        outbuf_add(outbuf, "])");
            }
            break;
        case T_OBJECT:
            {
                svalue_t *temp;

                if (obj->u.ob->flags & O_DESTRUCTED) {
                    numadd(outbuf, 0);
                    break;
                }

                outbuf_addchar(outbuf, '/');
                outbuf_add(outbuf, obj->u.ob->obname);

                if (!max_eval_error && !too_deep_error) {
                    push_object(obj->u.ob);
                    temp = safe_apply_master_ob(APPLY_OBJECT_NAME, 1);
                    if (temp && temp != (svalue_t *) -1 && (temp->type == T_STRING)) {
                        outbuf_add(outbuf, " (\"");
                                outbuf_add(outbuf, temp->u.string);
                                outbuf_add(outbuf, "\")");
                    }
                }
                break;
            }
        default:
            outbuf_addv(outbuf, "!ERROR: GARBAGE SVALUE: %x!", obj->type);
    }                           /* end of switch (obj->type) */
    if (trailing)
        outbuf_add(outbuf, ",\n");
}                               /* end of svalue_to_string() */