コード例 #1
0
ファイル: c-function.c プロジェクト: draegtun/ren-c
*/	void Do_Function(REBVAL *func)
/*
***********************************************************************/
{
	REBVAL *result;
	REBVAL *ds;

#if !defined(NDEBUG)
	const REBYTE *name = Get_Word_Name(DSF_LABEL(DSF));
#endif

	Eval_Functions++;

	//Dump_Block(VAL_FUNC_BODY(func));
	result = Do_Blk(VAL_FUNC_BODY(func), 0);
	ds = DS_OUT;

	if (IS_ERROR(result) && IS_RETURN(result)) {
		// Value below is kept safe from GC because no-allocation is
		// done between point of SET_THROW and here.
		if (VAL_ERR_VALUE(result))
			*ds = *VAL_ERR_VALUE(result);
		else
			SET_UNSET(ds);
	}
	else *ds = *result; // Set return value (atomic)
}
コード例 #2
0
ファイル: subroutine.cpp プロジェクト: MatChung/spud
static subroutine_t *_subroutine_extract(execr_t *er, unsigned int sidx)
{
	unsigned int i;

	for(i = sidx; i < er->instrs.size(); i++)
	{
		instr_t *inst = &(er->instrs[i]);
		//Try to find a bi $lr instruction for now.
		//A subroutine could also have more than one bi $lr, check this later.
		if(IS_RETURN(inst))
		{
			subroutine_t *res = new subroutine_t;
			res->er = er;
			res->sidx = sidx;
			res->eidx = i;
			return res;
		}
		//Discard subroutines with unknown instructions.
		if(inst->instr == INSTR_NONE)
		{
			DBGPRINTF("subroutine: unknown instruction @ 0x%05x\n", IIDX2ADDR(er, i));
			return NULL;
		}
	}

	return NULL;
}
コード例 #3
0
void
microblaze_pop_frame (struct frame_info *fi)
{
  int rn;
  CORE_ADDR func_addr, func_end, addr;
  enum microblaze_instr op;
  int insn, rd, ra, rb, imm;
  int status;
  char *name;
  int offset = 0;	/* offset that the return instruction specifies */

  /* Find the start and end of this function. */
  /* siva/9/19/05: pop frame was not computing this offset. copied code from
     microblaze_fix_call_dummy to find the return insn & the offset */
  status = find_pc_partial_function (fi->pc, &name, &func_addr, &func_end);

  for (addr = func_addr; addr < func_end; addr += INST_WORD_SIZE) {
	  /* Start decoding the function looking for rtsd */
	  insn = get_insn (addr);
	  op = microblaze_decode_insn (insn, &rd, &ra, &rb, &imm);

	  /* Check for return. */
	  if (IS_RETURN(op)) {
		  offset = imm;
		  break; 
	  }
  }

  if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
    generic_pop_dummy_frame ();
  else
    {
      /* Write out the PC we saved. */
      write_register (PC_REGNUM, FRAME_SAVED_PC (fi) + offset);

      /* Restore any saved registers. */
      for (rn = 0; rn < NUM_REGS; rn++)
	{
	  if (fi->saved_regs[rn] != 0)
	    {
	      ULONGEST value;

	      value = read_memory_unsigned_integer (fi->saved_regs[rn],
						    REGISTER_SIZE);
	      write_register (rn, value);
	    }
	}

      /* Actually cut back the stack. */
      write_register (SP_REGNUM, FRAME_FP (fi));
    }

  /* Finally, throw away any cached frame information. */
  flush_cached_frames ();
}
コード例 #4
0
ファイル: pstocanonbj.c プロジェクト: Magister/bjcups-2.50
static
int read_line(int fd, char *p_buf, int bytes)
{
	static char read_buf[DATA_BUF_SIZE];
	static int buf_bytes = 0;
	static int buf_pos = 0;
	int read_bytes = 0;

	while( bytes > 0 )
	{
		if( buf_bytes == 0 && fd != -1 )
		{
			buf_bytes = read(fd, read_buf, DATA_BUF_SIZE);

			if( buf_bytes > 0 )
			{
#ifdef	DEBUG_IN_PS
				if( g_in_log_fd > 0 )
					write(g_in_log_fd, read_buf, buf_bytes);
#endif
				buf_pos = 0;
			}
		}

		if( buf_bytes > 0 )
		{
			*p_buf = read_buf[buf_pos++];
			bytes--;
			buf_bytes--;
			read_bytes++;

			if( IS_RETURN(*p_buf) )
				break;

			p_buf++;
		}
		else if( buf_bytes < 0 )
		{
			if( errno == EINTR )
				continue;
		}
		else
			break;
	}

	return read_bytes; 
}
コード例 #5
0
ファイル: c-function.c プロジェクト: RamchandraApte/rebol
*/	void Do_Closure(REBVAL *func)
/*
**		Do a closure by cloning its body and binding it to
**		a new frame of words/values.
**
**		This could be made faster by pre-binding the body,
**		then using Rebind_Block to rebind the words in it.
**
***********************************************************************/
{
	REBSER *body;
	REBSER *frame;
	REBVAL *result;
	REBVAL *ds;

	Eval_Functions++;
	//DISABLE_GC;

	// Clone the body of the function to allow rebinding to it:
	body = Clone_Block(VAL_FUNC_BODY(func));

	// Copy stack frame args as the closure object (one extra at head)
	frame = Copy_Values(BLK_SKIP(DS_Series, DS_ARG_BASE), SERIES_TAIL(VAL_FUNC_ARGS(func)));
	SET_FRAME(BLK_HEAD(frame), 0, VAL_FUNC_ARGS(func));

	// Rebind the body to the new context (deeply):
	//Rebind_Block(VAL_FUNC_ARGS(func), frame, body);
	Bind_Block(frame, BLK_HEAD(body), BIND_DEEP); // | BIND_NO_SELF);

	ds = DS_RETURN;
	SET_OBJECT(ds, body); // keep it GC safe
	result = Do_Blk(body, 0); // GC-OK - also, result returned on DS stack
	ds = DS_RETURN;

	if (IS_ERROR(result) && IS_RETURN(result)) {
		// Value below is kept safe from GC because no-allocation is
		// done between point of SET_THROW and here.
		if (VAL_ERR_VALUE(result))
			*ds = *VAL_ERR_VALUE(result);
		else
			SET_UNSET(ds);
	}
	else *ds = *result; // Set return value (atomic)
}
コード例 #6
0
static CORE_ADDR
microblaze_analyze_prologue (struct frame_info *fi, CORE_ADDR pc )
{
  CORE_ADDR func_addr, func_end, addr, stop, prologue_end_addr;
  CORE_ADDR stack_size;
  int insn, rn, rd, ra, rb, imm;
  enum microblaze_instr op;
  int status, fp_regnum, flags;
  int framesize;
  int register_offsets[NUM_REGS];
  char *name;
  boolean save_hidden_pointer_found = false;
  boolean non_stack_instruction_found = false;

  /* If provided, use the PC in the frame to look up the
     start of this function. */
  pc = (fi == NULL ? pc : fi->pc);

  /* Find the start of this function. */
  status = find_pc_partial_function (pc, &name, &func_addr, &func_end);

  /* If the start of this function could not be found or if the debbuger
     is stopped at the first instruction of the prologue, do nothing. */
  if (status == 0)
    return pc;

  /* If the debugger is entry function, give up. */
  if (func_addr == entry_point_address ())
    {
      if (fi != NULL)
	fi->extra_info->status |= NO_MORE_FRAMES;
      return pc;
    }

  /* At the start of a function, our frame is in the stack pointer. */
  flags = MY_FRAME_IN_SP;

  /* Start decoding the prologue.  We start by checking two special cases:

     1. We're about to return
     2. We're at the first insn of the prologue.

     If we're about to return, our frame has already been deallocated.
     If we are stopped at the first instruction of a prologue,
     then our frame has not yet been set up. */

  /* Get the first insn from memory */
  microblaze_insn_debug (("MICROBLAZE: starting prologue decoding\n"));
  insn = get_insn (pc);
  microblaze_dump_insn ("got 1: ", pc, insn);
  op = microblaze_decode_insn (insn, &rd, &ra, &rb, &imm);

  /* Check for return. */
  if (fi != NULL && IS_RETURN(op))
    {
      microblaze_insn_debug (("MICROBLAZE: got return"));
      if (fi->next == NULL)
	fi->frame = read_sp ();
      fi->extra_info->status = flags;
      return fi->pc;
    }

  /* Check for first insn of prologue */
  if (fi != NULL && fi->pc == func_addr)
    {
      if (fi->next == NULL)
	fi->frame = read_sp ();
      fi->extra_info->status = flags;
      return fi->pc;
    }

  /* Figure out where to stop scanning */
  stop = (fi ? fi->pc : func_end);

  /* Don't walk off the end of the function */
  stop = (stop > func_end ? func_end : stop);

  /* REGISTER_OFFSETS will contain offsets, from the top of the frame
     (NOT the frame pointer), for the various saved registers or -1
     if the register is not saved. */
  for (rn = 0; rn < NUM_REGS; rn++)
    register_offsets[rn] = -1;

  /* Analyze the prologue. Things we determine from analyzing the
     prologue include:
     * the size of the frame
     * where saved registers are located (and which are saved)
     * FP used? */
  microblaze_insn_debug (("MICROBLAZE: Scanning prologue: func_addr=0x%x, stop=0x%x\n",
		     (unsigned int) func_addr, (unsigned int) stop));

  framesize = 0;
  for (prologue_end_addr = addr = func_addr; addr < stop; addr += INST_WORD_SIZE)
    {
      /* Get next insn */
      insn = get_insn (addr);
      microblaze_dump_insn ("got 2: ", addr, insn);
      op = microblaze_decode_insn (insn, &rd, &ra, &rb, &imm);

      /* This code is very sensitive to what functions are present in the prologue. It assumes
	 that the (addi, addik, swi, sw) can be the only instructions in the prologue.
	 */
      if (IS_UPDATE_SP(op, rd, ra))
	{
	  microblaze_insn_debug (("MICROBLAZE: got addi r1,r1,%d; contnuing\n", imm));
	  framesize = -1 * imm; /* Since stack grows towards low memory */
	  save_hidden_pointer_found = false;
	  continue;
	}
      else if (IS_SPILL_SP(op, rd, ra))
	{
	  /* Spill stack pointer */
	  register_offsets[rd] = imm; /* SP spilled before updating */

	  microblaze_insn_debug (("MICROBLAZE: swi r1 r1 %d, continuing\n", imm));
	  save_hidden_pointer_found = false;
	  continue;
	}
      else if (IS_SPILL_REG(op, rd, ra))
	{
	  /* Spill register */
	  register_offsets[rd] = imm - framesize; /* reg spilled after updating */

	  microblaze_insn_debug (("MICROBLAZE: swi %d r1 %d, continuing\n", rd, imm));
	  save_hidden_pointer_found = false;
	  continue;

	}
      else if (IS_ALSO_SPILL_REG(op, rd, ra, rb))
	{
	  /* Spill register */
	  register_offsets[rd] = 0 - framesize; /* reg spilled after updating */

	  microblaze_insn_debug (("MICROBLAZE: sw %d r0 r1, continuing\n", rd));
	  save_hidden_pointer_found = false;
	  continue;

	}
      else if (IS_SETUP_FP(op, ra, rb))
	{
	  /* We have a frame pointer.  Note
	     the register which is acting as the frame pointer. */
	  flags |= MY_FRAME_IN_FP;
	  flags &= ~MY_FRAME_IN_SP;
	  fp_regnum = rd;
	  microblaze_insn_debug (("MICROBLAZE: Found a frame pointer: r%d\n", fp_regnum));
	  save_hidden_pointer_found = false;
	  continue;
	}
      else if (IS_SPILL_REG_FP(op, rd, ra, fp_regnum))
	{
	  register_offsets[rd] = imm - framesize; /* reg spilled after updating */

	  microblaze_insn_debug (("MICROBLAZE: swi %d %d %d, continuing\n", rd, ra, imm));
	  save_hidden_pointer_found = false;
	  continue;
	}
      else if (IS_SAVE_HIDDEN_PTR(op, rd, ra, rb))
	{
	  /* If the first argument is a hidden pointer to the area where the 
	     return structure is to be saved, then it is saved as part of the 
	     prologue */

	  microblaze_insn_debug (("MICROBLAZE: add %d %d %d, continuing\n", rd, ra, rb));
	  save_hidden_pointer_found = true;
	  continue;
	}

      /* as a result of the modification in the next step where we continue to analyze the 
	 prologue till we reach a control flow instruction, we need another variable to store
	 when exactly a non-stack instruction was encountered, which is the current definition
	 of a prologue
       */
      if (!non_stack_instruction_found)
      		prologue_end_addr = addr;
      non_stack_instruction_found = true;

      /* When optimizations are enabled, it is not guaranteed that prologue instructions
	 are not mixed in with other instructions from the program. Some programs show this 
	 behavior at -O2. This can be avoided by adding -fno-schedule-insns2 switch as of now (edk 8.1)
	 In such cases, we scan the function until we see the first control instruction.
       */

	   
      {
	      unsigned op = (unsigned)insn >> 26;

	      if (!(op == 0x26 || op == 0x27 || op == 0x2d || op == 0x2e || op == 0x2f))
		      continue;    /* continue if not control flow (branch, return) */
	      else if (op == 0x2c)
		      continue;    /* continue if imm */
      }

      /* This is not a prologue insn, so stop here. */
      microblaze_insn_debug (("microblaze: insn is not a prologue insn -- ending scan\n"));
      break;
    }

  microblaze_insn_debug (("microblaze: done analyzing prologue\n"));
  microblaze_insn_debug (("microblaze: prologue end = 0x%x\n", addr));

  /* If the last instruction was an add rd, r5, r0 then don't count it as part of
     the prologue */
  if (save_hidden_pointer_found) {
    addr -= INST_WORD_SIZE;
    prologue_end_addr -= INST_WORD_SIZE;
  }

  /* Save everything we have learned about this frame into FI. */
  if (fi != NULL)
    {
      fi->extra_info->framesize = framesize;
      fi->extra_info->fp_regnum = fp_regnum;
      fi->extra_info->status = flags;

      /* Fix the frame pointer. When gcc uses r8 as a frame pointer,
         it is really an arg ptr. We adjust fi->frame to be a "real"
         frame pointer. */
      if (fi->next == NULL)
	{
	  if (fi->extra_info->status & MY_FRAME_IN_SP)
	    fi->frame = read_sp () + framesize;
	  else
	    fi->frame = read_register (fp_regnum) + framesize;
	}

      /* Note where saved registers are stored. The offsets in REGISTER_OFFSETS
         are computed relative to the top of the frame. */
      for (rn = 0; rn < NUM_REGS; rn++)
	{
	  if (register_offsets[rn] != -1)
	    {
	      fi->saved_regs[rn] = fi->frame + register_offsets[rn];
	      microblaze_insn_debug (("Saved register %s stored at 0x%08x, value=0x%08x\n",
			       microblaze_register_names[rn], fi->saved_regs[rn],
				microblaze_read_memory_integer (fi->saved_regs[rn])));
	    }
	}
    }

  /* Return addr of first non-prologue insn. */
  return prologue_end_addr;
}
コード例 #7
0
void QKeyPushButton::getKeyPress(bool capsStatus)
{
	int 		keyCode = 0;
	QKeyEvent	*key = NULL;
	QString		text = this->text();
	//
	// per tutti i car speciali tranne il CAPS (RETURN, ALT, SHIFT, ecc...) inoltra al componente widgetKeyBoard:
        if (NO_SPECIAL_KEY(text) == false && (IS_BACK(text) == true || IS_BACK_EMB(text) == true || IS_TAB(text) == true || IS_RETURN(text) == true || IS_CTRL_LEFT(text) == true ||
                        IS_ALT(text) == true || IS_CANC(text) == true || IS_CUT_LEFT(text) == true || IS_PASSWORD(text) || IS_PASSWORD_EMB(text) || IS_PASTE(text) || IS_COPY(text)))
		key = new QKeyEvent(QEvent::KeyPress, keyCode, Qt::NoModifier, text);
	else { // trattasi di caratteri stampabili
		keyCode = text.toAscii()[0]; // prende il valore numerico (sempre maiuscolo)
                if (capsStatus == false) { // se deve prendere minuscolo, controlla se il carattere è alfabetico
                    if (keyCode >= tr("A")[0] && keyCode <= tr("Z")[0]) {
                            keyCode += 32; // carattere piccolo
                            text = (char ) keyCode; // carattere piccolo
                    }
                    key = new QKeyEvent(QEvent::KeyPress, keyCode, Qt::NoModifier, text);
		}
		else
                    key = new QKeyEvent(QEvent::KeyPress, keyCode, Qt::ShiftModifier, text);
	}
        ((widgetKeyBoard *) this->m_parent)->receiptChildKey(key, NULL);
	QCoreApplication::processEvents();
}
コード例 #8
0
ファイル: pstocanonbj.c プロジェクト: Magister/bjcups-2.50
static
ParamList *get_ps_params(int ifd, BufList **ps_data)
{
	char read_buf[DATA_BUF_SIZE];
	ParamList *p_list = NULL;
	int begin_page = 0;
	int read_bytes;
	int acro_util = 0;	
	BufList *bl = NULL;

	while( (read_bytes = read_line(ifd, read_buf, DATA_BUF_SIZE - 1)) > 0 )
	{
		int dev_len = strlen(PAGE_DEV_BEGIN);
		int end_len = strlen(PAGE_DEV_END);
		// For Acrobat Reader 
		{
			if( is_acro_util(read_buf, read_bytes) ){
				acro_util = 1;	
			}
			else if( acro_util && is_end_resource(read_buf, read_bytes) ){
				acro_util = 0;	
			}

			if( acro_util ){
				int line_bytes=0;
				while( line_bytes+29 < read_bytes ){
					if(!strncmp(&read_buf[line_bytes], 
						" ct_BadResourceImplementation?", 30)){
						strcpy(&read_buf[line_bytes], " false");
						line_bytes+=6;
						strcpy(&read_buf[line_bytes], 
							&read_buf[line_bytes+24]);
						read_bytes-=24;
					}
					else{
						line_bytes++;
					}
				}
			}
		}

		// Retain the PS data in the buffer list.
		bl = buflist_new(read_buf, read_bytes);

		if( *ps_data == NULL )
			*ps_data = bl;
		else
			buflist_add_tail(*ps_data, bl);

		if( read_bytes > 0 )
		{
			if( read_buf[read_bytes - 1] == '\n' )
				read_buf[read_bytes - 1] = '\0';
			else
				read_buf[read_bytes] = '\0';
		}
		else
		{
			read_buf[0] = '\0';
		}

		// Parse the printing option per line.
		if( strncmp(read_buf, "%%BeginFeature:", 15) == 0 )
		{
			char key_buf[MAX_KEY_LEN + 1];
			char value_buf[MAX_VALUE_LEN + 1];
			int key_len = 0;
			int value_len = 0;
			char *p_code;

			p_code = read_buf + 15;

			while( *p_code != '\0' )
			{
				if( *p_code++ == '*' )
					break;
			}
			while( *p_code != '\0' )
			{
				if( IS_BLANK(*p_code)
				 || key_len >= MAX_KEY_LEN )
					break;
				key_buf[key_len++] = *p_code++;
			}
			while( *p_code != '\0' )
			{
				if( !IS_BLANK(*p_code)  )
					break;
				*p_code++;
			}
			while( *p_code != '\0' )
			{
				if( IS_BLANK(*p_code)
				 || value_len >= MAX_VALUE_LEN )
					break;
				value_buf[value_len++] = *p_code++;
			}
			if( key_len > 0 && value_len > 0 )
			{
				key_buf[key_len] = '\0';
				value_buf[value_len] = '\0';

				param_list_add_multi(&p_list, key_buf, value_buf, value_len + 1, 1);
			}
		}
		else if( !begin_page && strncmp(read_buf, "%%Page:", 7) == 0 )
		{
			begin_page = 1;
		}
		else if( begin_page )
		{
			if( strncmp(read_buf, "%%EndPageSetup", 14) == 0 )
				break;
			else if( strncmp(read_buf, "gsave", 5) == 0 )
				break;
			else if( read_buf[0] >= '0' && read_buf[0] <= '9' )
				break;
		}
		// For InkJet <</***(...)>>setpagedevice.
		else if(strncmp(read_buf + (read_bytes - 1 - end_len), PAGE_DEV_END, end_len) == 0)
		{
			char key_buf[MAX_KEY_LEN + 1];
			char value_buf[MAX_KEY_LEN + 1];
			char *p_code;
			int pos = 0;

			p_code = read_buf + dev_len;

			while( !IS_RETURN(p_code[pos]) )
			{
				int key_pos = 0;
				int val_pos = 0;

				while( p_code[pos] != '/'
				        && !IS_RETURN(p_code[pos]) ) pos++;

				if( p_code[pos] == '/' ) pos++;
				else continue;

				while( isalnum(p_code[pos])
						&& key_pos < 255 )
					key_buf[key_pos++] = p_code[pos++];

				key_buf[key_pos++] = 0;

				if( p_code[pos] == '(' )
				{
					pos++;

					while( p_code[pos] != ')'
						&& !IS_BLANK(p_code[pos])
						&& !IS_RETURN(p_code[pos])
						&& val_pos < 255 )
						value_buf[val_pos++] = p_code[pos++];

					value_buf[val_pos++] = 0;

					if( p_code[pos] == ')' ) pos++;
					else continue;

					if( !strcmp(key_buf, "CNPageSizeName") )
						strncpy(key_buf, "PageSize", MAX_KEY_LEN);
				}
				else continue;

				param_list_add_multi(&p_list, key_buf, value_buf, val_pos+1, 1);
			}
		}
	}

	while( (read_bytes = read_line(-1, read_buf, DATA_BUF_SIZE - 1)) > 0 )
	{
		BufList *bl = buflist_new(read_buf, read_bytes);

		if( *ps_data == NULL )
			*ps_data = bl;
		else
			buflist_add_tail(*ps_data, bl);

		if( read_bytes > 0 )
		{
			if( read_buf[read_bytes - 1] == '\n' )
				read_buf[read_bytes - 1] = '\0';
			else
				read_buf[read_bytes] = '\0';
		}
		else
		{
			read_buf[0] = '\0';
		}
	}
	return p_list;
}
コード例 #9
0
//
// riceve i caratteri che sono stati digitati:
void widgetKeyBoard::receiptChildKey(QKeyEvent *event, QLineEdit *focusThisControl, bool reset)
{
        static QLineEdit    *nextInput = NULL;

	if (reset == true) { // reinizializza il controllo
                nextInput = this->getNextTextbox(focusThisControl, true);
		return;
	}        
	if (nextInput == NULL)
		return;        
	//
	// inizia l'analisi del carattere ricevuto:
	QString	newKey = event->text();
	QString tmpReceiptString = nextInput->text();
        int     tmpPos = nextInput->cursorPosition();

        if (NO_SPECIAL_KEY(newKey) == false) {
            if (IS_RETURN(newKey) == true || IS_TAB(newKey) == true) { // trattasi di TAB, si sposta alla text successiva
                nextInput = this->setDefaultTextStyle(nextInput);
                nextInput->deselect();
                nextInput = this->getNextTextbox();
                this->controlKeyEcho(nextInput); // status of key echo here
                if (nextInput != NULL) {
                    nextInput->setCursorPosition(nextInput->text().length()); // comment this line if you want caret position at current char inserted
                    nextInput->setFocus(Qt::TabFocusReason);
                }
            }
            else if (IS_BACK(newKey) == true || IS_BACK_EMB(newKey) == true) { // trattasi di CANCELLARE carattere, elimina il carattere a sinistra
                if (tmpPos-1 >= 0) {
                    tmpReceiptString = tmpReceiptString.remove(tmpPos-1, 1);
                    nextInput->setText(tmpReceiptString);
                    nextInput->setCursorPosition(tmpPos-1);
                    nextInput->setSelection(tmpPos-2, 1);
                }
            }
            else if (IS_CANC(newKey) == true) { // trattasi di CANC carattere, elimina il carattere a destra
                 tmpReceiptString = tmpReceiptString.remove(tmpPos, 1);
                 nextInput->setText(tmpReceiptString);
                 nextInput->setCursorPosition(tmpPos);
                 nextInput->setSelection(tmpPos-1, 1);
            }
            else if (IS_COPY(newKey) == true || IS_CUT_LEFT(newKey) == true) {
                QPushButton *button = this->findChild<QPushButton *>(KEY_PASTE);

                if (button != NULL) {
                    if (nextInput->text().length() != 0) {
                        this->m_clipboard->setText(nextInput->text());
                        if (IS_CUT_LEFT(newKey) == true)
                            nextInput->setText("");
                        button->setEnabled(true);
                    }
                    else
                        button->setEnabled(false);
                }
            }
            else if (IS_PASTE(newKey) == true)
                nextInput->setText(this->m_clipboard->text());
            else if (IS_ALT(newKey) == true || IS_CTRL_LEFT(newKey) == true)
                ; // non esegue nessuna operazione
        }
        else { // si tratta di un carattere da visualizzare nella casella di testo corrente
            tmpReceiptString = tmpReceiptString.insert(tmpPos, newKey);
            nextInput->setText(tmpReceiptString);
            nextInput->setCursorPosition(tmpPos+1);
            nextInput->setSelection(tmpPos, 1);
	}
}