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

C++ I18N函数代码示例

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

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



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

示例1: usage

void usage(const char *name) {
  fprintf(stdout,"%s%s%s\n",
	  I18N("AqBackup - Manage your backups\n"
	       "(c) 2003 Martin Preuss<[email protected]>\n"
	       "This library is free software; you can redistribute it and/or\n"
	       "modify it under the terms of the GNU Lesser General Public\n"
	       "License as published by the Free Software Foundation; either\n"
	       "version 2.1 of the License, or (at your option) any later version.\n"
	       "\n"
	       "Usage:\n"
	       k_PRG" [OPTIONS] \n"
	       "\nOptions:\n"
	       " -h            - show this help\n"
	       " -V            - show version information\n"
	       " -v            - be more verbous\n"
	       " --logfile F  - use given F as log file\n"
	       " --logtype T  - use given T as log type\n"
	       "                These are the valid types:\n"
	       "                  stderr (log to standard error channel)\n"
	       "                  file   (log to the file given by --logfile)\n"),
#ifdef HAVE_SYSLOG_H
	  I18N("                  syslog (log via syslog)\n"),
#else
	  "",
#endif
	  I18N("                Default is stderr\n"
	       " --loglevel L - set the loglevel\n"
	       "                Valid levels are:\n"
	       "                  emergency, alert, critical, error,\n"
	       "                  warning, notice, info and debug\n"
	       "                Default is \"warning\".\n"
	      ));
}
开发者ID:BackupTheBerlios,项目名称:aqbackup,代码行数:33,代码来源:aqbackup.c


示例2: operateHost

static void
operateHost (char *host, int opCode, int confirm)
{
    char msg1[MAXLINELEN];
    char msg[MAXLINELEN];

    if (opCode == LIM_CMD_REBOOT)
	sprintf(msg1, I18N(256, "Restart LIM on <%s>"), host); /* catgets 256 */
    else
	sprintf(msg1, I18N(257, "Shut down LIM on <%s>"), host); /* catgets 257 */

    if (confirm) {
	sprintf(msg, "%s ? [y/n] ", msg1);
        if (!getConfirm(msg))
	    return;
    }
    fprintf(stderr, "%s ...... ", msg1);
    fflush(stderr);
    if (ls_limcontrol(host, opCode) == -1) {
	ls_perror ("ls_limcontrol");
	exitrc = -1;
    } else {
	char *delay = getenv("LSF_RESTART_DELAY");
	int  delay_time;
	if (delay == 0)
	    delay_time = 500;
	else
	    delay_time = atoi(delay) * 1000;

	millisleep_(delay_time);
	fprintf (stderr, "%s\n", I18N_done);
    }
    fflush(stderr);

}
开发者ID:FSchumacher,项目名称:openlava,代码行数:35,代码来源:cmd.limcontrol.c


示例3: prtFileNames

void
prtFileNames(struct jobInfoEnt *job, int prtCwd)
{
    char prline[MAXLINELEN];
    int i;

    
    if (prtCwd == TRUE) {
        if (job->cwd[0] == '/' || job->cwd[0] == '\\' || 
	    (job->cwd[0] != '\0' && job->cwd[1] == ':'))
	    sprintf(prline, ", CWD <%s>", job->cwd);
        else if (job->cwd[0] == '\0')
	    sprintf(prline, ", CWD <$HOME>"); 
        else
	    sprintf(prline, ", CWD <$HOME/%s>", job->cwd); 
        prtLine(prline);
    }

    
    if (job->submit.options & SUB_IN_FILE)  {
 	sprintf(prline, ", %s <%s>", 
	 	I18N(577, "Input File"), job->submit.inFile);/* catgets 577 */
 	prtLine(prline);
    }

    
    if (job->submit.options2 & SUB2_IN_FILE_SPOOL)  {
	sprintf(prline, ", %s(Spooled) <%s>", 
		I18N(577, "Input File"), job->submit.inFile);/* catgets 577 */
	prtLine(prline);
    }

    
    if (job->submit.options & SUB_OUT_FILE) {
        sprintf(prline, ", %s <%s>", 
	        I18N(578, "Output File"), job->submit.outFile);/* catgets 578 */
        prtLine(prline);
    }

    
    if (job->submit.options & SUB_ERR_FILE) {
        sprintf(prline, ", %s <%s>", 
		I18N(579, "Error File"), job->submit.errFile); /* catgets 579 */
        prtLine(prline);
    }

    
    if (job->submit.nxf) {
	sprintf(prline, ", %s",  I18N(580, "Copy Files")); /* catgets 580 */
	prtLine(prline);
    }
    
    for (i = 0; i < job->submit.nxf; i++) {
	sprintf(prline, " \"%s %s %s\"", job->submit.xf[i].subFn,
		strXfOptions(job->submit.xf[i].options),
		job->submit.xf[i].execFn);
	prtLine(prline);
    }

} 
开发者ID:FSchumacher,项目名称:openlava,代码行数:60,代码来源:cmd.job.c


