diff options
author | John Ankarström <john@ankarstrom.se> | 2021-07-20 02:29:45 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-07-20 02:29:45 +0200 |
commit | 4f4771fc00c0957699bc1def27e88fd4f0a9cc08 (patch) | |
tree | 4c337cc9a9d159805c378e9ca0da4d83d5ee7c76 | |
parent | 2d93fd3686d7f25a322643c450ad4e43ad3f8f5b (diff) | |
download | fref-4f4771fc00c0957699bc1def27e88fd4f0a9cc08.tar.gz |
Add %la (label)
-rw-r--r-- | example.t | 2 | ||||
-rw-r--r-- | fref.lex | 9 |
2 files changed, 7 insertions, 4 deletions
@@ -1,8 +1,8 @@ .SH References .XP +%la Bogorodickij (1887) %au Богородицкий, В. А. -%al Bogorodickij %da 1887 %ti Курс грамматики русского языка. Часть 1-ая: Фонетика %ci Варшава @@ -20,12 +20,12 @@ int a; /* Number of authors. */ char au[MAX][MAX]; /* author */ char ad[MAX]; /* internet address */ - char al[MAX]; /* TODO: alternative author name */ char bo[MAX]; /* book */ char ci[MAX]; /* city */ char da[MAX]; /* date (year) */ char ed[MAX]; /* editor */ char jo[MAX]; /* journal */ + char la[MAX]; /* label */ char no[MAX]; /* TODO: issue number */ char pp[MAX]; /* pages */ char pu[MAX]; /* publisher */ @@ -63,12 +63,12 @@ field(char *t) AS("au",e.au[e.a++]); AS("ad",e.ad); - AS("al",e.al); AS("bo",e.bo); AS("ci",e.ci); AS("da",e.da); AS("ed",e.ed); AS("jo",e.jo); + AS("la",e.la); AS("no",e.no); AS("pp",e.pp); AS("pu",e.pu); @@ -90,6 +90,9 @@ entry() #define EI(a, b) a ? a : b + /* Print label. */ + pf("% = ", e.la); + /* Print authors. */ for(i = 0; i < e.a-2; i++) printf("%s, ", e.au[i]); @@ -130,12 +133,12 @@ entry() e.a = 0; CL(e.ad); - CL(e.al); CL(e.bo); CL(e.ci); CL(e.da); CL(e.ed); CL(e.jo); + CL(e.la); CL(e.no); CL(e.pp); CL(e.pu); |