Example #1
0
void rabbit_object_free( VALUE value )
{
	assert( value );

	if( !IS_PTR_VALUE(value) ) {
		rabbit_bug("(object_free)ポインタ型では無いオブジェクトが送られてきました(type %d)", VALUE_TYPE(value) );
	}

	switch(VALUE_TYPE(value)) {
	case TYPE_STRING:
		free( R_STRING(value)->ptr );
		break;

	case TYPE_ARRAY:
		free( R_ARRAY(value)->ptr );
		break;

	case TYPE_CLASS:
		break;

	case TYPE_OBJECT:
		st_free_table( R_OBJECT(value)->ival_tbl );
		R_OBJECT(value)->ival_tbl = 0;
		break;

	case TYPE_METHOD:
		break;

	default:
		rabbit_bug("(object_free)未対応型のオブジェクトが送られてきました(type %d)", VALUE_TYPE(value) );
	}

	free( (void*)(value) );
}
static int OutputVcardAttribute(MimeObject *aMimeObj, VObject *aVcard, const char* id, nsACString& vCardOutput)
{
  VObject *prop = NULL;
  nsAutoCString string;

  nsCOMPtr<nsIMsgVCardService> vCardService = do_GetService(MSGVCARDSERVICE_CONTRACT_ID);
  if (!vCardService)
      return -1;

  prop = vCardService->IsAPropertyOf(aVcard, id);
  if (prop)
    if (VALUE_TYPE(prop))
    {
      if (VALUE_TYPE(prop) != VCVT_RAW)
        string.Adopt(vCardService->FakeCString(prop));
      else
        string.Adopt(vCardService->VObjectAnyValue(prop));

      if (!string.IsEmpty())
      {
        vCardOutput += "<tr> <td class=\"moz-vcard-property\">";
        vCardOutput += string;
        vCardOutput += "</td> </tr> ";
      }
    }

  return 0;
}
Example #3
0
char *getCString(VObject *vObj)
{
    if (VALUE_TYPE(vObj) == VCVT_USTRINGZ)
        return fakeCString(vObjectUStringZValue(vObj));
    if (VALUE_TYPE(vObj) == VCVT_STRINGZ)
        return PL_strdup(vObjectStringZValue(vObj));
    return NULL;
}
Example #4
0
/* Evaluate the value of the argument. The argument is an
   expression. If the expression contains spaces it needs to be
   included in double quotes. */
