• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ PRIV函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中PRIV函数的典型用法代码示例。如果您正苦于以下问题:C++ PRIV函数的具体用法?C++ PRIV怎么用?C++ PRIV使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了PRIV函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: surface_update_mfn_list

static void surface_update_mfn_list (surfman_surface_t * surface)
{
  struct surface_priv *p = PRIV(surface);
  xen_pfn_t *pfns;
  int rc;
  int domid = surface->pages_domid;
  size_t i, n = surface->page_count;

  /* p2m translation is only performed for lfb given by qemu,
   * so PFN_LINEAR or abort. */
  assert(p->type == TYPE_PFN_LINEAR);

  pfns = xcalloc(n, sizeof (xen_pfn_t));
  for (i = 0; i < n; ++i)
    pfns[i] = p->u.pfn_linear.base + i;

  if (xc_translate_gpfn_to_mfn (domid, n, pfns, surface->mfns))
    surfman_error ("Failed to translate pfns for dom%d (base:%#lx).",
                   domid, p->u.pfn_linear.base);

  free(pfns);
}
开发者ID:OpenXT,项目名称:surfman,代码行数:22,代码来源:surface.c


示例2: gom_noodle_replace_child

static GomNode *
gom_noodle_replace_child (GomNode *node,
                          GomNode *new_child,
                          GomNode *ref_child,
                          GError  **error)
{
    GomNoodlePrivate *priv = PRIV (node);
    GList *li;
    li = find_node (node, ref_child, error);
    if (li) {
        li->data = g_object_ref (new_child);
        priv->dirty_children = 1;
        if (GOM_IS_NODE_INTERNAL (ref_child)) {
            gom_node_internal_set_parent (GOM_NODE_INTERNAL (ref_child), NULL);
        }
        g_object_unref (ref_child);
        if (GOM_IS_NODE_INTERNAL (new_child)) {
            gom_node_internal_set_parent (GOM_NODE_INTERNAL (new_child), node);
        }
    }
    return ref_child;
}
开发者ID:jberkman,项目名称:gom,代码行数:22,代码来源:gomnoodle.c


示例3: idt77105_ioctl

static int idt77105_ioctl(struct atm_dev *dev,unsigned int cmd,void *arg)
{
        printk(KERN_NOTICE "%s(%d) idt77105_ioctl() called\n",dev->type,dev->number);
	switch (cmd) {
		case IDT77105_GETSTATZ:
			if (!capable(CAP_NET_ADMIN)) return -EPERM;
			/* fall through */
		case IDT77105_GETSTAT:
			return fetch_stats(dev,(struct idt77105_stats *) arg,
			    cmd == IDT77105_GETSTATZ);
		case ATM_SETLOOP:
			return set_loopback(dev,(int) (long) arg);
		case ATM_GETLOOP:
			return put_user(PRIV(dev)->loop_mode,(int *) arg) ?
			    -EFAULT : 0;
		case ATM_QUERYLOOP:
			return put_user(ATM_LM_LOC_ATM | ATM_LM_RMT_ATM,
			    (int *) arg) ? -EFAULT : 0;
		default:
			return -ENOIOCTLCMD;
	}
}
开发者ID:wxlong,项目名称:Test,代码行数:22,代码来源:idt77105.c


示例4: dclock_destructor

/* Plugin destructor. */
static void dclock_destructor(Plugin * p)
{
    DClockPlugin * dc = PRIV(p);

    /* Remove the timer. */
    if (dc->timer != 0)
        g_source_remove(dc->timer);

    /* Ensure that the calendar is dismissed. */
    if (dc->calendar_window != NULL)
        gtk_widget_destroy(dc->calendar_window);

    /* Deallocate all memory. */
    g_free(dc->clock_format);
    g_free(dc->tooltip_format);
    g_free(dc->action);
    g_free(dc->font);
    g_free(dc->prev_clock_value);
    g_free(dc->prev_tooltip_value);
    g_free(dc->timezone);
    g_free(dc->timezones);
    g_free(dc);
}
开发者ID:geekless,项目名称:waterline,代码行数:24,代码来源:dclock.c


