当前位置: 首页>>代码示例>>C++>>正文


C++ PINFO函数代码示例

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


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

示例1: g_return_if_fail

/* ================================================================= */
void
GncSqlTaxTableBackend::create_tables (GncSqlBackend* sql_be)
{
    gint version;

    g_return_if_fail (sql_be != NULL);

    version = sql_be->get_table_version( TT_TABLE_NAME);
    if (version == 0)
    {
        sql_be->create_table(TT_TABLE_NAME, TT_TABLE_VERSION, tt_col_table);
    }
    else if (version < m_version)
    {
        /* Upgrade 64 bit int handling */
        sql_be->upgrade_table(TT_TABLE_NAME, tt_col_table);
        sql_be->set_table_version (TT_TABLE_NAME, TT_TABLE_VERSION);
        PINFO ("Taxtables table upgraded from version 1 to version %d\n",
               TT_TABLE_VERSION);
    }

    version = sql_be->get_table_version( TTENTRIES_TABLE_NAME);
    if (version == 0)
    {
        sql_be->create_table(TTENTRIES_TABLE_NAME, TTENTRIES_TABLE_VERSION,
                              ttentries_col_table);
    }
    else if (version < TTENTRIES_TABLE_VERSION)
    {
        /* Upgrade 64 bit int handling */
        sql_be->upgrade_table(TTENTRIES_TABLE_NAME, ttentries_col_table);
        sql_be->set_table_version (TTENTRIES_TABLE_NAME, TTENTRIES_TABLE_VERSION);
        PINFO ("Taxtable entries table upgraded from version 1 to version %d\n",
               TTENTRIES_TABLE_VERSION);
    }
}
开发者ID:Mechtilde,项目名称:gnucash,代码行数:37,代码来源:gnc-tax-table-sql.cpp

示例2: ov6xx0_detect

/* This detects the OV6620, OV6630, OV6630AE, or OV6630AF chip. */
static int ov6xx0_detect(struct i2c_client *c)
{
	struct ovcamchip *ov = i2c_get_clientdata(c);
	int rc;
	unsigned char val;

	PDEBUG(4, "");

	/* Detect chip (sub)type */
	rc = ov_read(c, GENERIC_REG_COM_I, &val);
	if (rc < 0) {
		PERROR("Error detecting ov6xx0 type");
		return -1;
	}

	if ((val & 3) == 0) {
		ov->subtype = CC_OV6630;
		PINFO("Camera chip is an OV6630");
	} else if ((val & 3) == 1) {
		ov->subtype = CC_OV6620;
		PINFO("Camera chip is an OV6620");
	} else if ((val & 3) == 2) {
		ov->subtype = CC_OV6630;
		PINFO("Camera chip is an OV6630AE");
	} else if ((val & 3) == 3) {
		ov->subtype = CC_OV6630;
		PINFO("Camera chip is an OV6630AF");
	}

	if (ov->subtype == CC_OV6620)
		ov->sops = &ov6x20_ops;
	else
		ov->sops = &ov6x30_ops;

	return 0;
}
开发者ID:Dronevery,项目名称:JetsonTK1-kernel,代码行数:37,代码来源:ovcamchip_core.c

示例3: timer_event

static void timer_event(unsigned long data) 
{
	/* TODO Auto-generated Function */
	PINFO("my_input_dev_timer executing\n");
	//
	input_report_key(my_input_dev_priv->dev,KEY_A ,1);
	input_report_key(my_input_dev_priv->dev,KEY_A ,0);
	input_report_key(my_input_dev_priv->dev,KEY_B ,1);
	input_report_key(my_input_dev_priv->dev,KEY_B ,0);
	input_sync(my_input_dev_priv->dev);
	//
	my_input_dev_timer.expires = jiffies + MY_INPUT_DEV_DELAY_MS * HZ / 1000;
	add_timer(&my_input_dev_timer);

}
开发者ID:aseyfi,项目名称:linux_device_driver,代码行数:15,代码来源:my_input_dev.c

示例4: ctrl_g_defence_original

void ctrl_g_defence_original()
{
	char buf[200];
	if (RINFO.turn==mypos&& (PINFO(mypos).flag & PEOPLE_ALIVE))
	{
		if (PINFO(mypos).flag & PEOPLE_BAD)
		{
			if (RINFO.voted[mypos]!=-2)
			{
				sprintf (buf, "\33[31m你想崩溃了\33[m");
				RINFO.voted[mypos]=-2;
			}
			else
			{
				sprintf(buf,"\33[31m你不想崩溃了\33[m");
				RINFO.voted[mypos]=-1;
			}
		}
		else
			sprintf(buf,"不能崩溃");
		send_msg(mypos,buf);
		kill_msg(mypos);
	}
}
开发者ID:marvelliu,项目名称:lilacsrc,代码行数:24,代码来源:ctrlg.c