示例4: AH_NewKeyFileDialog_HandleActivatedIniLetter

static int AH_NewKeyFileDialog_HandleActivatedIniLetter(GWEN_DIALOG *dlg) {
  AH_NEWKEYFILE_DIALOG *xdlg;
  int rv;
  GWEN_BUFFER *tbuf;


  assert(dlg);
  xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, AH_NEWKEYFILE_DIALOG, dlg);
  assert(xdlg);

  tbuf=GWEN_Buffer_new(0, 1024, 0, 1);

  /* add HTML version of the INI letter */
  GWEN_Buffer_AppendString(tbuf, "<html>");
  rv=AH_Provider_GetIniLetterHtml(AB_User_GetProvider(xdlg->user),
				  xdlg->user,
				  0,
				  0,
				  tbuf,
				  1);
  if (rv<0) {
    DBG_INFO(AQHBCI_LOGDOMAIN, "here (%d)", rv);
    // TODO: show error message
    AB_Banking_ClearCryptTokenList(xdlg->banking);
    GWEN_Buffer_free(tbuf);
    return GWEN_DialogEvent_ResultHandled;
  }
  GWEN_Buffer_AppendString(tbuf, "</html>");


  /* add ASCII version of the INI letter for frontends which don't support HTML */
  rv=AH_Provider_GetIniLetterTxt(AB_User_GetProvider(xdlg->user),
				 xdlg->user,
				 0,
				 0,
				 tbuf,
				 0);
  if (rv<0) {
    DBG_INFO(AQHBCI_LOGDOMAIN, "here (%d)", rv);
    // TODO: show error message
    AB_Banking_ClearCryptTokenList(xdlg->banking);
    GWEN_Buffer_free(tbuf);
    return GWEN_DialogEvent_ResultHandled;
  }

  rv=GWEN_Gui_Print(I18N("INI Letter"),
		    "HBCI-INILETTER",
		    I18N("INI Letter for HBCI"),
		    GWEN_Buffer_GetStart(tbuf),
		    0);
  if (rv<0) {
    DBG_INFO(AQHBCI_LOGDOMAIN, "here (%d)", rv);
    // TODO: show error message
    GWEN_Buffer_free(tbuf);
    return GWEN_DialogEvent_ResultHandled;
  }

  GWEN_Buffer_free(tbuf);
  return GWEN_DialogEvent_ResultHandled;
}
开发者ID:Zauberstuhl,项目名称:aqbanking,代码行数:60,代码来源:dlg_newkeyfile.c


示例5: parseJobArrayIndex

static struct idxList *
parseJobArrayIndex (char *jobName)
{
  struct idxList *idxList = NULL, *idx;
  char *index;
  int maxJLimit;
  static char fName[] = "parseJobArrayIndex";

  index = strchr (jobName, '[');
  if (!index)
    return (NULL);
  yybuff = index;
  if (idxparse (&idxList, &maxJLimit))
    {
      freeIdxList (idxList);
      if (idxerrno == IDX_MEM)
	fprintf (stderr, I18N_FUNC_FAIL, fName, "malloc");
      else
	fprintf (stderr, (_i18n_msg_get (ls_catd, NL_SETN, 1014, "%s: Bad job array index list.\n")), jobName);	/* catgets  1014  */
      return (NULL);
    }


  for (idx = idxList; idx; idx = idx->next)
    {
      if (idx->end == INFINIT_INT)
	idx->end = LSB_MAX_ARRAY_IDX;

      if (idx->start > idx->end)
	{
	  fprintf (stderr, "%d-%d: %s.\n", idx->start, idx->end, I18N (1015, "Job Array index invalid range"));	/* catgets 1015 */
	  freeIdxList (idxList);
	  return (NULL);
	}
      if ((idx->start <= 0) || (idx->start > LSB_MAX_ARRAY_IDX))
	{
	  fprintf (stderr, "%d: %s.\n", idx->start, I18N (1016, "Job Array index out of valid range"));	/* catgets  1016  */
	  freeIdxList (idxList);
	  return (NULL);
	}
      if ((idx->end <= 0) || (idx->end > LSB_MAX_ARRAY_IDX))
	{
	  fprintf (stderr, "%d: %s.\n",
		   idx->end,
		   I18N (1016, "Job Array index out of valid range"));
	  freeIdxList (idxList);
	  return (NULL);
	}
      if ((idx->step <= 0) || (idx->step > LSB_MAX_ARRAY_IDX))
	{
	  fprintf (stderr, "%d: %s.\n", idx->step, I18N (1018, "Job Array index step out of valid range"));	/* catgets  1018  */
	  freeIdxList (idxList);
	  return (NULL);
	}

    }
  return (idxList);
}
开发者ID:georgemarselis,项目名称:openlava-macosx,代码行数:58,代码来源:jobid.c


