static void handle_query_response(DNSServiceRef sdr, ipc_msg_hdr *hdr, char *data) { DNSServiceFlags flags; uint32_t interfaceIndex, ttl; DNSServiceErrorType errorCode; char name[kDNSServiceMaxDomainName]; uint16_t rrtype, rrclass, rdlen; char *rdata; int str_error = 0; (void)hdr;//Unused flags = get_flags(&data); interfaceIndex = get_long(&data); errorCode = get_error_code(&data); if (get_string(&data, name, kDNSServiceMaxDomainName) < 0) str_error = 1; rrtype = get_short(&data); rrclass = get_short(&data); rdlen = get_short(&data); rdata = get_rdata(&data, rdlen); ttl = get_long(&data); if (!errorCode && str_error) errorCode = kDNSServiceErr_Unknown; ((DNSServiceQueryRecordReply)sdr->app_callback)(sdr, flags, interfaceIndex, errorCode, name, rrtype, rrclass, rdlen, rdata, ttl, sdr->app_context); return; }
static char * match_string (ASDatabase * db, DBMatchType type, unsigned int index, Bool dup_strings) { char *res = NULL; register ASDatabaseRecord *db_rec; register int i = 0; for( i = 0 ; db->match_list[i] >= 0 ; ++i ) { db_rec = get_asdb_record (db, db->match_list[i]); if (get_flags (db_rec->set_data_flags, type)) { switch (type) { case MATCH_Icon: res = db_rec->icon_file; break; case MATCH_Frame: res = db_rec->frame_name; break; case MATCH_Windowbox: res = db_rec->windowbox_name; break; case MATCH_MyStyle: res = db_rec->window_styles[(index < BACK_STYLES) ? index : 0]; break; default: break; } } } if (res != NULL && dup_strings) res = mystrdup (res); return res; }
void redecorateVolumes() { ASVolumeCanvasPlacement placement; int width, height; placement.vertical = get_flags(Config->flags, ASMOUNT_Vertical); placement.tileWidth = DEFAULT_TILE_WIDTH; placement.tileHeight = DEFAULT_TILE_HEIGHT; placement.currPos = 0; iterate_asbidirlist (AppState.volumes, redecorateVolume, &placement, NULL, False); XMapSubwindows (dpy, AppState.mainCanvas->w); width = placement.tileWidth; height = placement.tileHeight; if (placement.vertical) height = placement.currPos; else width = placement.currPos; setHints (width, height); /* setHints must happen first */ show_progress ( "resizing main canvas to %dx%d", width, height); resize_canvas (AppState.mainCanvas, width, height); ASSync (False); }
static dbus_bool_t add_watch(DBusWatch *w, void *data) { if (!dbus_watch_get_enabled(w)) return TRUE; ASDBusFd *fd = safecalloc (1, sizeof(ASDBusFd)); fd->fd = dbus_watch_get_unix_fd(w); unsigned int flags = dbus_watch_get_flags(w); if (get_flags(flags, DBUS_WATCH_READABLE)) fd->readable = True; /*short cond = EV_PERSIST; if (flags & DBUS_WATCH_READABLE) cond |= EV_READ; if (flags & DBUS_WATCH_WRITABLE) cond |= EV_WRITE; */ // TODO add to the list of FDs dbus_watch_set_data(w, fd, NULL); if (ASDBus.watchFds == NULL) ASDBus.watchFds = create_asvector (sizeof(ASDBusFd*)); append_vector(ASDBus.watchFds, &fd, 1); show_debug(__FILE__,__FUNCTION__,__LINE__,"added dbus watch fd=%d watch=%p readable =%d\n", fd->fd, w, fd->readable); return TRUE; }
/* Find the first file or directory in a directory listing. Supports absolute and relative. If the path is invalid, returns a negative DFS_errno. If a file or directory is found, returns the flags of the entry and copies the name into buf. */ int dfs_dir_findfirst(const char * const path, char *buf) { directory_entry_t *dirent; int ret = recurse_path(path, WALK_OPEN, &dirent, TYPE_DIR); /* Ensure that if this fails, they can't call findnext */ next_entry = 0; if(ret != DFS_ESUCCESS) { /* File not found, or other error */ return ret; } /* We now have the pointer to the first entry */ directory_entry_t t_node; grab_sector(dirent, &t_node); if(buf) { strcpy(buf, t_node.path); } /* Set up directory to point to next entry */ next_entry = get_next_entry(&t_node); return get_flags(&t_node); }
static int match_int (ASDatabase * db, DBMatchType type) { register ASDatabaseRecord *db_rec; register int i = 0; int value = 0 ; for( i = 0 ; db->match_list[i] >= 0 ; ++i ) { db_rec = get_asdb_record (db, db->match_list[i]); if (get_flags (db_rec->set_data_flags, type)) { switch (type) { case MATCH_Desk: value = db_rec->desk; break; case MATCH_layer: value = db_rec->layer; break; case MATCH_ViewportX: LOCAL_DEBUG_OUT( "viewport_x = %d", db_rec->viewport_x ); value = db_rec->viewport_x; break; case MATCH_ViewportY: value = db_rec->viewport_y; break; case MATCH_border_width: value = db_rec->border_width; break; case MATCH_resize_width: value = db_rec->resize_width; break; case MATCH_gravity: value = db_rec->gravity; break; case MATCH_window_opacity: value = db_rec->window_opacity; break; default: break; } } } return value; }
void asgtk_image_view_set_resize (ASGtkImageView * iv, unsigned long resize_flags, unsigned long set_mask) { unsigned long new_flags; g_return_if_fail (ASGTK_IS_IMAGE_VIEW (iv)); new_flags = (iv->flags & (~set_mask)) | (resize_flags & set_mask); if (new_flags == iv->flags) return; iv->flags = new_flags; if (get_flags (new_flags, ASGTK_IMAGE_VIEW_SCALE_TO_VIEW | ASGTK_IMAGE_VIEW_TILE_TO_VIEW)) { gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (iv->scrolled_window), GTK_POLICY_NEVER, GTK_POLICY_NEVER); } else { gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (iv->scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); } if (iv->image_entry) { display_image_view (iv); } }
int main(int ac, char *av[]) { char *flags; char *command; char *op_list; t_pile *pile_tab[2]; command = av[0]; if (ac < 2) display_usage(command); flags = get_flags(&ac, &av); if (ac < 1) display_usage(command); pile_tab[0] = save_param_to_pile(ac, av, command); pile_tab[1] = NULL; if (has_duplicate(pile_tab[0])) print_error(); if (ft_strchr(flags, 'v')) print_piles(pile_tab); op_list = solve(pile_tab, flags); if (op_list == NULL) ft_putendl("Already sorted"); else ft_putendl(op_list); return (0); }
int memmgr_info(resmgr_context_t *ctp, PROCESS *prp, mem_info_t *msg) { OBJECT *obp; int r; unsigned flags; paddr_t size; if(msg->i.fd != NOFD) { r = memmgr_find_object(ctp, prp, msg->i.fd, NULL, &obp); switch(r) { case EOK: if(obp != NULL) break; // fall through case ENOTSUP: r = ENODEV; // fall through default: return r; } switch(obp->hdr.type) { case OBJECT_MEM_TYPED: flags = get_flags(ctp, msg->i.fd); if(flags & IMAP_TYMEM_ALLOCATE) { tymem_free_info(obp, &size, NULL); } else if(flags & IMAP_TYMEM_ALLOCATE_CONTIG) { tymem_free_info(obp, NULL, &size); } else { size = 0; } memset(&msg->o, 0x00, sizeof msg->o); msg->o.info.posix_tmi_length = size; memobj_unlock(obp); return _RESMGR_PTR(ctp, &msg->o, sizeof msg->o); default: break; } memobj_unlock(obp); return ENODEV; } if(!(msg->i.flags & MAP_ANON)) { switch(msg->i.flags & MAP_TYPE) { case MAP_PRIVATEANON: case MAP_PRIVATE: break; case MAP_SHARED: return EINVAL; default: break; } } if(msg->i.flags & MAP_PHYS) { /* @@@ Don't support returning largest chuck yet */ return EINVAL; } memset(&msg->o, 0x00, sizeof msg->o); msg->o.info.posix_tmi_length = mem_free_size; return _RESMGR_PTR(ctp, &msg->o, sizeof msg->o); }
void ItemListPlugin::_get_property_list( List<PropertyInfo> *p_list) const { for(int i=0;i<get_item_count();i++) { String base=itos(i)+"/"; p_list->push_back( PropertyInfo(Variant::STRING,base+"text") ); p_list->push_back( PropertyInfo(Variant::OBJECT,base+"icon",PROPERTY_HINT_RESOURCE_TYPE,"Texture") ); int flags = get_flags(); if (flags&FLAG_CHECKABLE) { p_list->push_back( PropertyInfo(Variant::BOOL,base+"checkable") ); p_list->push_back( PropertyInfo(Variant::BOOL,base+"checked") ); } if (flags&FLAG_ID) p_list->push_back( PropertyInfo(Variant::INT,base+"id",PROPERTY_HINT_RANGE,"-1,4096") ); if (flags&FLAG_ENABLE) p_list->push_back( PropertyInfo(Variant::BOOL,base+"enabled") ); if (flags&FLAG_SEPARATOR) p_list->push_back( PropertyInfo(Variant::BOOL,base+"separator") ); } }
void tomorrow() { dom = 1; leap = nyear = nmonth = false; get_flags(); update(); }
static MuError move_msgid (MuStore *store, unsigned docid, const char* flagstr, GError **err) { MuMsg *msg; MuError rv; MuFlags flags; rv = MU_ERROR; msg = mu_store_get_msg (store, docid, err); if (!msg) goto leave; flags = flagstr ? get_flags (mu_msg_get_path(msg), flagstr) : mu_msg_get_flags (msg); if (flags == MU_FLAG_INVALID) { mu_util_g_set_error (err, MU_ERROR_IN_PARAMETERS, "invalid flags"); goto leave; } rv = do_move (store, docid, msg, NULL, flags, err); leave: if (msg) mu_msg_unref (msg); if (rv != MU_OK) print_and_clear_g_error (err); return rv; }
/* fixed size handling : */ static unsigned int get_layout_fixed_width( ASLayout *layout, unsigned int start_col, unsigned int end_col ) { register int i ; unsigned int width = 0 ; for( i = start_col ; i < end_col ; ++i ) { register ASLayoutElem *pelem = layout->cols[i]; register int fw = 0 ; while ( pelem ) { if( get_flags( pelem->flags, LF_FixedWidth ) ) { LOCAL_DEBUG_OUT( " layout %lX found item with fixed width %d at %dx%d", (unsigned long)layout, pelem->fixed_width, pelem->row, pelem->column ); if( pelem->fixed_width+pelem->bw > fw ) fw = pelem->fixed_width+pelem->bw ; } pelem = pelem->below ; } if( fw > 0 ) width += fw+layout->v_spacing ; } if( width > 0 ) width -= (int)layout->v_spacing ; return width ; }
static unsigned int get_layout_fixed_height( ASLayout *layout, unsigned int start_row, unsigned int end_row ) { register int i ; unsigned int height = 0 ; for( i = start_row ; i < end_row ; i++ ) { register ASLayoutElem *pelem = layout->rows[i]; register int fh = 0 ; while ( pelem ) { if( get_flags( pelem->flags, LF_FixedHeight ) ) { LOCAL_DEBUG_OUT( " layout %lX found item with fixed height %d at %dx%d", (unsigned long)layout, pelem->fixed_height, pelem->row, pelem->column ); if( pelem->fixed_height+pelem->bw > fh ) fh = pelem->fixed_height+pelem->bw ; } pelem = pelem->right ; } if( fh > 0 ) height += fh+layout->h_spacing ; } if( height >0 ) height -= layout->h_spacing ; return height; }
static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid) { DispatchEx *This = DISPATCHEX_THIS(iface); dispex_prop_t *iter; HRESULT hres; TRACE("(%p)->(%x %x %p)\n", This, grfdex, id, pid); if(id == DISPID_STARTENUM) { hres = fill_protrefs(This); if(FAILED(hres)) return hres; } iter = get_prop(This, id+1); if(!iter) { *pid = DISPID_STARTENUM; return S_FALSE; } while(iter < This->props + This->prop_cnt) { if(iter->name && (get_flags(This, iter) & PROPF_ENUM)) { *pid = prop_to_id(This, iter); return S_OK; } iter++; } *pid = DISPID_STARTENUM; return S_FALSE; }
void ppp_recv_config (int unit,int mru,u_int32_t asyncmap,int pcomp,int accomp) { u_int x; MAINDEBUG ((LOG_DEBUG, "recv_config: mru = %d\n", mru)); /* * If we were called because the link has gone down then there is nothing * which may be done. Just return without incident. */ if (!still_ppp()) { return; } /* * Set the receiver parameters */ if (ioctl(fd, PPPIOCSMRU, (caddr_t) &mru) < 0) { syslog(LOG_ERR, "ioctl(PPPIOCSMRU): %m"); } MAINDEBUG ((LOG_DEBUG, "recv_config: asyncmap = %lx\n", asyncmap)); if (ioctl(fd, PPPIOCSRASYNCMAP, (caddr_t) &asyncmap) < 0) { syslog(LOG_ERR, "ioctl(PPPIOCSRASYNCMAP): %m"); quit(); } x = get_flags(); x = accomp ? x & ~SC_REJ_COMP_AC : x | SC_REJ_COMP_AC; set_flags (x); }
void do_time( char_data* ch, char* argument ) { player_data* pc; int flags; if( !get_flags( ch, argument, &flags, "z", "Time" ) ) return; if( flags == 0 ) { send( ch, "Minute: %d Hour: %d Day: %d Month: %s\r\n", weather.minute, weather.hour, weather.day, month_name[weather.month] ); send( ch, "[This is temporary]\r\n" ); return; } if( ( pc = player( ch ) ) == NULL ) return; class type_field zonetype = { "timezone", 24, &timezones[0], &timezones[1], &pc->timezone }; zonetype.set( ch, empty_string, argument ); return; }
static void handle_resolve_response(DNSServiceRef sdr, ipc_msg_hdr *hdr, char *data) { DNSServiceFlags flags; char fullname[kDNSServiceMaxDomainName]; char target[kDNSServiceMaxDomainName]; uint16_t txtlen; union { uint16_t s; u_char b[2]; } port; uint32_t ifi; DNSServiceErrorType err; unsigned char *txtrecord; int str_error = 0; (void)hdr; //unused flags = get_flags(&data); ifi = get_long(&data); err = get_error_code(&data); if (get_string(&data, fullname, kDNSServiceMaxDomainName) < 0) str_error = 1; if (get_string(&data, target, kDNSServiceMaxDomainName) < 0) str_error = 1; port.b[0] = *data++; port.b[1] = *data++; txtlen = get_short(&data); txtrecord = (unsigned char *)get_rdata(&data, txtlen); if (!err && str_error) err = kDNSServiceErr_Unknown; ((DNSServiceResolveReply)sdr->app_callback)(sdr, flags, ifi, err, fullname, target, port.s, txtlen, txtrecord, sdr->app_context); }
void write_standard_options_source( FILE *f ) { int i = 0; fprintf( f, "<anchor id=\"standard_options_list\"/>\n" "<refsect1>\n" "<title>STANDARD OPTIONS</title>\n" "<para>The following is the list of command line options supported by" " all AfterStep modules and applications.</para>" "<variablelist>\n" ); while( as_standard_cmdl_options[i].long_opt ) { fprintf( f, " <varlistentry>\n" ); if( as_standard_cmdl_options[i].short_opt ) fprintf( f, " <term>-%s | --%s", as_standard_cmdl_options[i].short_opt, as_standard_cmdl_options[i].long_opt ); else fprintf( f, " <term> --%s", as_standard_cmdl_options[i].long_opt ); if( get_flags( as_standard_cmdl_options[i].flags, CMO_HasArgs ) ) fprintf( f, " <replaceable>val</replaceable>" ); fprintf( f, "</term>\n" " <listitem>\n" ); fprintf( f, " <para>%s. ", as_standard_cmdl_options[i].descr1 ); if( as_standard_cmdl_options[i].descr2 ) fprintf( f, " %s.", as_standard_cmdl_options[i].descr2 ); fprintf( f, " </para>\n" " </listitem>\n" " </varlistentry>\n" ); ++i ; } fprintf( f, "</variablelist>\n" "</refsect1>\n" ); }
void do_dedit( char_data* ch, char* argument ) { wizard_data* imm = (wizard_data*) ch; exit_data* exit; int flags; int dir; if( !get_flags( ch, argument, &flags, "1", "dedit" ) ) return; if( matches( argument, "delete" ) ) { if( ( exit = (exit_data*) one_thing( ch, argument, "dedit delete", (thing_array*) &ch->in_room->exits ) ) != NULL ) delete_exit( imm, exit, is_set( &flags, 0 ) ); return; } if( matches( argument, "new" ) ) { if( ( dir = direction_arg( argument ) ) != -1 ) create_exit( imm, dir, argument, is_set( &flags, 0 ) ); return; } if( ( exit = (exit_data*) one_thing( ch, argument, "dedit", (thing_array*) &ch->in_room->exits ) ) == NULL ) return; imm->exit_edit = exit; send( ch, "Dflag and dset now act on the exit %s.\n\r", dir_table[ exit->direction ].where ); }
static void print_flags(t_dumper *dumper) { size_t flags; flags = get_flags(dumper); printf("flags 0x%08lx:\n", flags); printf("\n"); }
/** * Create a thread and invoke the entry passing entry_arg. If * the entry routine returns the thread is considered dead * and will not be rescheduled and its stack is reclamined. * Any other global memory associated with the thread still * exists and is left untouched. * * @param stack_size is 0 a "default" stack size will be used. * @param entry is the routine to run * @param entry_arg is the argument passed to entry. * * @return a ac_thread_rslt contains a status and an opaque ac_thread_hdl_t. * if rslt.status == 0 the thread was created and ac_thread_hdl_t * is valid. */ ac_thread_rslt_t ac_thread_create(ac_size_t stack_size, void*(*entry)(void*), void* entry_arg) { ac_thread_rslt_t rslt; rslt.hdl = (ac_thread_hdl_t)thread_create(stack_size, get_flags(), entry, entry_arg); rslt.status = (rslt.hdl != 0) ? 0 : 1; return rslt; }
ASFlagType DigestWinListAlign( WinListConfig *Config, ASFlagType align ) { LOCAL_DEBUG_OUT( "Align = 0x%8.8lx, IconAlign = 0x%8.8lx, Location = %d", align, Config->IconAlign, Config->IconLocation ); if( !get_flags( Config->set_flags, WINLIST_IconLocation ) ) { if( get_flags(align, PAD_H_MASK) == ALIGN_RIGHT ) Config->IconLocation = 6 ; else if( get_flags(align, PAD_H_MASK) == ALIGN_LEFT ) Config->IconLocation = 4 ; } if( !get_flags( Config->set_flags, WINLIST_IconAlign ) ) { if( get_flags(align, PAD_H_MASK) == PAD_H_MASK ) { if( Config->IconLocation == 0 || Config->IconLocation == 4 ) { Config->IconAlign = ALIGN_RIGHT ; align = (align&(~PAD_H_MASK))|ALIGN_LEFT ; }else if( Config->IconLocation == 6 ) { Config->IconAlign = ALIGN_LEFT ; align = (align&(~PAD_H_MASK))|ALIGN_RIGHT ; } }else if( get_flags(align, PAD_H_MASK) == ALIGN_LEFT && (Config->IconLocation == 0 || Config->IconLocation == 4) ) Config->IconAlign = ALIGN_VCENTER ; else if( get_flags(align, PAD_H_MASK) == ALIGN_RIGHT && Config->IconLocation == 6 ) Config->IconAlign = ALIGN_VCENTER ; } LOCAL_DEBUG_OUT( "Align = 0x%8.8lx, IconAlign = 0x%8.8lx, Location = %d", align, Config->IconAlign, Config->IconLocation ); return align ; }
static void save_external_state (struct terminal_state_recording * s) { (s -> recorded_p) = (scheme_in_foreground && (isatty (s -> fd)) && ((get_terminal_state ((s -> fd), (& (s -> state)))) >= 0) && ((get_flags ((s -> fd), (& (s -> flags)))) >= 0)); }
void ccp_flags_set (int unit, int isopen, int isup) { if (still_ppp()) { int x = get_flags(ppp_dev_fd); x = isopen? x | SC_CCP_OPEN : x &~ SC_CCP_OPEN; x = isup? x | SC_CCP_UP : x &~ SC_CCP_UP; set_flags (ppp_dev_fd, x); } }
void grid_coords2real (ASGrid *g, ASGridLine *l, int *band, int *start, int *end) { *band = l->band; *start = l->start; *end = l->end; if (!get_flags(l->flags, ASGL_Absolute)) { if (get_flags(l->flags, ASGL_Vertical)) { *band -= g->curr_vx; *start -= g->curr_vy; *end -= g->curr_vy; } else { *band -= g->curr_vy; *start -= g->curr_vx; *end -= g->curr_vx; } LOCAL_DEBUG_OUT ("virtual: %d, %d-%d, real %d, %d-%d", l->band, l->start, l->end, *band, *start, *end); } }
ASFlagType set_layout_context_fixed_size( ASLayout *layout, int context, unsigned int width, unsigned int height, unsigned short flags ) { if( layout && layout->count > 0 ) { ASLayoutElem **pelem = get_layout_context_ptr( layout, context ); LOCAL_DEBUG_OUT( "setting fixedsize of context %d(%p) to %dx%d", context, pelem?*pelem:NULL, width, height ); if( pelem != NULL ) { register ASLayoutElem *elem = *pelem ; if( get_flags( flags, LF_FixedWidth ) ) elem->fixed_width = width ; if( get_flags( flags, LF_FixedHeight ) ) elem->fixed_height = height ; return elem->flags&LF_FixedSize&flags; } } return 0; }
Bool convert_xml_file( const char *syntax_dir, const char *file, ASXMLInterpreterState *state ) { char *source_file ; char *doc_str ; Bool empty_file = False ; source_file = make_file_name( syntax_dir, file ); doc_str = load_file(source_file); LOCAL_DEBUG_OUT( "file %s loaded", source_file ); /*LOCAL_DEBUG_OUT( "file %s loaded into {%s}", source_file, doc_str ); */ if( doc_str != NULL ) { xml_elem_t* doc; xml_elem_t* ptr; if( file[0] == '_' && !get_flags( state->flags, ASXMLI_ProcessingOptions )) state->pre_options_size += strlen(doc_str) ; else set_flags( state->flags, ASXMLI_ProcessingOptions ); doc = xml_parse_doc(doc_str, DocBookVocabulary); LOCAL_DEBUG_OUT( "file %s parsed, child is %p", source_file, doc->child ); if( doc->child ) { LOCAL_DEBUG_OUT( "child tag = \"%s\", childs child = %p", doc->child->tag, doc->child->child); empty_file = ( doc->child->tag_id == DOCBOOK_section_ID && doc->child->child == NULL ); if( doc->child->child ) { empty_file = ( doc->child->child->tag_id == XML_CDATA_ID && doc->child->child->next == NULL ); LOCAL_DEBUG_OUT( "childs child tag = \"%s\", parm = \"%s\"", doc->child->child->tag, doc->child->child->parm); } } LOCAL_DEBUG_OUT( "file %s %s", source_file, empty_file?"empty":"not empty" ); if( !empty_file ) { for (ptr = doc->child ; ptr ; ptr = ptr->next) { LOCAL_DEBUG_OUT( "converting child <%s>", ptr->tag ); convert_xml_tag( ptr, NULL, state ); LOCAL_DEBUG_OUT( "done converting child <%s>", ptr->tag ); } } /* Delete the xml. */ LOCAL_DEBUG_OUT( "deleting xml %p", doc ); xml_elem_delete(NULL, doc); LOCAL_DEBUG_OUT( "freeing doc_str %p", doc_str ); free( doc_str ); } LOCAL_DEBUG_OUT( "done with %s", source_file ); free( source_file ); fprintf( state->dest_fp, "\n" ); return !empty_file; }
inline osmium::util::MemoryMapping::MemoryMapping(size_t size, mapping_mode mode, int fd, off_t offset) : m_size(check_size(size)), m_offset(offset), m_fd(resize_fd(fd)), m_mapping_mode(mode), m_addr(::mmap(nullptr, m_size, get_protection(), get_flags(), m_fd, m_offset)) { assert(!(fd == -1 && mode == mapping_mode::readonly)); if (!is_valid()) { throw std::system_error(errno, std::system_category(), "mmap failed"); } }
void User::set_flags(const ustring& name, DWORD in, bool value, const ustring& dom) { const DWORD level = 1008; DWORD dwFlags = get_flags(name, dom); if (value) bits::Flags::set(dwFlags, in); else bits::Flags::unset(dwFlags, in); USER_INFO_1008 info; info.usri1008_flags = dwFlags; set_info(name, dom, level, &info); }