示例5: button_release_event

static gboolean
button_release_event (GtkWidget     * widget,
                      GdkEventButton* event)
{
  GList* iter;

  update_hits (widget, (GdkEvent*) event);

  for (iter = PRIV (widget)->hits; iter; iter = iter->next)
    {
      if (gtk_widget_event (iter->data, (GdkEvent*) event))
        {
          return TRUE;
        }
    }

  if (GTK_WIDGET_CLASS (progress_path_bar_parent_class)->button_release_event)
    {
      return GTK_WIDGET_CLASS (progress_path_bar_parent_class)->button_release_event (widget, event);
    }

  return FALSE;
}
开发者ID:lpereira,项目名称:path-bar,代码行数:23,代码来源:path-bar.c


示例6: PRIV

void
PRIV(jit_free)(void *executable_jit, pcre2_memctl *memctl)
{
#ifndef SUPPORT_JIT
(void)executable_jit;
(void)memctl;
#else  /* SUPPORT_JIT */

executable_functions *functions = (executable_functions *)executable_jit;
void *allocator_data = memctl;
int i;

for (i = 0; i < JIT_NUMBER_OF_COMPILE_MODES; i++)
  {
  if (functions->executable_funcs[i] != NULL)
    sljit_free_code(functions->executable_funcs[i]);
  PRIV(jit_free_rodata)(functions->read_only_data_heads[i], allocator_data);
  }

SLJIT_FREE(functions, allocator_data);

#endif /* SUPPORT_JIT */
}
开发者ID:ALSchwalm,项目名称:fish-shell,代码行数:23,代码来源:pcre2_jit_misc.c


示例7: gom_noodle_set_property

static void
gom_noodle_set_property (GObject *object,
                         guint property_id,
                         const GValue *value,
                         GParamSpec *pspec)
{
    GomNoodlePrivate *priv = PRIV (object);

    switch (property_id) {
    case PROP_OWNER_DOCUMENT:
        GOM_SET_WEAK (priv->owner_document, g_value_get_object (value));
        break;
    case PROP_NAMESPACE_URI:
    case PROP_PREFIX:
    case PROP_LOCAL_NAME:
        if (!g_value_get_string (value)) {
            break;
        }
    default:
        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
        break;
    }
}
开发者ID:jberkman,项目名称:gom,代码行数:23,代码来源:gomnoodle.c


示例8: main

static void main(uint8_t view, const app_t *app, svc_main_proc_event_t event) {
	hal_lcd_clear();
	if(event & SVC_MAIN_PROC_EVENT_KEY_UP) {
		INC_MOD(PRIV(app)->countdown_current, svc_countdowns_n);
	}
	else if (event & SVC_MAIN_PROC_EVENT_KEY_DOWN) {
		DEC_MOD(PRIV(app)->countdown_current, svc_countdowns_n);
	}
	else if(event & SVC_MAIN_PROC_EVENT_KEY_ENTER_LONG) {
		app_exit();
	}
	else if(event & SVC_MAIN_PROC_EVENT_KEY_DOWN_LONG) {
		svc_countdown_t cd;
		svc_countdown_get(PRIV(app_current)->countdown_current, &cd);
		if(cd.state == SVC_COUNTDOWN_STATE_STOP) {
			svc_countdown_start(PRIV(app_current)->countdown_current);
		}
		else {
			svc_countdown_stop(PRIV(app_current)->countdown_current);
		}
	}

	svc_countdown_t cd;
	svc_countdown_get(PRIV(app)->countdown_current, &cd);
	svc_lcd_puti(0, 2, cd.h);
	svc_lcd_puti(2, 2, cd.m);
	svc_lcd_puti(4, 2, cd.s);
	hal_lcd_seg_set(HAL_LCD_SEG_COLON, 1);
	hal_lcd_seg_set_blink(HAL_LCD_SEG_COLON, cd.state == SVC_COUNTDOWN_STATE_RUN);
	if(cd.state == SVC_COUNTDOWN_STATE_RUN) {
		svc_lcd_puts(8, "ru");
	}
	else {
		svc_lcd_puts(8, "st");
	}
	svc_lcd_puti(6, 2, PRIV(app)->countdown_current);
	if(event & SVC_MAIN_PROC_EVENT_KEY_ENTER) {
		app_set_view(app, 1);
	}
}
开发者ID:carrotIndustries,项目名称:pluto-fw,代码行数:40,代码来源:app.c