示例6: AB_SetupNewUserDialog_Init

void AB_SetupNewUserDialog_Init(GWEN_DIALOG *dlg) {
  AB_SETUP_NEWUSER_DIALOG *xdlg;
  GWEN_DB_NODE *dbPrefs;
  int i;

  assert(dlg);
  xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, AB_SETUP_NEWUSER_DIALOG, dlg);
  assert(xdlg);

  dbPrefs=GWEN_Dialog_GetPreferences(dlg);

  GWEN_Dialog_SetCharProperty(dlg,
			      "",
			      GWEN_DialogProperty_Title,
			      0,
			      I18N("New User Wizard"),
			      0);

  /* select first page */
  GWEN_Dialog_SetIntProperty(dlg, "wiz_stack", GWEN_DialogProperty_Value, 0, 0, 0);

  /* setup intro page */
  GWEN_Dialog_SetCharProperty(dlg,
			      "wiz_begin_label",
			      GWEN_DialogProperty_Title,
			      0,
                              I18N("<html>"
                                   "<p>This dialog assists you in creating an online banking user."
				   "The following steps are:</p>"
                                   "<ul>"
				   "<li>select the banking protocol</li>"
				   "<li>select the type of user to create</li>"
                                   "</ul>"
                                   "</html>"
                                   "This dialog assists you in creating an online banking user.\n"
                                   "The following steps are:\n"
                                   " - select the banking protocol\n"
				   " - select the type of user to create\n"),
			      0);

  /* read width */
  i=GWEN_DB_GetIntValue(dbPrefs, "dialog_width", 0, -1);
  if (i>=DIALOG_MINWIDTH)
      GWEN_Dialog_SetIntProperty(dlg, "", GWEN_DialogProperty_Width, 0, i, 0);

  /* read height */
  i=GWEN_DB_GetIntValue(dbPrefs, "dialog_height", 0, -1);
  if (i>=DIALOG_MINHEIGHT)
      GWEN_Dialog_SetIntProperty(dlg, "", GWEN_DialogProperty_Height, 0, i, 0);

  /* disable next and previous buttons */
  GWEN_Dialog_SetIntProperty(dlg, "wiz_prev_button", GWEN_DialogProperty_Enabled, 0, 0, 0);
  GWEN_Dialog_SetIntProperty(dlg, "wiz_next_button", GWEN_DialogProperty_Enabled, 0, 1, 0);
}
开发者ID:Zauberstuhl,项目名称:aqbanking,代码行数:54,代码来源:dlg_setup_newuser.c


示例7: AH_User_InputTan

int AH_User_InputTan(AB_USER *u,
		     char *pwbuffer,
		     int minLen,
                     int maxLen){
  int rv;
  char buffer[512];
  const char *un;
  const char *bn=NULL;
  GWEN_BUFFER *nbuf;
  AB_BANKINFO *bi;

  assert(u);
  un=AB_User_GetUserId(u);
  /* find bank name */
  bi=AB_Banking_GetBankInfo(AB_User_GetBanking(u),
			    "de",
                            "*",
			    AB_User_GetBankCode(u));
  if (bi)
    bn=AB_BankInfo_GetBankName(bi);
  if (!bn)
    AB_User_GetBankCode(u);

  buffer[0]=0;
  buffer[sizeof(buffer)-1]=0;
  snprintf(buffer, sizeof(buffer)-1,
	   I18N("Please enter the next TAN\n"
		"for user %s at %s."
		"<html>"
		"Please enter the next TAN for user <i>%s</i> at "
		"<i>%s</i>."
		"</html>"),
	   un, bn,
           un, bn);
  buffer[sizeof(buffer)-1]=0;

  nbuf=GWEN_Buffer_new(0, 256 ,0 ,1);
  AH_User_MkTanName(u, NULL, nbuf);

  rv=GWEN_Gui_GetPassword(GWEN_GUI_INPUT_FLAGS_TAN |
			  /*GWEN_GUI_INPUT_FLAGS_NUMERIC |*/
			  GWEN_GUI_INPUT_FLAGS_SHOW,
			  GWEN_Buffer_GetStart(nbuf),
			  I18N("Enter TAN"),
			  buffer,
			  pwbuffer,
			  minLen,
			  maxLen,
			  0);
  GWEN_Buffer_free(nbuf);
  AB_BankInfo_free(bi);
  return rv;
}
开发者ID:maduhu,项目名称:aqbanking-1,代码行数:53,代码来源:user.c


