ref: 98f900cdf5a1866c426cd0481bb557422b3ac6ad
parent: 6cb9961bb0b8fc745dc98b3ef5f7f72385b8adfd
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Sun Nov 22 18:32:29 EST 2020
command line: evaluate @NUMBER arguments as ref objects
--- a/main.c
+++ b/main.c
@@ -18,10 +18,10 @@
void
threadmain(int argc, char **argv)
{
- Pdf *pdf;
+ Object *v, o;
Biobuf *b;
- Object *v;
Stream *s;
+ Pdf *pdf;
int i, n;
quotefmtinstall();
@@ -54,6 +54,13 @@
fprint(2, "%d %d\n", v->stream.off, v->stream.len);
v = nil;
break;
+ }else if(argv[i][0] == '@' && isdigit(argv[i][1])){
+ o.ref = 1;
+ o.pdf = pdf;
+ o.type = Oindir;
+ o.indir.id = atoi(argv[i]+1);
+ v = &o;
+ pdfeval(&v);
}else{
v = dictget(v, argv[i]);
}