Changeset 1380 in svn for trunk/processor/main.m4


Ignore:
Timestamp:
2013-09-22T14:45:46Z (2 years ago)
Author:
Xuefer
Message:

make use of SRC/DST widely

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/main.m4

    r1313 r1380  
    8888dnl }}}
    8989dnl {{{ PROC_CLASS_ENTRY_P(1:elm)
    90 define(`PROC_CLASS_ENTRY_P', `PROC_CLASS_ENTRY_P_EX(`dst->$1', `SRC(`$1')', `$1')`'DONE(`$1')')
     90define(`PROC_CLASS_ENTRY_P', `PROC_CLASS_ENTRY_P_EX(`DST(`$1')', `SRC(`$1')', `$1')`'DONE(`$1')')
    9191dnl PROC_CLASS_ENTRY_P_EX(1:dst, 2:src, 3:elm-name)
    9292define(`PROC_CLASS_ENTRY_P_EX', `
     
    124124dnl }}}
    125125dnl {{{ FIXPOINTER
    126 define(`FIXPOINTER', `FIXPOINTER_EX(`$1', `dst->$2')')
     126define(`FIXPOINTER', `FIXPOINTER_EX(`$1', `DST(`$2')')')
    127127define(`FIXPOINTER_EX', `IFSTORE(`
    128128    $2 = ($1 *) processor->shm->handlers->to_readonly(processor->shm, (char *)$2);
    129129')')
    130 define(`UNFIXPOINTER', `UNFIXPOINTER_EX(`$1', `dst->$2')')
     130define(`UNFIXPOINTER', `UNFIXPOINTER_EX(`$1', `DST(`$2')')')
    131131define(`UNFIXPOINTER_EX', `IFSTORE(`
    132132    $2 = ($1 *) processor->shm->handlers->to_readwrite(processor->shm, (char *)$2);
     
    134134dnl }}}
    135135dnl {{{ COPY
    136 define(`COPY', `IFNOTMEMCPY(`IFCOPY(`dst->$1 = SRC(`$1');')')DONE(`$1')')
     136define(`COPY', `IFNOTMEMCPY(`IFCOPY(`DST(`$1') = SRC(`$1');')')DONE(`$1')')
    137137dnl }}}
    138138dnl {{{ COPY_N_EX
    139139define(`COPY_N_EX', `
    140     ALLOC(`dst->$3', `$2', `SRC(`$1')')
     140    ALLOC(`DST(`$3')', `$2', `SRC(`$1')')
    141141    IFCOPY(`
    142         memcpy(dst->$3, SRC(`$3'), sizeof(dst->$3[0]) * SRC(`$1'));
     142        memcpy(DST(`$3'), SRC(`$3'), sizeof(DST(`$3[0]')) * SRC(`$1'));
    143143        ')
    144144')
     
    151151dnl }}}
    152152dnl {{{ COPYARRAY_EX
    153 define(`COPYARRAY_EX', `IFNOTMEMCPY(`IFCOPY(`memcpy(dst->$1, SRC(`$1'), sizeof(dst->$1));')')')
     153define(`COPYARRAY_EX', `IFNOTMEMCPY(`IFCOPY(`memcpy(DST(`$1'), SRC(`$1'), sizeof(DST(`$1')));')')')
    154154dnl }}}
    155155dnl {{{ COPYARRAY
     
    158158dnl {{{ SETNULL_EX
    159159define(`SETNULL_EX', `IFCOPY(`$1 = NULL;')')
    160 define(`SETNULL', `SETNULL_EX(`dst->$1')DONE(`$1')')
     160define(`SETNULL', `SETNULL_EX(`DST(`$1')')DONE(`$1')')
    161161dnl }}}
    162162dnl {{{ SETZERO_EX
    163163define(`SETZERO_EX', `IFCOPY(`$1 = 0;')')
    164 define(`SETZERO', `SETZERO_EX(`dst->$1')DONE(`$1')')
     164define(`SETZERO', `SETZERO_EX(`DST(`$1')')DONE(`$1')')
    165165dnl }}}
    166166dnl {{{ COPYNULL_EX(1:dst, 2:elm-name)
     
    173173dnl {{{ COPYNULL(1:elm)
    174174define(`COPYNULL', `
    175     COPYNULL_EX(`dst->$1', `$1')DONE(`$1')
     175    COPYNULL_EX(`DST(`$1')', `$1')DONE(`$1')
    176176')
    177177dnl }}}
     
    185185dnl {{{ COPYZERO(1:elm)
    186186define(`COPYZERO', `
    187     COPYZERO_EX(`dst->$1', `$1')DONE(`$1')
     187    COPYZERO_EX(`DST(`$1')', `$1')DONE(`$1')
    188188')
    189189dnl }}}
Note: See TracChangeset for help on using the changeset viewer.