示例8: setUpComboFromDoubleStrings

static void setUpComboFromDoubleStrings(GWEN_DIALOG *dlg,
                                        const char *comboBoxName,
                                        const char **strings,
                                        const char *s)
{
  int i;
  int j;
  const char *t1;
  const char *t2;

  GWEN_Dialog_SetIntProperty(dlg, comboBoxName, GWEN_DialogProperty_ClearValues, 0, 0, 0);
  j=-1;
  for (i=0; ; i+=2) {
    t1=strings[i];
    if (t1==NULL)
      break;
    t2=strings[i+1];
    GWEN_Dialog_SetCharProperty(dlg, comboBoxName, GWEN_DialogProperty_AddValue, 0, I18N(t2), 0);
    if (s && *s && strcasecmp(s, t1)==0)
      j=i/2;
  }
  if (j==-1) {
    if (s && *s) {
      GWEN_Dialog_SetCharProperty(dlg, comboBoxName, GWEN_DialogProperty_AddValue, 0, s, 0);
      j=i/2;
    }
    else
      j=0;
  }
  GWEN_Dialog_SetIntProperty(dlg, comboBoxName, GWEN_DialogProperty_Value, 0, j, 0);
}
开发者ID:cstim,项目名称:aqbanking,代码行数:31,代码来源:csv_editprofile.c


示例9: ctrlHost

static void
ctrlHost(char *host, int hStatus, int opCode, char *message)
{

    if (lsb_hostcontrol(host, opCode, message) < 0) {
        char i18nBuf[100];
        sprintf(i18nBuf,I18N_FUNC_FAILED,"Host control");
        lsb_perror (i18nBuf );
        exitrc = -1;
        return;
    }

    if (opCode == HOST_OPEN) {
        if (hStatus & (HOST_STAT_BUSY | HOST_STAT_WIND | HOST_STAT_LOCKED_MASTER
                       | HOST_STAT_LOCKED | HOST_STAT_FULL)) {
            fprintf(stderr, (_i18n_msg_get(ls_catd,NL_SETN,910, "done : host remains closed due to "))); /* catgets  910  */
            if (hStatus & HOST_STAT_LOCKED)
                fprintf (stderr, (_i18n_msg_get(ls_catd,NL_SETN,911, "being locked; "))); /* catgets  911  */
            else if (hStatus & HOST_STAT_LOCKED_MASTER)
                fprintf(stderr, (I18N(917, "being locked by master LIM;"))); /* catgets  917  */
            else if (hStatus & HOST_STAT_WIND)
                fprintf(stderr, (_i18n_msg_get(ls_catd,NL_SETN,912, "dispatch window; "))); /* catgets  912  */
            else if (hStatus & HOST_STAT_FULL)
                fprintf(stderr, (_i18n_msg_get(ls_catd,NL_SETN,913, "job limit; "))); /* catgets  913  */
            else if (hStatus & HOST_STAT_BUSY)
                fprintf(stderr, (_i18n_msg_get(ls_catd,NL_SETN,914, "load threshold; "))); /* catgets  914  */
            fprintf(stderr, " \n");
            return;
        }
    }

    fprintf(stderr, (_i18n_msg_get(ls_catd,NL_SETN,915, "done\n"))); /* catgets  915  */

}
开发者ID:JohnLih,项目名称:openlava,代码行数:34,代码来源:cmd.bhc.c


示例10: GWEN_NEW_OBJECT