示例9: resized

Window::Window(uword width, uword height, const char *title,bool fullscreen,
               word xpos, word ypos) : resized(true)
{
	data = (void *) new WindowData;

	PRIV(WindowData, wd);
	wd->width = width;
	wd->height = height;
	wd->aspect = (double) width / (double) height;
    wd->fullscreen = fullscreen; 
    glutInitWindowPosition(xpos, ypos);
    glutInitWindowSize(width, height);
    glutCreateWindow(title);
    if(fullscreen){
        glutHideWindow();
        glutDestroyWindow(glutGetWindow());
        char gameModeString [50];
        sprintf (gameModeString, "%dx%d",width,height);
        glutGameModeString(gameModeString);
        glutSetWindow(glutEnterGameMode());
    }
	wd->wid = glutGetWindow();

	glClearColor(0, 0, 0, 0);
	glEnable(GL_DEPTH_TEST);
	glEnable(GL_CULL_FACE);
	glShadeModel(GL_SMOOTH);

	glEnable(GL_LIGHTING);

	glEnable(GL_BLEND);
	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    //Clearing screen to get a black screen while loading..
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
    glutSwapBuffers();
	windows.insert(this);
}
开发者ID:FerryT,项目名称:OGO-2.3,代码行数:37,代码来源:video_glut.cpp


示例10: dclock_configure

/* Callback when the configuration dialog is to be shown. */
static void dclock_configure(Plugin * p, GtkWindow * parent)
{
    DClockPlugin * dc = PRIV(p);

    const char * clock_format_tooltip = _(
        "See the manual page strftime(3) for possible format codes.\n\n"
        "You can use the Pango markup to adjust text color, font size and other text properties.\n\n"
        "Additionaly you can use:\n"
        "\\n for line break\n"
        "\\t for column break"
    );

    const char * tooltip_format_tooltip = _(
        "See the manual page strftime(3) for possible format codes.\n\n"
        "You can use the Pango markup to adjust text color, font size and other text properties."
    );

    GtkWidget * dialog = wtl_create_generic_config_dialog(
        _(plugin_class(p)->name),
        GTK_WIDGET(parent),
        (GSourceFunc) dclock_apply_configuration, (gpointer) p,

        "", 0, (GType)CONF_TYPE_BEGIN_TABLE,
        _("Clock Format")  , &dc->clock_format  , (GType)CONF_TYPE_STR,
        "tooltip-text", clock_format_tooltip, (GType)CONF_TYPE_SET_PROPERTY,
        _("Tooltip Format"), &dc->tooltip_format, (GType)CONF_TYPE_STR,
        "tooltip-text", tooltip_format_tooltip, (GType)CONF_TYPE_SET_PROPERTY,
        _("Font")          , &dc->font          , (GType)CONF_TYPE_STR,
        _("Action when clicked"), &dc->action, (GType)CONF_TYPE_STR,
        "tooltip-text", _("Default action: display calendar"), (GType)CONF_TYPE_SET_PROPERTY,
        _("Timezone")  , &dc->timezone , (GType)CONF_TYPE_STR,
        "completion-list", (gpointer)dclock_get_timezones(dc), (GType)CONF_TYPE_SET_PROPERTY,
        "", 0, (GType)CONF_TYPE_END_TABLE,
        NULL);
    if (dialog)
        gtk_window_present(GTK_WINDOW(dialog));
}
开发者ID:geekless,项目名称:waterline,代码行数:38,代码来源:dclock.c


示例11: tcf_gact