enum mi_cmd_result
mi_cmd_data_evaluate_expression (char *command, char **argv, int argc)
{
  struct expression *expr;
  struct cleanup *old_chain = NULL;
  struct value *val;
  struct ui_stream *stb = NULL;

  stb = ui_out_stream_new (uiout);

  if (argc != 1)
    {
      xasprintf (&mi_error_message,
		 "mi_cmd_data_evaluate_expression: Usage: -data-evaluate-expression expression");
      return MI_CMD_ERROR;
    }

  expr = parse_expression (argv[0]);

  old_chain = make_cleanup (free_current_contents, &expr);

  val = evaluate_expression (expr);

  /* Print the result of the expression evaluation. */
  val_print (VALUE_TYPE (val), VALUE_CONTENTS (val),
	     VALUE_EMBEDDED_OFFSET (val), VALUE_ADDRESS (val),
	     stb->stream, 0, 0, 0, 0);

  ui_out_field_stream (uiout, "value", stb);
  ui_out_stream_delete (stb);

  do_cleanups (old_chain);

  return MI_CMD_DONE;
}
Example #5
0
DizList::desc_map::iterator DizList::AddRecord(const string& Name, const string& Description)
{
	Modified=true;
	std::list<string> DescStrings;
	DescStrings.emplace_back(Description);
	return DizData.insert(DizData.begin(), VALUE_TYPE(DizData)(Name, DescStrings));
}
Example #6
0
DLLEXPORT(void) cleanVObject(VObject *o)
{
    if (o == 0) return;
    if (o->prop) {
	/* destroy time: cannot use the iterator here.
	   Have to break the cycle in the circular link
	   list and turns it into regular NULL-terminated
	   list -- since at some point of destruction,
	   the reference entry for the iterator to work
	   will not longer be valid.
	   */
	VObject *p;
	p = o->prop->next;
	o->prop->next = 0;
	do {
	   VObject *t = p->next;
	   cleanVObject(p);
	   p = t;
	   } while (p);
	}
    switch (VALUE_TYPE(o)) {
	case VCVT_STRINGZ:
	case VCVT_RAW:
	    // assume they are all allocated by malloc.
	    free((char*)STRINGZ_VALUE_OF(o));
	    break;
	case VCVT_VOBJECT:
	    cleanVObject(VOBJECT_VALUE_OF(o));
	    break;
	}
    deleteVObject(o);
}
Example #7
0
static void writeValue(OFile *fp, VObject *o, unsigned long size, bool nosemi)
{
    if (o == 0) return;
    switch (VALUE_TYPE(o)) {
	case VCVT_STRINGZ: {
	    writeEncString(fp, STRINGZ_VALUE_OF(o), nosemi);
	    break;
	    }
	case VCVT_UINT: {
	    char buf[16];
	    sprintf(buf,"%u", INTEGER_VALUE_OF(o));
	    appendsOFile(fp,buf);
	    break;
	    }
	case VCVT_ULONG: {
	    char buf[16];
	    sprintf(buf,"%lu", LONG_VALUE_OF(o));
	    appendsOFile(fp,buf);
	    break;
	    }
	case VCVT_RAW: {
	    appendcOFile(fp,'\n');
	    writeBase64(fp,(unsigned char*)(ANY_VALUE_OF(o)),size);
	    break;
	    }
	case VCVT_VOBJECT:
	    appendcOFile(fp,'\n');
	    writeVObject_(fp,VOBJECT_VALUE_OF(o));
	    break;
	}
}
Example #8
0
void gc_mark( VALUE value )
{
	if( !IS_PTR_VALUE(value) ) {
		return;
	}
	if( FLAG_TEST( value, FLAG_GC_MARK ) ) {
		return;
	}
	if( RANY(value)->as.free.flags == 0 ) {
		return;
	}
	FLAG_SET( value, FLAG_GC_MARK );

	gc_mark( R_BASIC(value)->klass );

	switch(VALUE_TYPE(value))
	{
	case TYPE_STRING:
		break;

	case TYPE_ARRAY: {
		int i;
		for( i=0; i< R_ARRAY(value)->len; ++i ) {
			gc_mark( R_ARRAY(value)->ptr[i] );
		}
		break;
	}
	case TYPE_CLASS:
		gc_mark( (VALUE)(R_CLASS(value)->super) );
		var_tbl_mark( R_CLASS(value)->ival_tbl );
		var_tbl_mark( R_CLASS(value)->method_tbl );
		break;

	case TYPE_OBJECT:
		gc_mark( (VALUE)(R_BASIC(value)->klass) );
		var_tbl_mark( R_OBJECT(value)->ival_tbl );
		break;

	case TYPE_METHOD:
		break;

	default:
		rabbit_bug("(GC MARK)未対応型のオブジェクトが送られてきました(type %d)", VALUE_TYPE(value) );
	}

}
int
ada_value_print (struct value *val0, struct ui_file *stream, int format,
		 enum val_prettyprint pretty)
{
  char *valaddr = VALUE_CONTENTS (val0);
  CORE_ADDR address = VALUE_ADDRESS (val0) + VALUE_OFFSET (val0);
  struct type *type =
    ada_to_fixed_type (VALUE_TYPE (val0), valaddr, address, NULL);
  struct value *val =
    value_from_contents_and_address (type, valaddr, address);

  /* If it is a pointer, indicate what it points to.  */
  if (TYPE_CODE (type) == TYPE_CODE_PTR)
    {
      /* Hack:  don't print (char *) for char strings.  Their
         type is indicated by the quoted string anyway.  */
      if (TYPE_LENGTH (TYPE_TARGET_TYPE (type)) != sizeof (char)
	  || TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_INT 
	  || TYPE_UNSIGNED (TYPE_TARGET_TYPE (type)))
	{
	  fprintf_filtered (stream, "(");
	  type_print (type, "", stream, -1);
	  fprintf_filtered (stream, ") ");
	}
    }
  else if (ada_is_array_descriptor_type (type))
    {
      fprintf_filtered (stream, "(");
      type_print (type, "", stream, -1);
      fprintf_filtered (stream, ") ");
    }
  else if (ada_is_bogus_array_descriptor (type))
    {
      fprintf_filtered (stream, "(");
      type_print (type, "", stream, -1);
      fprintf_filtered (stream, ") (...?)");
      return 0;
    }