GWEN_DIALOG *AH_NewKeyFileDialog_new(AB_BANKING *ab) {
  GWEN_DIALOG *dlg;
  AH_NEWKEYFILE_DIALOG *xdlg;
  GWEN_BUFFER *fbuf;
  int rv;

  dlg=GWEN_Dialog_new("ah_setup_newkeyfile");
  GWEN_NEW_OBJECT(AH_NEWKEYFILE_DIALOG, xdlg);
  GWEN_INHERIT_SETDATA(GWEN_DIALOG, AH_NEWKEYFILE_DIALOG, dlg, xdlg,
		       AH_NewKeyFileDialog_FreeData);
  GWEN_Dialog_SetSignalHandler(dlg, AH_NewKeyFileDialog_SignalHandler);

  /* get path of dialog description file */
  fbuf=GWEN_Buffer_new(0, 256, 0, 1);
  rv=GWEN_PathManager_FindFile(AB_PM_LIBNAME, AB_PM_DATADIR,
			       "aqbanking/backends/aqhbci/dialogs/dlg_newkeyfile.dlg",
			       fbuf);
  if (rv<0) {
    DBG_INFO(AQHBCI_LOGDOMAIN, "Dialog description file not found (%d).", rv);
    GWEN_Buffer_free(fbuf);
    GWEN_Dialog_free(dlg);
    return NULL;
  }

  /* read dialog from dialog description file */
  rv=GWEN_Dialog_ReadXmlFile(dlg, GWEN_Buffer_GetStart(fbuf));
  if (rv<0) {
    DBG_INFO(AQHBCI_LOGDOMAIN, "here (%d).", rv);
    GWEN_Gui_ShowError(I18N("Error"),
		       I18N("Could not read dialog description file [%s], maybe an installation error (%d)?"),
		       GWEN_Buffer_GetStart(fbuf), rv);
    GWEN_Buffer_free(fbuf);
    GWEN_Dialog_free(dlg);
    return NULL;
  }
  GWEN_Buffer_free(fbuf);

  xdlg->banking=ab;

  /* preset */
  xdlg->hbciVersion=210;
  xdlg->rdhVersion=0;

  /* done */
  return dlg;
}
开发者ID:Zauberstuhl,项目名称:aqbanking,代码行数:46,代码来源:dlg_newkeyfile.c


示例11: ctrlQueue

int
ctrlQueue (struct controlReq *qcReq, struct lsfAuth *auth)
{
  struct qData *qp;

  if ((qp = getQueueData (qcReq->name)) == NULL)
    return (LSBE_BAD_QUEUE);

  if (!isAuthManager (auth) && auth->uid != 0 && !isAuthQueAd (qp, auth))
    {
      ls_syslog (LOG_CRIT, I18N (7511, "ctrlQueue: uid <%d> not allowed to perform control operation"), auth->uid);	/* catgets 7511 */
      return (LSBE_PERMISSION);
    }

  if ((qcReq->opCode < QUEUE_OPEN) || (qcReq->opCode > QUEUE_INACTIVATE))
    return (LSBE_LSBLIB);

  if (qcReq->opCode == QUEUE_ACTIVATE && !(qp->qStatus & QUEUE_STAT_RUN))
    {
      qp->qStatus |= QUEUE_STAT_ACTIVE;
      log_queuestatus (qp, qcReq->opCode, auth->uid, auth->lsfUserName);
      return (LSBE_QUEUE_WINDOW);
    }

  if (((qp->qStatus & QUEUE_STAT_OPEN) &&
       (qcReq->opCode == QUEUE_OPEN))
      || (!(qp->qStatus & QUEUE_STAT_OPEN) &&
	  (qcReq->opCode == QUEUE_CLOSED))
      || ((qp->qStatus & QUEUE_STAT_ACTIVE) &&
	  (qcReq->opCode == QUEUE_ACTIVATE))
      || (!(qp->qStatus & QUEUE_STAT_ACTIVE) &&
	  (qcReq->opCode == QUEUE_INACTIVATE)))
    return (LSBE_NO_ERROR);

  if (qcReq->opCode == QUEUE_OPEN)
    {
      qp->qStatus |= QUEUE_STAT_OPEN;
      log_queuestatus (qp, qcReq->opCode, auth->uid, auth->lsfUserName);
    }
  if (qcReq->opCode == QUEUE_CLOSED)
    {
      qp->qStatus &= ~QUEUE_STAT_OPEN;
      log_queuestatus (qp, qcReq->opCode, auth->uid, auth->lsfUserName);
    }
  if (qcReq->opCode == QUEUE_ACTIVATE)
    {
      qp->qStatus |= QUEUE_STAT_ACTIVE;
      log_queuestatus (qp, qcReq->opCode, auth->uid, auth->lsfUserName);
    }
  if (qcReq->opCode == QUEUE_INACTIVATE)
    {
      qp->qStatus &= ~QUEUE_STAT_ACTIVE;
      log_queuestatus (qp, qcReq->opCode, auth->uid, auth->lsfUserName);
    }
  return (LSBE_NO_ERROR);

}
开发者ID:georgemarselis,项目名称:openlava-macosx,代码行数:57,代码来源:queue.c


示例12: limUnlock

int
limUnlock(int argc, char **argv)
{

    if (argc > optind) {
	fprintf(stderr, I18N(261, "Syntax error: too many arguments.\n")); /* catgets 261 */
	return(-2);
    }

    if (ls_unlockhost() < 0) {
        ls_perror("ls_unlockhost");
        return(-1);
    }

    printf(I18N(262, "Host is unlocked\n")); /* catgets 262 */
    fflush(stdout);

    return(0);
}
开发者ID:Tambralinga,项目名称:openlava,代码行数:19,代码来源:cmd.limcontrol.c