static int
tcf_gact(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res)
{
	struct tcf_gact *p = PRIV(a, gact);
	int action = TC_ACT_SHOT;

	spin_lock(&p->lock);
#ifdef CONFIG_GACT_PROB
	if (p->ptype && gact_rand[p->ptype] != NULL)
		action = gact_rand[p->ptype](p);
	else
		action = p->action;
#else
	action = p->action;
#endif
	p->bstats.bytes += skb->len;
	p->bstats.packets++;
	if (action == TC_ACT_SHOT)
		p->qstats.drops++;
	p->tm.lastuse = jiffies;
	spin_unlock(&p->lock);

	return action;
}
开发者ID:jameshilliard,项目名称:actiontec_opensrc_mi424wr-rev-e-f_fw-20-10-7-5,代码行数:24,代码来源:act_gact.c


示例12: dclock_run_command_calendar_visible

static void dclock_run_command_calendar_visible(Plugin * p, char ** argv, int argc)
{
    DClockPlugin * dc = PRIV(p);

    gboolean visible = dc->calendar_window != NULL;
    gboolean old_visible = visible;
    visible = !visible;

    if (argc >= 1)
    {
        if (strcmp(argv[0], "true") == 0 || strcmp(argv[0], "1") == 0)
            visible = TRUE;
        else if (strcmp(argv[0], "false") == 0 || strcmp(argv[0], "0") == 0)
            visible = FALSE;
    }

    if (visible != old_visible)
    {
        if (visible)
            dclock_show_calendar(dc);
        else
            dclock_hide_calendar(dc);
    }
}
开发者ID:geekless,项目名称:waterline,代码行数:24,代码来源:dclock.c


示例13: gom_noodle_append_child

static GomNode *
gom_noodle_append_child (GomNode *node,
                         GomNode *new_child,
                         GError  **error)
{
    GomNoodlePrivate *priv = PRIV (node);
    GomNode *parent;
    GError *err = NULL;
    g_object_get (new_child, "parent-node", &parent, NULL);
    if (parent) {
        gom_node_remove_child (parent, new_child, &err);
        g_object_unref (parent);
        if (err) {
            g_propagate_error (error, err);
            return new_child;
        }
    }
    priv->children = g_list_append (priv->children, g_object_ref (new_child));
    priv->dirty_children = 1;
    if (GOM_IS_NODE_INTERNAL (new_child)) {
        gom_node_internal_set_parent (GOM_NODE_INTERNAL (new_child), node);
    }
    return new_child;
}
开发者ID:jberkman,项目名称:gom,代码行数:24,代码来源:gomnoodle.c


示例14: cherokee_logger_init_base

ret_t
cherokee_logger_init_base (cherokee_logger_t      *logger,
			   cherokee_plugin_info_t *info,
			   cherokee_config_node_t *config)
{
	ret_t ret;
	CHEROKEE_NEW_TYPE(priv, struct cherokee_logger_private);

	/* Init the base class
	 */
	cherokee_module_init_base (MODULE(logger), NULL, info);

	/* Pure virtual methods
	 */
	logger->priv         = priv;
	logger->write_access = NULL;
	logger->utc_time     = false;

	/* Private
	 */
	logger->priv->backup_mode = false;

       	CHEROKEE_MUTEX_INIT (&PRIV(logger)->mutex, NULL);
	cherokee_x_real_ip_init (&logger->priv->x_real_ip);

	/* Read the configuration
	 */
	ret = cherokee_x_real_ip_configure (&logger->priv->x_real_ip, config);
	if (ret != ret_ok) {
		return ret_error;
	}

	cherokee_config_node_read_bool (config, "utc_time", &logger->utc_time);

	return ret_ok;
}
开发者ID:BeQ,项目名称:webserver,代码行数:36,代码来源:logger.c


示例15: clip6_create

