=== yfk
==================================================================
--- yfk	(revision 10089)
+++ yfk	(local)
@@ -65,8 +65,8 @@
 my $dbname='';
 my $dbserver='';
 my $directory='/tmp';
+my $initialqso='';
 
-
 sub readconfig {
 
 unless (-e "$ENV{HOME}/.yfklog/config") { return 0; }
@@ -105,7 +105,12 @@
 # CHeck if a config file exists. Otherwise make one.
 if (&readconfig) {
 	$firstrun = 0;
-	$status = 2;
+	if ($#ARGV == -1) {
+		$status = 2;
+	} else {
+		$status = 1;
+		$initialqso = shift @ARGV;
+	}
 }
 else {
 	printw "\n\nCouldn't find ~/.yfklog. Seems to be your first run.\n";
@@ -283,8 +288,19 @@
 # to $wqsos (3) (previous QSOs). $aw is the active window. 
 ##############################################################################
 
-&qsotofields($qso,$wi,1);				# fills 14 input field with QSO array
+&qsotofields($qso,$wi,1);			# fills 14 input field with QSO array
 
+if ($initialqso) {
+	# skip the first pass and fill it in ourselves
+	$qso[0] = uc($initialqso);
+	addstr($wi[1],0,0,uc($initialqso));		# write into window
+	$aw = 1;
+	$af = 1;
+#	$workcall = $initialqso;
+	$initialqso = '';
+	goto directentry;
+}
+
 # Now we loop infinitely until we get out of logging mode ($status==1)	
 while (1) {
 
@@ -311,6 +327,7 @@
 if ($af == 1) {							# READ CALLSIGN FIELD
 	$aw = &readw($wi,0,0,$qso,\$wlog,	# Read callsign. See details in sub.
 			\$editnr);
+  directentry:
 	if ($aw == 1) {						# All OK, next field
 		$af = &jumpfield(1, 'n');
 	}
