#pragma once

#define mds_malloc	acad_malloc
#define mds_free	acad_free
#define mds__msize	acad__msize
#define mds_realloc acad_realloc
#define mds_calloc	acad_calloc
#define mds_strdup	acad__strdup


#define	mds_getappname	mcedGetAppName
#define	mds_update	mcedUpdate
#define	mds_command	mcedCommand
#define	mds_cmd	mcedCmd
#define	mds_regfunc	mcedRegFunc
#define	mds_usrbrk	mcedUsrBrk
#define	mds_defun	mcedDefun
#define	mds_setfunhelp	mcedSetFunHelp
#define	mds_undef	mcedUndef
#define	mds_getfuncode	mcedGetFunCode
#define	mds_getargs	mcedGetArgs
#define	mds_retlist	mcedRetList
#define	mds_retval	mcedRetVal
#define	mds_retpoint	mcedRetPoint
#define	mds_retstr	mcedRetStr
#define	mds_retname	mcedRetName
#define	mds_retint	mcedRetInt
#define	mds_retreal	mcedRetReal
#define	mds_rett	mcedRetT
#define	mds_retnil	mcedRetNil
#define	mds_retvoid	mcedRetVoid
#define	mds_entsel	mcedEntSel
#define	mds_nentsel	mcedNEntSel
#define	mds_nentselp	mcedNEntSelP
#define	mds_ssget	mcedSSGet

#define	mds_ssgetfirst	mcedSSGetFirst
#define	mds_sssetfirst	mcedSSSetFirst

#define	mds_ssfree	mcedSSFree
#define	mds_sslength	mcedSSLength
#define	mds_ssadd	mcedSSAdd
#define	mds_ssdel	mcedSSDel
#define	mds_ssmemb	mcedSSMemb
#define	mds_ssname	mcedSSName
#define	mds_ssnamex	mcedSSNameX
#define	mds_ssGetKwordCallbackPtr	mcedSSGetKwordCallbackPtr
#define	mds_ssSetKwordCallbackPtr	mcedSSSetKwordCallbackPtr
#define	mds_ssGetOtherCallbackPtr	mcedSSGetOtherCallbackPtr
#define	mds_ssSetOtherCallbackPtr	mcedSSSetOtherCallbackPtr
#define	mds_setvar	mcedSetVar
#define	mds_initget	mcedInitGet
#define	mds_getsym	mcedGetSym
#define	mds_putsym	mcedPutSym
#define	mds_help	mcedHelp
#define	mds_fnsplit	mcedFNSplit
#define	mds_trans	mcedTrans
#define	mds_arxloaded	mcedArxLoaded
#define	mds_arxload	mcedArxLoad
#define	mds_arxunload	mcedArxUnload
#define	mds_invoke	mcedInvoke
#define	mds_getvar	mcedGetVar
#define	mds_findfile	mcedFindFile
#define	mds_agetenv	mcedGetEnv
#define	mds_asetenv	mcedSetEnv
#define	mds_getenv	mcedGetEnv
#define	mds_setenv	mcedSetEnv
#define	mds_agetcfg	mcedGetCfg
#define	mds_asetcfg	mcedSetCfg
#define	mds_getcfg	mcedGetCfg
#define	mds_setcfg	mcedSetCfg
#define	mds_getstring	mcedGetString
#define	mds_getstringb	mcedGetStringB
#define	mds_menucmd	mcedMenuCmd
#define	mds_prompt	mcedPrompt
#define	mds_alert	mcedAlert
#define	mds_getangle	mcedGetAngle
#define	mds_getcorner	mcedGetCorner
#define	mds_getdist	mcedGetDist
#define	mds_getorient	mcedGetOrient
#define	mds_getpoint	mcedGetPoint
#define	mds_getint	mcedGetInt
#define	mds_getkword	mcedGetKword
#define	mds_getreal	mcedGetReal
#define	mds_getinput	mcedGetInput
#define	mds_vports	mcedVports
#define	mds_textscr	mcedTextScr
#define	mds_graphscr	mcedGraphScr
#define	mds_textpage	mcedTextPage
#define	mds_redraw	mcedRedraw
#define	mds_osnap	mcedOsnap
#define	mds_grread	mcedGrRead
#define	mds_grtext	mcedGrText
#define	mds_grdraw	mcedGrDraw
#define	mds_grvecs	mcedGrVecs
#define	mds_xformss	mcedXformSS
#define	mds_draggen	mcedDragGen
#define	mds_setview	mcedSetView
#define	mds_getfiled	mcedGetFileD
#define	mds_textbox	mcedTextBox
#define	mds_tablet	mcedTablet
#define	mds_getcname	mcedGetCName


#define	mds_xdroom	mcdbXdRoom
#define	mds_xdsize	mcdbXdSize

#define mds_name_set(from, to)  (*(to)= *(from), (to)[1]=(from)[1])
#define mds_point_set(from, to) (*(to)= *(from), (to)[1]=(from)[1], (to)[2]=(from)[2])

#define mds_name_clear(name)    name[0] = name[1] = 0
#define mds_name_nil(name)      (name[0] == 0 && name[1] == 0)
#define mds_name_equal(name1, name2)  (name1[0]==name2[0] \
                                       && name1[1]==name2[1])


#define	mds_entdel	mcdbEntDel
#define	mds_entgetx	mcdbEntGetX
#define	mds_entget	mcdbEntGet
#define	mds_entlast	mcdbEntLast
#define	mds_entnext	mcdbEntNext
#define	mds_entupd	mcdbEntUpd
#define	mds_entmod	mcdbEntMod
#define	mds_entmake	mcdbEntMake
#define	mds_entmakex	mcdbEntMakeX
#define	mds_tblnext	mcdbTblNext
#define	mds_tblsearch	mcdbTblSearch
#define	mds_namedobjdict	mcdbNamedObjDict
#define	mds_dictsearch	mcdbDictSearch
#define	mds_dictnext	mcdbDictNext
#define	mds_dictrename	mcdbDictRename
#define	mds_dictremove	mcdbDictRemove
#define	mds_dictadd	mcdbDictAdd
#define	mds_tblobjname	mcdbTblObjName
#define	mds_handent	mcdbHandEnt
#define	mds_inters	mcdbInters
#define	mds_snvalid	mcdbSNValid
#define	mds_xstrsave	mcdbXStrSave
#define	mds_xstrcase	mcdbXStrCase
#define	mds_regapp	mcdbRegApp
#define	mds_fail	mcdbFail
#define	mds_angtos	mcdbAngToS
#define	mds_rtos	mcdbRToS
#define	mds_angtof	mcdbAngToF
#define	mds_distof	mcdbDisToF

#define mds_regappx(appname, xsave12)   mcdbRegApp(appname)


#define	mds_printf	mcutPrintf
#define	mds_cvunit	mcutCvUnit
#define	mds_wcmatch	mcutWcMatch
#define	mds_angle	mcutAngle
#define	mds_distance	mcutDistance
#define	mds_polar	mcutPolar
#define	mds_isalpha	mcutIsAlpha
#define	mds_isupper	mcutIsUpper
#define	mds_islower	mcutIsLower
#define	mds_isdigit	mcutIsDigit
#define	mds_isxdigit	mcutIsXDigit
#define	mds_isspace	mcutIsSpace
#define	mds_ispunct	mcutIsPunct
#define	mds_isalnum	mcutIsAlNum
#define	mds_isprint	mcutIsPrint
#define	mds_isgraph	mcutIsGraph
#define	mds_iscntrl	mcutIsCntrl
#define	mds_toupper	mcutToUpper
#define	mds_tolower	mcutToLower
#define	mds_newrb	mcutNewRb
#define	mds_relrb	mcutRelRb
#define	mds_buildlist	mcutBuildList