int clip6_create(int number)
{
	struct net_device *dev;
	struct clip6_priv *clip6_priv;
	int error;

	DPRINTK("clip6_create\n");
	if (number != -1) {
		for (dev = clip6_devs; dev; dev = PRIV(dev)->next)
			if (PRIV(dev)->number == number) return -EEXIST;
	}
	else {
		number = 0;
		for (dev = clip6_devs; dev; dev = PRIV(dev)->next)
			if (PRIV(dev)->number >= number)
				number = PRIV(dev)->number+1;
		DPRINTK("clip6_create number %d\n", number);
	}
	dev = kmalloc(sizeof(struct net_device)+sizeof(struct clip6_priv),
	    GFP_KERNEL); 
	DPRINTK("clip6_create mem\n");
	if (!dev) return -ENOMEM;
	DPRINTK("clip6_create mem ok\n");
	memset(dev,0,sizeof(struct net_device)+sizeof(struct clip6_priv));
	clip6_priv = PRIV(dev);
	sprintf(dev->name,"atm%d",number);
	dev->init = clip6_init;
	spin_lock_init(&clip6_priv->xoff_lock);
	clip6_priv->number = number;
	error = register_netdev(dev);
	if (error) {
		kfree(dev);
		DPRINTK("clip6_create error %d\n",error);
		return error;
	}
	clip6_priv->next = clip6_devs;
	clip6_devs = dev;
	clip6_priv->vccs = NULL;
	clip6_priv->vcc = NULL;
	DPRINTK("registered (net:%s)\n",dev->name);
	return number;
}
开发者ID:ProjectZeroSlackr,项目名称:linux-2.4.32-ipod,代码行数:42,代码来源:ipv6atm.c


示例16: error

/*
    Function: py_AudioFrame_new
        Creates an AudioFrame and gets a pointer to its audio_frame structure.
        Internal use only.

    Parameters:
        min_sample - Minimum sample for this frame.
        max_sample - Maximum sample for this frame.
        channels - Number of channels for this frame.
        frame - Optional pointer to a variable to receive the actual frame.
            Everything but the current data window will be set.

    Returns:
        A reference to the new object if successful, or NULL on an error (an
        exception will be set).
*/
PyObject *
py_AudioFrame_new( int min_sample, int max_sample, int channels, audio_frame **frame ) {
    if( max_sample < min_sample ) {
        PyErr_SetString( PyExc_ValueError, "max_sample was less than min_sample." );
        return NULL;
    }

    if( channels < 0 ) {
        PyErr_SetString( PyExc_ValueError, "channels was less than zero." );
        return NULL;
    }

    PyObject *tuple = PyTuple_New( 0 ), *dict = PyDict_New();

    PyObject *result = py_type_AudioFrame.tp_new( &py_type_AudioFrame, tuple, dict );

    Py_CLEAR(tuple);
    Py_CLEAR(dict);

    if( !result )
        return NULL;

    PRIV(result)->full_min_sample = min_sample;
    PRIV(result)->full_max_sample = max_sample;
    PRIV(result)->channels = channels;

    PRIV(result)->data = PyMem_Malloc( sizeof(float) * (max_sample - min_sample + 1) * channels );

    if( !PRIV(result)->data ) {
        Py_DECREF(result);
        return PyErr_NoMemory();
    }

    if( frame )
        *frame = PRIV(result);

    return result;
}
开发者ID:fluggo,项目名称:Canvas,代码行数:54,代码来源:AudioFrame.c


示例17: suni_start

static int suni_start(struct atm_dev *dev)
{
	unsigned long flags;
	int first;

	if (!(PRIV(dev) = kmalloc(sizeof(struct suni_priv),GFP_KERNEL)))
		return -ENOMEM;

	PRIV(dev)->dev = dev;
	spin_lock_irqsave(&sunis_lock,flags);
	first = !sunis;
	PRIV(dev)->next = sunis;
	sunis = PRIV(dev);
	spin_unlock_irqrestore(&sunis_lock,flags);
	memset(&PRIV(dev)->sonet_stats,0,sizeof(struct k_sonet_stats));
	PUT(GET(RSOP_CIE) | SUNI_RSOP_CIE_LOSE,RSOP_CIE);
		/* interrupt on loss of signal */
	poll_los(dev); /* ... and clear SUNI interrupts */
	if (dev->signal == ATM_PHY_SIG_LOST)
		printk(KERN_WARNING "%s(itf %d): no signal\n",dev->type,
		    dev->number);
	PRIV(dev)->loop_mode = ATM_LM_NONE;
	suni_hz(0); /* clear SUNI counters */
	(void) fetch_stats(dev,NULL,1); /* clear kernel counters */
	if (first) {
		init_timer(&poll_timer);
		poll_timer.expires = jiffies+HZ;
		poll_timer.function = suni_hz;
		poll_timer.data = 1;
#if 0
printk(KERN_DEBUG "[u] p=0x%lx,n=0x%lx\n",(unsigned long) poll_timer.list.prev,
    (unsigned long) poll_timer.list.next);
#endif
		add_timer(&poll_timer);
	}
	return 0;
}
开发者ID:sarnobat,项目名称:knoppix,代码行数:37,代码来源:suni.c