示例5: my_uart_init

static int __init my_uart_init(void)
{
    /* TODO Auto-generated Function Stub */

    int res;
    int i;

    my_uart_tty = alloc_tty_driver(MY_UART_N_MINORS);
    if (!my_uart_tty) {
        PERR("TTY Driver allocation failed\n");
        return -ENOMEM;
    }

    my_uart_tty_initialization();

    tty_set_operations(my_uart_tty, &my_uart_tops);

    res= tty_register_driver(my_uart_tty);
    if(res) {
        PERR("Failed to register the tty driver\n");
        return res;
    }

    for (i = 0; i < MY_UART_N_MINORS; i++) {

        init_timer(&devices[i].my_uart_timer1);
        devices[i].my_uart_timer1.data = &devices[i]; //TODO
        devices[i].my_uart_timer1.function = my_timer;
        devices[i].my_uart_timer1.expires = jiffies + MY_UART_DELAY_MS * HZ / 1000;

        tty_port_init(&devices[i].port);

#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
        tty_register_device(my_uart_tty, i, NULL);
#else
        tty_port_register_device(&devices[i].port, my_uart_tty, i, NULL);
#endif
    }

    PINFO("INIT\n");

    init_timer(&my_uart_timer);
    my_uart_timer.data = 100; //TODO
    my_uart_timer.function = my_timer;
    my_uart_timer.expires = jiffies + MY_UART_DELAY_MS * HZ / 1000;

    return 0;
}
开发者ID:aseyfi,项目名称:linux_device_driver,代码行数:48,代码来源:my_uart.c

示例6: gnc_hook_lookup

static GncHook *
gnc_hook_lookup (const gchar *name)
{
    GncHook *hook;

    ENTER("name %s", name);
    if (gnc_hooks_list == NULL)
    {
        PINFO("no hook lists");
        gnc_hooks_init();
    }

    hook = g_hash_table_lookup(gnc_hooks_list, name);
    LEAVE("hook list %p", hook);
    return(hook);
}
开发者ID:iulianu,项目名称:gnucash-butchered,代码行数:16,代码来源:gnc-hooks.cpp

示例7: qof_object_compliance

bool
qof_object_compliance (QofIdTypeConst type_name, bool warn)
{
    const QofObject *obj;

    obj = qof_object_lookup(type_name);
    if ((obj->create == NULL) || (obj->foreach == NULL))
    {
        if (warn)
        {
            PINFO (" Object type %s is not fully QOF compliant", obj->e_type);
        }
        return false;
    }
    return true;
}
开发者ID:iulianu,项目名称:gnucash-butchered,代码行数:16,代码来源:qofobject.cpp

示例8: VBoxVFSModuleLoad

/**
 * KEXT Module BSD entry point
 */
static kern_return_t VBoxVFSModuleLoad(struct kmod_info *pKModInfo, void *pvData)
{
    int rc;

    /* Initialize the R0 guest library. */
#if 0
    rc = vboxInit();
    if (RT_FAILURE(rc))
        return KERN_FAILURE;
#endif

    PINFO("VirtualBox " VBOX_VERSION_STRING " shared folders "
          "driver is loaded");

    return KERN_SUCCESS;
}
开发者ID:Klanly,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:19,代码来源:VBoxVFS.cpp

示例9: ap_assistant_finish

void
ap_assistant_finish (GtkAssistant *assistant, gpointer user_data)
{
    AcctPeriodInfo *info = user_data;
    GtkTextBuffer * buffer;
    GtkTextIter startiter, enditer;
    gint len;
    const char *btitle;
    char *bnotes;

    ENTER("info=%p", info);

    btitle = gtk_entry_get_text (GTK_ENTRY(info->book_title));
    buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(info->book_notes));
    len = gtk_text_buffer_get_char_count (buffer);
    gtk_text_buffer_get_iter_at_offset(buffer, &startiter, 0);
    gtk_text_buffer_get_iter_at_offset(buffer, &enditer, len);

    bnotes = gtk_text_buffer_get_text(buffer, &startiter, &enditer , 0);
    PINFO("Book title is - %s\n", btitle);

    g_free(bnotes);

    /* Report the status back to the user. */
    info->close_status = 0;  /* XXX fixme success or failure? */

    /* Find the next closing date ... */
    info->prev_closing_date = info->closing_date;
    recurrenceListNextInstance (info->period, &info->prev_closing_date,
				&info->closing_date);


    /* FIXME Test for valid closing date, not sure why it won't be!!! */
    if (g_date_valid(&info->closing_date) == TRUE)
    {
        /* If the next closing date is in the future, then we are done. */
        if (gnc_time (NULL) >
	    gnc_time64_get_day_end_gdate (&info->closing_date))
        {
            /* Load up the GUI for the next closing period. */
            gnc_frequency_setup_recurrence (info->period_menu, NULL,
					    &info->closing_date);
            /* Jump back to the Close Book page. */
            gtk_assistant_set_current_page (GTK_ASSISTANT(info->window), 1);
        }
    }
}
开发者ID:Gnucash,项目名称:gnucash,代码行数:47,代码来源:assistant-acct-period.c