示例13: prtAcctFinish

void
prtAcctFinish(struct jobInfoEnt *job)
{
    char prline[MAXLINELEN];

    if (job->status == JOB_STAT_DONE)
        sprintf(prline, "%s: %s.\n",
		_i18n_ctime(ls_catd, CTIME_FORMAT_a_b_d_T, &job->endTime),
		I18N(620, "Completed <done>")); /* catgets  620  */
    else if (job->status == JOB_STAT_EXIT)
        sprintf(prline, "%s: %s.\n",
	       _i18n_ctime(ls_catd, CTIME_FORMAT_a_b_d_T, &job->endTime),
	       I18N(621, "Completed <exit>")); /* catgets  621  */
    else
        sprintf(prline, "%s: %s.\n",
		_i18n_ctime(ls_catd, CTIME_FORMAT_a_b_d_T, &job->endTime),
		I18N(622, "sbatchd unavail <zombi>"));  /* catgets  622  */
    prtLineWUF(prline);
}
开发者ID:fudanyi,项目名称:openlava,代码行数:19,代码来源:cmd.job.c


示例14: print_long

static void
print_long(struct resItem *res)
{

    char tempStr[15];
    static int first = TRUE;

    if (first) {
	printf("%s:  %s\n",
	   _i18n_msg_get(ls_catd,NL_SETN,1812, "RESOURCE_NAME"), /* catgets  1812  */
	   res->name);
        first = FALSE;
    } else
	printf("\n%s:  %s\n",
	    _i18n_msg_get(ls_catd,NL_SETN,1812, "RESOURCE_NAME"),
	    res->name);
    printf(_i18n_msg_get(ls_catd,NL_SETN,1814, "DESCRIPTION: %s\n"),res->des); /* catgets  1814  */

    printf("%-7.7s ", I18N(15, "TYPE"));  	/* catgets  1815  */
    printf("%5s  ",   I18N(1816, "ORDER"));  	/* catgets  1816  */
    printf("%9s ",    I18N(1817, "INTERVAL"));  /* catgets  1817  */
    printf("%8s ",    I18N(1818, "BUILTIN"));  	/* catgets  1818  */
    printf("%8s ",    I18N(1819, "DYNAMIC"));  	/* catgets  1819  */
    printf("%8s\n",   I18N(1820, "RELEASE"));  	/* catgets  1820  */

    sprintf(tempStr,"%d",res->interval);
    printf("%-7.7s %5s  %9s %8s %8s %8s\n",
            valueTypeToStr(res->valueType),
            orderTypeToStr(res->orderType),
            tempStr,
            flagToStr(res->flags & RESF_BUILTIN),
            flagToStr(res->flags & RESF_DYNAMIC),
            flagToStr(res->flags & RESF_RELEASE));
}
开发者ID:shaoboyang,项目名称:jhlava,代码行数:34,代码来源:lsinfo.c


示例15: LC_Client_Init

LC_CLIENT_RESULT LC_Client_Init(LC_CLIENT *cl) {
  LONG rv;

  assert(cl);
  if (LC_Client_InitCommon()) {
    DBG_ERROR(LC_LOGDOMAIN, "Error on init");
    return LC_Client_ResultInternal;
  }

  /* establish context */
  rv=SCardEstablishContext(SCARD_SCOPE_SYSTEM,    /* scope */
			   NULL,                  /* reserved1 */
			   NULL,                  /* reserved2 */
			   &(cl->scardContext));  /* ptr to context */
  if (rv!=SCARD_S_SUCCESS) {
    if (rv == SCARD_E_NO_SERVICE) {
      DBG_ERROR(LC_LOGDOMAIN,
		"SCardEstablishContext: "
		"Error SCARD_E_NO_SERVICE: "
		"The Smartcard resource manager is not running. "
		"Maybe you have to start the Smartcard service manually?");
      GWEN_Gui_ProgressLog(0, GWEN_LoggerLevel_Error,
			   I18N("The PC/SC service is not running.\n"
				"Please make sure that the package \"pcscd\" is\n"
				"installed along with the appropriate driver.\n"
				"For cyberJack devices you will need to install\n"
				"the package \"ifd-cyberjack\" (Debian) or\n"
				"\"cyberjack-ifd\" (SuSE).\n"
				"For most other readers the package \"libccid\"\n"
				"needs to be installed."
				"<html>"
				"<p>The PC/SC service is not running.</p>"
				"<p>Please make sure that the package <b>pcscd</b> is "
				"installed along with the appropriate driver.</p>"
				"<p>For cyberJack devices you will need to install "
				"the package <b>ifd-cyberjack</b> (Debian) or "
				"<b>cyberjack-ifd</b> (SuSE).</p>"
				"<p>For most other readers the package <b>libccid</b> "
				"needs to be installed.</p>"
                                "</html>"));
    }
    else {
      DBG_ERROR(LC_LOGDOMAIN,
		"SCardEstablishContext: %ld (%04lx)", (long int) rv,
		rv);
    }
    LC_Client_FiniCommon();
    return LC_Client_ResultIoError;
  }

  return LC_Client_ResultOk;
}
开发者ID:rhvall,项目名称:SmartCard,代码行数:52,代码来源:client.c