示例18: PRIV

static inline struct atm_flow_data *lookup_flow(struct Qdisc *sch, u32 classid)
{
	struct atm_qdisc_data *p = PRIV(sch);
	struct atm_flow_data *flow;

	for (flow = p->flows; flow; flow = flow->next)
		if (flow->classid == classid)
			break;
	return flow;
}

static int atm_tc_graft(struct Qdisc *sch, unsigned long arg,
			struct Qdisc *new, struct Qdisc **old)
{
	struct atm_qdisc_data *p = PRIV(sch);
	struct atm_flow_data *flow = (struct atm_flow_data *)arg;

	DPRINTK("atm_tc_graft(sch %p,[qdisc %p],flow %p,new %p,old %p)\n",
		sch, p, flow, new, old);
	if (!find_flow(p, flow))
		return -EINVAL;
	if (!new)
		new = &noop_qdisc;
	*old = xchg(&flow->q, new);
	if (*old)
		qdisc_reset(*old);
	return 0;
}

static struct Qdisc *atm_tc_leaf(struct Qdisc *sch, unsigned long cl)
开发者ID:acassis,项目名称:emlinux-ssd1935,代码行数:30,代码来源:sch_atm.c


示例19: vms_initialize

static bfd_boolean
vms_initialize (bfd * abfd)
{
  int i;
  bfd_size_type amt;

  bfd_set_start_address(abfd, (bfd_vma)-1);

  amt = sizeof(struct vms_private_data_struct);
  abfd->tdata.any = bfd_alloc(abfd, amt);
  if (abfd->tdata.any == NULL) {
      return FALSE;
  }

#ifdef __ALPHA
  PRIV(is_vax) = FALSE;
#else
  PRIV(is_vax) = TRUE;
#endif /* __ALPHA */
  PRIV(vms_buf) = NULL;
  PRIV(buf_size) = 0;
  PRIV(rec_length) = 0;
  PRIV(file_format) = FF_UNKNOWN;
  PRIV(fixup_done) = FALSE;
  PRIV(sections) = NULL;

  amt = (sizeof(struct stack_struct) * STACKSIZE);
  PRIV(stack) = (struct stack_struct *)bfd_alloc(abfd, amt);
  if (PRIV(stack) == NULL) {
      goto error_ret1;
  }
  PRIV(stackptr) = 0;

  amt = sizeof(struct bfd_hash_table);
  PRIV(vms_symbol_table) = (struct bfd_hash_table *)bfd_alloc(abfd, amt);
  if (PRIV (vms_symbol_table) == NULL)
    goto error_ret1;

  if (!bfd_hash_table_init (PRIV (vms_symbol_table), _bfd_vms_hash_newfunc))
    goto error_ret1;

  amt = sizeof(struct location_struct) * LOCATION_SAVE_SIZE;
  PRIV(location_stack) = (struct location_struct *)bfd_alloc(abfd, amt);
  if (PRIV(location_stack) == NULL) {
      goto error_ret2;
  }

  for ((i = 0); (i < VMS_SECTION_COUNT); i++) {
      PRIV(vms_section_table)[i] = NULL;
  }

  amt = MAX_OUTREC_SIZE;
  PRIV(output_buf) = (unsigned char *)bfd_alloc(abfd, amt);
  if (PRIV(output_buf) == NULL) {
      goto error_ret2;
  }

  PRIV (push_level) = 0;
  PRIV (pushed_size) = 0;
  PRIV (length_pos) = 2;
  PRIV (output_size) = 0;
  PRIV (output_alignment) = 1;

  return TRUE;

 error_ret2:
  bfd_hash_table_free (PRIV (vms_symbol_table));
 error_ret1:
  bfd_release (abfd, abfd->tdata.any);
  abfd->tdata.any = NULL;
  return FALSE;
}
开发者ID:cooljeanius,项目名称:apple-gdb-1824,代码行数:72,代码来源:vms.c