示例10: catch

/* A helper function intended to be called only from set_column_type_price */
void GncPriceImport::update_price_props (uint32_t row, uint32_t col, GncPricePropType prop_type)
{
    if (prop_type == GncPricePropType::NONE)
        return; /* Only deal with price related properties. */

    auto price_props = std::make_shared<GncImportPrice> (*(std::get<PL_PREPRICE>(m_parsed_lines[row])).get());

    if (col >= std::get<PL_INPUT>(m_parsed_lines[row]).size())
        price_props->reset (prop_type); //reset errors
    else
    {
        auto value = std::get<PL_INPUT>(m_parsed_lines[row]).at(col);
        bool enable_test_empty = true;
        try
        {
            // set the from_commodity based on combo so we can test for same.
            if (prop_type == GncPricePropType::TO_CURRENCY)
            {
                if (m_settings.m_from_commodity)
                    price_props->set_from_commodity (m_settings.m_from_commodity);

                if (m_settings.m_to_currency)
                    enable_test_empty = false;
            }
            // set the to_currency based on combo so we can test for same.
            if (prop_type == GncPricePropType::FROM_COMMODITY)
            {
                if (m_settings.m_to_currency)
                    price_props->set_to_currency (m_settings.m_to_currency);

                if (m_settings.m_from_commodity)
                    enable_test_empty = false;
            }
            price_props->set(prop_type, value, enable_test_empty);
        }
        catch (const std::exception& e)
        {
            /* Do nothing, just prevent the exception from escalating up
             * However log the error if it happens on a row that's not skipped
             */
            if (!std::get<PL_SKIP>(m_parsed_lines[row]))
                PINFO("User warning: %s", e.what());
        }
    }
    /* Store the result */
    std::get<PL_PREPRICE>(m_parsed_lines[row]) = price_props;
}
开发者ID:Gnucash,项目名称:gnucash,代码行数:48,代码来源:gnc-import-price.cpp

示例11: init_cdev

int init_cdev(void)
{
	int result = 0;	
	dev_t dev = 0;	
	struct device *nmc_dev;		
	
	PINFO("%s\n", __FUNCTION__);	
	/*	
	*	create the character device	
	*/	
	result = alloc_chrdev_region(&dev, nmc_cdev_minor, 1, NMC_DEV_NAME);	
	nmc_cdev_major = MAJOR(dev);		
	if (result < 0) {		
		PERR("%s: fail to register cdev\n", __FUNCTION__);		
		return result;	
	}	
	
	printk("%s: nmc_cdev_major %d\n", __FUNCTION__, nmc_cdev_major);		
	
	cdev_init(&nmc_device_cdev, &nmc_dev_fops);	
	result = cdev_add (&nmc_device_cdev, dev, 1);	
	if (result) {		
		PERR("%s: fail cdev_add, err=%d\n", __FUNCTION__, result);		
		goto fail;	
	}	
	/*
	*	create the device node	
	*/	
	nmc_device_class = class_create(THIS_MODULE, NMC_DEV_NAME);	
	if(IS_ERR(nmc_device_class)) {		
		PERR("%s:  class create failed\n", __FUNCTION__);		
		result = -EFAULT;		
		goto fail;	
	}	
	nmc_dev = device_create(nmc_device_class, NULL, MKDEV(nmc_cdev_major, nmc_cdev_minor), NULL, NMC_DEV_NAME);	
	if(IS_ERR(nmc_dev)) {		
		PERR("%s:  device create failed\n", __FUNCTION__);		
		result = -EFAULT;		
		goto fail;	
	}		
	
	return 0;
fail:	
	deinit_cdev();	
	return result;
}
开发者ID:cubelibre,项目名称:rk3188-kernel,代码行数:46,代码来源:linux_wlan_cdev.c

示例12: me8200_do_isr

static irqreturn_t me8200_do_isr(int irq, void *dev_id, struct pt_regs *regs)
#endif
{
	me8200_do_subdevice_t *instance;
	uint16_t ctrl;
	uint8_t irq_status;

	instance = (me8200_do_subdevice_t *) dev_id;

	if (irq != instance->irq) {
		PERROR("Incorrect interrupt num: %d.\n", irq);
		return IRQ_NONE;
	}

	irq_status = inb(instance->irq_status_reg);
	if (!
	    (irq_status &
	     (ME8200_DO_IRQ_STATUS_BIT_ACTIVE << instance->do_idx))) {
		PINFO
		    ("%ld Shared interrupt. %s(): idx=%d irq_status_reg=0x%04X\n",
		     jiffies, __func__, instance->do_idx, irq_status);
		return IRQ_NONE;
	}

	PDEBUG("executed.\n");

	spin_lock(&instance->subdevice_lock);
	instance->rised = 1;
	instance->count++;

	spin_lock(instance->irq_mode_lock);
	ctrl = inw(instance->irq_ctrl_reg);
	ctrl |= ME8200_IRQ_MODE_BIT_CLEAR_POWER << instance->do_idx;
	outw(ctrl, instance->irq_ctrl_reg);
	PDEBUG_REG("irq_ctrl_reg outw(0x%lX+0x%lX)=0x%x\n", instance->reg_base,
		   instance->irq_ctrl_reg - instance->reg_base, ctrl);
	ctrl &= ~(ME8200_IRQ_MODE_BIT_CLEAR_POWER << instance->do_idx);
	outw(ctrl, instance->irq_ctrl_reg);
	PDEBUG_REG("irq_ctrl_reg outw(0x%lX+0x%lX)=0x%x\n", instance->reg_base,
		   instance->irq_ctrl_reg - instance->reg_base, ctrl);
	spin_unlock(instance->irq_mode_lock);
	spin_unlock(&instance->subdevice_lock);
	wake_up_interruptible_all(&instance->wait_queue);

	return IRQ_HANDLED;
}
开发者ID:johnny,项目名称:CobraDroidBeta,代码行数:46,代码来源:me8200_do.c

示例13: serviceMatching

/**
 * Wait for VBoxGuest.kext to be started
 */
IOService * org_virtualbox_VBoxVFS::waitForCoreService(void)
{
    IOService *service;

    OSDictionary *serviceToMatch = serviceMatching("org_virtualbox_VBoxGuest");
    if (!serviceToMatch)
    {
        PINFO("unable to create matching dictionary");
        return false;
    }

    /* Wait 10 seconds for VBoxGuest to be started */
    service = waitForMatchingService(serviceToMatch, 10ULL * 1000000000ULL);
    serviceToMatch->release();

    return service;
}
开发者ID:Klanly,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:20,代码来源:VBoxVFS.cpp

示例14: ap_show_menu

static void
ap_show_menu (GnomeDruidPage *druidpage,
              GtkWidget *druid,
              gpointer user_data)
{
    AcctPeriodInfo *info = user_data;
    ENTER("info=%p", info);

    /* Find the date of the earliest transaction in the current book.
     * Note that this could have changed since last time, since
     * we may have closed books since last time. */
    info->earliest = get_earliest_in_book (gnc_get_current_book());
    info->earliest_str = qof_print_date(info->earliest);
    PINFO ("date of earliest is %ld %s", info->earliest, ctime (&info->earliest));

    prepare_remarks (info);
}
开发者ID:nizarklai,项目名称:gnucash-1,代码行数:17,代码来源:druid-acct-period.c

示例15: create_slots_tables

/* ================================================================= */
static void
create_slots_tables( GncSqlBackend* be )
{
    gint version;
    gboolean ok;

    g_return_if_fail( be != NULL );

    version = gnc_sql_get_table_version( be, TABLE_NAME );
    if ( version == 0 )
    {
        (void)gnc_sql_create_table( be, TABLE_NAME, TABLE_VERSION, col_table );

        ok = gnc_sql_create_index( be, "slots_guid_index", TABLE_NAME, obj_guid_col_table );
        if ( !ok )
        {
            PERR( "Unable to create index\n" );
        }
    }
    else if ( version < TABLE_VERSION )
    {
        /* Upgrade:
            1->2: 64-bit int values to proper definition, add index
            2->3: Add gdate field
        */
        if ( version == 1 )
        {
            gnc_sql_upgrade_table( be, TABLE_NAME, col_table );
            ok = gnc_sql_create_index( be, "slots_guid_index", TABLE_NAME, obj_guid_col_table );
            if ( !ok )
            {
                PERR( "Unable to create index\n" );
            }
        }
        else if ( version == 2 )
        {
            ok = gnc_sql_add_columns_to_table( be, TABLE_NAME, gdate_col_table );
            if ( !ok )
            {
                PERR( "Unable to add gdate column\n" );
            }
        }
        (void)gnc_sql_set_table_version( be, TABLE_NAME, TABLE_VERSION );
        PINFO("Slots table upgraded from version %d to version %d\n", version, TABLE_VERSION);
    }
}
开发者ID:nishmu,项目名称:gnucash,代码行数:47,代码来源:gnc-slots-sql.c


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