  if (TYPE_CODE (type) == TYPE_CODE_ARRAY
      && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) == 0
      && TYPE_CODE (TYPE_INDEX_TYPE (type)) == TYPE_CODE_RANGE)
    {
      /* This is an array of zero-length elements, that is an array
         of null records.  This array needs to be printed by hand,
         as the standard routine to print arrays relies on the size of
         the array elements to be nonzero.  This is because it computes
         the number of elements in the array by dividing the array size
         by the array element size.  */
      fprintf_filtered (stream, "(%d .. %d => ())",
                        TYPE_LOW_BOUND (TYPE_INDEX_TYPE (type)),
                        TYPE_HIGH_BOUND (TYPE_INDEX_TYPE (type)));
      return 0;
    }
  
  return (val_print (type, VALUE_CONTENTS (val), 0, address,
		     stream, format, 1, 0, pretty));
}
Example #10
0
static void writeProp(OFile *fp, VObject *o)
{
    int isQuoted=0;
    if (NAME_OF(o)) {
        const struct PreDefProp *pi;
        VObjectIterator t;
        const char **fields_ = 0;
        pi = lookupPropInfo(NAME_OF(o));
        if (pi && ((pi->flags & PD_BEGIN) != 0)) {
            writeVObject_(fp,o);
            return;
            }
        if (isAPropertyOf(o,VCGroupingProp))
            writeGroup(fp,o);
        else
            appendsOFile(fp,NAME_OF(o));
        if (pi) fields_ = pi->fields;
        initPropIterator(&t,o);
        while (moreIteration(&t)) {
            const char *s;
            VObject *eachProp = nextVObject(&t);
            s = NAME_OF(eachProp);
            if (strcasecmp(VCGroupingProp,s) && !inList(fields_,s))
                writeAttrValue(fp,eachProp);
            if (strcasecmp(VCQPProp,s)==0 || strcasecmp(VCQuotedPrintableProp,s)==0)
                 isQuoted=1;
            }
        if (fields_) {
            int i = 0, n = 0;
            const char** fields = fields_;
            /* output prop as fields */
            appendcOFile(fp,':');
            while (*fields) {
                VObject *tl = isAPropertyOf(o,*fields);
                i++;
                if (tl) n = i;
                fields++;
                }
            fields = fields_;
            for (i=0;i<n;i++) {
                writeValue(fp,isAPropertyOf(o,*fields),0,isQuoted);
                fields++;
                if (i<(n-1)) appendcOFile(fp,';');
                }
            }
        }

    if (VALUE_TYPE(o)) {
        unsigned long size = 0;
        VObject *p = isAPropertyOf(o,VCDataSizeProp);
        if (p) size = LONG_VALUE_OF(p);
        appendcOFile(fp,':');
        writeValue(fp,o,size,isQuoted);
        }

    appendcOFile(fp,'\n');
}
Example #11
0
VObject* newVObject_(const char *id)
{
    VObject *p = (VObject*) new(VObject);
    p->next = 0;
    p->id = id;
    p->prop = 0;
    VALUE_TYPE(p) = 0;
  ANY_VALUE_OF(p) = 0;
    return p;
}
Example #12
0
	void write(std::ostream& Stream, const container& Container)
	{
		static_assert(std::is_trivially_copyable_v<VALUE_TYPE(Container)>);

		const auto Size = std::size(Container);
		if (!Size)
			return;

		Stream.write(static_cast<const char*>(static_cast<const void*>(std::data(Container))), Size * sizeof(*std::data(Container)));
	}
Example #13
0
DLLEXPORT(VObject*) newVObject_(const char *id)
{
    VObject *p = (VObject*)malloc(sizeof(VObject));
    p->next = 0;
    p->id = id;
    p->prop = 0;
    VALUE_TYPE(p) = 0;
    ANY_VALUE_OF(p) = 0;
    return p;
}
Example #14
0
static void printNameValue(FILE *fp,VObject *o, int level)
{
    indent(fp,level);
    if (NAME_OF(o)) {
	fprintf(fp,"%s", NAME_OF(o));
	}
    if (VALUE_TYPE(o)) {
	fputc('=',fp);
	printValue(fp,o, level);
	}
    fprintf(fp,"\n");
}
static void info_embedded_symbol_command (char *exp, int from_tty)
{
  struct expression *expr;
  struct value *val;
  CORE_ADDR address;
  struct embedded_symbol *sym;

  expr = parse_expression (exp);
  val = evaluate_expression (expr);
  if (TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_REF)
    val = value_ind (val);
  if ((TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_FUNC) && (VALUE_LVAL (val) == lval_memory))
    address = VALUE_ADDRESS (val);
  else
    address = value_as_address (val);

  sym = search_for_embedded_symbol (address);
  if (sym != NULL)
    fprintf_unfiltered
      (gdb_stderr, "Symbol at 0x%lx is \"%s\".\n", (unsigned long) address, sym->name);
  else
    fprintf_unfiltered
      (gdb_stderr, "Symbol at 0x%lx is unknown.\n", (unsigned long) address);
}
Example #16
0
static void writeAttrValue(OFile *fp, VObject *o)
{
    if (NAME_OF(o)) {
	struct PreDefProp *pi;
	pi = lookupPropInfo(NAME_OF(o));
	if (pi && ((pi->flags & PD_INTERNAL) != 0)) return;
	appendcOFile(fp,';');
	appendsOFile(fp,NAME_OF(o));
	}
    else
	appendcOFile(fp,';');
    if (VALUE_TYPE(o)) {
	appendcOFile(fp,'=');
	writeValue(fp,o,0);
	}
}
Example #17
0
static struct value *
value_of_builtin_frame_pc_reg (struct frame_info *frame)
{
  if (PC_REGNUM >= 0)
    return value_of_register (PC_REGNUM, frame);
  else
    {
      struct value *val = allocate_value (builtin_type_void_data_ptr);
      char *buf = VALUE_CONTENTS_RAW (val);
      if (frame == NULL)
	memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val)));
      else
	ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf,
			    get_frame_pc (frame));
      return val;
    }
}
Example #18
0
static void printValue(FILE *fp, VObject *o, int level)
{
    switch (VALUE_TYPE(o)) {
	case VCVT_USTRINGZ: {
	    char c;
            char *t,*s;
	    s = t = fakeCString(USTRINGZ_VALUE_OF(o));
	    fputc('"',fp);
	    while (c=*t,c) {
	        fputc(c,fp);
		if (c == '\n') indent(fp,level+2);
		t++;
		}
	    fputc('"',fp);
	    deleteStr(s);
	    break;
	    }
	case VCVT_STRINGZ: {
	    char c;
	    const char *s = STRINGZ_VALUE_OF(o);
	    fputc('"',fp);
	    while (c=*s,c) {
	        fputc(c,fp);
		if (c == '\n') indent(fp,level+2);
		s++;
		}
	    fputc('"',fp);
	    break;
	    }
	case VCVT_UINT:
	    fprintf(fp,"%d", INTEGER_VALUE_OF(o)); break;
	case VCVT_ULONG:
	    fprintf(fp,"%ld", LONG_VALUE_OF(o)); break;
	case VCVT_RAW:
	    fprintf(fp,"[raw data]"); break;
	case VCVT_VOBJECT:
	    fprintf(fp,"[vobject]\n");
	    printVObject_(fp,VOBJECT_VALUE_OF(o),level+1);
	    break;
	case 0:
	    fprintf(fp,"[none]"); break;
	default:
	    fprintf(fp,"[unknown]"); break;
	}
}
Example #19
0
static struct value *
value_of_builtin_frame_reg (struct frame_info *frame)
{
  struct value *val;
  char *buf;
  build_builtin_type_frame_reg ();
  val = allocate_value (builtin_type_frame_reg);
  VALUE_LVAL (val) = not_lval;
  buf = VALUE_CONTENTS_RAW (val);
  memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val)));
  /* frame.base.  */
  if (frame != NULL)
    ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf,
			get_frame_base (frame));
  buf += TYPE_LENGTH (builtin_type_void_data_ptr);
  /* frame.XXX.  */
  return val;
}
Example #20
0
static bool includesUnprintable(VObject *o, bool nosemi)
{
    if (o) {
	if (VALUE_TYPE(o) == VCVT_STRINGZ) {
	    const char *p = STRINGZ_VALUE_OF(o);
	    if (p) {
		while (*p) {
		    if (*p==' ' && (!p[1] || p[1]=='\n') // RFC 1521: spaces at ends need quoting
			    || qpReplaceChar(*p)
			    || *p==';' && nosemi )
			return TRUE;
		    p++;
		}
	    }
	}
    }
    return FALSE;
}
Example #21
0
static void writeValue(OFile *fp, VObject *o, unsigned long size)
{
    if (o == 0) return;
    switch (VALUE_TYPE(o)) {
	case VCVT_USTRINGZ: {
	    char *s = fakeCString(USTRINGZ_VALUE_OF(o));
	    if (isAPropertyOf(o, VCQuotedPrintableProp))
	      writeQPString(fp, s, 1);
	    else
	      writeQPString(fp, s, 0);
	    deleteStr(s);
	    break;
	    }
	case VCVT_STRINGZ: {
	    if (isAPropertyOf(o, VCQuotedPrintableProp))
	      writeQPString(fp, STRINGZ_VALUE_OF(o), 1);
	    else
	      writeQPString(fp, STRINGZ_VALUE_OF(o), 0);
	    break;
	    }
	case VCVT_UINT: {
	    char buf[16];
	    snprintf(buf,sizeof(buf),"%u", INTEGER_VALUE_OF(o));
	    appendsOFile(fp,buf);
	    break;
	    }
	case VCVT_ULONG: {
	    char buf[16];
	    snprintf(buf,sizeof(buf),"%lu", LONG_VALUE_OF(o));
	    appendsOFile(fp,buf);
	    break;
	    }
	case VCVT_RAW: {
	    appendcOFile(fp,'\n');
	    writeBase64(fp,(unsigned char*)(ANY_VALUE_OF(o)),size);
	    break;
	    }
	case VCVT_VOBJECT:
	    appendcOFile(fp,'\n');
	    writeVObject_(fp,VOBJECT_VALUE_OF(o));
	    break;
	}
}
Example #22
0
static struct value *
value_of_builtin_frame_fp_reg (struct frame_info *frame)
{
  if (DEPRECATED_FP_REGNUM >= 0)
    /* NOTE: cagney/2003-04-24: Since the mere presence of "fp" in the
       register name table overrides this built-in $fp register, there
       is no real reason for this DEPRECATED_FP_REGNUM trickery here.
       An architecture wanting to implement "$fp" as alias for a raw
       register can do so by adding "fp" to register name table (mind
       you, doing this is probably a dangerous thing).  */
    return value_of_register (DEPRECATED_FP_REGNUM, frame);
  else
    {
      struct value *val = allocate_value (builtin_type_void_data_ptr);
      char *buf = VALUE_CONTENTS_RAW (val);
      if (frame == NULL)
	memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val)));
      else
	ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf,
			    get_frame_base_address (frame));
      return val;
    }
}
static int OutputBasicVcard(MimeObject *aMimeObj, VObject *aVcard, nsACString& vCardOutput)
{
  VObject *prop = NULL;
  nsAutoCString urlstring;
  nsAutoCString namestring;
  nsAutoCString emailstring;

  nsCOMPtr<nsIMsgVCardService> vCardService =  do_GetService(MSGVCARDSERVICE_CONTRACT_ID);
  if (!vCardService)
      return -1;

  /* get the name and email */
  prop = vCardService->IsAPropertyOf(aVcard, VCFullNameProp);
  if (prop)
  {
    if (VALUE_TYPE(prop))
    {
      if (VALUE_TYPE(prop) != VCVT_RAW)
        namestring.Adopt(vCardService->FakeCString(prop));
      else
        namestring.Adopt(vCardService->VObjectAnyValue(prop));

      if (!namestring.IsEmpty())
      {
        vCardOutput += "<td class=\"moz-vcard-title-property\"> ";

        prop = vCardService->IsAPropertyOf(aVcard, VCURLProp);
        if (prop)
        {
          urlstring.Adopt(vCardService->FakeCString(prop));
          if (urlstring.IsEmpty())
            vCardOutput += namestring;
          else
          {
            char buf[512];
            PR_snprintf(buf, 512, "<a href=""%s"" private>%s</a>", urlstring.get(), namestring.get());
            vCardOutput.Append(buf);
          }
        }
        else
          vCardOutput += namestring;

        /* get the email address */
        prop = vCardService->IsAPropertyOf(aVcard, VCEmailAddressProp);
        if (prop)
        {
          emailstring.Adopt(vCardService->FakeCString(prop));
          if (!emailstring.IsEmpty())
          {
            char buf[512];
            PR_snprintf(buf, 512, "&nbsp;&lt;<a href=""mailto:%s"" private>%s</a>&gt;", emailstring.get(), emailstring.get());
            vCardOutput.Append(buf);
          }
        } // if email address property

        vCardOutput += "</td> </tr> "; // end the cell for the name/email address
      } // if we have a name property
    }
  } // if full name property

  // now each basic property goes on its own line

  // title
  (void) OutputVcardAttribute (aMimeObj, aVcard, VCTitleProp, vCardOutput);

  // org name and company name
  prop = vCardService->IsAPropertyOf(aVcard, VCOrgProp);
  if (prop)
  {
    OutputVcardAttribute (aMimeObj, prop, VCOrgUnitProp, vCardOutput);
    OutputVcardAttribute (aMimeObj, prop, VCOrgNameProp, vCardOutput);
  }

  return 0;
}
Example #24
0
bool filemasks::Set(const string& masks, DWORD Flags)
{
	bool Result = false;

	if (!masks.empty())
	{
		Free();

		string expmasks(masks);
		std::list<string> UsedGroups;
		size_t LBPos, RBPos;

		while((LBPos = expmasks.find(L'<')) != string::npos && (RBPos = expmasks.find(L'>', LBPos)) != string::npos)
		{
			string MaskGroupNameWB = expmasks.substr(LBPos, RBPos-LBPos+1);
			string MaskGroupName = expmasks.substr(LBPos+1, RBPos-LBPos-1);
			string MaskGroupValue;
			if (std::find(ALL_CONST_RANGE(UsedGroups), MaskGroupName) == UsedGroups.cend())
			{
				Global->Db->GeneralCfg()->GetValue(L"Masks", MaskGroupName, MaskGroupValue, L"");
				ReplaceStrings(expmasks, MaskGroupNameWB, MaskGroupValue);
				UsedGroups.emplace_back(MaskGroupName);
			}
			else
			{
				ReplaceStrings(expmasks, MaskGroupNameWB, L"");	
			}
		}

		if (!expmasks.empty())
		{
			const wchar_t* ptr = expmasks.data();

			string SimpleMasksInclude, SimpleMasksExclude;

			auto DestContainer = &Include;
			auto DestString = &SimpleMasksInclude;

			Result = true;

			while(*ptr)
			{
				ptr = SkipSeparators(ptr);
				auto nextpos = SkipRE(ptr);
				if (nextpos != ptr)
				{
					filemasks::masks m;
					Result = m.Set(string(ptr, nextpos-ptr));
					if (Result)
					{
						DestContainer->emplace_back(std::move(m));
						ptr = nextpos;
					}
					else
					{
						break;
					}
					ptr = nextpos;
				}
				ptr = SkipSeparators(ptr);
				nextpos = SkipMasks(ptr);
				if (nextpos != ptr)
				{
					*DestString += string(ptr, nextpos-ptr);
					ptr = nextpos;
				}
				if (*ptr == ExcludeMaskSeparator)
				{
					if (DestContainer != &Exclude)
					{
						DestContainer = &Exclude;
						DestString = &SimpleMasksExclude;
					}
					else
					{
						break;
					}
					++ptr;
				}
			}

			if (Result && !SimpleMasksInclude.empty())
			{
				filemasks::masks m;
				Result = m.Set(SimpleMasksInclude);
				if (Result)
					Include.emplace_back(std::move(m));
			}

			if (Result && !SimpleMasksExclude.empty())
			{
				filemasks::masks m;
				Result = m.Set(SimpleMasksExclude);
				if (Result)
					Exclude.emplace_back(std::move(m));
			}

			if (Result && Include.empty() && !Exclude.empty())
			{
				Include.emplace_back(VALUE_TYPE(Include)());
				Result = Include.back().Set(L"*");
			}

			Result = !empty();
		}

		if (!Result)
		{
			if (!(Flags & FMF_SILENT))
			{
				ErrorMessage();
			}
			Free();
		}

	}

	return Result;
}
Example #25
0
DLLEXPORT(int) vObjectValueType(VObject *o)
{
    return VALUE_TYPE(o);
}
Example #26
0
DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p)
{
    VOBJECT_VALUE_OF(o) = p;
    VALUE_TYPE(o) = VCVT_VOBJECT;
}
Example #27
0
DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t)
{
    ANY_VALUE_OF(o) = t;
    VALUE_TYPE(o) = VCVT_RAW;
}
Example #28
0
DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l)
{
    LONG_VALUE_OF(o) = l;
    VALUE_TYPE(o) = VCVT_ULONG;
}
Example #29
0
DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i)
{
    INTEGER_VALUE_OF(o) = i;
    VALUE_TYPE(o) = VCVT_UINT;
}
Example #30
0
DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s)
{
    STRINGZ_VALUE_OF(o) = s;
    VALUE_TYPE(o) = VCVT_STRINGZ;
}