示例20: vms_object_p

static const struct bfd_target *
vms_object_p (bfd * abfd)
{
  int err = 0;
  int prev_type;
  const struct bfd_target *target_vector = NULL;
  const bfd_arch_info_type *arch = NULL;
  void * tdata_save = abfd->tdata.any;
  bfd_vma saddr_save = bfd_get_start_address (abfd);

#if defined(VMS_DEBUG) && VMS_DEBUG
  vms_debug(1, "vms_object_p (%p)\n", (void *)abfd);
#endif

  if (!vms_initialize (abfd))
    goto error_ret;

  if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET))
    goto err_wrong_format;

  prev_type = -1;

  do
    {
#if defined(VMS_DEBUG) && VMS_DEBUG
      vms_debug(7, "reading at %08lx\n", (unsigned long)bfd_tell(abfd));
#endif
      if (_bfd_vms_next_record (abfd) < 0)
	{
#if defined(VMS_DEBUG) && VMS_DEBUG
	  vms_debug (2, "next_record failed\n");
#endif
	  goto err_wrong_format;
	}

      if ((prev_type == EOBJ_S_C_EGSD)
	   && (PRIV (rec_type) != EOBJ_S_C_EGSD))
	{
	  if (! vms_fixup_sections (abfd))
	    {
#if defined(VMS_DEBUG) && VMS_DEBUG
	      vms_debug (2, "vms_fixup_sections failed\n");
#endif
	      goto err_wrong_format;
	    }
	}

      prev_type = PRIV (rec_type);

      if (target_vector == NULL)
	{
	  if (prev_type <= OBJ_S_C_MAXRECTYP)
	    target_vector = &vms_vax_vec;
	  else
	    target_vector = &vms_alpha_vec;
	}

      switch (prev_type)
	{
	  case OBJ_S_C_HDR:
	  case EOBJ_S_C_EMH:
	    err = _bfd_vms_slurp_hdr (abfd, prev_type);
	    break;
	  case OBJ_S_C_EOM:
	  case OBJ_S_C_EOMW:
	  case EOBJ_S_C_EEOM:
	    err = _bfd_vms_slurp_eom (abfd, prev_type);
	    break;
	  case OBJ_S_C_GSD:
	  case EOBJ_S_C_EGSD:
	    err = _bfd_vms_slurp_gsd (abfd, prev_type);
	    break;
	  case OBJ_S_C_TIR:
	  case EOBJ_S_C_ETIR:
	    err = _bfd_vms_slurp_tir (abfd, prev_type);
	    break;
	  case OBJ_S_C_DBG:
	  case EOBJ_S_C_EDBG:
	    err = _bfd_vms_slurp_dbg (abfd, prev_type);
	    break;
	  case OBJ_S_C_TBT:
	  case EOBJ_S_C_ETBT:
	    err = _bfd_vms_slurp_tbt (abfd, prev_type);
	    break;
	  case OBJ_S_C_LNK:
	    err = _bfd_vms_slurp_lnk (abfd, prev_type);
	    break;
	  default:
	    err = -1;
	}
      if (err != 0)
	{
#if defined(VMS_DEBUG) && VMS_DEBUG
	  vms_debug (2, "slurp type %d failed with %d\n", prev_type, err);
#endif
	  goto err_wrong_format;
	}
    }
  while ((prev_type != EOBJ_S_C_EEOM) && (prev_type != OBJ_S_C_EOM) && (prev_type != OBJ_S_C_EOMW));

//.........这里部分代码省略.........
开发者ID:cooljeanius,项目名称:apple-gdb-1824,代码行数:101,代码来源:vms.c



注:本文中的PRIV函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ PRIVATE函数代码示例发布时间:2022-05-30
下一篇:
C++ PRINT_TEST_BANNER函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap