summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/memory/memory.sty
blob: 19c1d68c83fb4978c84b2bbde33b9a11c3c32db2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
%%
%% This is file `memory.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% memory.dtx  (with options: `memory')
%% 
%% This is a generated file.
%% 
%% Copyright (C) 2013 by Song Zhiwei <songzw@gmail.com>
%% 
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.3c of this license
%% or (at your option) any later version. The latest version of this
%% license is in:
%% 
%%    http://www.latex-project.org/lppl.txt 32
%% 
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2006/05/20 or later.
%% 
\NeedsTeXFormat{LaTeX2e}[2003/12/01]
\ProvidesPackage{memory}
  [2013/05/13 v1.2 containers for data of object and array in LaTeX]
\def\set@memory#1#2=#3{\if#1*\expandafter\gdef\csname#2\endcsname{#3}%
                         \else\expandafter\def\csname#2\endcsname{#3}\fi}
\def\eset@memory#1#2=#3{\if#1*\expandafter\xdef\csname#2\endcsname{#3}%
                         \else\expandafter\edef\csname#2\endcsname{#3}\fi}
\def\etest@memory#1#2:{\@ifnextchar={\eset@memory{#1}{#2}}
                                    {\csname #2\endcsname:}}
\def\data@memory#1#2{\@ifnextchar={\set@memory{#1}{@#2@memory}}
                                  {\@ifnextchar:{\etest@memory{#1}{@#2@memory}}
                                                {\csname @#2@memory\endcsname}}}
\def\array@memory#1#2[#3]{\data@memory{#1}{#2@#3}}
\def\newdata@memory#1#2{\@ifundefined{#2}
  {\if#1*\expandafter\gdef\csname#2\endcsname{\@ifnextchar[
                          {\array@memory{#1}{#2}}{\data@memory{#1}{#2}}}%
   \else \expandafter\def\csname#2\endcsname{\@ifnextchar[
                          {\array@memory{#1}{#2}}{\data@memory{#1}{#2}}}\fi}
  {\PackageWarningNoLine{memory}{`#2' already defined.
                                 Macro `newdata' ignored!}}}
\def\newdata{\@ifnextchar*{\newdata@memory}{\newdata@memory{}}}
\endinput
%%
%% End of file `memory.sty'.