示例16: AH_NewKeyFileDialog_HandleActivatedFileButton

int AH_NewKeyFileDialog_HandleActivatedFileButton(GWEN_DIALOG *dlg) {
  AH_NEWKEYFILE_DIALOG *xdlg;
  int rv;
  const char *s;
  GWEN_BUFFER *pathBuffer;

  assert(dlg);
  xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, AH_NEWKEYFILE_DIALOG, dlg);
  assert(xdlg);

  pathBuffer=GWEN_Buffer_new(0, 256, 0, 1);
  s=GWEN_Dialog_GetCharProperty(dlg, "wiz_filename_edit", GWEN_DialogProperty_Value, 0, NULL);
  if (s && *s)
    GWEN_Buffer_AppendString(pathBuffer, s);
  rv=GWEN_Gui_GetFileName(I18N("Create Keyfile"),
			  GWEN_Gui_FileNameType_SaveFileName,
			  0,
			  I18N("All Files (*)\tOHBCI Files (*ohbci;*.medium)"),
			  pathBuffer,
			  GWEN_Dialog_GetGuiId(dlg));
  if (rv==0) {
    GWEN_Dialog_SetCharProperty(dlg,
				"wiz_filename_edit",
				GWEN_DialogProperty_Value,
				0,
				GWEN_Buffer_GetStart(pathBuffer),
				0);
    rv=AH_NewKeyFileDialog_GetFilePageData(dlg);
    if (rv<0)
      GWEN_Dialog_SetIntProperty(dlg, "wiz_next_button", GWEN_DialogProperty_Enabled, 0, 0, 0);
    else
      GWEN_Dialog_SetIntProperty(dlg, "wiz_next_button", GWEN_DialogProperty_Enabled, 0, 1, 0);
  }
  else {
    DBG_NOTICE(AQHBCI_LOGDOMAIN, "here (%d)", rv);
  }
  GWEN_Buffer_free(pathBuffer);
  return GWEN_DialogEvent_ResultHandled;
}
开发者ID:Zauberstuhl,项目名称:aqbanking,代码行数:39,代码来源:dlg_newkeyfile.c


示例17: limLock

int
limLock(int argc, char **argv)
{
    u_long duration = 0;
    extern int optind;
    extern char *optarg;
    char *optName;

    while ((optName = myGetOpt(argc, argv, "l:")) != NULL) {
        switch(optName[0]) {
            case 'l':
                duration = atoi(optarg);
                if (!isint_(optarg) || atoi(optarg) <= 0) {
	            fprintf(stderr, I18N(258, "The host locking duration <%s> should be a positive integer\n"), optarg); /* catgets 258 */
                    return -2;
		}
		break;
            default:
                return -2;
        }
    }

    if (argc > optind)
        return -2;

    if (ls_lockhost(duration) < 0) {
	ls_perror("failed");
        return(-1);
    }

    if (duration)
        printf(I18N(259, "Host is locked for %lu seconds\n") /* catgets 259 */,
	       (unsigned long)duration);
    else
        printf(I18N(260, "Host is locked\n")); /* catgets 260 */

    fflush(stdout);
    return(0);
}
开发者ID:FSchumacher,项目名称:openlava,代码行数:39,代码来源:cmd.limcontrol.c


示例18: prtBTTime

void
prtBTTime(struct jobInfoEnt *job)
{
    char prline[MAXLINELEN];

    
    if (job->submit.beginTime > 0) {
        sprintf(prline, ", %s <%s>", 
	        I18N(572, "Specified Start Time"),  
                _i18n_ctime(ls_catd, CTIME_FORMAT_a_b_d_T, 
			    (time_t *)&(job->submit.beginTime)));
        prtLine(prline);
    }
    
    if (job->submit.termTime > 0) {
        sprintf(prline, ", %s <%s>", 
		I18N(573, "Specified Termination Time"), 
                _i18n_ctime(ls_catd, CTIME_FORMAT_a_b_d_T, 
			     (time_t *)&(job->submit.termTime)));
        prtLine(prline);
    }

} 
开发者ID:FSchumacher,项目名称:openlava,代码行数:23,代码来源:cmd.job.c


示例19: AH_ImExporterCtxFile_Import

int AH_ImExporterCtxFile_Import(AB_IMEXPORTER *ie,
				AB_IMEXPORTER_CONTEXT *ctx,
				GWEN_SYNCIO *sio,
				GWEN_DB_NODE *params){
  AH_IMEXPORTER_CTXFILE *ieh;
  GWEN_DB_NODE *dbData;
  int rv;

  assert(ie);
  ieh=GWEN_INHERIT_GETDATA(AB_IMEXPORTER, AH_IMEXPORTER_CTXFILE, ie);
  assert(ieh);

  dbData=GWEN_DB_Group_new("context");
  rv=GWEN_DB_ReadFromIo(dbData,
			sio,
			GWEN_DB_FLAGS_DEFAULT |
			GWEN_PATH_FLAGS_CREATE_GROUP);
  if (rv) {
    DBG_ERROR(AQBANKING_LOGDOMAIN, "Error importing data (%d)", rv);
    GWEN_Gui_ProgressLog(0, GWEN_LoggerLevel_Error,
			 "Error importing data");
    GWEN_DB_Group_free(dbData);
    return GWEN_ERROR_GENERIC;
  }

  /* transform DB to transactions */
  GWEN_Gui_ProgressLog(0, GWEN_LoggerLevel_Notice,
		       I18N("Data imported, transforming to UTF-8"));
  rv=AB_ImExporter_DbFromIso8859_1ToUtf8(dbData);
  if (rv) {
    GWEN_Gui_ProgressLog(0, GWEN_LoggerLevel_Error,
			 "Error converting data");
    GWEN_DB_Group_free(dbData);
    return rv;
  }
  GWEN_Gui_ProgressLog(0, GWEN_LoggerLevel_Notice,
		       "Transforming data to transactions");

  rv=AB_ImExporterContext_ReadDb(ctx, dbData);
  if (rv) {
    GWEN_Gui_ProgressLog(0, GWEN_LoggerLevel_Error,
			 "Error importing data");
    GWEN_DB_Group_free(dbData);
    return rv;
  }

  GWEN_DB_Group_free(dbData);
  return 0;
}
开发者ID:Zauberstuhl,项目名称:aqbanking,代码行数:49,代码来源:ctxfile.c


示例20: AH_NewKeyFileDialog_HandleActivatedSpecial

int AH_NewKeyFileDialog_HandleActivatedSpecial(GWEN_DIALOG *dlg) {
  AH_NEWKEYFILE_DIALOG *xdlg;
  GWEN_DIALOG *dlg2;
  int rv;

  assert(dlg);
  xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, AH_NEWKEYFILE_DIALOG, dlg);
  assert(xdlg);

  dlg2=AH_RdhSpecialDialog_new(xdlg->banking);
  if (dlg2==NULL) {
    DBG_ERROR(AQHBCI_LOGDOMAIN, "Could not create dialog");
    GWEN_Gui_ShowError(I18N("Error"), "%s", I18N("Could not create dialog, maybe an installation error?"));
    return GWEN_DialogEvent_ResultHandled;
  }

  AH_RdhSpecialDialog_SetFlags(dlg2, xdlg->flags);
  AH_RdhSpecialDialog_SetHbciVersion(dlg2, xdlg->hbciVersion);
  AH_RdhSpecialDialog_SetRdhVersion(dlg2, xdlg->rdhVersion);

  rv=GWEN_Gui_ExecDialog(dlg2, 0);
  if (rv==0) {
    /* rejected */
    GWEN_Dialog_free(dlg2);
    return GWEN_DialogEvent_ResultHandled;
  }
  else {
    xdlg->hbciVersion=AH_RdhSpecialDialog_GetHbciVersion(dlg2);
    xdlg->rdhVersion=AH_RdhSpecialDialog_GetRdhVersion(dlg2);
    xdlg->flags=AH_RdhSpecialDialog_GetFlags(dlg2);
  }

  GWEN_Dialog_free(dlg2);

  return GWEN_DialogEvent_ResultHandled;
}
开发者ID:Zauberstuhl,项目名称:aqbanking,代码行数:36,代码来源:dlg_newkeyfile.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ I18N_NOOP函数代码示例发布时间:2022-05-30
下一篇:
C++ I1函数代码示例发布时间: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